简体   繁体   中英

Ionic can't run my app on my iPhone

I have a problem with Ionic, more precisely with Xcode (I think). When I use the command sudo ionic run -device , it gives me this:

=== BUILD TARGET felicitation OF PROJECT felicitation WITH CONFIGURATION Debug ===




Check dependencies


No profiles for 'com.arguiot.felicitation123456' were found:  Xcode couldn't find a provisioning profile matching 'com.arguiot.felicitation123456'.

Code signing is required for product type 'Application' in SDK 'iOS 10.2'



** ARCHIVE FAILED **



The following build commands failed:

    Check dependencies

(1 failure)

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Arthur-Guiot/GitHub/Appli-Samuel-Julien/platforms/ios/cordova/build-debug.xcconfig,-workspace,felicitation.xcworkspace,-scheme,felicitation,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,felicitation.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/Arthur-Guiot/GitHub/Appli-Samuel-Julien/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/Arthur-Guiot/GitHub/Appli-Samuel-Julien/platforms/ios/build/sharedpch

I tried to build it manually, but I can't, because I have iOS 10.3 beta on my iPhone SE. I have Xcode 8.2, and for the command line: Xcode 8.2 (8C38) . I recently updated the command line tool, and I think it's the problem. Whatever, the code of the app is here . Is there any solution to reinstall every dependency, or to fix the problem? If you guys think that it comes from the code, feel free to do pull request of the GitHub Repository.

Try removing the iOS platform by using the command:

ionic platform remove ios

Then add ios platform version 4.2.0 using the following command:

ionic platform add ios@4.2.0

Version higher than 4.3.0 have problem with ionic build. This could solve your problem.

Also if you are running it on a real device, you may need to create a development provisioning profile. Without provisioning profile you cannot run it on real device.

Do following steps

  • Add ios platform sudo ionic platform add ios
  • Create a developer provisioning profile using Apple's developer portal (You'll need a provisioning profile to run your app on a device. You have to create a one by using an Apple Developer account. ). To create provisioning profile this link will help to you. Follow the steps are in under section. 部分下的步骤操作。 You can follow the rest of steps are there to run your application on a ios device. But as a summery following steps are mentioned below.
  • Go to your project and navigate to inside your platform folder and you can find out ios folder. Go to inside that folder and open the .xcodeproj using Xcode. Note: If it has .xcworkspace, open it instead of .xcodeproj.
  • Then in Xcode in the Scheme pop-up menu, choose your device and click on run button to run your application in device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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