Using the force_load linker flag with RestKit (iOS) Using the force_load linker flag with RestKit (iOS) xcode xcode

Using the force_load linker flag with RestKit (iOS)


Chyeahh! I figured it out. The flags should be set as

-force_load facebook-ios-sdk/lib/facebook-ios-sdk/libfacebook_ios_sdk.a -force_load $(BUILT_PRODUCTS_DIR)/libRestKit.a


With the new Facebook SDK 3.0 for iOS the linker flags are slightly different than answered previously. I had to put:

-force_load /path/to/FacebookSDK/FacebookSDK.framework/FacebookSDK -force_load $(BUILT_PRODUCTS_DIR)/libRestKit.a


I've struggled with this one in the past. Cocoa pods seems to simplify things a bit here. My path looks like this and I can successfully build:

-ObjC -l"Pods-AFNetworking" -l"Pods-AWSiOSSDKv2" -l"Pods-FMDB" -l"Pods-GZIP" -l"Pods-ISO8601DateFormatterValueTransformer" -l"Pods-Mantle" -l"Pods-RKValueTransformers" -l"Pods-Reachability" -l"Pods-RestKit" -l"Pods-SOCKit" -l"Pods-STTwitter" -l"Pods-SWRevealViewController" -l"Pods-TMCache" -l"Pods-TransitionKit" -l"Pods-UICKeyChainStore" -l"Pods-XMLDictionary" -l"sqlite3" -l"z" -framework "Accounts" -framework "CFNetwork" -framework "CoreData" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "Twitter" -framework "UIKit" -weak_framework "Social" -weak_framework "UIKit"

Note that to eliminate duplicated symbols I had to remove the reference the link reference to Bolts...

-l"Pods-Bolts"

was taken out. I guess because Facebook already includes it somehow...