4.1. Product > Scheme > Manage Schemes... > Select your pod.
4.2. Product > Scheme > Edit Scheme... > Change Build Configuration to Release. Close
4.3. Select any latest simulator for building the framework and then Product > Build.
Now you will find Release-iphonesimulator in your build directory.
The last step is to create universal library as follows.
5. Merge the frameworks into a single universal-framework
5.1. Create a new directory within build directory as Release-universal.
5.2. If your pod builds are frameworks then copy and paste the Release-iphoneos framework in Release-universal directory and then delete YourPodName.framework/YourPodName file. Else if your pod builds are static binary (.a) files then copy and paste the build/Release-iphoneos/YourPodName directory in build/Release-universal/.
5.3. For framework:
lipo -create [path to Release-iphoneos framework] [path to Release-iphonesimulator framework] -output [destination path to universal-framework]
For example: lipo -create Release-iphoneos/MyTestAppEx/MyTestAppEx.framework/MyTestAppEx Release-iphonesimulator/MyTestAppEx/MyTestAppEx.framework/MyTestAppEx -output Release-universal/MyTestAppEx.framework/MyTestAppEx
For fat static binary:
lipo -create [path to Release-iphoneos binary] [path to Release-iphonesimulator binary] -output [destination path to fat-static-binary]
For example: lipo -create Release-iphoneos/MyTestAppEx/MyTestAppEx.a Release-iphonesimulator/MyTestAppEx/MyTestAppEx.a -output Release-universal/MyTestAppEx/MyTestAppEx.a
Done!
6. Verification
If you want to check the supported architectures in your newly created universal files, then run the command:
lipo -info YourPodName.a
OR
lipo -info YourPodName.frmaework/YourPodName
Hope this helps someone.
1. sharpie pod init ios YourPodName
2. sharpie pod bind
3. Open Pods/Pods.xcodeproj in XCode
4. Build Release-iphonesimulator framework
The last step is to create universal library as follows.
5. Merge the frameworks into a single universal-framework
6. Verification