Closed ddfreiling closed 11 months ago
Hi @ddfreiling, I tried to reproduce the issue, but it seems not reproducible with Xcode 11.3. What is your version (please check with xcodebuild -version
). I got the following output of the strip script:
Stripping frameworks in /Users/bektchiev/work/_scratch/mydemo/platforms/ios/build/Debug-iphonesimulator/mydemo.app/Frameworks
Architectures of ./NotaWebViewExt.framework/NotaWebViewExt: x86_64
Architectures of ./NativeScript.framework/NativeScript: i386 x86_64 armv7 arm64
Stripped ./NativeScript.framework/NativeScript of architectures: armv7 arm64
Code Signing ./NativeScript.framework/NativeScript with Identity -
/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements ./NativeScript.framework/NativeScript
./NativeScript.framework/NativeScript: replacing existing signature
Architectures of ./TNSWidgets.framework/TNSWidgets: i386 x86_64 armv7 arm64
Stripped ./TNSWidgets.framework/TNSWidgets of architectures: armv7 arm64
Code Signing ./TNSWidgets.framework/TNSWidgets with Identity -
/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements ./TNSWidgets.framework/TNSWidgets
./TNSWidgets.framework/TNSWidgets: replacing existing signature
~/work/_scratch/mydemo/platforms/ios
As you can see the .xcframework
bundle isn't copied by Xcode into the .app/Frameworks
directory but only the relevant platform's .framework
. Maybe its something that Apple have changed in the latest Xcode version...
I've verified that the plugin version is correct and contains the .XCFramework in ./node_modules/@nota/nativescript-webview-ext/platforms/ios/NotaWebViewExt.xcframework
I think this is really important issue and should be opened. I have to manually embed and sign this .xcframeworks now
@PixsaOJ Please open an issue in https://github.com/NativeScript/ios with as much detail as possible if you are having issues in the latest iOS runtime.
@PixsaOJ Please open an issue in https://github.com/NativeScript/ios with as much detail as possible if you are having issues in the latest iOS runtime.
Readme basically says I have to do things manually. I've spent countless hours on this. Maybe i will create issue in the future but for now I'm just going to focus on developing apps. I did not have luck in Discord servers when I asked around about this issue.
I am also bit confused on which place is right to open issue. I am not trying to develop runtime, I just want to use it to copy my App_Resources/IOS/*.xcframework
to proper folder and Embed & Sing for physical device. If I have to do this manually, then its okay but bit annoying.
@PixsaOJ try this:
test-plugin
{
"name": "test-plugin",
"version": "1.0.0",
"private": true,
"nativescript": {
"platforms": {
"ios": "*"
}
}
}
Then npm i --save ./test-plugin
in your project. All the frameworks will be picked up and embedded into your app.
@rigor789 Actually thank you so much!
I don't know why cant we do this without plugins. I'll consider sponsoring ❤️
Environment Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
A project with a plugin which includes a .XCFramework in its /platforms/ios can prepare just fine, but when you try to build it, it fails because of the
strip-dynamic-framework-architectures.sh
script, which does not seem to support XCFrameworks.To Reproduce
tns create mydemo --ng tns plugin add @nota/nativescript-webview-ext@xcframework tns build ios
Expected behavior Expect that
tns build
does not try to strip out architectures from an .XCFramework from a plugin. https://github.com/NativeScript/ios-runtime/blob/master/build/project-template/internal/strip-dynamic-framework-architectures.sh should probably be updated to support .XCFramework libraries.Sample project
See repro. Plugin source at https://github.com/Notalib/nativescript-webview-ext/tree/ba57098ef56a846720febeb164324944a523a8b9
Additional context
I added some debug logging to strip-dynamic-framework-architectures.sh and got this output. It seems it's trying to use lipo to remove the only architecture of a non-fat Framework inside an XCFramework.