iPhone Apps built for the simulator are stored here:
为模拟器构建的iPhone应用程序存储在此处:
/Users/<username>/Library/Application Support/iPhone Simulator/User/Applications
Is it possible to copy the <GUID>.sb and <GUID> directory and install them on a different computer (with Development tools installed)?
是否可以复制
This would be very useful for testing/demoing with out having to buy iPhones for all the managers and external clients.
这对于测试/演示非常有用,无需为所有经理和外部客户购买iPhone。
4 个解决方案
#1
Yes, if you send those files to another person, and they put them into that directory, they can test the applications in the iPhone Simulator as well :)
是的,如果您将这些文件发送给另一个人,并将它们放入该目录,他们也可以在iPhone模拟器中测试应用程序:)
#2
I found a way that requires just a little more setup, but is much easier for non-developers:
我发现了一种只需要更多设置的方法,但对于非开发人员来说更容易:
Instructions for your users/testers:
- Install Xcode following Apple's instructions
- Double-click the attached application - the iPhone simulator will launch, install the app and start it automatically.
按照Apple的说明安装Xcode
双击附加的应用程序 - iPhone模拟器将启动,安装应用程序并自动启动它。
How to set it up:
- Download and unzip (to a folder on your desktop or wherever) 'Simulator Bundler' from: http://github.com/landonf/simlaunch/downloads
- Set your XCode build target to the required Simulator configuration (iPad/iPhone/which iOS version)
- Do a 'Build and archive'
- Find it: select 'Archived applications' in the Organizer, right click the relevant build, select "Reveal archived application in Finder"
- Drag the application (yourAppName, no extension) onto the Simulator Bundler app
从以下网址下载并解压缩(到桌面或任何地方的文件夹)“Simulator Bundler”:http://github.com/landonf/simlaunch/downloads
将XCode构建目标设置为所需的模拟器配置(iPad / iPhone / iOS版本)
做一个'建立和存档'
找到它:在管理器中选择“已存档的应用程序”,右键单击相关的构建,选择“在Finder中显示已存档的应用程序”
将应用程序(yourAppName,无扩展名)拖到Simulator Bundler应用程序上
Done. This will create a self-contained Mac OS X yourAppDisplayName.app file in the same folder (with your app's icon as the icon) that you can stick up on an FTP server or email to your users/testers.
完成。这将在同一文件夹中创建一个独立的Mac OS X yourAppDisplayName.app文件(使用您的应用程序图标作为图标),您可以将其粘贴在FTP服务器上或发送给您的用户/测试人员。
--
I think it's much neater/slicker than having to explain where to copy files, how to launch the simulator and so on.. And if anything gets messed up they can just uninstall via the familiar tap-and-hold + (x) gesture in the simulator UI, then double-click the app you sent them again.
我认为它比解释复制文件的位置,如何启动模拟器等更整洁/更光滑。如果有什么搞砸了,他们可以通过熟悉的点击并按住+(x)手势卸载模拟器UI,然后双击您再次发送它们的应用程序。
You can also produce several of these packages changing the bundle identifier between builds, allowing them to be installed side by side in your testers' simulators; say for getting some user feedback on different UI designs, or configure one for Production and one for Staging/QA servers, so your content editors can check their changes before they go live or whatever..
您还可以生成多个这些软件包,在构建之间更改软件包标识符,允许它们在测试人员的模拟器中并排安装;比如说获取一些用户对不同UI设计的反馈,或者为生产配置一个,为Staging / QA服务器配置一个,所以你的内容编辑可以在他们上线之前检查他们的变化或者其他什么。
The ability to reinstall the app from a desktop icon is also very convenient for localisation testing: launch the simulator, uninstall the app if present, set the required region format and language, double click the icon on your desktop, test; repeat for each required locale. (guarantees a fresh install each time, I've found that switching language with the app installed can result in all sorts of strange behaviour)
从桌面图标重新安装应用程序的能力对于本地化测试也非常方便:启动模拟器,卸载应用程序(如果有),设置所需的区域格式和语言,双击桌面上的图标,测试;重复每个必需的区域设置。 (保证每次全新安装,我发现安装app的切换语言会导致各种奇怪的行为)
#3
We just put up a little tool that will help you through this process for the latest version of Xcode.
我们刚刚提出了一个小工具,可以帮助您完成最新版Xcode的这个过程。
It basically creates a zip of the app so that you can pass to the tester and it'll install the app in the right Xcode directory. It will also open it up for the user with the right device selected in iOS Simulator.
它基本上创建了一个应用程序的zip,以便您可以传递给测试人员,它将在正确的Xcode目录中安装该应用程序。它还将为用户在iOS模拟器中选择正确的设备打开它。
Here it is
这里是
http://blog.placeit.net/ios-app-packager/
Hopefully it's useful to you guys.
希望它对你们有用。
#4
You are able to use simctl
binary to interact with iOS simulators from command line.
您可以使用simctl二进制文件从命令行与iOS模拟器进行交互。
Build app
-
Variant 1 (Preferable):
变式1(优先):
-
Build a project
建立一个项目
Pattern:
xcodebuild -project "path_to_fileName.xcodeproj" -target "targetName" -sdk "targetSDK" -configuration buildConfig CODE_SIGN_IDENTITY="NameOfCertificateIdentity" PROVISIONING_PROFILE="ProvisioningProfileName" OTHER_CODE_SIGN_FLAGS="--keychain keyChainName"
模式:xcodebuild -project“path_to_fileName.xcodeproj”-target“targetName”-sdk“targetSDK”-configuration buildConfig CODE_SIGN_IDENTITY =“NameOfCertificateIdentity”PROVISIONING_PROFILE =“ProvisioningProfileName”OTHER_CODE_SIGN_FLAGS =“ - keychain keyChainName”
-
Build a worksapce
建立一个工作原理
Pattern:
xcodebuild -workspace "path_to_fileName.xcworkspace" -scheme "schemeName" -sdk "targetSDK" -configuration buildConfig CODE_SIGN_IDENTITY="NameOfCertificateIdentity" PROVISIONING_PROFILE="ProvisioningProfileName" OTHER_CODE_SIGN_FLAGS="--keychain keyChainName"
模式:xcodebuild -workspace“path_to_fileName.xcworkspace”-scheme“schemeName”-sdk“targetSDK”-configuration buildConfig CODE_SIGN_IDENTITY =“NameOfCertificateIdentity”PROVISIONING_PROFILE =“ProvisioningProfileName”OTHER_CODE_SIGN_FLAGS =“ - keychain keyChainName”
Example:
xcodebuild -workspace "/Users/name.xcworkspace" -scheme "MyShemeName" -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
示例:xcodebuild -workspace“/Users/name.xcworkspace”-scheme“MyShemeName”-sdk iphonesimulator CODE_SIGN_IDENTITY =“”CODE_SIGNING_REQUIRED = NO
Find .app file inside derived data folder.
/Users/alex/Library/Developer/Xcode/DerivedData/../Build/Products/Debug-iphonesimulator/AppName.app
在派生数据文件夹中查找.app文件。 /Users/alex/Library/Developer/Xcode/DerivedData/../Build/Products/Debug-iphonesimulator/AppName.app
-
-
Variant 2:
- Build and run the app on the simulator.
- Open
Activity Monitor
and find the<App Name>
you are running(Not Xcode, the actual App you are building). Double click on the<App Name> -> Open Files and Ports -> Find <App Name.app> path -> find and copy a file <App Name.app> by path -> save the file locally
.
在模拟器上构建并运行应用程序。
打开Activity Monitor并找到您正在运行的
(不是Xcode,您正在构建的实际App)。双击 <应用程序名称> - >打开文件和端口 - >查找 路径 - >按路径查找并复制文件 - >在本地保存文件。
变体2:在模拟器上构建并运行应用程序。打开Activity Monitor并找到您正在运行的
Install app
- Open Xcode and open a Simulator
- On the command line type this command
xcrun simctl install booted <path to App Name.app>
- The App should appear on the Simulator, just click on the App to Launch it.
打开Xcode并打开模拟器
在命令行上键入此命令xcrun simctl install booted
该应用程序应出现在模拟器上,只需单击应用程序即可启动它。
The original instruction here -
https://coderwall.com/p/rv2lgw/use-xcodebuild-to-build-workspace-vs-project
https://www.webdigi.co.uk/blog/2016/how-to-transfer-your-app-to-an-ios-simulator-on-another-machine-using-app-file-and-xcrun/
这里的原始说明 - https://coderwall.com/p/rv2lgw/use-xcodebuild-to-build-workspace-vs-project https://www.webdigi.co.uk/blog/2016/how-to-转移您的应用程序内对一个-IOS模拟器上,另一机利用-APP-文件和xcrun /
#1
Yes, if you send those files to another person, and they put them into that directory, they can test the applications in the iPhone Simulator as well :)
是的,如果您将这些文件发送给另一个人,并将它们放入该目录,他们也可以在iPhone模拟器中测试应用程序:)
#2
I found a way that requires just a little more setup, but is much easier for non-developers:
我发现了一种只需要更多设置的方法,但对于非开发人员来说更容易:
Instructions for your users/testers:
- Install Xcode following Apple's instructions
- Double-click the attached application - the iPhone simulator will launch, install the app and start it automatically.
按照Apple的说明安装Xcode
双击附加的应用程序 - iPhone模拟器将启动,安装应用程序并自动启动它。
How to set it up:
- Download and unzip (to a folder on your desktop or wherever) 'Simulator Bundler' from: http://github.com/landonf/simlaunch/downloads
- Set your XCode build target to the required Simulator configuration (iPad/iPhone/which iOS version)
- Do a 'Build and archive'
- Find it: select 'Archived applications' in the Organizer, right click the relevant build, select "Reveal archived application in Finder"
- Drag the application (yourAppName, no extension) onto the Simulator Bundler app
从以下网址下载并解压缩(到桌面或任何地方的文件夹)“Simulator Bundler”:http://github.com/landonf/simlaunch/downloads
将XCode构建目标设置为所需的模拟器配置(iPad / iPhone / iOS版本)
做一个'建立和存档'
找到它:在管理器中选择“已存档的应用程序”,右键单击相关的构建,选择“在Finder中显示已存档的应用程序”
将应用程序(yourAppName,无扩展名)拖到Simulator Bundler应用程序上
Done. This will create a self-contained Mac OS X yourAppDisplayName.app file in the same folder (with your app's icon as the icon) that you can stick up on an FTP server or email to your users/testers.
完成。这将在同一文件夹中创建一个独立的Mac OS X yourAppDisplayName.app文件(使用您的应用程序图标作为图标),您可以将其粘贴在FTP服务器上或发送给您的用户/测试人员。
--
I think it's much neater/slicker than having to explain where to copy files, how to launch the simulator and so on.. And if anything gets messed up they can just uninstall via the familiar tap-and-hold + (x) gesture in the simulator UI, then double-click the app you sent them again.
我认为它比解释复制文件的位置,如何启动模拟器等更整洁/更光滑。如果有什么搞砸了,他们可以通过熟悉的点击并按住+(x)手势卸载模拟器UI,然后双击您再次发送它们的应用程序。
You can also produce several of these packages changing the bundle identifier between builds, allowing them to be installed side by side in your testers' simulators; say for getting some user feedback on different UI designs, or configure one for Production and one for Staging/QA servers, so your content editors can check their changes before they go live or whatever..
您还可以生成多个这些软件包,在构建之间更改软件包标识符,允许它们在测试人员的模拟器中并排安装;比如说获取一些用户对不同UI设计的反馈,或者为生产配置一个,为Staging / QA服务器配置一个,所以你的内容编辑可以在他们上线之前检查他们的变化或者其他什么。
The ability to reinstall the app from a desktop icon is also very convenient for localisation testing: launch the simulator, uninstall the app if present, set the required region format and language, double click the icon on your desktop, test; repeat for each required locale. (guarantees a fresh install each time, I've found that switching language with the app installed can result in all sorts of strange behaviour)
从桌面图标重新安装应用程序的能力对于本地化测试也非常方便:启动模拟器,卸载应用程序(如果有),设置所需的区域格式和语言,双击桌面上的图标,测试;重复每个必需的区域设置。 (保证每次全新安装,我发现安装app的切换语言会导致各种奇怪的行为)
#3
We just put up a little tool that will help you through this process for the latest version of Xcode.
我们刚刚提出了一个小工具,可以帮助您完成最新版Xcode的这个过程。
It basically creates a zip of the app so that you can pass to the tester and it'll install the app in the right Xcode directory. It will also open it up for the user with the right device selected in iOS Simulator.
它基本上创建了一个应用程序的zip,以便您可以传递给测试人员,它将在正确的Xcode目录中安装该应用程序。它还将为用户在iOS模拟器中选择正确的设备打开它。
Here it is
这里是
http://blog.placeit.net/ios-app-packager/
Hopefully it's useful to you guys.
希望它对你们有用。
#4
You are able to use simctl
binary to interact with iOS simulators from command line.
您可以使用simctl二进制文件从命令行与iOS模拟器进行交互。
Build app
-
Variant 1 (Preferable):
变式1(优先):
-
Build a project
建立一个项目
Pattern:
xcodebuild -project "path_to_fileName.xcodeproj" -target "targetName" -sdk "targetSDK" -configuration buildConfig CODE_SIGN_IDENTITY="NameOfCertificateIdentity" PROVISIONING_PROFILE="ProvisioningProfileName" OTHER_CODE_SIGN_FLAGS="--keychain keyChainName"
模式:xcodebuild -project“path_to_fileName.xcodeproj”-target“targetName”-sdk“targetSDK”-configuration buildConfig CODE_SIGN_IDENTITY =“NameOfCertificateIdentity”PROVISIONING_PROFILE =“ProvisioningProfileName”OTHER_CODE_SIGN_FLAGS =“ - keychain keyChainName”
-
Build a worksapce
建立一个工作原理
Pattern:
xcodebuild -workspace "path_to_fileName.xcworkspace" -scheme "schemeName" -sdk "targetSDK" -configuration buildConfig CODE_SIGN_IDENTITY="NameOfCertificateIdentity" PROVISIONING_PROFILE="ProvisioningProfileName" OTHER_CODE_SIGN_FLAGS="--keychain keyChainName"
模式:xcodebuild -workspace“path_to_fileName.xcworkspace”-scheme“schemeName”-sdk“targetSDK”-configuration buildConfig CODE_SIGN_IDENTITY =“NameOfCertificateIdentity”PROVISIONING_PROFILE =“ProvisioningProfileName”OTHER_CODE_SIGN_FLAGS =“ - keychain keyChainName”
Example:
xcodebuild -workspace "/Users/name.xcworkspace" -scheme "MyShemeName" -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
示例:xcodebuild -workspace“/Users/name.xcworkspace”-scheme“MyShemeName”-sdk iphonesimulator CODE_SIGN_IDENTITY =“”CODE_SIGNING_REQUIRED = NO
Find .app file inside derived data folder.
/Users/alex/Library/Developer/Xcode/DerivedData/../Build/Products/Debug-iphonesimulator/AppName.app
在派生数据文件夹中查找.app文件。 /Users/alex/Library/Developer/Xcode/DerivedData/../Build/Products/Debug-iphonesimulator/AppName.app
-
-
Variant 2:
- Build and run the app on the simulator.
- Open
Activity Monitor
and find the<App Name>
you are running(Not Xcode, the actual App you are building). Double click on the<App Name> -> Open Files and Ports -> Find <App Name.app> path -> find and copy a file <App Name.app> by path -> save the file locally
.
在模拟器上构建并运行应用程序。
打开Activity Monitor并找到您正在运行的
(不是Xcode,您正在构建的实际App)。双击 <应用程序名称> - >打开文件和端口 - >查找 路径 - >按路径查找并复制文件 - >在本地保存文件。
变体2:在模拟器上构建并运行应用程序。打开Activity Monitor并找到您正在运行的
Install app
- Open Xcode and open a Simulator
- On the command line type this command
xcrun simctl install booted <path to App Name.app>
- The App should appear on the Simulator, just click on the App to Launch it.
打开Xcode并打开模拟器
在命令行上键入此命令xcrun simctl install booted
该应用程序应出现在模拟器上,只需单击应用程序即可启动它。
The original instruction here -
https://coderwall.com/p/rv2lgw/use-xcodebuild-to-build-workspace-vs-project
https://www.webdigi.co.uk/blog/2016/how-to-transfer-your-app-to-an-ios-simulator-on-another-machine-using-app-file-and-xcrun/
这里的原始说明 - https://coderwall.com/p/rv2lgw/use-xcodebuild-to-build-workspace-vs-project https://www.webdigi.co.uk/blog/2016/how-to-转移您的应用程序内对一个-IOS模拟器上,另一机利用-APP-文件和xcrun /