I setup the google licensing in my app, for the protection it’s supposed to provide against pirates. But, now when i run it on my iOS devices, I’m getting the following error:
Runtime error ERROR: Could not load provider (google) due to the following reason: module 'CoronaProvider.licensing.google' not found:resource (CoronaProvider.licensing.google.lu) does not exist in archive no field package.preload['CoronaProvider.licensing.google']
I’m wondering if this is normal, since I’m on an iOS device, instead of an android? Or will it do this on android as well? I would think corona would ignore the google licensing when it builds for iOS? I don’t have an android handy to test on, so I’m posting here.
Here’s how I implemented it:
Included the following in build.settings
android = { usesPermissions = { "android.permission.INTERNET", "com.android.vending.CHECK\_LICENSE", "com.android.vending.BILLING", }, },
and this in config.lua
application = { license = { google = { key = "mySpecialKey-removedForPostingPurposes", policy = "serverManaged", }, }, }
And the following in my main.lua
-- new google licensing stuff to protect against pirates. local licensing = require( "licensing" ) licensing.init( "google" ) local function licensingListener( event ) local verified = event.isVerified if not event.isVerified then --failed verify app from the play store, we print a message print( "Pirates: Walk the Plank!!!" ) native.requestExit() --assuming this is how we handle pirates end end licensing.verify( licensingListener )
Just want to be sure I haven’t missed anything.