(GPGS) iOS Problem

Hi,

maybe you can help us. We have a problem using GPGS on a iOS Build. When we start the app, the GPGS permission-screen appears. But when we select accept it goes back to the game and then a white screen pops up while the app is not usable anymore… However the background music is still running.

Is this maybe because we’re using a development provisioning profil?

Do we need to upload the app to testflight in order to test GPGS?

We’re stuck… there is also no valuable information coming from the debug console. :frowning:

Can anyone help us or has similar experiences?

Cheers,

Patrick

Hi Patrick,

Did you follow all of the detailed setup requirements (by Google) outlined here?

https://docs.coronalabs.com/plugin/gpgs/index.html#ios

Brent

Hi Brent,

thank you for your message.

Everthing is excactly set up in the build settings like it is told in the docs…

Any other ideas?

Cheers, Pat

We have broken down out issue to a sample project.

We check “everything” configurationwise and it seems all right. We checked a lot of articles and threads but were unable to come to the solution yet. We linked the app to our google play developer console with Android and iOS as described in this article: LINK

For the sample project we used Corona version: 2016.3002 and 2016.2992 with the following code:

local lGameNetwork lGameNetwork = require( "plugin.gpgs" ) local function gameLoginCallback( event ) print("gameLoginCallback2") print(json.prettify(event)) end local function gameRequestCallback( event ) print(json.prettify(event)) if event.name == "init" then print("login Called2") lGameNetwork.login( { userInitiated = true, listener = gameLoginCallback }) end end function setUpGameNetwork() if lGameNetwork.isConnected() then print("setUpGameNetwork, already logged in") return end print("globalGameNetwork.init") lGameNetwork.init( gameRequestCallback ) end

Our main file just calls "setUpGameNetwork() "

On version 3002 the “gameLoginCallback()” is never called, the last print we can see is “login Called2”.

On 2992 the “gameLoginCallback()” states that the login succeded (phase = “logged in”).

However, in both cases the app shows the following behaviour:

  1. The App is opened and automatically swipes to the screen asking for permission.
  2. We accept the asked permissions.
  3. The App swipes back to our App.
  4. Then the App immediately swipes to ask for permissions-screen, again.
  5. We accept again.
  6. The App swipes back to our App again.
  7. But then: Now the App swipes in the same direction the permission screen was befoire but, the  screen does not contain any permissions. It is simly white. The App however is running.

We don’t think that the build.settings are the issue however here is the settings we use.

