What it does
Builds an iphoneos (Device) and iphonesimulator (Simulator) binary using xcodebuild (comes with Xcode). The two binaries get merged afterwards using lipo. It also copies eventually existing header files in the result directory.
Usage
- Do
git clone git@github.com:MattesGroeger/xcode-universal-binary.gitwherever you want to have the shell script reside. - Navigate to the repository
cd xcode-universal-binary. - Grant executable rights:
chmod a+x universal_binary.sh. - Add the
universal_binary.shto yourPATH(e.g. in .bash_profile). - Navigate to the project you want to create a universal binary of.
- Call
universal_binary.sh {target} {lib.a}where you have to replace{target}with the Xcode target and{lib.a}with the target library name.
Hint
This version only creates the Release configurations.
Credits
Thanks to Eonil who did the basic work in this stackoverflow post.
