- [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.

enter image description here

 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

+3


source to share


2 answers


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.

+1


source


Change the presentation class of your banner self.linBannerView

in the storyboard to GADBannerView

.

Double check the same class is in the IBOutlet

one you did.



Hope it helps.

+3


source







All Articles