iPhone模拟器有什么限制吗?
有什么是设备可以做而模拟器不能做的吗?有一些显而易见的事情,比如以某种方式使用加速度计,但是还有其他的吗?比如DSP?我的应用程序在设备上运行良好,但在模拟器上崩溃,我只是想确保这不是由于任何模拟器可能存在的固有限制。
谢谢!
Is there anything that a device can do that the simulator can't? There are obvious things like using the accelerometer in a certain way, but are there others? Such as DSP, for example? My app runs fine on the device, but crashes on the simulator and I just want to make sure that it is not due to any of the simulators possible inherent limitations.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
包括:
苹果推送服务
用于访问照片、联系人、日历和提醒的隐私警报
UIBackgroundModes 键
iCloud 文档同步和键值存储支持
including:
Apple Push Services
Privacy alerts for access to Photos, Contacts, Calendar, and Reminders
The UIBackgroundModes key
iCloud document syncing and key-value storage support
这是上一个问题的一个很好的列表:
iPhone 设备与 iPhone 模拟器
另一种当前适用于 iOS 4 的:iPhone 应用程序开发傻瓜
Here's a nice list from a previous question:
iPhone device vs. iPhone simulator
And another one current to iOS 4: IPhone Application Development For Dummies
例如,据我所知,Apple 推送通知服务将无法在模拟器中运行。
For example Apple Push Notification Service will not work in Simulator, as far as I can remember.
模拟器在 CPU 性能、内存、存储等方面比任何实际设备的限制要少。但是 OpenGL 和 GPU 性能等可能存在差异。
您的应用程序应该在使用之前检查是否存在任何硬件功能它们,并检查 nil 对象和指针。因此,任何缺失的东西(例如加速计或摄像头)都应该不会导致应用程序崩溃。
如果您的应用程序在模拟器上崩溃,则强烈表明它可能会在未来的某些 iOS 设备或操作系统版本上崩溃。所以你应该找出原因。
设备和模拟器之间的指令集不同(ARM 与 x86、NEON 与 SSE),因此它可能是编译器或编译器优化错误的可能性极小。
The Simulator is less limited than any actual device in such things as CPU performance, memory, storage, etc. But there may be differences in Open GL and GPU performance, etc.
Your app should be checking for the existence of any hardware features before using them, and checking for nil objects and pointers as well. So anything missing, such as an accelerometer or the camera, should not cause an app to crash.
If your app is crashing on the Simulator, that is a very strong indication that it might crash on some future iOS device or OS release. So you should hunt the cause down.
The instruction sets are different between the device and the Simulator (ARM vs. x86, NEON vs. SSE), so there's an extremely tiny possibility that it could be a compiler or compiler optimization bug.
相机无法工作。他们可以模拟默认的 Mac 相机。
Camera does not work. They could make a default mac camera simulated.