xcode - Could not find custom event class named MPGoogleAdMobBannerCustomEvent -
i having trouble integrating admob sdk mopub (in fabric). installed mopub through fabric installer. using ios swift, xcode version 7.3.1 (7d1014), base sdk ios 9.3, project deployment target ios 8.0.
i able display mopub test ads in app runtime errors when displaying admob ads through mopub.
i cannot find detailed instructions on how integrate admob sdk when using fabric mopub installer. instructions add third party libraries when using standalone mopub sdk. keep fabric mopub framework.
after got mopub test ads working, followed these steps:
i added googleadmobcustomevent.framework project, came in mopub-ios-custom-events.zip archive (found in https://dev.twitter.com/mopub/ios/mediation-fabric)
i added googlemobileads.framework (latest version google: v7.8.1) project.
in mopub dashboard, created new order, 1 line item , 2 ad units (banner , leaderboard) admob network.
when run project following error:
2016-05-28 12:03:57.662 mopubtest[43756:2148130] mopub: banner view (*adunit id*) loading ad mopub server url: *mopub server url* 2016-05-28 12:04:00.909 mopubtest[43756:2148130] mopub: not find custom event class named mpgoogleadmobbannercustomevent 2016-05-28 12:04:00.910 mopubtest[43756:2148130] mopub: banner ad view fetching ad network type: admob_native 2016-05-28 12:04:00.910 mopubtest[43756:2148130] mopub: banner view (*adunit id*) loading ad mopub server url: *mopub server url* 2016-05-28 12:04:00.954 mopubtest[43756:2148130] mopub: banner ad view fetching ad network type: clear 2016-05-28 12:04:00.954 mopubtest[43756:2148130] mopub: no ads found ad unit: *adunit id* 2016-05-28 12:04:02.365 mopubtest[43756:2148130] mopub: banner view (*adunit id*) failed. error: error domain=com.mopub.iossdk code=0 "the operation couldn’t completed. (com.mopub.iossdk error 0.)"
it looks missing step. guessing issue when integrating mopub provided googleadmobcustomevent.framework (which in objective-c, , contains mpgoogleadmobbannercustomevent header) swift project.
i've tried adding frameworks project both dragging , adding files (selecting copy files option). tried adding framework , header search paths, added bridging header file, changed paths inside framework header files.
in of above project compiles without errors still error @ runtime: could not find custom event class named mpgoogleadmobbannercustomevent
anyone ideas on wrong?
thanks!
update: able work switching fabric , mopub frameworks installed via cocoapods (instead of using fabric app):
installed fabric , mopub via cocoapods https://fabric.io/kits/ios/mopub/install
instead of adding googleadmobcustomevent.framework, added following objective-c files manually project:
mpgoogleadmobbannercustomevent.h
mpgoogleadmobbannercustomevent.m
mpgoogleadmobinterstitialcustomevent.h
mpgoogleadmobinterstitialcustomevent.mthese 4 files can found in adnetworksupport folder of ios mopub sdk git repo
created bridging header file following content:
#import <mopub_ios_sdk/mopub-bridging-header.h> #import <googlemobileads/googlemobileads.h>
i added googlemobileads.framework (latest version google: v7.8.1) project.
added path location of googlemobileads.framework/headers in targets' "search paths" -> "framework search path"
in theory can install mopub's custom events via cocoapads, @ moment not possible because of bug. (see https://stackoverflow.com/a/36830967/6394927)
i hope helps else in future.
Comments
Post a Comment