Question

i added AdSupport framework to my iPhone application since I wanted to use rev mob ads (as we can see in installation instructions http://sdk.revmob.com/ios) . Now the application runs well for iOS 6.0 but crashes for 5.1.1 since 5.1.1 does not have Ad Support framework. So i removed add support frame work and built pn iOS 5.1.1 . Now application does not crash and adds are also working . Is it not clear to me how removing Ad Support framework are impacting the the advertisements. If it is not impacting why have rev mob mentioned it in their documentation to add it.

Was it helpful?

Solution

You should keep the AdSupport framework in, as the rev mob code is probably conditionally checking for it where required.

What you're probably doing is strong linking the library, whereas you should be weak linking it. Strong linking a library (the default) means it is marked as being required, and thus won't run on iOS 5 (as the library doesn't exist). Whereas when you weak link a library it is optional, and will happily run on older iOS versions (but you need to make sure you conditionally check for the library when you call any of its APIs).

To weak link a library, open up your project's Build Phases settings panel, and in the drop-down to the right of the AdSupport library change it from 'Required' to 'Optional'.

OTHER TIPS

You have to change AdSupport library from 'Required' to 'Optional'.

The AdSupport library has been included in the iOS 6, which include new and important features useful for ad networks, like RevMob: http://developer.apple.com/library/ios/#documentation/DeviceInformation/Reference/AdSupport_Framework/_index.html#//apple_ref/doc/uid/TP40012658

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top