Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook iOS SDK - How to build static library for Xcode 4.3?

Tags:

sh

ios

facebook

sdk

I'm integrating Facebook to my iOS ARC app by following instructions in this link. i'm stuck at building static library step.

https://developers.facebook.com/docs/mobile/ios/build/

I'm using Xcode 4.3 (Developer folder now moved inside the Application) so the script "build_facebook_ios_sdk_static_lib.sh" didn't work. I've tried to modified the script but wasn't successful.

Could someone please help? Thanks !

like image 794
Luong Huy Duc Avatar asked Feb 29 '12 04:02

Luong Huy Duc


3 Answers

just edit "build_facebook_ios_sdk_static_lib.sh" with TextEdit

and change:

XCODEBUILD_PATH=/Developer/usr/bin

to:

XCODEBUILD_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin

and run :build_facebook_ios_sdk_static_lib.sh from the shell , it will be work

like image 154
yasserislam Avatar answered Nov 17 '22 17:11

yasserislam


If you have an Apple Developer Account, log into http://developer.apple.com/mac and then navigate to https://developer.apple.com/downloads/index.action

In there, you'll find "Command Line Tools for Xcode". Download that and you'll have the ability to build stuff easily from the command line again (which is what I suspect the "build_facebook_ios_sdk_static_lib.sh" shell script needs).

like image 21
Michael Dautermann Avatar answered Nov 17 '22 15:11

Michael Dautermann


When you are integrate the Facebook SDk into your ARC enabled Iphone Application.

I suppose you had some NonARC problem(errors due to release and dealloc etc.) in Facebook Classes(headers).Due to this you are not able to create the Build.

So in my opinion you can disable the ARC for those Facebook Classes.

I think after Disabling the ARC for those Facebook Classes ,you may create build Easily.

For the Disabling the ARC you just need to follow few Steps.

1)Go to the Application Target

2)Choose Build Phase option from Build Phase.

3)Compile Sources->Set "-fno-objc-arc" Flag for all Facebook Classes.

Now Build Application

I hope it'll help you.

like image 1
Kamar Shad Avatar answered Nov 17 '22 16:11

Kamar Shad