Giter Club home page Giter Club logo

Comments (22)

shishirshettygit avatar shishirshettygit commented on May 30, 2024 81

All I had to do was disconnect my real device (iPhone X) from my Mac.

from cordova-ios.

jannikco avatar jannikco commented on May 30, 2024 19

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 **" 💪

from cordova-ios.

brodybits avatar brodybits commented on May 30, 2024 3

I get the following results from running cordova build ios with no ios-deploy installed:

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 ios-deploy which has viral GPL v3 license should not be required to build an app from the command line.

I think we should make some better distinction between required build tools and recommended build tools.

from cordova-ios.

janpio avatar janpio commented on May 30, 2024 2

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).

from cordova-ios.

brodybits avatar brodybits commented on May 30, 2024 1

@oliversalzburg I think you did identify the right "culprit", not so sure that I would follow your logic concerning check_reqs.run() 100%. I think check_reqs.run() which checks for xcodebuild tool would be used for both simulator and device.

Considering that check_reqs.check_ios_deploy() is also called in

return check_reqs.check_ios_deploy();

a quick solution could be to simply remove check_reqs.check_ios_deploy() check from:

return check_reqs.check_ios_deploy();

The downside of this quick solution is that it would lead to a case where an attempt to do cordova run ios --device with no ios-deploy installed would first do the build and then fail with the "ios-deploy was not found" error.

I think a better solution would be to adapt cordova-lib and cordova-ios so that an attempt to do cordova run ios --device with no --nobuild option would somehow check the result of check_reqs.check_ios_deploy() before attempting to build and run. This kind of solution would definitely need an adaptation to https://github.com/apache/cordova-lib/blob/master/src/cordova/run.js. I think the hard part would be getting the interface between cordova-lib and cordova-ios right.

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.

from cordova-ios.

maxegghead avatar maxegghead commented on May 30, 2024 1

-> BrianRosamilia
Thanks for this, really useful, much better to be able to run new builds without keep unplugging my phone. Especially as every time I plug in my phone I get asked if I trust my macbook, and have to type in my 6 digit lock code (slowly as the screen keyboard can't keep up with a fast rate of typing). sheesh Apple.

from cordova-ios.

donni106 avatar donni106 commented on May 30, 2024 1

All I had to do was disconnect my real device (iPhone X) from my Mac.

:o wow, so glad to found your comment @shishirshettygit

from cordova-ios.

janpio avatar janpio commented on May 30, 2024

My guess is this happens because of a "global" requirement check, triggered by this code:

function checkTool (tool, minVersion, message, toolFriendlyName) {
toolFriendlyName = toolFriendlyName || tool;
// Check whether tool command is available at all
let tool_command = shell.which(tool);
if (!tool_command) {
return Q.reject(toolFriendlyName + ' was not found. ' + (message || ''));
}

Can you post more of your output (and stacktrace if available) so we can better track this down?

from cordova-ios.

oliversalzburg avatar oliversalzburg commented on May 30, 2024

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

from cordova-ios.

oliversalzburg avatar oliversalzburg commented on May 30, 2024

My guess is this is the culprit:

return check_reqs.check_ios_deploy();

will then invoke check_reqs.run(), which might as well also check for ios-deploy as well and then the check_reqs.check_ios_deploy(); could be dropped, right?

from cordova-ios.

oliversalzburg avatar oliversalzburg commented on May 30, 2024

Doesn't this piece already take care of the identical check for cordova run ios?

return check_reqs.check_ios_deploy();

And that check happens before the project would be built prior to deployment. It seems to me like that check in build.js just needs to be removed.

from cordova-ios.

 avatar commented on May 30, 2024

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

from cordova-ios.

AlexAstilean avatar AlexAstilean commented on May 30, 2024

All I had to do was disconnect my real device (iPhone X) from my Mac.

I just spent over 2 hours trying to find a solution. This was the real problem.

Thank you so much !

from cordova-ios.

brodybits avatar brodybits commented on May 30, 2024

Why does https://github.com/phonegap/ios-deploy redirect to https://github.com/ios-control/ios-deploy. Was there an ownership switch.

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.

from cordova-ios.

brodybits avatar brodybits commented on May 30, 2024

All I had to do was disconnect my real device (iPhone X) from my Mac.

I just spent over 2 hours trying to find a solution. […]

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).

from cordova-ios.

jpike88 avatar jpike88 commented on May 30, 2024

argh just ran into this... thank god someone told me I had to unplug my iPad. was about to go down a rabbit hole

from cordova-ios.

BrianRosamilia avatar BrianRosamilia commented on May 30, 2024

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

mdfind check_reqs.check_ios_deploy

Comment out line in any build.js


Should be totally safe since the return value is actually never used (and mdfind is super fast 🥇). Hope this helps someone!

from cordova-ios.

jpike88 avatar jpike88 commented on May 30, 2024

@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

from cordova-ios.

mattfroese avatar mattfroese commented on May 30, 2024

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 **" 💪

My gosh. Thank you. This worked for me.

from cordova-ios.

Hussain-AboAlamal avatar Hussain-AboAlamal commented on May 30, 2024

All I had to do was disconnect my real device (iPhone X) from my Mac.

thanks a lot, you saved my day

from cordova-ios.

pranayreddy123 avatar pranayreddy123 commented on May 30, 2024

closed xcode and ran 'ionic cordova build ios' in vscode. it worked for me

from cordova-ios.

Mehuge avatar Mehuge commented on May 30, 2024

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.

from cordova-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.