I've just updated the Facebook iOS SDK in my project from 3.0 to 3.1. The project does not compile anymore. Instead I get the following linker errors:
Undefined symbols for architecture i386:
"_ACFacebookAppIdKey", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACFacebookAudienceEveryone", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_ACFacebookAudienceFriends", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] 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)
"_ACFacebookPermissionsKey", referenced from:
-[FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in FacebookSDK(FBSession.o)
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in FacebookSDK(FBSettings.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The Facebook docs clearly say:
The SDK relies on three other frameworks (AdSupport, Accounts and
Social) to use the Facebook features built into iOS6.
Those frameworks do not exist in Xcode 4.2 . Is there any workaround, i.e. can I download (where?) and add the frameworks manually to my project and will that suffice to get rid of the compile errors or do I have to upgrade to Xcode 4.5?
Those frameworks are part of iOS 6 (well, except for Accounts, which is from iOS 5). You won't be able to use them without upgrading to Xcode 4.5, and consequently, iOS 6 SDK.
You can still set your deployment target down to iOS 4.3, if that's your concern.
I think your options are:
Upgrade to Xcode 4.5, or
Use Facebook SDK 3.0.
To make things clear:
For XCode 4.5:
If you use FB SDK3.0, you only need to add Accounts and FacebookSDK frameworks.
If you use FB SDK3.1, you need to add Accounts, FacebookSDK, Social, and AdSupport frameworks.
If you use FB SDK3.2++, check by yourself what other frameworks you may or may not need. ;)
Hope that sums it up nicely for everyone.
The SDK relies on three other frameworks (AdSupport, Accounts and Social).
To add these, go to the 'Linked Frameworks and Libraries' section of the target's Summary pane, and add them.
Sobri is right. Either upgrade to Xcode 4.5 or use SDK 3.0 or If you want to use 3.1 then download the source from github, modify the build file(basically remove the references to frameworks provided by iOS 6.0 ) and rebuild the SDK. That ways you can use the SDK 3.1 as well as run it on older XCode versions.
The following steps may be helpful to resolve this issue
Download Facebook iOS SDK 3.0 from links present in the URL http://developers.facebook.com/ios/features/whats-new-ios-sdk-3/
Add the FacebookSDK framework from Mac Documents directory
Add sqlite3 to project
Then, I've tried the code in http://developers.facebook.com/docs/howtos/login-with-facebook-using-ios-sdk/ with the following changes (as it is for Facebook iOS SDK 3.1)
Replace openActiveSessionWithReadPermissions with openActiveSessionWithPermissions
Replace [FBSession.activeSession handleDidBecomeActive]; with [FBSession activeSession];
This worked for me. Try it once.
Thanks,
prodeveloper.
Related
After upgrading XCode from 5.1.1 to 6.0 cannot compile my project - get linker errors:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GTLDrivePermissionId", referenced from:
objc-class-ref in GTLDrive_Sources.o
"_OBJC_CLASS_$_GTLDriveChannel", referenced from:
objc-class-ref in GTLDrive_Sources.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know how to fix it?
Try this. It works for me after upgrading the AdMob SDK.
Following the SDK Release Notes you have to link two additional Frameworks:
https://developers.google.com/mobile-ads-sdk/docs/admob/ios/rel-notes
Official release for iOS 8 support.
Ad loading takes less time on the main thread on iOS 8.
Smart Banner ads are correctly displayed in landscape on iOS 8.
Requires linking against two new frameworks: EventKit and EventKitUI. These are auto-linked if modules and auto-linking frameworks are enabled.
Deprecated mediatedAdView property on GADBannerView.
Removed the previously deprecated loadAndDisplayRequest:usingWindow:initialImage: method on GADInterstitial.
I have a Static iOS Library which uses Phonegap as a component. ( I follow the steps provided by the documentation), I can compile the library alone without problems.
Now I try to use my static library in an iOS Application.
So I have my App which have a project reference to my static library which have an project reference to phonegap.
It looks like
App
Library
Phonegap
Now when I want to compile I get many errors and all look like:
Undefined symbols for architecture armv7:
"_kUTTypeVideo", referenced from:
-[CDVCapture captureVideo:] in libmyLibrary.a(CDVCapture.o)
I try to change the valid architectures in many combinations and the switch build valid architectures only but nothing works.
Its no ARC Project if it helps...
It seems that cordova library you are using is not armv7 compatible. Use latest cordova library that is compatible with armv7 architecture.
I currently found the problem, I have to import all the frameworks that described in the phonegap documentation not only in the static library that uses phonegap but rather also in the main app.
I had the same issue...it seems that you are using older version of PhoneGap (say 1.2 ...). The only solution to this issue is to use Cordova library (the latest one), which resolved my issue.
I pass to xcode 4.2 and when I compile I have this error:
ld: library not found for -lz.1.2.3
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang
failed with exit code 1.
I am assuming lz is supposed to be libz. If that is the case, you are looking for a very specific version of the lib, so you're problem can be fixed by changing it to 1.2. This is done where you add frameworks (Coredata etc) in Xcode.
Hope this helps.
When trying to compile the software for iOS 5, XCode 4.2 throws an error:
ld: library not found for -lz.1.2.3
I found this post that tells me to replace 1.2.3. with 1.2.5
https://github.com/dbloete/ioctocat/issues/107
After doing what the link has suggested, it worked for XCode 4.2 but fails for older versions for XCode with the error
ld: library not found for -lz.1.2.5
Has anyone encountered the above situation? How can I resolve this so that it will not fail between the different versions of SDK?
Just use -lz, there's no need to use the versioned link to it. So remove libz-1.2.5.dylib from frameworks and add libz.dylib.
I've removed the import of the UIKit framework, and now I get this error. Do I have to somehow recompile the framework? It's not really giving me anything to go on...
And if it means anything, I am able to run the SDK examples in IOS so there aren't any system requirements that I'm not meeting.
ld: warning: ignoring file /Developer/SDKs/MacOSX10.7.sdk/Library/Frameworks//AWSiOSSDK.framework/AWSiOSSDK, missing required architecture x86_64 in file
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AmazonS3Client", referenced from:
objc-class-ref in Constants.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You can't just use the .framework provided by Amazon, because the binary is only for iOS. You need to rebuild the framework from the source, which thankfully comes in the SDK.
I created a XCode project with the source from the iOS SDK that appears to work. I have only tested some of the rudimentary S3 code but since it works in iOS, presumably, and I am able to communicate with S3, I think it should be good for all the services it supports.
https://bitbucket.org/danap/osx-aws-toolkit
Please feel free to fork and submit pull requests with changes.
I've created a fork of the AWS iOS SDK which can be built and used for Mac OS X development. Check it out: https://github.com/amberdixon/aws-sdk-ios. In the readme, I've included instructions on how to build the Mac OS X-compatible version of the AWS iOS SDK framework, which you can import into your OS X projects.