3

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

2 Answers 2

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

1
  • 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. Dec 5, 2011 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.