Skip to content

Instantly share code, notes, and snippets.

@ianand
Created April 5, 2011 19:37
Show Gist options
  • Select an option

  • Save ianand/904358 to your computer and use it in GitHub Desktop.

Select an option

Save ianand/904358 to your computer and use it in GitHub Desktop.
How to build Urban Airship on iOS/iPhone Simulator without warning messages
/*
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
@sashamace
Copy link
Copy Markdown

The next version of the library will be a universal arm6/7/i386 release from the get go.

@ianand
Copy link
Copy Markdown
Author

ianand commented Apr 5, 2011

Yay! Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment