iOS: Admob issue: module 'plugin.google.play.services' not found

Trying to implement admob v2, and I get this error. It works fine on Android.

Runtime error module 'plugin.google.play.services' not found:resource(plugin.google.play.services.lu) does not exist in archive no field

etc…

What’s going on?

Using build 2014.2511.

My build settings look like this (replacing personal stuff with “blahblah)”:

[lua]

settings =

{

  application = 

  {

      license =

      {

          google =

          {

              key = “blahblah”,

          },

      },

  },

  orientation =

  {

    default = “portrait”,

    supported =

    {

      “portrait”,

    },

  },

  iphone =

  {

    UIStatusBarHidden = true,

    plist =

    {

      UIStatusBarHidden = true,

      UIApplicationExitsOnSuspend = false,

      UIAppFonts =

      {

        “Quicksand-Bold.ttf”,

      },

      CFBundleIdentifier = “blahblah”,

      CFBundleIconFile = “Icon.png”,

      CFBundleIconFiles = {

            “Icon.png”,

            “Icon@2x.png”,

            “Icon-40.png”,

            “Icon-72.png”,

            “Icon-76.png”,

            “Icon-80.png”,

            “Icon-100.png”,

            “Icon-114.png”,

            “Icon-120.png”,

            “Icon-144.png”,

            “Icon-152.png”,

            “Icon-512.png”,

            “Icon-1024.png”,

            “Icon-Small-50.png”,

            “Icon-Small.png”,

            “Icon-Small@2x.png”

      },

      CFBundleLocalizations = {

        “en”

      },

    },

 FacebookAppID = “blahblah”,

 CFBundleURLTypes = {

{

  CFBundleURLSchemes = { “blahblah”, },

  }

 },

 [“URL types”] = {

item = {

[“URL Schemes”] =

{ [“Item 0”] = “blahblah” },

},

 },

   },

  android =

  {

    usesPermissions =

    {

       “android.permission.VIBRATE”,

       “android.permission.INTERNET”,

       “android.permission.ACCESS_NETWORK_STATE”,

       “com.android.vending.BILLING”,

    },

    googlePlayGamesAppId = “blahblah”

  },

  plugins =

  {

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

        {

            publisherId = “com.coronalabs”

        },

        [“CoronaProvider.gameNetwork.apple”] =

        {

            publisherId = “com.coronalabs”,

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

        },

        [“CoronaProvider.gameNetwork.google”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android = true }

        },

        [“plugin.google.iap.v3”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

        },

  },

  }

[/lua]

EDIT: similar issue:

http://forums.coronalabs.com/topic/53968-file-module-plugin-google-play-services-not-found-on-corona-simulator-when-using-admob-v2-plugin/

Please use:

local ads = require( “ads” )

in your lua files in cause you are doing something else different.

Rob

I’ve tried using that, but I just get

attempt to call field 'init' (a nil value)

when I try to init ads using

[lua]

ads.init(“admob”, “mykey”)

[/lua]

Can you post more code?

Ohhh myyyy goodness.

In the hubub of trying different requires, I forgot to actually write “require.” So I was just calling a string.

[lua]

local ads = “ads” --the stupid way that doesn’t work

local ads = require(“ads”) --the right way

[/lua]

Thank you for updating the documentation. It’s working swimmingly now. I’ll mark this as resolved.

Please use:

local ads = require( “ads” )

in your lua files in cause you are doing something else different.

Rob

I’ve tried using that, but I just get

attempt to call field 'init' (a nil value)

when I try to init ads using

[lua]

ads.init(“admob”, “mykey”)

[/lua]

Can you post more code?

Ohhh myyyy goodness.

In the hubub of trying different requires, I forgot to actually write “require.” So I was just calling a string.

[lua]

local ads = “ads” --the stupid way that doesn’t work

local ads = require(“ads”) --the right way

[/lua]

Thank you for updating the documentation. It’s working swimmingly now. I’ll mark this as resolved.