2

I have created a static library of a UIView libLinOneSdk.a. So i am getting crash when i am using it's property or funcitons. but if i am using LinDFPBanner.m Everything is working fine, In Storyboard i have hooked it in nib also. I searched but got no clue why in static libraries this is happening. The problem may be of Library Search Path. can anybody help me how can i give library search path.

enter image description here

 self.linBannerView.adUnitID1 = @"XXXX";
    self.linBannerView.rootViewController1 = self;

Also app is working fine in ipod touch5 and ipad mini. crashing in simulator and iphone 5s. it can be architech problem.

Do i need to create a framework rather static library ? because it's not working in iphone 5s

iOS
  • 213
  • 1
  • 14
  • Code needed to evaluate add exception break point – Arun Jan 05 '15 at 09:52
  • @Spynet- thier is no need for code, because everything is working fine when i am not using static libraies – iOS Jan 05 '15 at 09:53
  • Have you set LibrarySearchPath for the libLinOneSdk? – Mrunal Jan 05 '15 at 09:55
  • @confused tap on the black arrow inside the LinDFPBanner class – Arun Jan 05 '15 at 09:56
  • @Mrunal- no, i haven't added it. i suppose it should take it automatically. because before it i used libGoogleAdMobAds.a and i never gave it's path. – iOS Jan 05 '15 at 10:00
  • @Spynet- i clicked on it and it opens LinDFPBanner.h file – iOS Jan 05 '15 at 10:01
  • @Mrunal- Can u help me how to add library search path. because i have never added added search path for library. – iOS Jan 05 '15 at 10:16
  • @Confused did u solved ? open project settings and type header search path – Arun Jan 05 '15 at 10:21
  • did u got it ? @Confused – Arun Jan 05 '15 at 10:24
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/68212/discussion-between-confused-and-spynet). – iOS Jan 05 '15 at 10:25
  • I hope every thing in this stack overflow answer http://stackoverflow.com/questions/20157365/xcode-5-how-to-add-header-search-path-and-use-gdataxmlnode – Arun Jan 05 '15 at 10:36

2 Answers2

3

Change the class of your banner view self.linBannerView in storyboard to GADBannerView.

Double check the same class is there in the IBOutlet that you took.

Hope this helps..

Ashish Kakkad
  • 23,586
  • 12
  • 103
  • 136
Henit Nathwani
  • 442
  • 3
  • 10
1

The library libLinOneSdk.a only contains code for the armv7 architecture. iPhone 5s is 64-bit, so you need to include the 64-bit architecture code. You need to follow instructions for building a fat library first. After you do that, then you will need to follow the instructions below to get things linked properly.


When linked from a static library LinDFPBanner is getting dead stripped. To ensure it doesn't get dead stripped you need to add a reference to LinDFPBanner in your code. You can do so by adding the following code:

- (void)dummyMethod
{
  [LinDFPBanner class];
}

This will cause the class to be referenced and it should load properly when needed.

Community
  • 1
  • 1
ThomasW
  • 16,981
  • 4
  • 79
  • 106
  • Thanks, i will work on it and will accept your answer – iOS Jan 05 '15 at 15:24
  • @thomasW- thanks for pointing the real problem. i will ask new question how to make in xcode 6. the link you have provided is not working solution – iOS Jan 06 '15 at 12:03