-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is ios-deploy required for plain builds (without deployment)? #420
Comments
My guess is this happens because of a "global" requirement check, triggered by this code: cordova-ios/bin/templates/scripts/cordova/lib/check_reqs.js Lines 145 to 152 in 46da4bc
Can you post more of your output (and stacktrace if available) so we can better track this down? |
I get the following results from running CordovaError: Promise rejected with non-error: 'ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do \'npm install -g ios-deploy\''
at cli.catch.err (/Users/brodybits/.nvs/node/8.12.0/x64/lib/node_modules/cordova/bin/cordova:29:15)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7) I am marking this as a bug since I think I think we should make some better distinction between required build tools and recommended build tools. |
It is required to deploy to iOS devices. I don't think there is a distinction if a requirement is for building or running (or there even should be). |
Here is more log output: $ cordova build --debug --device ios
Copying '/Users/hartwigdev/builds/f083891d/0/fairmanager/mobile2/.build/build-extras.gradle' to '/Users/hartwigdev/builds/f083891d/0/fairmanager/platforms/android/build-extras.gradle'.
Analyzing repo in '/Users/hartwigdev/builds/f083891d/0/fairmanager/mobile2/platforms/ios/FairManager'.
Android platform isn't being prepared. Not setting build number.
4773 commits found on current branch.
New iOS build number will be '4773'
new pbx project written with localization groups
/Users/hartwigdev/builds/f083891d/0/fairmanager/mobile2/platforms/ios purged from project cache
IOS project Code Sign Entitlements now set to: FairManager/Resources/FairManager.entitlements
Entitlements file is in reference section.
Reading build config file:
Reading build config file:
CordovaError: Promise rejected with non-error: 'ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do \'npm install -g ios-deploy\''
at cli.catch.err (/Users/hartwigdev/.npm-global/lib/node_modules/cordova/bin/cordova:29:15)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
ERROR: Job failed: exit status 1 |
My guess is this is the culprit:
will then invoke |
@oliversalzburg I think you did identify the right "culprit", not so sure that I would follow your logic concerning Considering that
a quick solution could be to simply remove
The downside of this quick solution is that it would lead to a case where an attempt to do I think a better solution would be to adapt I cannot promise when I would personally have time to work on this one. I suspect the other cordova-ios experts are pretty busy right now. PRs on cordova-lib and cordova-ios for review would be very welcome. |
Doesn't this piece already take care of the identical check for
And that check happens before the project would be built prior to deployment. It seems to me like that check in |
Why does https://github.com/phonegap/ios-deploy redirect to https://github.com/ios-control/ios-deploy. Was there an ownership switch. I am very confused. Also since it is as @brodybits said GPL v3 does that mean you have to abide by the guidelines just for building your app with ios-deploy |
closes apache#419 closes apache#420 fixes apache#429
All I had to do was disconnect my real device (iPhone X) from my Mac. |
F**K! It works. I was getting mad over this. Thank you so much! "** BUILD SUCCEEDED **" 💪 |
I just spent over 2 hours trying to find a solution. This was the real problem. Thank you so much ! |
Yes. As you likely know, Cordova was originally born as PhoneGap. PhoneGap was mostly renamed as Cordova in order to avoid trademark issues in the Apache project. I think the iOS tools were moved to a separate org to keep them independently under other licenses. They still use PhoneGap for PhoneGap Build and other tools by Adobe. And the confusing part is that they made a PhoneGap CLI which is a copy of the Cordova CLI. @shazron and @purplecabbage could probably explain this better. |
I just created and added the help wanted label, hope we can get this one fixed soon. I would likely favor my “better solution” that I proposed in #420 (comment). |
argh just ran into this... thank god someone told me I had to unplug my iPad. was about to go down a rabbit hole |
I almost never clone+fix global packages to deal with issues like this, so I added this to my readme instead. It's instructions on how to remove this line since it's a bit annoying for my personal workflow. Fix phone plugged in testing
Comment out line in any Should be totally safe since the return value is actually never used (and mdfind is super fast 🥇). Hope this helps someone! |
-> BrianRosamilia |
@maxegghead do yourself the favour and remove the need to ever test Cordova outputs on a real device, just deploy to a beta testing platform instead. I wrote a whole build pipeline composed of fuse-box tasks with some Cordova cli calls to upload the build to TestFlight etc. It’s somehow much smoother than trying to test on device |
My gosh. Thank you. This worked for me. |
:o wow, so glad to found your comment @shishirshettygit |
thanks a lot, you saved my day |
closed xcode and ran 'ionic cordova build ios' in vscode. it worked for me |
This issue also breaks the code signing settings in the project. Specifically, if I build the project with a device plugged in, the build fails with the promise rejection, the resulting project code signing settings are broken. No team is selected and Xcode displays a warning about having mixed code signing settings. Unplug the phone, build, and the xcode project signing settings are correctly defined. |
If neither `--device` nor `--emulator` are specified for the build command, it will check for a connected device and assume `--device` if one is found. However, it was also checking for the availability of the ios-deploy tool which is used to deploy to a connected device. If we're just building, we don't need to check for a deploy tool. The run command already has this check to ensure that ios-deploy is available before actually trying to deploy. Closes apacheGH-420. Closes apacheGH-677.
If neither `--device` nor `--emulator` are specified for the build command, it will check for a connected device and assume `--device` if one is found. However, it was also checking for the availability of the ios-deploy tool which is used to deploy to a connected device. If we're just building, we don't need to check for a deploy tool. The run command already has this check to ensure that ios-deploy is available before actually trying to deploy. Closes apacheGH-420. Closes apacheGH-677.
* feat!: Support for Catalyst builds `cordova build ios --device --target=mac ...` Output is to `build/Debug-maccatalyst` * fix: Disable iPad-on-Mac builds in favour of Catalyst Xcode warns that only one can be enabled at a time, so we need to pick one, and Catalyst seems like the better option for a proper macOS app experience. * feat!: Enable compiling for Apple Vision platform * chore(ci): Add unit tests for run and Catalyst stuff * fix(build): Don't check for ios-deploy at build time If neither `--device` nor `--emulator` are specified for the build command, it will check for a connected device and assume `--device` if one is found. However, it was also checking for the availability of the ios-deploy tool which is used to deploy to a connected device. If we're just building, we don't need to check for a deploy tool. The run command already has this check to ensure that ios-deploy is available before actually trying to deploy. Closes GH-420. Closes GH-677.
Why am I seeing this complaint when I'm not even trying to deploy? This happens on
cordova build
:The text was updated successfully, but these errors were encountered: