im using this:
local StoreListener
local PLATAFORMA
local store
if ( system.getInfo( “platformName” ) == “Android” ) then
store = require( “plugin.google.iap.v3” )
PLATAFORMA=“ANDROID”
elseif ( system.getInfo( “platformName” ) == “iPhone OS” ) then
store = require( “store” )
PLATAFORMA=“IOS”
end
and this line code:
store.init( “google”, StoreListener )
give me this error----
Runtime error
I/Corona (11811): ?:0: attempt to call field ‘?’ (a boolean value)
I/Corona (11811): stack traceback:
I/Corona (11811): ?: in function ‘new’
I/Corona (11811): ?: in function ‘_onEvent’
I/Corona (11811): ?: in function ‘?’
I/Corona (11811): ?: in function <?:677>
I/Corona (11811): ?: in function <?:221>
this is my build.settings
– Supported values for orientation:
– portrait, portraitUpsideDown, landscapeLeft, landscapeRight
settings = {
orientation = {
default = “portrait”,
supported = { “portrait”, }
},
plugins =
{
[“plugin.google.iap.v3”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { android=true }
},
[“plugin.google.play.services”] =
{
publisherId = “com.coronalabs”
},
},
android =
{
permissions =
{
{ name = “.permission.C2D_MESSAGE”, protectionLevel = “signature” },
},
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.GET_ACCOUNTS”,
“android.permission.RECEIVE_BOOT_COMPLETED”,
“com.google.android.c2dm.permission.RECEIVE”,
“.permission.C2D_MESSAGE”,
“com.android.vending.BILLING”,
“android.permission.ACCESS_NETWORK_STATE”,
},
},
iphone = {
plist = {
UIAppFonts =
{
“orange juice 2.0.ttf”,
},
UIStatusBarHidden = true,
UIPrerenderedIcon = false, – set to false for “shine” overlay
–UIApplicationExitsOnSuspend = true, – uncomment to quit app on suspend
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles =
{
“Icon.png”,
“Icon@2x.png”,
“Icon-60.png”,
“Icon-60@2x.png”,
“Icon-72.png”,
“Icon-72@2x.png”,
“Icon-76.png”,
“Icon-76@2x.png”,
},
--[[
– iOS app URL schemes:
CFBundleURLTypes =
{
{
CFBundleURLSchemes =
{
“fbXXXXXXXXXXXXXX”, – example scheme for facebook
“coronasdkapp”, – example second scheme
}
}
}
--]]
}
},
}
and this is my config.lua
local aspectRatio = display.pixelHeight / display.pixelWidth
–print(aspectRatio)
application = {
content = {
width = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ),
height = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ),
--width = 320,
–height = 480,
scale = “letterBox”,
fps = 30,
},
notification =
{
google =
{
– This Project Number (also known as a Sender ID) tells Corona to register this application
– for push notifications with the Google Cloud Messaging service on startup.
– This number can be obtained from the Google API Console at: https://code.google.com/apis/console
projectNumber = “changed for this post”,
},
},
license =
{
google =
{
key = “XXX my key of course i change it to make this post”,
– This is optional, it can be strict or serverManaged(default).
– stric WILL NOT cache the server response so if there is no network access then it will always return false.
– serverManaged WILL cache the server response so if there is no network access it can use the cached response.
–policy = “serverManaged”,
},
},
--[[
– Push notifications
notification =
{
iphone =
{
types =
{
“badge”, “sound”, “alert”, “newsstand”
}
}
}
--]]
}
What im doing wrong?