Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS Facebook SDK 3.1 with -ObjC flag

I'm trying to implement admob mediation using the latest admob sdk, and their library requires me to use linker flag -ObjC.

However, after adding this flag, I get linker errors for facebook SDK.

Undefined symbols for architecture armv7: "_SLServiceTypeFacebook", referenced from: +[FBNativeDialogs composeViewControllerWithSession:handler:] in FacebookSDK(FBNativeDialogs.o)
"_OBJC_CLASS_$_SLComposeViewController", referenced from: objc-class-ref in FacebookSDK(FBNativeDialogs.o)

Did anyone else also encounter this?

like image 263
Jeffrey Chee Avatar asked Oct 19 '12 01:10

Jeffrey Chee


2 Answers

Have you added the Social and Accounts Frameworks to your project?

Remember to weak link those, if you are targeting below iOS 6!

like image 145
Lefteris Avatar answered Oct 09 '22 23:10

Lefteris


Do you have -ObjC in other linker flags? This was my problem when I've linked facebook SKD, social and accounts frameworks with this flag (it works when removed). Now I'm trying to figure out the workaround as I need this flag to be used i my project.

like image 32
JakubKnejzlik Avatar answered Oct 09 '22 23:10

JakubKnejzlik