13

I've just upgraded my app to run on the new iPhone5 simulator, however when I try to build it for my iPhone 4S device, I get this Apple Mach-O Liner error.

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/Darren/Documents/Dev stuff/My App/GoogleAdMobAdsSDKiOS-5.0.5/libGoogleAdMobAds.a for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can someone shed some light on what this error it and how to fix it? I am using adWhirl with AdMob.

Thanks

EDIT --- I am also getting this error in another project for the file libfacebook_ios_sdk.a

8
  • What's your Deployment Target?
    – Kjuly
    Sep 13, 2012 at 9:54
  • I've just looked at another of my apps, and it has the same error when building for device.
    – Darren
    Sep 13, 2012 at 10:11
  • I've just started editing a third, and this time get the error for libfacebook_ios_sdk.a
    – Darren
    Sep 13, 2012 at 11:33
  • This question talks about information that is still under the NDA that you signed (which you broke by posting here), so please try the apple developer forums instead. Sep 13, 2012 at 11:38
  • The iPhone 5 became public knowledge last night so I'm not sure which part of my question breaks the NDA
    – Darren
    Sep 13, 2012 at 11:52

4 Answers 4

11

The same answer as I gave in this thread:

If you want to remove the support for any architecture, try this:

Project -> Build Settings -> remove the architecture from "valid architectures"

You can use this as a temporary solution until the library has been updated. You have to remove the flag from your own project.

2

iPhone5's cpu is A6(armv7s). The existing Admob sdk does not support it. We have to wait for admob to update the sdk.

4
  • Their new sdk wont work with AdWhirl, so we either have to move to AdMob mediation, drop AdMob or stick with AdWhirl & AdMob but remove armv7s support from the build.
    – Darren
    Sep 14, 2012 at 10:05
  • The admob page says it's not compatible with AdWhirl cl.ly/image/1u2b2F1M0P1p
    – Darren
    Sep 16, 2012 at 12:17
  • 1
    @Darren, that says you can not use admob sdk as an AdSense SDK in Adwhirl
    – xingzhi.sg
    Sep 21, 2012 at 12:20
  • 1
    This is the google group thread for news about it, for the moment still nothing. groups.google.com/forum/?fromgroups=#!topic/…
    – cescofry
    Sep 26, 2012 at 17:34
2

Update to Admob 6.2.0 or later.

See this post: http://googleadsdeveloper.blogspot.com/2012/09/migrating-to-admob-v62-for-ios.html.

Also, include the AdSupport framework and remove the -all_load flag. You've got to use the -ObjC flag however.

This works for me, finally!!

0

Try this:

This article copy an armv7 lib code as an armv7s and build into the original lib. so xcode will see that lib has an armv7s code/arch

http://www.galloway.me.uk/2012/09/hacking-up-an-armv7s-library/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.