我不知道这是什么时候发生的,可能是在升级到 Mac OS Lion 和 Xcode 4.1 之后。但我不确定。
我有一个相当大的 iOS 项目,它受到 Game Center/Game Kit 的限制。我开门见山:在模拟器上我无法再连接到 Game Center。 例如,即使我在模拟器上打开“Game Center”应用程序并单击“创建帐户”,我也会收到错误消息:“Game Center 帐户服务当前不可用。请稍后重试。”
我已经用谷歌搜索了几天,这是我尝试过的:
我按照 Apple 在文档中所说的那样配置了我的路由器,尽管它在几周前的配置之前就已经工作了。我还检查了不同的网络/路由器。
我完全删除了 XCode Developer 工具(整个/Developer/-文件夹)和
~/Library/Application Support/iPhone Simulator
中的 iPhone Simulator cahce 并重新安装了所有内容当然我多次重置设备
模拟器有互联网连接。当我打开 Safari 时,我可以浏览网络。
谢谢,我真的很感激任何帮助或建议! 费边
最佳答案
根据这个线程:
https://discussions.apple.com/thread/3206110?start=0&tstart=0
解决方案应该是重置您的 hosts
文件(在 /private/etc/hosts
中)
并且连接应该再次工作
默认主机文件应如下所示:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
无论如何,如果您向我们提供一些调试信息,这将很有帮助,例如
NSLog(@"%@",[error description])
error
的类型是 NSError
来自 NSHTTPURLResponse sendSynchronousRequest:
关于objective-c - "Game Center account services are currently unavailable"在模拟器上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7259007/