3

How do I specify -weak_framework for multiple frameworks while compiling iPhone apps for older deployment targets?

Till
  • 27,559
  • 13
  • 88
  • 122
Bijoy Thangaraj
  • 5,434
  • 4
  • 43
  • 70

2 Answers2

15

In the Build Phases section of your target, you've got the list of the linked frameworks.

For each one, you can select Required or Optional, optional meaning weak.

enter image description here

Macmade
  • 52,708
  • 13
  • 106
  • 123
  • 1
    Thanks for the response. In my application, I am accessing Twitter.framework and Accounts.framework that need to be weekly-linked. I've set the "Link Binaries With Libraries" to "Optional" for these frameworks. However, I still get the following errors and the application is crashing in previous Deployment targets: warning: Unable to read symbols from "Accounts" (not yet mapped into memory). warning: Unable to read symbols from "Twitter" (not yet mapped into memory). Please help. – Bijoy Thangaraj Dec 05 '11 at 13:06
2

Add a linker flag -weak_framework <framework_name> Check this link: https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

sahiti
  • 342
  • 1
  • 8