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

Darren
  • 10,182
  • 20
  • 95
  • 162
  • What's your `Deployment Target`? – Kjuly Sep 13 '12 at 09:54
  • I've just looked at another of my apps, and it has the same error when building for device. – Darren Sep 13 '12 at 10:11
  • I've just started editing a third, and this time get the error for libfacebook_ios_sdk.a – Darren Sep 13 '12 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. – Richard J. Ross III Sep 13 '12 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 '12 at 11:52
  • I got this working now. But I guess I can't say how. – Darren Sep 13 '12 at 12:34
  • The part about Xcode 4.5 and iOS 6 SDK, which are clearly still under NDA in bold letters when you log into your developer account. – borrrden Sep 13 '12 at 12:37
  • I found the answer here: [Is there a compiler flag to indicate lack of armv7s architecture][1]. [1]: http://stackoverflow.com/questions/12405378/is-there-a-compiler-flag-to-indicate-lack-of-armv7s-architecture – RMeijs Sep 13 '12 at 23:41

4 Answers4

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.

Community
  • 1
  • 1
Nicholas
  • 5,770
  • 1
  • 20
  • 30
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.

Vince Yuan
  • 10,533
  • 3
  • 32
  • 27
  • 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 '12 at 10:05
  • The admob page says it's not compatible with AdWhirl http://cl.ly/image/1u2b2F1M0P1p – Darren Sep 16 '12 at 12:17
  • 1
    @Darren, that says you can not use admob sdk as an AdSense SDK in Adwhirl – xingzhi.sg Sep 21 '12 at 12:20
  • 1
    This is the google group thread for news about it, for the moment still nothing. https://groups.google.com/forum/?fromgroups=#!topic/google-admob-ads-sdk/9Wub-gh9rf8 – cescofry Sep 26 '12 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!!

Jim Huang
  • 401
  • 5
  • 9
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/

sprhawk
  • 221
  • 3
  • 3