I need to weak link some framework with my target.
But I can't find how to do it...
If I try to run my project on 3.2 iPad simulator i get the following error:
dyld: Library not loaded: /System/Library/Frameworks/iAd.framework/iAd Reason : Image not found
Thanks !
To include a framework in your Xcode project, choose Project > Add to Project and select the framework directory. Alternatively, you can control-click your project group and choose Add Files > Existing Frameworks from the contextual menu.
If the framework you want to weakly link to is listed in the Link Binary With Libraries build phase, select it, and choose Edit > Delete to remove it. Now you can tell the linker to use weak linking for that framework. Select the target, open its Info window, and click Build. Build your product.
In Xcode, select File ▸ New ▸ Project…. Then choose iOS ▸ Framework & Library ▸ Framework.
Go to your project -> Targets -> Build Phases -> Link Binary with Libraries.
Then change the library you want to weak-link from "Required" to "Optional".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With