Closed giordanocardillo closed 4 years ago
👋 @giordanocardillo
Thanks for your comment. iOS native library is fat library built with both, device and simulator architectures support. So in case someone doesn't need simulator architectures inside of the library, can strip them with lipo
like you did above.
This is also nice way how to maybe automate things so that you don't need to do it on your own upon each update.
Will close the issue, but if there's any need to reopen/comment, feel free to.
Cheers
I did that using a post install plugin hook on this very plugin, I'll do a PR if you need to add this. The hook adds a shell script to the build process in order to remove archs based on the build target
Nice. 👌 In theory if that script runs post installation of our plugin, in that case running app with that state of our plugin on iOS Simulators would not really be possible? Or would it?
I've to ask, I've made some tries with my cordova app:
AdjustSdk.framework
with AdjustSdk
Executable from cordova_sdk
repo v4.21.2 is 10 MB, removed i386 and x86_64 becomes like 5MB, and it fails my build with:
Found an unexpected Mach-O header code: 0x72613c21
AdjustSdk.framework
with AdjustSdk
Executable from ios_sdk
repo v4.21.3 is 5 MB, removed i386 and x86_64 becomes like 4MB and with this my build goes wellWhy are the framework executables different between the repos?
Which framework archive did you take from https://github.com/adjust/ios_sdk/releases/tag/v4.21.3?
If you check AdjustSdkStatic.framework.zip
(which is static library used in Cordova SDK) and unzip it, you'll see that library in there is also a bit over 10MB (AdjustSdk.framework/Versions/A/AdjustSdk
).
I've taken the dynamic one
That one is not used in Cordova plugin, but static one.
I'm trying with the static one to see if throws the same error, thank you.
EDIT
Same error as the cordova_sdk
one
Are there problems if I use the dynamic one in a cordova application? Since it's the only one that works for me
I guess not really. It's not how we intended it to work in plugin itself, so it's pretty much altering the plugin implementation, but if it works well for you, all good.
Hello, we had iOS building problems using this plugin. I had to manually remove i386 and x86_64 platforms from AdjustSdk executable in order to get to compile.
Leaving here if someone needs: