If you are working with a framework that was not previously supported in your deploy target, you may want to weak-link the framework. To do this:
1) Open your Xcode project
2) In the Groups & Files pane on the left, expand "Targets"
3) Double click on your Target
4) Add in your framework.
5) In the "Type" column on the right, change the value from "Required" to "Weak".
6) close the window, clean all targets, rebuild.
You may also get an error like the following:
“_ADBannerContentSizeIdentifier320x50″, referenced from:
_ADBannerContentSizeIdentifier320x50$non_lazy_ptr in AdMyClassIAd.o
ld: symbol(s) not found”
I'm not quite sure of the exact cause of this error, but it seemed to have gone away after I changed my iAd framework to "Weak". I say I'm not sure what caused this error because I have tried changing the framework back to "Required" and didn't get the error again. Best thing to do is to clean all targets, close Xcode, delete the build folder, and try again.
Testing if a Class Exists
If you are working with a class that was not previously supported in your deploy target, you should test if a class exists before using it. For example:
Class adViewClass = NSClassFromString(@"ADBannerView");
if (adViewClass) {
if (self.adView == nil) {
self.adView = [[adViewClass alloc] initWithFrame:CGRectZero];
...
}
}
For more info on this you can visit the useyourloaf.com blog below.
Thanks to these blogs for the help:
http://blog.gregfiumara.com/?p=68&cpage=1
For more info on this you can visit the useyourloaf.com blog below.
Thanks to these blogs for the help:
http://blog.gregfiumara.com/?p=68&cpage=1
No comments:
Post a Comment