settings = { orientation = { default = "portrait", -- Initial launch orientation supported = {"portrait"} -- Table of allowed options for auto-orientation }, android = { googlePlayGamesAppId = "46xxxxxxxxxx", usesPermissions = { "android.permission.VIBRATE", "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.VIBRATE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", "com.android.vending.BILLING", "android.permission.RECEIVE\_BOOT\_COMPLETED", "android.permission.GET\_ACCOUNTS" }, usesFeatures = { { name="android.hardware.location", required=false }, { name="android.hardware.location.gps", required=false }, { name="android.hardware.location.network", required=false }, }, }, plugins = { ["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true, iphone=true, ["android-kindle"]=false } }, }, iphone = { plist = { CFBundleDisplayName = "Corecraft", CFBundleName = "Corecraft", CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png" }, UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPad Pro Portrait ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Portrait-1366", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{1024, 1366}" }, }, --required UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, UIStatusBarHidden = true, --APPODEAL REQUIRES MINIMUM 8.0! MinimumOSVersion = "8.0", --CoronaLabs NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, --GPGS GooglePlayGamesOAuth2ClientId = "46xxxxxxxxxx-cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxr.apps.googleusercontent.com", CFBundleURLTypes = { { CFBundleURLSchemes = { "com.googleusercontent.apps.46xxxxxxxxxx-cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxr } }, { CFBundleURLSchemes = { "com.rxxxxx.cxxxxxxx" } }, }, --OneSignal NSLocationUsageDescription = "Location permission prompt text", NSLocationWhenInUseUsageDescription = "Location permission prompt text", }, }, }

Does anybody ever had this App behaviour-issue ending up in a white screen?

Thanks for any help in advance.

In a similar issue I have found something:

Quoting form thread ( https://github.com/playgameservices/play-games-plugin-for-unity/issues/1354 )

“For Android users who don’t have a Google Game Play Service account, you will be guided to create one then you’ll log in sucessfully. But there’s no guide for IOS users to follow, it’s the reason why cause the IOS users fail to sign in.”

And Indeed we have found the issue but not the solution to it.

We were using an email adress on our test device that is not linked with a gpgs profile.

So basically anybody that would use an email with no GPGS linked would be unable to play our game.

Is it possible that we are send towards a non existing page? Or is this an error?

If we switch at the permission screen to an email that has a gpgs profile we are logged in successfully.

Hi @amplexor,

So when you use a “no-GPGS-linked” email, you get no responses at all from the GPGS callback functions? No event tables that may contain information which you can process and handle? The app just “stalls” outright and there’s no way to continue?

Brent

Exactly,

>no-GPGS-linked email -> No callback is called after we try to login.

>GPGS-linked email -> Callback -> phase = “logged in”

However, this behaviour itself wouldn’t be the main issue here. We would be able to create a workaround for that.

The main issue is that after the no-GPGS-linked user tries to log in we are automatically passed to a white screen.

Which I assume is the screen that would contain a “How to setup GPGS”-guide but it is simply white.

And there is no way to continue in this stage. I have to “kill” the app and restart it.

Hi @amplexor,

Can you gather any details from the Xcode/iOS console log output on what it’s “attempting to do” when it goes to that blank white screen? Is there any kind of error details or something that might help us figure out what’s going on (or what GPGS is trying to do but apparently isn’t)?

Brent

Hey there, sorry for the late reply, I’m in on the problem with amplexor:

I have done a log starting at the screen where a user can choose an account (after lGameNetwork.login is called)

(The screen swipes to the choose account screen then I started this log)

Here it goes:

Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation started: SIGN IN Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation SIGN IN finished with status VALID Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: User signed in: 107980706\*\*\*\*\*\*\*\*\*\*\*3 Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Done loading from datastore. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Called RegisterCurrentDeviceToken With empty token. Ignoring. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Application metadata cache entry expired. Refreshing. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Achievement cache fully expired: refreshing all. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Snapshot cache fully expired: refreshing all. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: ERROR: Async revision check returned an error status; forcing sign-out. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation started: SIGN OUT Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Converting an invalid BaseStatus to a FlushStatus. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: ERROR: Could not automatically seed application metadata cache. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Could not automatically seed player level cache. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: About to KickstartRetries. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: About to wait on condition variable. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Finished waiting! Main dispatch may now continue unimpeded Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation SIGN OUT finished with status ERROR\_NOT\_AUTHORIZED Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation SIGN IN finished with status ERROR\_NOT\_AUTHORIZED Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Could not automatically seed achievement cache. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Error fetching local player for Welcome Back UI Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Could not automatically seed snapshot cache.

Best new year :slight_smile:

Hi Patrick,

Did you follow all of the detailed setup requirements (by Google) outlined here?

https://docs.coronalabs.com/plugin/gpgs/index.html#ios

Brent

Hi Brent,

thank you for your message.

Everthing is excactly set up in the build settings like it is told in the docs…

Any other ideas?

Cheers, Pat

We have broken down out issue to a sample project.

We check “everything” configurationwise and it seems all right. We checked a lot of articles and threads but were unable to come to the solution yet. We linked the app to our google play developer console with Android and iOS as described in this article: LINK

For the sample project we used Corona version: 2016.3002 and 2016.2992 with the following code:

local lGameNetwork lGameNetwork = require( "plugin.gpgs" ) local function gameLoginCallback( event ) print("gameLoginCallback2") print(json.prettify(event)) end local function gameRequestCallback( event ) print(json.prettify(event)) if event.name == "init" then print("login Called2") lGameNetwork.login( { userInitiated = true, listener = gameLoginCallback }) end end function setUpGameNetwork() if lGameNetwork.isConnected() then print("setUpGameNetwork, already logged in") return end print("globalGameNetwork.init") lGameNetwork.init( gameRequestCallback ) end

Our main file just calls "setUpGameNetwork() "

On version 3002 the “gameLoginCallback()” is never called, the last print we can see is “login Called2”.

On 2992 the “gameLoginCallback()” states that the login succeded (phase = “logged in”).

However, in both cases the app shows the following behaviour:

  1. The App is opened and automatically swipes to the screen asking for permission.
  2. We accept the asked permissions.
  3. The App swipes back to our App.
  4. Then the App immediately swipes to ask for permissions-screen, again.
  5. We accept again.
  6. The App swipes back to our App again.
  7. But then: Now the App swipes in the same direction the permission screen was befoire but, the  screen does not contain any permissions. It is simly white. The App however is running.

We don’t think that the build.settings are the issue however here is the settings we use.

settings = { orientation = { default = "portrait", -- Initial launch orientation supported = {"portrait"} -- Table of allowed options for auto-orientation }, android = { googlePlayGamesAppId = "46xxxxxxxxxx", usesPermissions = { "android.permission.VIBRATE", "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.VIBRATE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COARSE\_LOCATION", "com.android.vending.BILLING", "android.permission.RECEIVE\_BOOT\_COMPLETED", "android.permission.GET\_ACCOUNTS" }, usesFeatures = { { name="android.hardware.location", required=false }, { name="android.hardware.location.gps", required=false }, { name="android.hardware.location.network", required=false }, }, }, plugins = { ["plugin.gpgs"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true, iphone=true, ["android-kindle"]=false } }, }, iphone = { plist = { CFBundleDisplayName = "Corecraft", CFBundleName = "Corecraft", CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png" }, UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- iPad Pro Portrait ["UILaunchImageMinimumOSVersion"] = "9.0", ["UILaunchImageName"] = "Default-Portrait-1366", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{1024, 1366}" }, }, --required UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, UIStatusBarHidden = true, --APPODEAL REQUIRES MINIMUM 8.0! MinimumOSVersion = "8.0", --CoronaLabs NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, --GPGS GooglePlayGamesOAuth2ClientId = "46xxxxxxxxxx-cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxr.apps.googleusercontent.com", CFBundleURLTypes = { { CFBundleURLSchemes = { "com.googleusercontent.apps.46xxxxxxxxxx-cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxr } }, { CFBundleURLSchemes = { "com.rxxxxx.cxxxxxxx" } }, }, --OneSignal NSLocationUsageDescription = "Location permission prompt text", NSLocationWhenInUseUsageDescription = "Location permission prompt text", }, }, }

Does anybody ever had this App behaviour-issue ending up in a white screen?

Thanks for any help in advance.

In a similar issue I have found something:

Quoting form thread ( https://github.com/playgameservices/play-games-plugin-for-unity/issues/1354 )

“For Android users who don’t have a Google Game Play Service account, you will be guided to create one then you’ll log in sucessfully. But there’s no guide for IOS users to follow, it’s the reason why cause the IOS users fail to sign in.”

And Indeed we have found the issue but not the solution to it.

We were using an email adress on our test device that is not linked with a gpgs profile.

So basically anybody that would use an email with no GPGS linked would be unable to play our game.

Is it possible that we are send towards a non existing page? Or is this an error?

If we switch at the permission screen to an email that has a gpgs profile we are logged in successfully.

Hi @amplexor,

So when you use a “no-GPGS-linked” email, you get no responses at all from the GPGS callback functions? No event tables that may contain information which you can process and handle? The app just “stalls” outright and there’s no way to continue?

Brent

Exactly,

>no-GPGS-linked email -> No callback is called after we try to login.

>GPGS-linked email -> Callback -> phase = “logged in”

However, this behaviour itself wouldn’t be the main issue here. We would be able to create a workaround for that.

The main issue is that after the no-GPGS-linked user tries to log in we are automatically passed to a white screen.

Which I assume is the screen that would contain a “How to setup GPGS”-guide but it is simply white.

And there is no way to continue in this stage. I have to “kill” the app and restart it.

Hi @amplexor,

Can you gather any details from the Xcode/iOS console log output on what it’s “attempting to do” when it goes to that blank white screen? Is there any kind of error details or something that might help us figure out what’s going on (or what GPGS is trying to do but apparently isn’t)?

Brent

Hey there, sorry for the late reply, I’m in on the problem with amplexor:

I have done a log starting at the screen where a user can choose an account (after lGameNetwork.login is called)

(The screen swipes to the choose account screen then I started this log)

Here it goes:

Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation started: SIGN IN Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation SIGN IN finished with status VALID Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: User signed in: 107980706\*\*\*\*\*\*\*\*\*\*\*3 Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Done loading from datastore. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Called RegisterCurrentDeviceToken With empty token. Ignoring. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Application metadata cache entry expired. Refreshing. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Achievement cache fully expired: refreshing all. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Snapshot cache fully expired: refreshing all. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: ERROR: Async revision check returned an error status; forcing sign-out. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation started: SIGN OUT Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Converting an invalid BaseStatus to a FlushStatus. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: ERROR: Could not automatically seed application metadata cache. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Could not automatically seed player level cache. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: About to KickstartRetries. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: About to wait on condition variable. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: VERBOSE: Finished waiting! Main dispatch may now continue unimpeded Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation SIGN OUT finished with status ERROR\_NOT\_AUTHORIZED Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: INFO: Auth operation SIGN IN finished with status ERROR\_NOT\_AUTHORIZED Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Could not automatically seed achievement cache. Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Error fetching local player for Welcome Back UI Jan 6 16:29:18 SomeUserName SomeAPP[4479] \<Notice\>: WARNING: Could not automatically seed snapshot cache.

Best new year :slight_smile: