xcode 我可以在没有源代码的情况下将应用程序安装到模拟器吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/947317/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:03:37  来源:igfitidea点击:

Can I install an app to the simulator without the source code?

iphonecocoa-touchxcode

提问by Corey Floyd

I have a client who wants to just drag and drop the binary to run it in the simulator.

我有一个客户只想拖放二进制文件以在模拟器中运行它。

I want to build the simulator app and email it to them.

我想构建模拟器应用程序并将其通过电子邮件发送给他们。

What can the client do to install this in the simulator?

客户端可以做什么来在模拟器中安装它?

Is this possible?

这可能吗?

Thanks for any help.

谢谢你的帮助。

采纳答案by MystikSpiral

As long as they are on the same version of the target O/S as you you should be fine. Look here on your local machine:

只要它们与您在目标操作系统的同一版本上,就应该没问题。在您的本地机器上查看这里:

~/Library/Application Support/iPhone Simulator/User/Applications/

~/库/应用程序支持/iPhone 模拟器/用户/应用程序/

That is where the apps are stored.

那就是存储应用程序的地方。

Watch this directory and grab everything that is added when you install the app. Then you can zip those materials and have your client un-zip them under the same path.

观看此目录并获取安装应用程序时添加的所有内容。然后您可以压缩这些材料并让您的客户在同一路径下解压缩它们。

回答by SaRaVaNaN DM

You can, by executing the command below in the Terminal app.

您可以通过在终端应用程序中执行以下命令。

xcrun simctl install {simulator_udid} {path of .app file}

xcrun simctl install {simulator_udid} {path of .app file}

It will install the .appfile in the referenced simulator.

它将.app在引用的模拟器中安装文件。

Note: Make sure that the .app file is built for the simulator (i.e. i386or x86_64).

注意:确保 .app 文件是为模拟器构建的(即i386x86_64)。

回答by Chris

As the poster before me has stated you will find the apps in this folder:

正如我之前的海报所说,您将在此文件夹中找到应用程序:

~/Library/Application Support/iPhone Simulator/User/Applications/

~/库/应用程序支持/iPhone 模拟器/用户/应用程序/

I needed to copy the following two files:

我需要复制以下两个文件:

  • A folder with a cryptic name (seams to be some hash)
  • And a file with the same name as the folder and the .sb suffix
  • 一个带有神秘名称的文件夹(接缝是一些散列)
  • 以及与文件夹同名且后缀为 .sb 的文件

Put them in the same place on your second computer and start the simulator there:

把它们放在你的第二台电脑上的同一个地方,然后在那里启动模拟器:

/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications

/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications

I have tested this on my work computer and on my home computer which has no certificates installed.

我已经在我的工作计算机和没有安装证书的家用计算机上对此进行了测试。

回答by prethushpj

I had the same need and worked on the issue in iOS 5 simulator.

我有同样的需求,并在 iOS 5 模拟器中解决了这个问题。

You need to run the application at least once. Then you can find your application under the folder path

您需要至少运行一次应用程序。然后你可以在文件夹路径下找到你的应用程序

~/Library/Application Support/iPhone Simulator/'simulator version'/Applications/

~/Library/Application Support/iPhone Simulator/'模拟器版本'/Applications/

The folders will have a hashed name. Find the folder which contains your application and just copy the AppName.app file from that folder. Now you can send that file to your clients.

文件夹将有一个散列名称。找到包含您的应用程序的文件夹,然后从该文件夹复制 AppName.app 文件。现在您可以将该文件发送给您的客户。

The clients will to make a folder under the same folder path as mentioned above with any name and copy the AppName.app file and just open the simulator. voila... they will see the app installed in simulator.

客户端将在与上述相同文件夹路径下使用任何名称创建一个文件夹,然后复制 AppName.app 文件,然后打开模拟器。瞧...他们会看到安装在模拟器中的应用程序。