如何在 iPhone 模拟器中安装 iPhone 应用程序 [英] How to install iPhone application in iPhone Simulator

查看:56
本文介绍了如何在 iPhone 模拟器中安装 iPhone 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 mySample.app 文件 - 一个由 xcode 开发的 iPhone 应用程序.

I have a mySample.app file - an iPhone application developed by xcode.

如何使用我的 xcode 运行这个(只有 mySample.app 文件)应用程序?

How do I run this (only mySample.app file) application using my xcode?

推荐答案

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

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

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 Simulator 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...

这篇关于如何在 iPhone 模拟器中安装 iPhone 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