ionic-cli: Can't access app path ../ios/build/device/name.app : No such file or directory

Short description of the problem:

When creating a new project and then running it on an iPad I get a can’t access path error. When following the path, the device folder appears to be missing as though it was never built.

What behavior are you expecting?

The CLI to run the app on my iPad.

Steps to reproduce:

  1. Create a new blank project. ionic start TEST2 blank
  2. Build the blank project. ionic build ios
  3. Run the project. ionic run ios
2016-07-22 10:21:06.364 ios-deploy[3580:121214] [ !! ] Can't access app path '/Users/huntmj/documents/Test2/platforms/ios/build/device/TEST2.app' : No such file or directory

Error: Error code 253 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b,/Users/huntmj/documents/Test2/platforms/ios/build/device/TEST2.app

Other information:

When I navigate to ios/build/ their is no device folder:

screen shot 2016-07-22 at 10 34 53 am

Which Ionic Version? 2.x

Run ionic info from terminal/cmd prompt: (paste output below) Your system information:

Cordova CLI: 6.3.0 Ionic Framework Version: 1.3.1 Ionic CLI Version: 2.0.0-beta.32 Ionic App Lib Version: 2.0.0-beta.18 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v4.4.7 Xcode version: Xcode 7.3.1 Build version 7D1014

More detail terminal output

screen shot 2016-07-22 at 10 47 11 am

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 8
  • Comments: 57 (1 by maintainers)

Most upvoted comments

Try it with the --device flag:

ionic run ios --device

Son of a gun that worked. The --device flag added the device folder to the build folder. Thanks!!

I had one final error but all I had to do was run the project in xCode, add a provisioning profile, and ionic run ios --device ran the app on my iPad.

Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.ionicframework.test2374987” were found.

** BUILD FAILED **

The following build commands failed:
    Check dependencies

(1 failure)

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/huntmj/documents/Test2/platforms/ios/cordova/build-debug.xcconfig,-project,TEST2.xcodeproj,-target,TEST2,-configuration,Debug,-destination,platform=iOS,build,CONFIGURATION_BUILD_DIR=/Users/huntmj/documents/Test2/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/huntmj/documents/Test2/platforms/ios/build/sharedpch

I still can’t run the app on device.

Here is what I get after adding the --device flag:

Error: Error code 1 for command: ios-deploy with args: --justlaunch,–no-wifi,-d,-b,/Users/lm/test/platforms/ios/build/device/test.app

Caught exception: undefined

like @patrickmcd has mentioned it, just add the --device after cordova/ionic run ios :

cordova run ios --device

and look in your platforms/ios/build/ directory if there’s a /device directory. Cordova should copy all the compiled stuff in it.

That is to say you might want to leave the issue open, because ionic run ios should work without the flag.

I was seeing the same issue. Adding --device worked. Thanks!

Open your project under xcode, from there click the play button. Your project file will be under plaforms -> ios -> project_name.xcodeproj

Double check that your project has the developer account assigned.

I am getting the same error as @MasterProgrammer200

2016-07-27 19:32:36.027 ios-deploy[17802:618056] [ !! ] Can't access app path '/Users/...../platforms/ios/build/device/App.app' : No such file or directory

Error: Error code 253 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b,/Users/...../platforms/ios/build/device/App.app

Also same error when I run with --device. No provisioning profile…

Any workarounds ? Thank you !!

Awesome! well at least you can move forward now 😉

still having this issue as well

ionic run ios --device doesn’t work for me

niether does

un install ios-deploy sudo npm install -g ios-deploy --unsafe-perm=true --allow-root

This issue still exists today: screen shot 2016-09-29 at 22 49 02

Steps to reproduce:

  1. ionic start demo blank --v2
  2. ionic run ios

My Ionic info:

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: Mac OS X El Capitan (Wrong info by the cli, it's actually macOS Sierra)
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a

Also experiencing this issue, but only after I changed my app name and rm/add ios platform… before this it was working… --device flag helped 😃

10x

@MasterProgrammer200 the comment you mentioned is relative to provisioning profile. You need to create a test provisioning profile (XCode 7) allows you to create a test provisioning profile for development (without paying for Apple account). Let me know if you find it difficult to create provisioning profile.

But, yes, that --device flag should have documented or fixed as par @patrickmcd’s comment.