Created
April 5, 2011 19:37
-
-
Save ianand/904358 to your computer and use it in GitHub Desktop.
How to build Urban Airship on iOS/iPhone Simulator without warning messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Build.xcconfig | |
| PushSample | |
| UrbanAirship provides a simulator version of their library: | |
| http://help.urbanairship.com/discussions/questions/441-running-apps-in-simulator-with-uaiap | |
| Unfortunately including this library in your project will add a warning message during builds: | |
| "file was built for archive which is not the architecture being linked (armv6)" | |
| To solve this warning message: | |
| (1) Add this file to your project. You may need to modify the linker search path (specified with a -L below). This file was designed for the PushSample. | |
| (2) Remove the liblUAirship-1.0.4a and libUAirshipSimulator-1.0.4.a frameworks from your project. | |
| (3) Base your build on this xcconfig file as shown in http://developer.apple.com/tools/xcode/images/build-configuration-file.jpg | |
| That's it. You should now be able to build both device and simulator builds without warning messages. | |
| Note that another solution is to combine both simulator and device libraries into a single universal library using lipo: | |
| lipo -output libUAirshipUniversal-1.0.4.a -create libUAirship-1.0.4.a libUAirshipSimulator-1.0.4.a | |
| and then only use libUAirshipUniversal-1.0.4.a in your project. | |
| Created by @ianand 4/5/11 | |
| */ | |
| LD_FLAGS[sdk=iphonesimulator*] = -lUAirshipSimulator-1.0.4 -L../Airship | |
| LD_FLAGS[sdk=iphoneos*] = -lUAirship-1.0.4 -L../Airship |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The next version of the library will be a universal arm6/7/i386 release from the get go.