- [UIView setAdUnitID1:]: unrecognized selector posted to the instance
I created a static library UIView
libLinOneSdk.a
. So I am getting crash when I use its property or funcitons. but if I use LinDFPBanner.m
Everything works fine, in Storyboard I also connected it in nib. I searched but did not understand why in static libraries this is happening. The problem could be Library search path . can someone help me how can i give the library search path.
self.linBannerView.adUnitID1 = @"XXXX";
self.linBannerView.rootViewController1 = self;
Also the app works fine on ipod touch5 and ipad mini. crash in simulator and iphone 5s. it might be an architech problem.
Do I need to build a framework and not a static library? because it doesn't work in iphone 5s
source to share
LibLinOneSdk.a contains only armv7 architecture code. iPhone 5s is 64-bit, so you need to enable 64-bit architecture code. You need to follow the instructions for building the thick library first . Once you've done that, you'll need to follow the instructions below to tie things up correctly.
It LinDFPBanner
becomes dead when linking from a static library . To make sure it's not lost, you need to add a link to LinDFPBanner
in your code. You can do this by adding the following code:
- (void)dummyMethod
{
[LinDFPBanner class];
}
This will cause the class to be referenced and should be loaded properly when needed.
source to share