For an framework to be compatible with various devices it has to be compiled for them specifically, This script does those tasks in single shot.
- Select Target
- [ ⌘ + ⌥ + i] Command + alt + i.
- Archive > Post-actions >
+
>New run script action
Provide build settings from
: SELECT YOUR TARGET- copy and paste this script in the script area.
- Select Target > Build Settings >
Skip Install
- Ensure that it is set to
NO
Due to some bug in Xcode, this is not done automatically.
https://eladnava.com/publish-a-universal-binary-ios-framework-in-swift-using-cocoapods/
Xcode 10 version: