IOS7版本中GameCenter的一个bug的解决方法

本文介绍了一种在iOS游戏中遇到的GameCenter认证错误问题及解决方案。该错误表现为真机测试时出现取消或禁用操作提示,尝试常规解决方法无效。最终通过重置设备设置解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

       

        最近写了小游戏,添加GameCenter功能的过程中出现一个问题,虚拟机调试没有问题,但是,真机就会报这个错误: 

        GameCenter Authentication Error: Error Domain=GKErrorDomain Code=2 “The requested operation has been cancelled or disabled by the user.” UserInfo=0x17d489f0 {NSLocalizedDescription=The requested operation has been cancelled or disabled by the user.}, { NSLocalizedDescription = “The requested operation has been cancelled or disabled by the user.”; }

         注意,可不是:

        GKErrorDomain Code=2 "The requested operation has been cancelled." 

    网上盛传的所谓的解决方式:

          [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:"]]; 

   也解决不了,卡了好长时间,后来找到了解决方法,就是把测试机:“设置”->"通用设置"-"还原"->"还原掉所有设置",等完事之后,重新在真机测试,问题解决,感谢:

          http://ishamrock.com/post/66808377466/beware-of-canceling-the-ios-7-game-center-sandbox-login


         转载请注明 :http://blog.youkuaiyun.com/guoranliaoran/article/details/20238927

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值