简体   繁体   English

适用于iOs的phoneGap应用程序:如果应用程序在xCode设备模拟器中有效

[英]phoneGap app for iOs: if application works in xCode device emulator

I've got a newbie question about phoneGap and creating apps for iOs. 我有一个关于phoneGap和为iOs创建应用程序的新手问题。

If my phoneGap app runs in device emulator in xCode and everything is ok, can I be sure that it will work the same way on a real iOS device when I publish it in the appstore? 如果我的phoneGap应用程序在xCode中的设备模拟器中运行并且一切正常,那么当我在appstore中发布它时,我能确定它在真实iOS设备上的工作方式是否相同?

The XCode simulator does what the name suggest - 'simulates' . XCode模拟器的功能就是名称 - “模拟” It is not identical to the actual hardware, for a number of reasons. 由于多种原因,它与实际硬件不同。 Here are just a few of them: 以下是其中一些:

Performance - your computer has much more memory and processing power available than the phone itself. 性能 - 您的计算机具有比手机本身更多的内存和处理能力。 Your app may run fine on the simulator, but quite slow on the device. 您的应用程序可能在模拟器上正常运行,但在设备上运行速度很慢。 This is why it's a good idea to run on the device itself, especially if you're doing stuff which could use up a lot of memory. 这就是为什么在设备上运行是个好主意,特别是如果你正在做可能耗费大量内存的东西。

Missing features - the simulator doesn't allow certain things to be tested, like in app purchase or media/asset management. 缺少功能 - 模拟器不允许对某些内容进行测试,例如在应用购买或媒体/资产管理中。 And obviously you're missing things like the camera, the accelerometers, compass, etc. You can from iOS 5 simulate certain things like the GPS, but nowhere near everything. 显然你错过了相机,加速度计,指南针等等。你可以从iOS 5模拟某些东西,比如GPS,但远不及一切。

Visuals - the simulator runs at your monitor resolution, whereas the phone itself has a much higher DPI display. 视觉效果 - 模拟器以您的显示器分辨率运行,而手机本身具有更高的DPI显示。 Things that look readable or fine on the simulator can on device look very different. 在模拟器上看起来可读或精细的东西在设备上看起来非常不同。

If you're not testing your app on an actual device before releasing it to the app store you're doing a disservice to your users - this is Apple's point of view, and one shared by most developers. 如果你没有在实际设备上测试你的应用程序,然后再将它发布到应用程序商店,那么你的用户就会受到损害 - 这是Apple的观点,也是大多数开发人员共享的观点。 It's not necessarily what you might want to here, but unfortunately the simulator really is just that - a simulator. 它不一定是你想要的,但不幸的是模拟器真的就是 - 一个模拟器。 You wouldn't want to be in a plane piloted by somebody who had only trained on a simulator. 你不会想要被一个只在模拟器上训练的人驾驶过的飞机。 And you probably wouldn't want to use an app that had only been run on the iOS simulator. 你可能不想使用只在iOS模拟器上运行的应用程序。

Here's what Apple have to say about it in their own documentation: 以下是Apple在自己的文档中对此所说的内容:

Although you can do much of your debugging and testing of an iOS application using iOS Simulator, simulation cannot completely match the results of running your application on the target devices; 虽然您可以使用iOS模拟器对iOS应用程序进行大量调试和测试,但模拟不能完全匹配在目标设备上运行应用程序的结果; you must test your application on actual devices to ensure that it runs as intended and to tune it for performance on actual hardware. 您必须在实际设备上测试您的应用程序,以确保它按预期运行并调整其在实际硬件上的性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IOS中的Facebook登录可以在模拟器上运行,但不能在安装了本机应用程序的设备上运行 - Facebook login in IOS works on emulator but not on device with native app installed Phonegap应用程序可在iOS 6中运行,但不能在iOS 5中运行 - Phonegap App Works in iOS 6 but not iOS 5 应用程序在Simulator(Xcode 7.1.1)中运行良好,但在iOS设备上运行不正常 - app works fine in Simulator (Xcode 7.1.1) but not on iOS device 在ios设备上运行phonegap应用 - Running a phonegap app on an ios device Phonegap应用程序可在iOS后台运行 - Phonegap app works in IOS background 录音在 iOS 仿真器上工作,但在实际设备上不工作 - Audio recording works on iOS emulator but not on the actual device iOS:保存到文件可在模拟器上运行,但不能在设备上运行 - iOS: Saving into a file works on emulator but not on device 如何通过cli而不是通过xcode将cordova(phonegap)ios应用程序安装到设备上 - How to install cordova(phonegap) ios app to device via cli and not via xcode Xcode 7 iOS应用程序无法在设备上运行 - Xcode 7 iOS app not working on device 无法在 iOS 仿真器或物理设备上构建 Flutter 应用程序 - 虽然在 Android 上工作正常 - Cannot build Flutter app on iOS emulator or physical device - works fine on Android though
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM