iOS 6 and Game Center not working in Portrait

Hello all,

Game center does not seem to be initializing properly for iOS 6. My app is a portrait app, so it’s not the landscape bug. And when I install the app on an old iOS 5.1 device, GC works fine. The following error message shows up in Organizer’s console when my code get to the if statement below

Jan 13 19:44:26 Nathaniels-iPhone-5 bounce[23230] : libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary

[lua]function initCallback( event )
if event.data then
loadScores()
resetAchievements()
loggedIntoGC = true
end
end[/lua]

Has anyone run into this? I have tried this with both the latest public release (971) and 999.

Thanks,
Nate
[import]uid: 118346 topic_id: 34911 reply_id: 334911[/import]

A little more information from the event that game center passes to the callback.

“The requested operation could not be completed because this application is not recognized by Game Center.”

This only happens on iOS6 devices, not iOS5.

Any help would be greatly appreciated. [import]uid: 118346 topic_id: 34911 reply_id: 138750[/import]

Hey, Nate @ bentomobility, I don’t get any Game Center related errors with my game (built with daily build 999). My current app is landscape. I just checked on both iOS6.0.1 and iOS5.1.1 devices. They both seem to post Achievements & High Score without any issue. Maybe there’s something wrong with your set up??

Naomi [import]uid: 67217 topic_id: 34911 reply_id: 138757[/import]

Very strange. Here’s the code that I use, which is basically just straight from the documentation.

[lua]local gameNetwork = require( “gameNetwork” )

userScoreText, userRankText, currentBoardText = nil, nil, nil
currentBoard = “Total_Score”
loggedIntoGC = false

leaderBoards, achievements, userAchievements = {}, {}, {}

leaderBoards.Total_Score = “Total_Score”
leaderBoards.EpisodeOne = “Episode_One”
leaderBoards.EpisodeTwo = “Episode_Two”

achievements.finish_episode_one = “finish_episode_one”
achievements.finish_episode_two = “finish_episode_two”
achievements.catch_1000_babies = “catch_1000_babies”
achievements.catch_20000_babies = “catch_20000_babies”
achievements.reach_the_moon = “reach_the_moon”
achievements.all_stars_episode_one = “all_stars_episode_one”
achievements.all_stars_episode_two = “all_stars_episode_two”
achievements.penny_pincher = “penny_pincher”
achievements.mad_bomber = “mad_bomber”
userScore, userRank = 0, 0

function resetAchievements()
gameNetwork.request( “loadAchievements”, { listener=requestCallback } )
end

function loadScores()
gameNetwork.request(
“loadScores”,
{
leaderboard={ category=“World.Rank”, playerScope=“Global”, timeScope=“AllTime” },
listener=requestCallback
}
)
end

function offlineAlert()
native.showAlert( “GameCenter Offline”, “Please check your internet connection.”, { “OK” } )
end

function requestCallback( event )
if event.type == “setHighScore” then
loadScores()
elseif event.type == “loadScores” then
if event.localPlayerScore then
userRank = event.localPlayerScore.rank
userScore = event.localPlayerScore.value
else
userRank = “Not ranked”
userScore = “No high score”
end
elseif event.type == “loadAchievements” then
userAchievements = event.data
end
end

function initCallback( event )
for k,v in pairs(event) do print(k,v) end
if event.data then
loadScores()
resetAchievements()
loggedIntoGC = true
end
end

function onSystemEvent( event )
if “applicationStart” == event.type then
loggedIntoGC = false
gameNetwork.init( “gamecenter”, initCallback )
return true
end
end
Runtime:addEventListener( “system”, onSystemEvent )[/lua]
[import]uid: 118346 topic_id: 34911 reply_id: 138759[/import]

Hey, Nate @ bentomobility, I just googled “The requested operation could not be completed because this application is not recognized by Game Center” and a lot came up. It might be worth the trouble to check them out? Who knows, someone else with the very same problem might’ve figured out its cause and might’ve posted the solution… I’m sorry I can’t be of further help, but I haven’t come across the error with mine, and I don’t see any real problem with your code…

Naomi [import]uid: 67217 topic_id: 34911 reply_id: 138760[/import]

Thanks Naomi… it’s strange because the app is in the store now and works on iOS 6. Now that I am trying to fix some bugs it’s stopped working. I’ll do some googling. [import]uid: 118346 topic_id: 34911 reply_id: 138761[/import]

Naomi - I see that you are using 6.0.1. That iOS version actually does work for me. The problem is when using iOS 6.0.2 on my iPhone 5. I wonder if there is now an incompatibility with Corona and the latest version of iOS? [import]uid: 118346 topic_id: 34911 reply_id: 138838[/import]

