Admob runtime error when runnning on iPhone 4

That sounds a bit weird. That might be a typo in the docs, as their sample code for FAN doesn’t include it in build.settings.

https://github.com/coronalabs/plugins-sample-fbAudienceNetwork

Yeah I thought it was a type, but on the docs it was specified “…add two entries into the plugins table of build.settings”

Anyway, thanks!

Even when removing the supportedPlatforms entry there are still those pesky warnings for iOS:

warning: /var/folders/9j/vw2bf7xn53g9ms_nnp0sct9167gh9d/C/org.llvm.clang.chrisp/ModuleCache/3WS22YCC15OO/Foundation-A3SOD99KJ0S9.pcm: No such file or directory
while processing /Users/ingemar/Downloads/testadscode.app/.build/plugin.fbAudienceNetwork/libFBAudienceNetwork.a(FBAdCache.o):
warning: /var/folders/9j/vw2bf7xn53g9ms_nnp0sct9167gh9d/C/org.llvm.clang.chrisp/ModuleCache/3WS22YCC15OO/Foundation-A3SOD99KJ0S9.pcm: No object file for requested architecture
while processing /Users/ingemar/Downloads/testadscode.app/.build/plugin.fbAudienceNetwork/libFBAudienceNetwork.a(FBAdCache.o):
warning: /var/folders/9j/vw2bf7xn53g9ms_nnp0sct9167gh9d/C/org.llvm.clang.chrisp/ModuleCache/3WS22YCC15OO/UIKit-2LM3EQU7VVY4O.pcm: No such file or directory
while processing /Users/ingemar/Downloads/testadscode.app/.build/plugin.fbAudienceNetwork/libFBAudienceNetwork.a(FBAdCache.o):
warning: /var/folders/9j/vw2bf7xn53g9ms_nnp0sct9167gh9d/C/org.llvm.clang.chrisp/ModuleCache/3WS22YCC15OO/UIKit-2LM3EQU7VVY4O.pcm: No object file for requested architecture
while processing /Users/ingemar/Downloads/testadscode.app/.build/plugin.fbAudienceNetwork/libFBAudienceNetwork.a(FBAdCache.o):
warning: /var/folders/9j/vw2bf7xn53g9ms_nnp0sct9167gh9d/C/org.llvm.clang.chrisp/ModuleCache/3WS22YCC15OO/Darwin-MI6WZSG1PNOM.pcm: No such file or directory
while processing /Users/ingemar/Downloads/testadscode.app/.build/plugin.fbAudienceNetwork/libFBAudienceNetwork.a(FBAdCache.o):
warning: /var/folders/9j/vw2bf7xn53g9ms_nnp0sct9167gh9d/C/org.llvm.clang.chrisp/ModuleCache/3WS22YCC15OO/Darwin-MI6WZSG1PNOM.pcm: No object file for requested architecture
.
.
.

I’m starting to wonder if they’ve forgotten to add the 64-bit slice for iOS…

I’m asking Engineering to chime in and see what’s going on.

Rob

Lots of questions here.

Google Play Services aka GPS, are required when using FAN for Android, for access to the advertising identifier. The reason the docs have the supported platforms line including Android only, is that it’s only required to use GPS with FAN for Android builds.

If you’re using admob along with FAN on both platforms, you should remove the supported platforms line. I’ll get the docs for this fixed, to make this clearer. Sorry for the confusion.

Regarding the iOS 6 warnings, FAN do support iOS 6, but their SDK is built against iOS 7, hence the harmless warnings. We should probably supress these warnings however, as they clutter the build log.

I’ll look into that.

Hope this clears things up. Let me know if you have any further questions.

This is my build.setting

– Supported values for orientation:

– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

settings = {

    orientation = {

        default = “portrait”,

        supported = { “portrait”, }

    },

    plugins =

    {

       [“plugin.google.play.services”] =

        {

            publisherId = “com.coronalabs”

        },

    },

    

    iphone = {

        plist = {

            CFBundleShortVersionString = “1.0”,

            CFBundleIconFile = “Icon.png”,

            UIBackgroundModes = {“remote-notification”},

            NSLocationWhenInUseUsageDescription = “Your location is used to find businesses around your location. This is shown on the first page the lowest button. Also it is used if you want to show the option to drive to the business location.”,

            UIStatusBarHidden = false,

            UIPrerenderedIcon = true, – set to false for “shine” overlay

            --UIApplicationExitsOnSuspend = true, – uncomment to quit app on suspend

            

            – iOS app URL schemes:

            CFBundleURLTypes =

            {

                {

                    CFBundleURLSchemes =

                    {

                        “fbXXXXXXXXXXXXXX”, – example scheme for facebook

                        “coronasdkapp”, – example second scheme

                    }

                }

            }

          

        }

    },

    android =

    {

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.ACCESS_FINE_LOCATION”,

            “android.permission.ACCESS_COARSE_LOCATION”,

            “android.permission.WRITE_INTERNAL_STORAGE”,

            “android.permission.CALL_PHONE”,

        },

    },

     plugins =

    {

    [“plugin.GameThrivePushNotifications”] =

    {

        publisherId = “com.gamethrive”,

    },

    [“plugin.google.play.services”] =

    {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true, [“android-kindle”]=true },

    },

    },  

}

It didnt help when I took the second google plugin out either.

When you build what “Store” did you select from the menu? Recently it has only worked for me using the Google value. Not sure if that is your issue but give it a try. 

I could fix it by adding this:

supportedPlatforms = { iphone = true, [“iphone-sim”] = true } --for iOS

You are loading the old admob plugin. You need to load the admob v2 plugin instead. We removed the old deprecated plugin. It should mostly be a change to your build.settings.

See: https://docs.coronalabs.com/plugin/ads-admob-v2/index.html

