Luong Huy Duc
Luong Huy Duc

Reputation: 458

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

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 !

Upvotes: 5

Views: 5497

Answers (3)

yasserislam
yasserislam

Reputation: 154

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

Upvotes: 6

Mohammad Kamar Shad
Mohammad Kamar Shad

Reputation: 6067

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.

Upvotes: 1

Michael Dautermann
Michael Dautermann

Reputation: 89519

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).

Upvotes: 2

Related Questions