[英]Strange “error” trying to connect to my server from iOS devices
I have an app which connects to my server to fetch scores, register users etc - the usual stuff. 我有一个连接到我的服务器以获取分数,注册用户等的应用程序-常用的东西。
If I run it on the simulator, it works fine. 如果我在模拟器上运行它,则可以正常运行。
If I run it on the device using xcode it works fine, and continues to work fine even once I disconnect the device from xcode and use the app directly from the phones desktop. 如果我使用xcode在设备上运行它,则可以正常工作,即使我断开设备与xcode的连接并直接在手机桌面上使用该应用程序,它仍可以正常工作。
However when I build an .ipa file and use that, the app does not connect to my server - it just timeouts. 但是,当我构建一个.ipa文件并使用它时,该应用程序无法连接到我的服务器-只是超时。 Does anyone have an idea about what could be causing a difference between how it works on the phone when it was put there directly via an xcode build + run, and when it is dropped on as an .ipa using organizer/iTunes?
有谁知道通过xcode build + run直接将其放置在手机上以及使用Organizer / iTunes作为.ipa放置在手机上时,如何在手机上工作?
As far as I am concerned they should be exactly the same, so I have no idea about where to even start looking. 就我而言,它们应该完全相同,所以我不知道从哪里开始寻找。
I am building with the dev target as iOS3.2, using xcode4.2 and iOS sdk5.0. 我使用xcode4.2和iOS sdk5.0将开发目标定为iOS3.2。 Have tried it out on a 3GS and iPod Touch 4th gen both with the same result.
在3GS和iPod Touch 4th gen上都进行了尝试,结果均相同。
If any more info is needed then I can give that, but fundamentally everything works, so I suspect that maybe there is a permissions error or a file I need to include that I'm not aware of. 如果需要更多信息,那么我可以给出答案,但是从根本上讲一切正常,因此我怀疑可能存在权限错误或需要包含的文件,但我不知道。 This project was originally designed by someone else and they are no longer around, other projects I have made connected to my server without any issues so I'm really hoping someone can help.
这个项目最初是由其他人设计的,他们已经不在了,我已经连接到服务器的其他项目没有任何问题,所以我真的希望有人可以提供帮助。
请参阅上面的最后一条评论,该错误只是由于试图查找不正确的服务器地址的发布版本而导致的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.