feat: allow embedding into Swift host projects#231
feat: allow embedding into Swift host projects#231NathanWalker merged 11 commits intoNativeScript:mainfrom
Conversation
NativeScript/NativeScript.mm
Outdated
| Isolate* isolate = runtime_->GetIsolate(); | ||
| { | ||
| v8::Locker l(isolate); | ||
| v8::Isolate::Scope isolate_scope(isolate); | ||
| v8::HandleScope handle_scope(isolate); | ||
|
|
||
| isolate->Dispose(); |
There was a problem hiding this comment.
this likely shouldn't be done here (the runtime destructor is responsible for deleting this isolate)
| } | ||
| } | ||
|
|
||
| return self; |
There was a problem hiding this comment.
shouldn't this still return self?
NativeScript/NativeScript.mm
Outdated
| if (self = [super init]) { | ||
| [self initializeWithConfig:config]; | ||
| } |
There was a problem hiding this comment.
init will be called twice if this method is called (one here and another in initializeWithConfig)
There was a problem hiding this comment.
Are all these changes necessary in this pbxproj file @tdermendjiev ?
|
can we just confirm this all works with existing projects? I'm not sure about the implications on the changes to modules in the pbxproj. But once that's confirmed I believe this can be merged |
v8ios.xcodeproj/project.pbxproj
Outdated
| dstSubfolderSpec = 10; | ||
| files = ( | ||
| C20525802577D6F900C12A5C /* NativeScript.framework in Embed Frameworks */, | ||
| 2B5088A82BBEC1BC00F6EB68 /* TNSWidgets.xcframework in Embed Frameworks */, |
There was a problem hiding this comment.
is this addition necessary?
There was a problem hiding this comment.
how do we generate this again when the metadata is updated? Shouldn't this just be part of the build process?
This PR includes methods required for running NS apps and js strings from a native app using the NS runtime:
A default metadata binary is added to the framework product. This contains metadata about all the Apple frameworks.
TBD: Create a separate build target for the framework used for embedding.