Initial iOS integration#30
Merged
Merged
Conversation
Set version to 0.0.1 as 0.0.0 is not valid for pods
Update README.md files with iOS specific info, as well as manual file updates required for camera permissions
Add initialize and whenInitialize stubs
…he JS thread) and getting a pointer to the JSIRuntime (e.g. JSCRuntime when using JSC)
…ylonNative lib (including interop layer) Include BabylonNative (generated) project in Playground workspace Fix things up to pass a jsi::Runtime* to the interop layer
…y (instead of NSRunLoop wrapper)
…ction of Swift files
… switching from Swift to Objective C
…ied as a dependency in the Babylon React Native podspec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the initial work to get iOS integration working. There are a bunch of known things still left, which I've listed off in issue #15, but this change brings basic functionality. The big parts of this change are:
Babylon::Nativeclass that mirrors what we did on the Android side (ties together the set of underlying Babylon Native constructs we want to use in the React Native integration).CMakeLists.txtthat compilesBabylon::Native(and all its dependencies on Babylon Native).CMakeon this newCMakeLists.txtto generate an XCode project.EngineViewManagerthat mostly mirrors what we do on the Android side. One difference here is that there doesn't seem to be a way to get onto the JS thread directly from the native code, so now early in the initialization the JS code makes a synchronous call into the native code so we can capture theCFRunLoopfor the JS thread and later schedule work on this thread.EngineViewto call this new synchronous initialization function.run_loop_scheduler(based onCFRunLoop).JSCRuntime.hthat @syntheticmagus created that gives us access to the underlying JSCJSGlobalContextRef. In a different change I will update the Android side to deal with the JS context similarly to how I did it here for iOS, which will make for a smoother transition away from the customJSCRuntime.hto just using JSI directly.