Closed huntmj01 closed 6 years ago
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
It's probably still an issue (though not sure if it's Ionic or Cordova). I think ionic run ios
without the flag used to work for me, and a cordova upgrade broke it, but I lost track.
That is to say you might want to leave the issue open, because ionic run ios
should work without the flag.
As per the recommendation of @patrickmcd, I am reopening the issue.
@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.
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
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 !!
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.
I was seeing the same issue. Adding --device worked. Thanks!
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
Same issue but the build fails with --device
I am facing same issue as reported by MasterProgrammer200 please help. I am not able run on ios device.
Just came across this issue in the latest version as of this moment (2.0.0). Apparently adding --device
works around this. I assume some kind of glitch in two places in the code where different defaults are provided for this behaviour.
This issue still exists today:
Steps to reproduce:
ionic start demo blank --v2
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
Exactly the same issue today
This seems to be a cordova issue. I just finished going through the cordova hello world example, and when I run cordova run ios
, I get:
** BUILD SUCCEEDED **
[....] Waiting up to 1 seconds for iOS device to be connected
[....] Found iPhone 5s (GSM) 'iPhone' (<redacted>) connected through USB.
2016-10-05 22:44:23.378 ios-deploy[32337:930100] [ !! ] Can't access app path '/Library/WebServer/Documents/hello/platforms/ios/build/device/HelloWorld.app' : No such file or directory
Error: Error code 253 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b,/Library/WebServer/Documents/hello/platforms/ios/build/device/HelloWorld.app
Adding the --device
flag fixed the issue. Furthermore, after running with --device
once, running the command again without the flag seems to work.
Any workaround?
Have you added your project to an xcode development group? i.e a valid developer account
Same issue for me:
** BUILD SUCCEEDED **
[....] Waiting up to 1 seconds for iOS device to be connected
[....] Found iPhone 6s 'MyiPhone' (0e7a65c0f0a189d19cf56434e[...]) connected through USB.
2016-10-11 18:36:29.501 ios-deploy[26362:7165583] [ !! ] Can't access app path '/Users/[...]/platforms/ios/build/device/MyApp.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/MyApp.app
Your system information:
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.0
Gulp local:
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.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v4.4.4
Xcode version: Xcode 8.0 Build version 8A218a
If you're still having the same issue and project has been allocated a developer account under xcode, give the following a try:
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
@audan2009 just making sure, you have already attached your project under xcode to a developer account/team? Whenever i've had this error in the past, it's always because i've forgotten to assign a team to the project.
Yup. I had this working in beta 11 just fine. Same app Id
Interesting. ionic Emmulator works fine? have you tried running it from xcode also?
Yes it does. I'm not sure how to run it from xcode.
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.
That worked! Looks like I didnt have it assigned... I didn't have to do that with beta 11.
Now that its on my phone theres 10 other things that don't work :(
Awesome! well at least you can move forward now ;-)
No, sorry. That didn't work either (npm (un)install ios-depoly + xcode dev account).
When i build and run the app from xcode it will be successfully deployed to my iphone via usb. From ionic's run command it still fails with the previously posted error message.
edit: ionic emulate --target="iPhone-5, 10.0" runs successful
@athomer have you tried running it under Xcode? And dev account assigned?
@rrubio yes, under xcode it builds and runs without errors. a dev account is assigned...
If you haven't done so already, I would try removing platforms and re-add them.
That is -
Also make sure you have the following installed -
tried to remove the platform and add it again, but that didn't solve my problem. the needed tools (ios-sim, ios-deploy and cordova) are installed. a test with a newly created plain vanilla hello world rc0 app (ionic start ionicRc0 --v2) shows the same error:
CodeSign build/emulator/ionicRc0.app
cd /Users/.../Desktop/DEV/apps/ionicRc0/platforms/ios
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin[...]"
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp=none /Users/.../Desktop/DEV/apps/ionicRc0/platforms/ios/build/emulator/ionicRc0.app
** BUILD SUCCEEDED **
[....] Waiting up to 1 seconds for iOS device to be connected
[....] Found iPhone 4S 'iPhone' (4ade41a012082c5a451032cef7ecb6a...) connected through USB.
2016-10-13 11:44:14.738 ios-deploy[65926:9276180] [ !! ] Can't access app path '/Users/.../Desktop/DEV/apps/ionicRc0/platforms/ios/build/device/ionicRc0.app' : No such file or directory
Error: Error code 253 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b,/Users/.../Desktop/DEV/apps/ionicRc0/platforms/ios/build/device/ionicRc0.app
Had the same problem here.
I'm running latest developer beta on my phone and had selected according xCode beta on my Mac, but xCode-beta
was not set as default xCode.
Got it working by executing sudo xcode-select -switch /Applications/Xcode-beta.app
Looks like ionic run ios
will build the app under the emulator folder?
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp=none /Users/.../platforms/ios/build/emulator/myapp.app
/Users/.../platforms/ios/build/emulator/myapp.app: replacing existing signature
emulator should be device?
@ThorstenHans i think my xcode version and paths are correct. i only use the latest build on my mac.
@snowcxt yes, it seems like that.
I ran ionic run ios
but found this in the console:
Building project: /Users/.../platforms/ios/MissDolphin-Mobile.xcodeproj
Configuration: Debug
Platform: emulator
So I also am having the following error. When I add the --device flag I get this error
Error: Error code 1 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b
I can deploy from xcode however and appears to work fine when I go that route.
I also removed my platform and added back same issue.
i tryed everything and nothing help me until : i downgrade the cordova
use sudo npm install -g cordova@6.0.0
and also sudo npm install -g ios-deploy --unsafe-perm=true
than i hade premission xcode project error so i add the admin premission.
and wholla . that work !! (sory for my english :)
Ok I wrote a gist of this in my blog: http://meshfields.de/ionic2-ios-local/
+1 problem exist for me too, I can run it from xcode but not from terminal. I followed the provided instruction.
My OS: macOS Sierra
I believe the "Can't access app path ..." issue can be solved by ALSO granting Cordova / Ionic write permissions to the project folder, as noticed by @BARSHAHAF EDIT / CLARIFICATION : both sudo npm install -g ios-deploy --unsafe-perm AND granting Cordova / Ionic write permissions to the project's folder were necessary for me
This is most probably a Provisioning Profile Issue. Try to build the app using Xcode once and then try again.I fixed this issue.
Updating to latest cordova version 6.5.0 (sudo npm update -g cordova) and using "ionic run ios -l --device" fixed this issue for me. Tried everything else in this thread before, though.
it's a problem related to python module "six". Install six and try again.
easy_install six
I just fixed this issue by trying to launch it through Xcode. It pops up an alert message telling me to check the Settings>General>Device Management to enable my phone as a trusted device.
I just ran into the problem myself. The only way I could run my app was using Xcode to build and deploy to my device. Xcode found many things wrong with the project as one would expect, but by using the recommend settings when it prompts you helps as well. It is a pain to do it this way.
I am creating ionic 1 projects, and met the same issue here, here is what I did:
Append --device flag: ionic run myApp --device
, now that specific error disappears. but there is some other error .
Then I open the iOS project in Xcode8.2 and associate it with my developer certificate.
And now i am able to simply use ionic run ios
to run it on my device. (but I have to wake up and unlock my device first, otherwise it will yell me below message:
2017-03-23 21:44:47.791 ios-deploy[29119:867835] [ !! ] Unable to mount developer disk image. (e80000e2)
Error: Error code 253 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b,/Users/xxxxxx/myApp/platforms/ios/build/device/myApp.app
Your system information:
Cordova CLI: 6.5.0 Ionic CLI Version: 2.2.1 Ionic App Lib Version: 2.2.0 ios-deploy version: 1.9.1 ios-sim version: 5.0.13 OS: macOS Sierra Node Version: v6.10.0 Xcode version: Xcode 8.2.1 Build version 8C1002
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:
Other information:
When I navigate to ios/build/ their is no device folder:
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