1

I am trying to launch my iOS app on the simulator but it does not work. Running the app on the phone works normally though. It has something to do with my admon integration. Before the simulator was running smoothly. I am using Xcode 6.1.

I added all required frameworks:

AdSupport  
AudioToolbox  
AVFoundation  
CoreGraphics  
CoreTelephony  
EventKit
EventKitUI 
MessageUI
StoreKit
SystemConfiguration
as well as libGoogleAdMobAds.a

The error I get is:

ld: warning: ignoring file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport, missing required architecture i386 in file /Users/XXXXXXX/Documents/app1/app1/AdSupport.framework/AdSupport (3 slices)
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_ASIdentifierManager", referenced from:
      objc-class-ref in libGoogleAdMobAds.a(GADDevice.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Dominik Hadl
  • 3,609
  • 3
  • 24
  • 58
Michael
  • 815
  • 1
  • 6
  • 23
  • Add AdSupport.framework in your project. – Rumin Nov 02 '14 at 16:25
  • it is already added. but the simulator fails with the given error – Michael Nov 02 '14 at 16:29
  • Include all the list of frameworks that you have added in your project, in your question. If any of the framwork is not missing try adding libGoogleAdMobAds.a again – Rumin Nov 02 '14 at 16:43
  • added all frameworks to my post – Michael Nov 02 '14 at 16:49
  • 1
    Refer answer given by Akshay in http://stackoverflow.com/questions/6984368/undefined-symbols-for-architecture-i386-objc-class-skpsmtpmessage-referenc – Rumin Nov 02 '14 at 16:59
  • Try running `$ file libGoogleAdMobAds.a` in terminal and check if it contains the required architecture slice. – Dominik Hadl Nov 03 '14 at 08:10
  • I created this follow up http://stackoverflow.com/questions/26712532/ios-linking-with-missing-architecture-i386-adsupport-framework – Michael Nov 03 '14 at 10:46

3 Answers3

0

Go to "info" in project settings and clear library search paths, and then re-add the libGoogleAdMobAds.a framework

Logan
  • 828
  • 7
  • 10
0

The library most probably does not contains any i386 binary slice. It probably contains slices for devices -- 3 "iPhone" architectures: armv7, armv7s, arm64 -- but not the simulator architecture, which runs on your computer. Since the binary slice can't be found, the linker is missing symbols to make the i386 executable, and it can't be run in the simulator.

acoomans
  • 360
  • 1
  • 4
  • thanks Dominik and acoomans, but apparenty this archive supports armv7, armv7s, u386m x86_64 and arm64) so this shouldnt be the problem – Michael Nov 03 '14 at 09:53
  • I think I found the problem! Its not the libGoogleAdMobAds.a that is missing the required slice, but the AdSupport.framework! If I run file AdSupport within the framework, I only get 3 slices, i386 is missing! So where can I get the complete framework? (Thanks for file command again, I am new to this stuff) – Michael Nov 03 '14 at 10:14
0

Where did you get the AdSupport.framework from? I now realize it's in your Documents directory.

Normally you should link the target from Xcode, by going in the target settings:

enter image description here

then Build phases > Link binary with libraries:

enter image description here

search for "AdSupport", it should be under iOS8.1:

enter image description here

the library should be there:

enter image description here

acoomans
  • 360
  • 1
  • 4