Comments (22)
All I had to do was disconnect my real device (iPhone X) from my Mac.
from cordova-ios.
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.
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.
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.
@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
a quick solution could be to simply remove check_reqs.check_ios_deploy()
check from:
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.
-> 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.
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.
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?
from cordova-ios.
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.
My guess is this is the culprit:
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.
Doesn't this piece already take care of the identical check for cordova run ios
?
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.
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.
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.
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.
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.
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.
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.
@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.
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.
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.
closed xcode and ran 'ionic cordova build ios' in vscode. it worked for me
from cordova-ios.
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)
- cordova creating hundreds of Xcode 14 "stale files outside root paths" warnings HOT 4
- cordova ios not injecting referrerpolicy into iframe url calls HOT 7
- Loading HTML from the data directory with WKWebView results in an error HOT 1
- Cannot read property 'name' of undefined xcode@15 ios17
- Cannot read property 'name' of undefined xcode@15 ios17 HOT 2
- Webview Serving HOT 2
- Xcode 15.0: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.0.99. HOT 15
- Allow to configure a default simulator instead of always using --target on `cordova run` HOT 1
- Failing to broadcast 'pause' event when app enters background
- xcodebuild was not found. After upgrading to Cordova 7.0.1 from Cordova 6.1.0 HOT 3
- warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 17.0.99 HOT 2
- Unable to configure icons for Catalyst
- Undefined symbols on Xcode HOT 3
- Version 17 breaks podfile with deployment-target HOT 2
- 每次从后台进入前台UIApplicationDidBecomeActiveNotification这个方法执行有问题 HOT 1
- Cordova was listed on the list of requirements for third-party SDKs announced by Apple today. HOT 50
- Failed to verify code signature of some framework and cannot install on device HOT 3
- (Black screen) when App Reload is triggered on iPhones with Notch:
- Console.log is not displayed in the safari terminal, but is displayed in the Xcode console HOT 1
- App stuck on splash screen on ios 16+ HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-ios.