Xcode 4.5: Undefined characters for armv7s architecture:

I am completely crazy about this issue. I have a project that works fine, but after I added facebook sdk it gives me the following errors (the errors that made me remove armv6, hoping that this worked fine, but it gives more problems as I am experiencing this I am now using the armv7 and armv7s arches together, and this is the error it gives

/Users/ME/Library/Developer/Xcode/DerivedData/Cocktail-gfjrrmcunekvfiacogqdfcxliqfg/Build/Intermediates/Cocktail.build/Debug-iphoneos/Cocktail.build/Objects-normal/armvv/ MEvv7C DistributedApps / Cocktail All / Cocktail "setenv IPHONEOS_DEPLOYMENT_TARGET 4.3 setenv PATH" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/rbin : / usr / bin: / bin: / USR / SBIN: / SBIN "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot / Applications / Xcode.app /Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6. 0.sdk -L / Users / ME / Library / Developer / Xcode / DerivedData / MyProj-gfjrrmcunekvfiacogqdfcxliqfg / Build / Products / Debug-iphoneos "-L / Users / ME / Apple DistributedApps / MyProj All / MyProj" -F / Users / ME / Library / Developer / Xcode / DerivedData / MyProj-gfjrrmcunekvfiacogqdfcxliqfg / Build / Products / Debug-iphoneos "-F / Users / ME / Apple DistributedApps / MyProj All / MyProj" files / Users / ME / Library / Developer / Xcode / DerivedData / MyProj -runtime -miphoneos-version-min = 4.3 -framework AdSupport -framework Social -framework SystemConfiguration -framework MapKit -framework CoreLocation -framework Twitter -framework Assets Library -framework MobileCoreServices -framework CoreVideo -framework CoreMedia -lz -lsqlite3.0 Address Book -framework CFNetwork -framework CoreFoundation -framework Security -framework iAd -framework MessageUI -framework QuartzCore -framework AudioToolbox -framework MediaPlayer -framework AVFoundation -framework CoreGraphics - UIKit frames -framework Foundation -framework FacebookSDK -framelframelaryframeworkfourmoryframeworkframeworkframeworkmemeury /Library/Developer/Xcode/DerivedData/MyProj-gfjrrmcunekvfiacogqdfcxliqfg/Build/Intermediates/MyProj.build/Debug-iphoneos/MyProj.build/Objects- normal / ARMv 7 / MYPROJ

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_ACAccountStore", referenced from: objc-class-ref in FacebookSDK(FBSession.o) "_SKStoreProductParameterITunesItemIdentifier", referenced from: -[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o) "_ACFacebookAudienceFriends", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) "_OBJC_CLASS_$_SKStoreProductViewController", referenced from: objc-class-ref in RevMobAds(RevMobStoreController.o) "_OBJC_CLASS_$_GADBannerView", referenced from: objc-class-ref in NewsViewController.o objc-class-ref in SportsViewController.o objc-class-ref in LecViewController.o objc-class-ref in AccViewController.o objc-class-ref in JokesViewController.o objc-class-ref in GamesViewController.o objc-class-ref in CaricViewController.o ... "_ACFacebookAppIdKey", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) "_ACAccountTypeIdentifierFacebook", referenced from: +[FBSession renewSystemAuthorization] in FacebookSDK(FBSession.o) "_ACFacebookAudienceKey", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) "_ACFacebookAudienceOnlyMe", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) "_kGADAdSizeSmartBannerPortrait", referenced from: -[NewsViewController shouldAutorotateToInterfaceOrientation:] in NewsViewController.o -[SportsViewController viewDidLoad] in SportsViewController.o -[LecViewController viewDidLoad] in LecViewController.o -[AccViewController viewDidLoad] in AccViewController.o -[JokesViewController viewDidLoad] in JokesViewController.o -[GamesViewController viewDidLoad] in GamesViewController.o -[CaricViewController viewDidLoad] in CaricViewController.o ... "_OBJC_CLASS_$_GADRequest", referenced from: objc-class-ref in NewsViewController.o objc-class-ref in SportsViewController.o objc-class-ref in LecViewController.o objc-class-ref in AccViewController.o objc-class-ref in JokesViewController.o objc-class-ref in GamesViewController.o objc-class-ref in CaricViewController.o ... "_ACFacebookPermissionsKey", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) "_CGSizeFromGADAdSize", referenced from: -[NewsViewController shouldAutorotateToInterfaceOrientation:] in NewsViewController.o -[SportsViewController viewDidLoad] in SportsViewController.o -[LecViewController viewDidLoad] in LecViewController.o -[AccViewController viewDidLoad] in AccViewController.o -[JokesViewController viewDidLoad] in JokesViewController.o -[GamesViewController viewDidLoad] in GamesViewController.o -[CaricViewController viewDidLoad] in CaricViewController.o ... "_ACFacebookAudienceEveryone", referenced from: -[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) 
+6
source share
3 answers

Facebook sdk is not compiled for armv7s, but you can compile yourself

Look at Liam Nichols, answer here

https://developers.facebook.com/bugs/107674376052717/

Download a copy of the source code on the git hub page ( facebook git hub ) Open the xcode project and change the architecture to armv7, armv7s in the build settings Close the project Go to / scripts and in the terminal run ./build_all.sh When it finishes compiling, you can find the framework in builds / FacebookSDK.framework

+2
source

As an interim solution, you can remove armv7 from architectures in your Xcode project. Change "$ (ARCHS_STANDARD_32_BIT)" to "armv7". When the libraries are updated, modify them to re-add support for armv7s.

+4
source

Remove the armv7s section from valid architectures and it will work.

Build Settings -> Architectures -> Acceptable Architectures

Xcode Build Settings

0
source

Source: https://habr.com/ru/post/927676/


All Articles