Error with clicking on adView / XCode 7 / iOS 9.2 / Swift

ios

#1

After integrating mopub in my project I have successfully loaded AdView with Test ID, but after clicking on it I’m getting this error:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Containers/Bundle/Application/2BC54729-C930-47B1-B33C-38BB57772F10/myappname.app> (loaded)' with name 'MPAdBrowserController''

My Podfile has use_frameworks and because of that I’m unable to set h file in bridging header, but I just import

#import mopub_ios_sdk

in every controller where adview is used.

Important note: I used banner view example from Fabric


#2

I checked now, problem exists even with native UITableView when I click on Install button (cannonball example nib)


#3

I put xib file “MPAdBrowserController.xib” into project tree from SDK (just copy from pod resources) and after that click work correctly!
This is some kind of issue with pod installation.


#4

Hi @sourceCtrl,

This issue might occur if the files are renamed outside the Xcode, which would cause Xcode to be unable to find the files. If you are still experiencing the crash after you’ve ensure that the files haven’t been renamed, please reach out to us directly at support@mopub.com with the as much of the following as you can:

  • Number of observed app crashes
  • MoPub SDK version
  • Partner SDK version
  • Ad unit ID associated with the crash
  • Steps to replicate the crash
  • Crashlytics link and/or crash logs.

Thanks!


#5

Having exactly same issue when using MoPub with Cocoapods and use_frameworks!.
Furthermore, I have to use these imports to make it build, not those from tutorial or Fabric app guide.
Bridging header:

#import mopub_ios_sdk/MoPub-Bridging-Header.h>

AppDelegate

import Fabric
import Crashlytics
import mopub_ios_sdk