Hey, Nate @ bentomobility, interesting. It might very well be iOS 6.0.2 specific issue then? I don’t have iPhone 5 with iOS 6.0.2 handy. My iPod Touch 5 apparently does not update to 6.0.2, so I can’t verify. You might want to flag Corona Labs about it?

Naomi [import]uid: 67217 topic_id: 34911 reply_id: 138841[/import]

A little more information from the event that game center passes to the callback.

“The requested operation could not be completed because this application is not recognized by Game Center.”

This only happens on iOS6 devices, not iOS5.

Any help would be greatly appreciated. [import]uid: 118346 topic_id: 34911 reply_id: 138750[/import]

Hey, Nate @ bentomobility, I don’t get any Game Center related errors with my game (built with daily build 999). My current app is landscape. I just checked on both iOS6.0.1 and iOS5.1.1 devices. They both seem to post Achievements & High Score without any issue. Maybe there’s something wrong with your set up??

Naomi [import]uid: 67217 topic_id: 34911 reply_id: 138757[/import]

Very strange. Here’s the code that I use, which is basically just straight from the documentation.

[lua]local gameNetwork = require( “gameNetwork” )

userScoreText, userRankText, currentBoardText = nil, nil, nil
currentBoard = “Total_Score”
loggedIntoGC = false

leaderBoards, achievements, userAchievements = {}, {}, {}

leaderBoards.Total_Score = “Total_Score”
leaderBoards.EpisodeOne = “Episode_One”
leaderBoards.EpisodeTwo = “Episode_Two”

achievements.finish_episode_one = “finish_episode_one”
achievements.finish_episode_two = “finish_episode_two”
achievements.catch_1000_babies = “catch_1000_babies”
achievements.catch_20000_babies = “catch_20000_babies”
achievements.reach_the_moon = “reach_the_moon”
achievements.all_stars_episode_one = “all_stars_episode_one”
achievements.all_stars_episode_two = “all_stars_episode_two”
achievements.penny_pincher = “penny_pincher”
achievements.mad_bomber = “mad_bomber”
userScore, userRank = 0, 0

function resetAchievements()
gameNetwork.request( “loadAchievements”, { listener=requestCallback } )
end

function loadScores()
gameNetwork.request(
“loadScores”,
{
leaderboard={ category=“World.Rank”, playerScope=“Global”, timeScope=“AllTime” },
listener=requestCallback
}
)
end

function offlineAlert()
native.showAlert( “GameCenter Offline”, “Please check your internet connection.”, { “OK” } )
end

function requestCallback( event )
if event.type == “setHighScore” then
loadScores()
elseif event.type == “loadScores” then
if event.localPlayerScore then
userRank = event.localPlayerScore.rank
userScore = event.localPlayerScore.value
else
userRank = “Not ranked”
userScore = “No high score”
end
elseif event.type == “loadAchievements” then
userAchievements = event.data
end
end

function initCallback( event )
for k,v in pairs(event) do print(k,v) end
if event.data then
loadScores()
resetAchievements()
loggedIntoGC = true
end
end

function onSystemEvent( event )
if “applicationStart” == event.type then
loggedIntoGC = false
gameNetwork.init( “gamecenter”, initCallback )
return true
end
end
Runtime:addEventListener( “system”, onSystemEvent )[/lua]
[import]uid: 118346 topic_id: 34911 reply_id: 138759[/import]

Hey, Nate @ bentomobility, I just googled “The requested operation could not be completed because this application is not recognized by Game Center” and a lot came up. It might be worth the trouble to check them out? Who knows, someone else with the very same problem might’ve figured out its cause and might’ve posted the solution… I’m sorry I can’t be of further help, but I haven’t come across the error with mine, and I don’t see any real problem with your code…

Naomi [import]uid: 67217 topic_id: 34911 reply_id: 138760[/import]

Thanks Naomi… it’s strange because the app is in the store now and works on iOS 6. Now that I am trying to fix some bugs it’s stopped working. I’ll do some googling. [import]uid: 118346 topic_id: 34911 reply_id: 138761[/import]

Naomi - I see that you are using 6.0.1. That iOS version actually does work for me. The problem is when using iOS 6.0.2 on my iPhone 5. I wonder if there is now an incompatibility with Corona and the latest version of iOS? [import]uid: 118346 topic_id: 34911 reply_id: 138838[/import]

Hey, Nate @ bentomobility, interesting. It might very well be iOS 6.0.2 specific issue then? I don’t have iPhone 5 with iOS 6.0.2 handy. My iPod Touch 5 apparently does not update to 6.0.2, so I can’t verify. You might want to flag Corona Labs about it?

Naomi [import]uid: 67217 topic_id: 34911 reply_id: 138841[/import]