简体   繁体   English

在多个设备上使用fbsimctl启动React-Native应用

[英]Launch React-Native apps with fbsimctl on multiple devices

Thanks to fbsimctl we can launch multiple iOS simulators running multiple iOS-versions at the same time. 借助fbsimctl,我们可以启动同时运行多个iOS版本的多个iOS模拟器。 Any ideas how to launch ReactNative-projects on all iOS-simulators simultanously? 有什么想法如何在所有iOS模拟器上同时启动ReactNative-projects?

When i launch the app with " react-native run-ios " it will only appear on the very first simulator that was launched. 当我使用“ react-native run-ios ”启动应用程序时,它只会出现在启动的第一个模拟器上。 When i launch via XCode all other simulators will shutdown automatically except this one that was selected in the XCode launch-bar. 当我通过XCode启动时,所有其他模拟器都将自动关闭,但在XCode启动栏中选择的模拟器除外。

In the README is stated the command: 在自述文件中声明了以下命令:

fbsimctl launch com.facebook.someapp

I replaced the app-id to mine and it did not help, but will output something like: 我将应用程序ID替换为我的ID,它没有帮助,但会输出类似以下内容:

Error Domain=com.facebook.FBSimulatorControl Code=0 "App com.myown.appid can't be launched as it isn't installed" 错误Domain = com.facebook.FBSimulatorControl代码= 0“由于未安装应用com.myown.appid,因此无法启动”

It is also mentioned to call 也有人提到

fbsimctl install Someapp.app

I tried it with an exported IPA directly out of XCode. 我用XCode导出的IPA进行了尝试。 It produces: 它产生:

Error Domain=com.facebook.FBSimulatorControl Code=0 "Could not determine Application information for path /private/var/folders/cj/c_zjt5x12ps_6q93t023qc4w0000gn/T/61863B0A-89D3-4002-ACC4-D31EC256BA50-70447-0000472A108998F9/Payload/XXXXXX.app" UserInfo={NSLocalizedDescription=Could not determine Application information for path /private/var/folders/cj/c_zjt5x12ps_6q93t023qc4w0000gn/T/61863B0A-89D3-4002-ACC4-D31EC256BA50-70447-0000472A108998F9/Payload/XXXXXX.app 错误Domain = com.facebook.FBSimulatorControl代码= 0“无法确定路径/ private / var / folders / cj / c_zjt5x12ps_6q93t023qc4w0000gn / T / 61863B0A-89D3-4002-ACC4-D31EC256BA50-70447-0000472A108998F9 / Payload / XXX的应用程序信息。 app“ UserInfo = {NSLocalizedDescription =无法确定路径/ private / var / folders / cj / c_zjt5x12ps_6q93t023qc4w0000gn / T / 61863B0A-89D3-4002-ACC4-D31EC256BA50-70447-0000472A108998F9 / Payload / XXXXXX的应用程序信息。

Has anyone used it? 有人用过吗? For android i find it very usefully being able to launch several different simulators and launch the app with only one command on all these "devices". 对于Android,我发现能够启动多个不同的模拟器并在所有这些“设备”上仅使用一个命令即可启动应用程序非常有用。

fbsimctl install Someapp.app To use this command, you must have a build of your app for the simulator (.app file). fbsimctl install Someapp.app要使用此命令,您必须具有用于模拟器的应用程序构建(.app文件)。 You can create it via Xcode or via command line (use as target iOS Simulator) 您可以通过Xcode或命令行创建它(用作目标iOS模拟器)

It's preferable to start with simulators and .app, because using real devices and .ipa is much more complicated because of the profiling 最好从模拟器和.app开始,因为使用真实设备和.ipa会更加复杂,因为要进行分析

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM