Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Dynamic Framework • For historical reasons, OneSignal's iOS framework was a static framework, not a dynamic framework. • However, for some wrapper SDK's like Flutter, this causes issues with cocoapods. Any cocoapod in a project that uses use_frameworks! must not have any static dependencies • To fix this, we are considering adding a subspec to fix the problem, but will allow some of our users to test this branch in the mean time TODO: • We want this dynamic framework to run on iOS devices as well as run in the iOS simulator (x86_64 and i386 architectures) • To do this, we've made this a fat framework that contains slices for: arm64, armv7, x86_64, and i386 • However, Apple will not allow app submissions that contain fat frameworks • So we will soon need to create a build script developers can add to their apps that strips the simulator architecture slices from the framework, so developers don't run into this issue. • We will want to investigate if we can make this buildscript a part of our cocoapod target, or if it will require developers to add the script to their xcode projects. * Dynamic Fat Framework • It appears iOS framework codesigning fails if the framework uses symlinks and versions • Changed the build script so that the SDK will put all relevant directories in the root of the framework, instead of using symlinks at the root and a Versions/A folder • Created a new aggregate target that uses a buildscript to create a universal dynamic framework. • The new aggregate target uses a buildscript to generate two static libraries, one for simulator (x86_64 and i386) and one for real devices (arm64 and armv7), it then uses lipo to combine these into a single dynamic fat framework NOTE: The framework produced by the new dynamic target does not actually create its own product, it simply generates a new framework in the repo's /iOS_SDK/OneSignalSDK/Framework folder. * Add Additional Podspec for Dynamic Framework • We do not want to immediately switch all users to use our new fat dynamic framework • However we do want it to be available on Cocoapods, so we've created an additional podspec & framework path • When the project was started years back, the OneSignal-Dynamic target was actually creating a static framework, so I've renamed this target to OneSignal-Static-Framework • The new OneSignal-Dynamic-Framework is just an aggregate framework. It does not directly produce its own product. Instead it uses a build script to produce a dynamic framework at repo/iOS_SDK/OneSignalSDK/Framework/Dynamic/OneSignal.framework
- Loading branch information