Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

plugin.gpgs: login() is not supported on this platform
Started by pigscanfly2k Mar 05 2020 01:19 PM

6 replies to this topic
gpgs login
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

pigscanfly2k

[GLOBAL: userInfoPane.html]
pigscanfly2k
  • Observer

  • 9 posts
  • Corona SDK

Hi everyone,

 

I am trying to get started with setting up GPGS for a project and I am hoping I will be able to login and develop the app through the corona console but I am getting this error:

 

plugin.gpgs: login() is not supported on this platform

 

I am not really certain how to go about trouble shooting this, any help would be appreciated.

 

Cheers ~



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,680 posts
  • Enterprise

You need to use the v2 version of the plugin.

 

See: http://docs.coronalabs.com/plugin/gpgs2/index.html

 

Rob



[TOPIC: post.html]
#3

pigscanfly2k

[GLOBAL: userInfoPane.html]
pigscanfly2k
  • Observer

  • 9 posts
  • Corona SDK

Hi Rob, 

Thanks for the response, I already have been setup for v2:
 

 
local gpgs = require( "plugin.gpgs.v2" )
 
 
 
 
 
--
-- Plugins section
--
plugins =
{
        ["plugin.gpgs.v2"] = {
            publisherId = "com.coronalabs",
            supportedPlatforms = {["android"] = true}
        }
},
 
 
Is there anything else I might be missing?
 
Cheers ~`


[TOPIC: post.html]
#4

pigscanfly2k

[GLOBAL: userInfoPane.html]
pigscanfly2k
  • Observer

  • 9 posts
  • Corona SDK

Is there anyone that can help with this issue?

I am completely unable to resolve this:
 

-- main.lua
local gpgs = require( "plugin.gpgs.v2" )
local function gpgsLoginListener(event)
print("login called...")
end
gpgs.login({userInitiated=true, listener=gpgsLoginListener})
 
-- build.settings
 
--
-- Plugins section
--
plugins =
{
        ["plugin.gpgs.v2"] = {
            publisherId = "com.coronalabs",
            supportedPlatforms = {["android"] = true}
        }
},

 

Open a brand new project with the above settings and I always get this error:

plugin.gpgs: login() is not supported on this platform.
 
Any ideas would be appreciated.
 
Cheers ~


[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,680 posts
  • Enterprise

Please read this: http://docs.coronalabs.com/tutorial/games/gameLeaderboards/index.html

 

Rob



[TOPIC: post.html]
#6

pigscanfly2k

[GLOBAL: userInfoPane.html]
pigscanfly2k
  • Observer

  • 9 posts
  • Corona SDK

Hi Rob,

 

I was finally able to get this code to run, but only by testing it directly on my own personal android device.

 

Is it not possible to connect to gpgs through the corona simulator? Maybe I missed this information somewhere?

 

Cheers ~



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,680 posts
  • Enterprise

Most plugins only work on devices. Here's the reason.

 

A plugin like GPGS is built to run on Android. It's a series of Java libraries that call Android native features, looks for devices with Google Play installed and so on. Your Windows or Mac computer doesn't understand these Java/Android libraries since those devices are not running Android nor do you have Google Play available for Windows or Macs. 

 

Every Ad plugin, in-app purchases, analytics plugin and many more only run when testing your app on a real device.

 

On Windows, the simulator is a Windows .exe On macOS, it's a macOS executable. It's simulating the Corona API's but it doesn't emulate a device.

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: gpgs, login