Rob

ROb, I did what it was on that link but I git error message on iPhone 4.

Post your current build.settings file.  Please paste the code in the box that pops up when you click the blue <> button in the edit bar (with Bold, Italic, etc.).

Also, copy and paste the text from your terminal window where you’re getting your output from the device. If you don’t know how to do this, please see:

http://docs.coronalabs.com/guide/basics/debugging/index.html

Rob

I had the exact same problem and just found what’s causing the error.

In my case I was using AdMob and FB Audience Network.

To activate FAN plugin you need to add, as documented here:

settings = { plugins = { ["plugin.fbAudienceNetwork"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true, osx=true, ["win32-sim"]=true } }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, }, }

the issue in my case is the line:

       supportedPlatforms = { android=true }

Removing the line fix the issue (now, I don’t know if that line is a typo or it’s actually needed for FB Audience Network… in that case there’s a bug)

@amirfarazmand

In your first post, you also have two plugins= sections in your build.settings. One at the beginning and one at the end, which would cause issues.

Hi Ingemar, that didn’t seem to cause error. As mentiioned this line fixed the error:

supportedPlatforms = { iphone = true, [“iphone-sim”] = true } --for iOS

If you get an error in the simulator saying it can’t find the plugin, comment out the supportedPlatform line in build.settings and relaunch the simulator. This will let the simulator download it’s stub file. Once thats done, you can re-enable the supportedPlatform line.

This has been fixed in recent daily builds.

Rob

 
In my case I don’t get an error on the simulator but on device.
 
I’m using the latest daily and I’ve tried commenting and re-enabling the supportedPlatform but I still get the runtime error.
 
As I wrote above, the issue (at least in my case) is using FB Audience Network & AdMob at the same time.
 
Specifically, FB Audience Network requires adding the line supportedPlatforms= { android=true } to  plugin.google.play.services (btw, why do we need to load the google play services when using only FB Audience Network?) :

["plugin.google.play.services"] =&nbsp;{ &nbsp; &nbsp; &nbsp; publisherId = "com.coronalabs", &nbsp; &nbsp; &nbsp; supportedPlatforms = { android=true } },

Removing that line OR changing it (as instructed by amirfarazmand above) to:
   supportedPlatforms = { iphone = true, [“iphone-sim”] = true } --for iOS
   (btw, where does this come from, can’t find anything on the docs)
 
solves the issue.
 
Is it only on my side? Can someone try adding FAN + ADMOB with supportedPlatforms = {android = true} and build on device?
 
 
 
FIY, this is my most simplified test code exhibiting the issue:
 
build.settings 

settings ={ &nbsp; &nbsp; plugins = &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; ["plugin.fbAudienceNetwork"] = &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publisherId = "com.coronalabs", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; supportedPlatforms = { iphone=true, android=true, osx=true, ["win32-sim"]=true } &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; ["plugin.google.play.services"] = &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publisherId = "com.coronalabs", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; supportedPlatforms = { android=true } &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; }, }

main.lua

local ads = require( "ads" ) local fbAudienceNetwork = require( "plugin.fbAudienceNetwork" ) function testListener( ... ) end ads.init( "admob", "ads", testListener ) local function adListener( ... ) end fbAudienceNetwork.init( adListener )

The error on device is:
<Warning>: Runtime Error: Runtime error: ERROR: Could not load provider (admob) due to the following reason: module ‘CoronaProvider.ads.admob’ not found:resource (CoronaProvider.ads.admob.lu) does not exist in archive

Another thing I noticed is that recently it takes a really long time to build the code (stuck in Communicating with build server… for a long time) then when it start building I see a lot of warning messages in the console for the most part like:

testadmob.app/.build/plugin.fbAudienceNetwork/libFBSDKCoreKit.a(FBSDKUtility.o)) was built for newer iOS version (7.0) than being linked (6.0)

@PXL artificer

FAN on iOS requires iOS 7. I believe Corona still targets iOS 6 by default so you can try adding a MinimumOSVersion in your build.settings for iOS. That should get rid of the warnings.

build.settings

settings = { iphone = { plist = { MinimumOSVersion = "7.0" } } }

Just tried, but no, it’s not what’s causing the runtime error.

I’m seeing a lot of warnings on compiling the FB Audience Network plugin

warning: /var/folders/9j/vw2bf7xn53g9ms_nnp0sct9167gh9d/C/org.llvm.clang.chrisp/ModuleCache/3WS22YCC15OO/Foundation-A3SOD99KJ0S9.pcm: No such file or directory

Jan 29 01:46:48.052 while processing /Users/rubenfrosali/Desktop/testadmob.app/.build/plugin.fbAudienceNetwork/libFBAudienceNetwork.a(FBAdCache.o):

Jan 29 01:46:48.052 warning: /var/folders/9j/vw2bf7xn53g9ms_nnp0sct9167gh9d/C/org.llvm.clang.chrisp/ModuleCache/3WS22YCC15OO/Foundation-A3SOD99KJ0S9.pcm: No object file for requested architecture

almost 100 similar warnings on compile

While I’m seeing a lot of error on compiling the fbAudienceNetwork plugin, the error seems still caused by admob, because of the line required by FAN

supportedPlatforms = { android=true }

The error message is

ERROR: Could not load provider (admob) due to the following reason: module ‘CoronaProvider.ads.admob’ not found:resource (CoronaProvider.ads.admob.lu) does not exist in archive.

OK, there seem to be multiple things going on here, but I assume that the iOS7/iOS6 warnings should be gone now at least.

The warnings you reported now indicate that the archive doesn’t have the iOS slice necessary to compile. 

I’ll try to set up a test project myself to see if I can find out what’s going on.

BTW What version of OS X / Xcode are you using?