且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在iPhone模拟器中安装iPhone应用程序

更新时间:2022-04-15 03:19:18

请注意:此答案已过时,功能已从iOS模拟器中删除。

我刚刚发现你不需要将移动应用程序包复制到iPhone模拟器的文件夹中,就可以在模拟器上启动它,如论坛中所述。这样你就需要点击应用程序才能启动它,当你想进行测试并多次启动应用程序时,你需要很舒服。

I have just found that you don't need to copy the mobile application bundle to the iPhone Simulator's folder to start it on the simulator, as described in the forum. That way you need to click on the app to get it started, not confortable when you want to do testing and start the app numerous times.

有未记录的命令行参数适用于iOS模拟器,可用于此类目的。您正在寻找的是:-SimulateApplication

There are undocumented command line parameters for the iOS Simulator, which can be used for such purposes. The one you are looking for is: -SimulateApplication

启动YourFavouriteApp的示例命令行:

An example command line starting up YourFavouriteApp:

/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication path_to_your_app/YourFavouriteApp.app/YourFavouriteApp

这将启动您的应用程序,无需任何安装,至少可以使用iOS模拟器4.2。但是,您无法访问主菜单。

This will start up your application without any installation and works with iOS Simulator 4.2 at least. You cannot reach the home menu, though.

还有其他未发布的命令行参数,例如切换SDK。快乐寻找那些......

There are other unpublished command line parameters, like switching the SDK. Happy hunting for those...