Can not build AdMob plugin with Corona Enterprise

After looking more closely at your code in admob.lua, you should change:

local adsResponse = event.response

to

local adsResponse = event.phase 

My problem is somehow the same :frowning: i believe there were no errors logged. I am stumped :((

[Device] libMobileGestalt MobileGestaltSupport.m:153: pid 1703 (Xoomi) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled

[Device] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)

[Device] Platform: iPhone / iPhone9,4 / 10.3.2 / Apple A10 GPU / OpenGL ES 2.0 Metal - 39.9 / 2017.3076 / en-PH | PH | en_PH | en

using CoronaSDK Version 2017.3076 (2017.4.25) with XCode 8.3 on MacOS Sierra, iOS SDK 10.3.

TIA :slight_smile:

Are you linking both libAdMobPlugin.a and libGoogleMobileAds.a ?

Also make sure you have the AdSupport and CoreTelephony frameworks added to your project.

Hi, ingemar_cl

Thank you for your advice!

I can build it. 

But this app do not start up.

2017-05-17 16:17:54.659675+0900 바람필게요 -메시지형 연애게임[5409:1523232] [DYMTLInitPlatform] platform initialization successful 2017-05-17 16:17:54.707633+0900 바람필게요 -메시지형 연애게임[5409:1523115] -[FlurryWatchConnectivity init]: WatchConnectivity isn't linked, Flurry Analytics will be disabled for any paired watch 2017-05-17 16:17:54.947501+0900 바람필게요 -메시지형 연애게임[5409:1523115] libMobileGestalt MobileGestaltSupport.m:153: pid 5409 (·Ñá·Ö°·ÑÖ·Ö°·Ü∑·Ñë·Öµ·ÜØ·ÑÄ·Ö¶·Ñã·Ö≠ -·ÑÜ·Ö¶·Ñâ·Öµ·Ñå·Öµ·Ñí·Ö߷ܺ ·Ñã·Öß·Ü´·Ñã·Ö¢·ÑÄ·Ö¶·Ñã·Öµ·Ü∑) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled 2017-05-17 16:17:54.947661+0900 바람필게요 -메시지형 연애게임[5409:1523115] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see \<rdar://problem/11744455\>) 2017-05-17 16:17:55.043356+0900 바람필게요 -메시지형 연애게임[5409:1523115] Platform: iPod touch / iPod7,1 / 10.3.1 / Apple A8 GPU / OpenGL ES 2.0 Apple A8 GPU - 96.27.1 / 2017.3025 / ko-JP | JP | ko-Kore\_JP | ko 2017-05-17 16:17:55.101051+0900 바람필게요 -메시지형 연애게임[5409:1523115] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/1514D0D0-0D41-4096-8F3C-1368680B3D8C/Library/Cookies/Cookies.binarycookies 2017-05-17 16:17:55.173675+0900 바람필게요 -메시지형 연애게임[5409:1523115] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2017-05-17 16:17:55.175928+0900 바람필게요 -메시지형 연애게임[5409:1523115] [MC] Reading from public effective user settings. 2017-05-17 16:17:56.457216+0900 바람필게요 -메시지형 연애게임[5409:1523115] ERROR: ERROR: flurry.init() has not been called 2017-05-17 16:17:56.543174+0900 바람필게요 -메시지형 연애게임[5409:1523115] Flurry: Starting session on Agent Version [Flurry\_iOS\_175\_7.5.2] 2017-05-17 16:17:56.632581+0900 바람필게요 -메시지형 연애게임[5409:1523115] -[\_\_NSCFString count]: unrecognized selector sent to instance 0x17403c6a0

Would you tell me some advice?

Please try using Corona build 2017.3060 or later.

Also, it looks like you are trying to use Flurry Analytics, and you have not called init(). 

Thank you!

I try it but it do not start up yet.

I used Corona build 2017.3060 and 2017.3080.

It’s difficult to say why, however from the log above it looks like it’s Flurry Analytics that is causing the crash.

You can try to comment out all calls to Flurry to see if the app starts.

I tried to comment out all calls to Flurry to see if the app starts.

But it do not start up yet.

#import "CoronaApplicationMain.h" #import "AppCoronaDelegate.h" int main(int argc, char \*argv[]) { @autoreleasepool { CoronaApplicationMain( argc, argv, [AppCoronaDelegate class] ); // occurred signal SIGABRT } return 0; }

Would you tell me some advice?

Can you post the device log?

This is device log.

2017-05-18 10:08:11.961253+0900 바람필게요 -메시지형 연애게임[309:23154] [DYMTLInitPlatform] platform initialization successful 2017-05-18 10:08:11.990435+0900 바람필게요 -메시지형 연애게임[309:22954] -[FlurryWatchConnectivity init]: WatchConnectivity isn't linked, Flurry Analytics will be disabled for any paired watch 2017-05-18 10:08:12.233840+0900 바람필게요 -메시지형 연애게임[309:22954] libMobileGestalt MobileGestaltSupport.m:153: pid 309 (·Ñá·Ö°·ÑÖ·Ö°·Ü∑·Ñë·Öµ·ÜØ·ÑÄ·Ö¶·Ñã·Ö≠ -·ÑÜ·Ö¶·Ñâ·Öµ·Ñå·Öµ·Ñí·Ö߷ܺ ·Ñã·Öß·Ü´·Ñã·Ö¢·ÑÄ·Ö¶·Ñã·Öµ·Ü∑) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled 2017-05-18 10:08:12.233944+0900 바람필게요 -메시지형 연애게임[309:22954] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see \<rdar://problem/11744455\>) 2017-05-18 10:08:12.362772+0900 바람필게요 -메시지형 연애게임[309:22954] Platform: iPod touch / iPod7,1 / 10.3.1 / Apple A8 GPU / OpenGL ES 2.0 Apple A8 GPU - 96.27.1 / 2017.3080 / ko-JP | JP | ko-Kore\_JP | ko 2017-05-18 10:08:12.420204+0900 바람필게요 -메시지형 연애게임[309:22954] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/D0E994EA-5459-4162-99EA-91E7DB7153E8/Library/Cookies/Cookies.binarycookies 2017-05-18 10:08:12.486906+0900 바람필게요 -메시지형 연애게임[309:22954] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 2017-05-18 10:08:12.489037+0900 바람필게요 -메시지형 연애게임[309:22954] [MC] Reading from public effective user settings.

Regards,

Unfortunately there is nothing in those logs that can explain why your app isn’t starting.

May I ask, is this your first Corona Enterprise app for iOS?

No, this app is already release.

https://itunes.apple.com/kr/app/%EB%B0%94%EB%9E%8C%ED%95%84%EA%B2%8C%EC%9A%94-%EB%A9%94%EC%8B%9C%EC%A7%80%ED%98%95-%EC%97%B0%EC%95%A0%EA%B2%8C%EC%9E%84/id1163447549?mt=8

When I include AdMob Plugin, it is occurred.

Which should I send logs?

From your device log I can see that AdMob isn’t being initialized at all. 

Are you sure you have the -all_load flag set under ‘Other Linker Flags’ in your Xcode project?

Yes, I have -all_load and -ObjC flag set under ‘Other Linker Flags’ in your Xcode project.

I suspect there is some issue with your Xcode project when including the AdMob plugin.

Here is a working Corona Enterprise project with the AdMob plugin included:

https://www.dropbox.com/s/47ybwlpit25fazl/AdMobSample.zip?dl=0

Please note:

To compile the app you will need to change the bundle-id, and Team in the Xcode project.

You will also need to add your AdMob AppID and AdUnitIds to main.lua.

You can compare the sample Xcode project above with your own to see if you can find any differences that may cause your app to fail.

Thank you for your advice.

I have searched any differences the may cause my app to fail.

But I could not search it.

I think related this log.

2017-05-22 17:50:19.550146+0900 浮気したら死んだ…◆恋愛謎解きチャットゲームでアナタもリア充?[401:33492] -[\_\_NSCFString count]: unrecognized selector sent to instance 0x17402ae60 2017-05-22 17:50:21.505087+0900 浮気したら死んだ…◆恋愛謎解きチャットゲームでアナタもリア充?[401:33527] Could not successfully update network info during initialization.

Would you tell me some advice?

It definitely has to do with:

[__NSCFString count]: unrecognized selector sent to instance 0x17402ae60

 but unfortunately I do not know where it comes from.

I assume you are calling admob.init() in your main.lua?

Also, can you post the code you use for admob.init() and admob.load()?

I don’t call admob.init() in my main.lua. 

But it occurred.

Can you post the code you use for admob.init() and admob.load()?

I understand.

This is admob.lua .

local admob = require 'plugin.admob' local object = require 'object' local this = object.new() this.initialized = false this.option = {} this.ads\_type = nil local isShow = false local function adListener( event ) local adsResponse = event.response if event.phase == 'init' then admob.load( 'rewardedVideo', { adUnitId = this.option.adUnitId } ) elseif event.phase == 'reward' then isShow = false adsResponse = 'reward' elseif event.phase == 'closed' then adsResponse = 'closed' elseif event.phase == 'failed' then if isShow then hideModal() adsResponse = 'reward-failed' end end this:dispatchEvent{ adnetwork = 'admob', name = adsResponse, origin\_response = event } end function this.init( option ) this.option = option admob.init( adListener, { appId = option.appId, testMode = option.testMode } ) this.initialized = true end function this.prepare( ads\_type, option ) assert( this.initialized == true, 'ERROR : ads.init() をして下さい' ) assert( ads\_type, 'ERROR : ads\_typeが指定されていません' ) admob.load( 'rewardedVideo', { adUnitId = this.option.adUnitId } ) end function this.show( ads\_type, option ) assert( this.initialized == true, 'ERROR : ads.init() をして下さい' ) assert( ads\_type, 'ERROR : ads\_typeが指定されていません' ) assert( ads\_type == 'rewardedVideo', 'ERROR : 存在しないads\_typeです' ) if admob.isLoaded( ads\_type ) then isShow = true admob.show( ads\_type ) else -- adListener{ response = 'reward-failed' } timer.performWithDelay( 500, function() this.show( ads\_type, option ) end ) end end function this.remove() end return this

This is main.lua.

\_H = display.contentHeight \_W = display.contentWidth CENTER\_X = display.contentCenterX CENTER\_Y = display.contentCenterY local admob = require 'admob' admob.init{ appId = 'ca-app-pub-9384125113983211', adUnitId = 'ca-app-pub-9384125113983211/3077096087' } local function adsHandler( event ) if event.name == 'reward' then timer.performWithDelay( 300, function() local alert = native.showAlert( '視聴完了', 'アイテムを手に入れました。', { 'OK' } ) end ) end if event.name == 'closed' then ads.prepare( 'rewardedVideo' ) end end admob:addEventListener( adsHandler ) local rect = display.newRect( CENTER\_X, CENTER\_Y, 200, 200 ) rect:addEventListener( 'tap', function() admob.show( 'rewardedVideo' ) end )

If I try build Android AdMob plugin with Corona SDK(not Enterorise), it works without problems.