Fixed appschema

AppSchema prior to this commit was purely built in javascript, because
of dead locking conditions with objc/ffi bridges its necessary to have
this as a objective-c code that can run in a different thread than main.