1

I created a template for xcode 4 and included FacebookSDK in it. The problem is that some frameworks (AdSupport, Accounts) must be set as "optional" if you want to use sdk on iOS 5. How can I make them optional from TemplateInfo.plist. Or there can be another solution?

Dilip Manek
  • 9,095
  • 5
  • 44
  • 56
quarezz
  • 454
  • 1
  • 6
  • 11
  • http://stackoverflow.com/questions/12594070/dyld-library-not-loaded-different-behavior-for-6-0-simulator-6-0-device/12812450#12812450 refer image i have attached.... hope this will help you. – VSN Feb 25 '13 at 13:32

2 Answers2

2

You should add the frameworks with the -weak_framework prefix to your OTHER_LDFLAGS, like this:

<key>SharedSettings</key>
<dict>
<key>OTHER_LDFLAGS</key>
<string>-all_load -ObjC -weak_framework Accounts -weak_framework Social</string>
<key>CLANG_ENABLE_OBJC_ARC</key>
<string>YES</string>
</dict>
Roeland Weve
  • 499
  • 3
  • 7
1

enter image description here

See this image. It will be helpful to you.

Prasad G
  • 6,702
  • 7
  • 42
  • 65
  • 1
    Thanks, but I need to do this before project creation..somewhere in template settings. So that frameworks would be already "optional" after project creation. – quarezz Feb 25 '13 at 16:39