Cordova项目在Android和iPad上运行,但不在iPhone上运行

时间:2023-01-12 17:50:21

I have a Cordova project, that I can run on my Android phone using ionic run android --device and on my iPad using ionic run ios --device. However, now I connect my iPhone 5, and run the last command again, but get the following error message.

我有一个Cordova项目,我可以使用离子运行android - 设备在我的Android手机上运行,​​并使用离子运行ios - 设备在我的iPad上运行。但是,现在我连接我的iPhone 5,并再次运行最后一个命令,但收到以下错误消息。

...
[ 60%] TakingInstallLock
[ 65%] PreflightingApplication
[ 65%] InstallingEmbeddedProfile
[ 70%] VerifyingApplication
2015-06-24 17:58:48.564 ios-deploy[33436:1048931] [ !! ] Error 0xe8008015: ∑~}ˇ AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Error code 253 for command: ios-deploy with args: -d,-b,/path/to/project/App/platforms/ios/build/device/project_name.app
ERROR running one or more of the platforms: Error: /path/to/project/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project

Online (also on SO) I find many users facing this issue with an Android device, and then they need to install the Android APK. I also read here that I have to run the following command first: sudo npm install -g ios-deploy, which I did. It did not help though.

在线(也在SO上)我发现许多用户在使用Android设备时遇到此问题,然后他们需要安装Android APK。我还在这里读到我必须首先运行以下命令:sudo npm install -g ios-deploy,我做了。但它并没有帮助。

I am using version 5.0.0, and I read here that I have to downgrade to version 4.3.0. I find this hard to believe though. Is there another cause for this error? How can I check for it, and how can I solve it?

我使用的是5.0.0版本,我在这里读到我必须降级到4.3.0版本。我发现这很难相信。这个错误还有其他原因吗?我该如何检查它,我该如何解决?

1 个解决方案

#1


2  

I encountered the same ios deploy AMDeviceSecureInstallApplication error when deploying to a new ios device. Here is how I was able to resolve it and successfully deploy to the new ios device. Start xcode and open your xcodeproj file which can be found in your project_name/platforms/ios directory. Once the project is finished loading then from the top menu select Product and then select destination and choose your new ios device. Then when you click run in xcode you will be prompted that it cannot run on the new ios device because of your code signing provisioning profile. There will be an option that says something like "try and fix it" and simply select that option and follow the prompts, confirm which provisioning profile you want to use to deploy your app to the device. If you only have one provisioning profile then select that one and the app will now run on your device. And in the future you should be able to deploy to this device using the ionic run ios --device command.

在部署到新的ios设备时,我遇到了相同的ios部署AMDeviceSecureInstallApplication错误。以下是我能够解决它并成功部署到新的ios设备的方法。启动xcode并打开xcodeproj文件,该文件可以在project_name / platforms / ios目录中找到。项目完成加载后,从顶部菜单中选择产品,然后选择目标并选择新的ios设备。然后,当您单击xcode中的运行时,系统将提示您由于您的代码签名配置文件而无法在新的ios设备上运行。会有一个选项说“尝试并修复它”,只需选择该选项并按照提示操作,确认您要使用哪个配置文件将应用程序部署到设备。如果您只有一个配置文件,则选择该配置文件,该应用程序现在将在您的设备上运行。在将来,您应该能够使用ionic run ios --device命令部署到此设备。

#1


2  

I encountered the same ios deploy AMDeviceSecureInstallApplication error when deploying to a new ios device. Here is how I was able to resolve it and successfully deploy to the new ios device. Start xcode and open your xcodeproj file which can be found in your project_name/platforms/ios directory. Once the project is finished loading then from the top menu select Product and then select destination and choose your new ios device. Then when you click run in xcode you will be prompted that it cannot run on the new ios device because of your code signing provisioning profile. There will be an option that says something like "try and fix it" and simply select that option and follow the prompts, confirm which provisioning profile you want to use to deploy your app to the device. If you only have one provisioning profile then select that one and the app will now run on your device. And in the future you should be able to deploy to this device using the ionic run ios --device command.

在部署到新的ios设备时,我遇到了相同的ios部署AMDeviceSecureInstallApplication错误。以下是我能够解决它并成功部署到新的ios设备的方法。启动xcode并打开xcodeproj文件,该文件可以在project_name / platforms / ios目录中找到。项目完成加载后,从顶部菜单中选择产品,然后选择目标并选择新的ios设备。然后,当您单击xcode中的运行时,系统将提示您由于您的代码签名配置文件而无法在新的ios设备上运行。会有一个选项说“尝试并修复它”,只需选择该选项并按照提示操作,确认您要使用哪个配置文件将应用程序部署到设备。如果您只有一个配置文件,则选择该配置文件,该应用程序现在将在您的设备上运行。在将来,您应该能够使用ionic run ios --device命令部署到此设备。