Weak-linking multiple frameworks for iPhone Apps (-weak_framework)
Asked Answered
P

2

3

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

Piero answered 5/12, 2011 at 12:39 Comment(0)
D
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

Dissymmetry answered 5/12, 2011 at 12:44 Comment(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.Piero
M
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

Monadelphous answered 19/3, 2013 at 7:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.