Error when open Game Center

Hi,

 

When running my app on iPhone I am getting the following error:

 

"Runtime error

ERROR: Could not load provider (gamecenter) due to the following reason: module ‘CoronoaProvider.gameNetwork.gamecenter’ not found:resource (CoronaProiver.gameNetwork.gamecenter.lu) does not exist in archive 

no field package.preload[‘CoronaProvider.gameNetwork.gamecenter’] no file '/private/var/mobile/Contaniners/Bundle/Application/…"

 

I have just copy the example code from corona guide buid for iOS and copy it to my iPhone Device.

 

These are the codes :

 

in build.settings the following where added:

settings = { plugins = { ["CoronaProvider.gameNetwork.apple"] = {publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, }, }, }

in main.lua the following added:

local gameNetwork = require( "gameNetwork" ) local loggedIntoGC = false local function initCallback( event ) if ( event.type == "showSignIn" ) then -- This is an opportunity to pause your game or do other things you might need to do while the Game Center Sign-In controller is up. elseif ( event.data ) then loggedIntoGC = true native.showAlert( "Success!", "", { "OK" } ) end end gameNetwork.init( "gamecenter", initCallback )

Is that your entire build.settings?

What version of Corona SDK are you using?

Rob

Hi Rob,

The version I am using is : 2015.2707

And the build.setting is :

