I’m currently working on implementing all of GameKit for iOS and have come across a problem that I can’t seem to figure out. My test app works fine in the simulator and properly authenticates the local player, however in a deployed app to my phone I get the following error whenever I try to authenticate the user:
Jul 23 18:12:00 Jasons-iPhone gamed <Warning>: Application(com.jasonking.gamekittest) is not allowed to run in production
Does anyone have any experience as to why this is happening or if anything special needs to be done when deploying to a phone? I’ve spent almost 2 hours with google and have only been able to find one reference to the problem hidden in the middle of a thread on the Unity forums which was mysteriously resolved and suddenly started working for them. If anyone has any idea of how to solve this, any help would be appreciated.
Yes I think you are right and that is why I was asking. I created a new provisioning profile and enabled Game Center in it. I think I added the gamekit key to my info plist - I created a small plist which I dragged into the project:
[code]<?xml version="1.0" encoding="UTF-8"?>
I believe that Xojo should merge this into the plist it generates from what others have said on the forum, but maybe I have the plist wrong?
I believe that the compiler will auto link to the GameKit framework since I have several declares into it and it not linking was fixed in 2015r1.
So I just created a new app with a provisioning profile that didn’t include Game Center and I get the exact same behavior - it works in the simulator and not in a deployed app. I wonder if the provisioning profile is respected by Xojo or if a generic one if used? Off to investigate some more…
The key may be in the first two bullets above… I don’t know what else XCODE does to a project when you select that option. The plist change was the only visible thing I saw… but it may embed items in the project file that link other framework(s) too.
So I just created a new project in Xcode and linked it with GameKit and I agree that the only visible change is the linking to the GameKit framework and the addition of the gamekit key to the plist file. I think I need to figure out how to specify entitlements in Xojo. There is a place to select an entitlements file in build settings but I’m not sure what format that would be and what it would need to contain to make everything work. Is there a resource that describes this?
Ok, I just managed to get this to work. The problem is that Game Center sandboxing must be enabled in Settings or you aren’t allowed to test Game Center on a device. Thanks for all of the help you tried to provide, I really appreciate it.