settings = { --------------------- Oriantation ---------------------------------------- -------------------------------------------------------------------------- orientation = { default = "portrait", --initial launch orientation content = "", --locked orientation of the Corona stage, independent of Native UI elements (iOS only) ?? supported = {"portrait"}, --table of allowed options for auto-orientation }, --------------------- plugins -------------------------------------------- -------------------------------------------------------------------------- plugins = { ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true } } }, --------------------- iPhone --------------------------------------------- -------------------------------------------------------------------------- iphone = { skipPNGCrush = false, plist = { UILaunchImageSize = { { -- 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"] = " ", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414,736}" } }, CFBundleIconFiles = { "Icon-60@3x.png", -- \>= 8.0 180 × 180 App Icon — iPhone 6 Plus "Icon-60.png", -- \>= 7.0 60 × 60 App Icon — iPhone "Icon-60@2x.png", -- \>= 7.0 120 × 120 App Icon — Retina iPhone "Icon-76.png", -- \>= 7.0 76 × 76 App Icon — iPad "Icon-76@2x.png", -- \>= 7.0 152 × 152 App Icon — Retina iPad "Icon.png", -- \<= 6.1 57 × 57 App Icon — iPhone "Icon@2x.png", -- \<= 6.1 114 × 114 App Icon — Retina iPhone "Icon-72.png", -- \<= 6.1 72 × 72 App Icon — iPad "Icon-72@2x.png" -- \<= 6.1 144 × 144 App Icon — Retina iPad }, UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, --Don't apply shibe to the game Icon by Apple UIStatusBarHidden = true, UIAppFonts = { "Komika\_Hand.ttf"}, MinimumOSVersion ="6.0" -- TBD check this out !! } }, --------------------- Android ------------------------------------------- -------------------------------------------------------------------------- android = { versionCode = "1", --In each upgrade to market increased the versionCode usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COURSE\_LOCATION" }, usesFeatures = { { name = "android.hardware.camera", required = false }, { name = "android.hardware.location", required = false }, { name = "android.hardware.location.gps", required = false } } } }

I took your Lua code above and your build.settings and made a quick app with it.  It installed and ran with out error other than GameNetwork saying that I can’t login since I didn’t use a production profile and I’m not logged into the sandbox. I think the code is fine.

Can you go to https://store.coronalabs.com/plugins and make sure Apple Game Center is activated for your account.

Hi Rob,

OK so I went to Apple iTune Connect and  activate the GC (After finish the process the status is " Game Center has been enabled for your app.")

I rebuild and sync my app to iPhone device but still getting the same error when running the app.

Yuval

I’m trying to implement achievements in my iOS game using Game Center and the Social API. I have 6 achievements registered on iTunes Connect as can be seen in the image below. However, when I call Social.ReportProgress with the Achievement ID, progress percent, and callback, it always fails to report it successfully and logs the error “Achievement ID not found”. I’ve noticed that while Social.LoadAchievements will return 0 results, Social.LoadAchievementDescriptions will return 3 descriptions named “Achievement01” etc.

Hi @azimabdul288,

What is the “Social API”? There is a Corona “Social Popup” plugin but that has no relation to Game Center. And, the calls you are making such as “ReportProgress” are not related to Game Center. So, I really do not know what you are trying to implement or what service this is in regards to.

Brent

I think anything related to Game Center not logging in or not showing a leaderboard has got to do with Game Center itself totally broken in iOS 9+

Same code for me on iOS 8 works fine.  Same code on iOS 9 does not work.

Apple need to come up with some fix to GC.  Some people are saying it’s fixed in iOS 9.1 but I don’t think it is.

If you try to open up Game Center itself you’ll probably be presented with a white screen and nothing else.  It just hangs.  If you get that then I think you’ll encounter problems when trying to connect to GC in code.  Once again, on iOS 8.4 it works but not on any versions on iOS 9.

If I’m missing something then I’d love to know.

Read this article related to GC not working: https://discussions.apple.com/thread/7218355?q=ios

Yes, I’m also having problems with GC. When I try to show a leader board it crashes the app. Quits right to the desktop. Maddening.

David

Is that your entire build.settings?

What version of Corona SDK are you using?

Rob

Hi Rob,

The version I am using is : 2015.2707

And the build.setting is :

settings = { --------------------- Oriantation ---------------------------------------- -------------------------------------------------------------------------- orientation = { default = "portrait", --initial launch orientation content = "", --locked orientation of the Corona stage, independent of Native UI elements (iOS only) ?? supported = {"portrait"}, --table of allowed options for auto-orientation }, --------------------- plugins -------------------------------------------- -------------------------------------------------------------------------- plugins = { ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true } } }, --------------------- iPhone --------------------------------------------- -------------------------------------------------------------------------- iphone = { skipPNGCrush = false, plist = { UILaunchImageSize = { { -- 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"] = " ", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414,736}" } }, CFBundleIconFiles = { "Icon-60@3x.png", -- \>= 8.0 180 × 180 App Icon — iPhone 6 Plus "Icon-60.png", -- \>= 7.0 60 × 60 App Icon — iPhone "Icon-60@2x.png", -- \>= 7.0 120 × 120 App Icon — Retina iPhone "Icon-76.png", -- \>= 7.0 76 × 76 App Icon — iPad "Icon-76@2x.png", -- \>= 7.0 152 × 152 App Icon — Retina iPad "Icon.png", -- \<= 6.1 57 × 57 App Icon — iPhone "Icon@2x.png", -- \<= 6.1 114 × 114 App Icon — Retina iPhone "Icon-72.png", -- \<= 6.1 72 × 72 App Icon — iPad "Icon-72@2x.png" -- \<= 6.1 144 × 144 App Icon — Retina iPad }, UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, --Don't apply shibe to the game Icon by Apple UIStatusBarHidden = true, UIAppFonts = { "Komika\_Hand.ttf"}, MinimumOSVersion ="6.0" -- TBD check this out !! } }, --------------------- Android ------------------------------------------- -------------------------------------------------------------------------- android = { versionCode = "1", --In each upgrade to market increased the versionCode usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_FINE\_LOCATION", "android.permission.ACCESS\_COURSE\_LOCATION" }, usesFeatures = { { name = "android.hardware.camera", required = false }, { name = "android.hardware.location", required = false }, { name = "android.hardware.location.gps", required = false } } } }

I took your Lua code above and your build.settings and made a quick app with it.  It installed and ran with out error other than GameNetwork saying that I can’t login since I didn’t use a production profile and I’m not logged into the sandbox. I think the code is fine.

Can you go to https://store.coronalabs.com/plugins and make sure Apple Game Center is activated for your account.

Hi Rob,

OK so I went to Apple iTune Connect and  activate the GC (After finish the process the status is " Game Center has been enabled for your app.")

I rebuild and sync my app to iPhone device but still getting the same error when running the app.

Yuval

I’m trying to implement achievements in my iOS game using Game Center and the Social API. I have 6 achievements registered on iTunes Connect as can be seen in the image below. However, when I call Social.ReportProgress with the Achievement ID, progress percent, and callback, it always fails to report it successfully and logs the error “Achievement ID not found”. I’ve noticed that while Social.LoadAchievements will return 0 results, Social.LoadAchievementDescriptions will return 3 descriptions named “Achievement01” etc.

Hi @azimabdul288,

What is the “Social API”? There is a Corona “Social Popup” plugin but that has no relation to Game Center. And, the calls you are making such as “ReportProgress” are not related to Game Center. So, I really do not know what you are trying to implement or what service this is in regards to.

Brent

I think anything related to Game Center not logging in or not showing a leaderboard has got to do with Game Center itself totally broken in iOS 9+

Same code for me on iOS 8 works fine.  Same code on iOS 9 does not work.

Apple need to come up with some fix to GC.  Some people are saying it’s fixed in iOS 9.1 but I don’t think it is.

If you try to open up Game Center itself you’ll probably be presented with a white screen and nothing else.  It just hangs.  If you get that then I think you’ll encounter problems when trying to connect to GC in code.  Once again, on iOS 8.4 it works but not on any versions on iOS 9.

If I’m missing something then I’d love to know.

Read this article related to GC not working: https://discussions.apple.com/thread/7218355?q=ios

Yes, I’m also having problems with GC. When I try to show a leader board it crashes the app. Quits right to the desktop. Maddening.

David