question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cordova-ios 6.0.0/6.1.0 wont deploy on physical device only simulator

See original GitHub issue

Bug Report

Problem

every time i run cordova run ios it wont deploy to my attached iPhone it seems to try deploying to simulator instead which actually fails because i haven’t run cordova emulate ios first

What is expected to happen?

i expected it to deploy the app to my attached iPhone device

What does actually happen?

it tries to deploy the app to default simulator device instead of deploying to physical device but fails

Information

if i use cordova platform add ios@6.0.0 i have this problem BUT if i use cordova platform add ios which installs 5.1.1 i am able to deploy without any issues

brief extract from logs

Running command: xcodebuild -exportArchive -archivePath getMyDinner.xcarchive -exportOptionsPlist /Users/Simon/Developer/Cordova/getmydinner/platforms/ios/exportOptions.plist -exportPath /Users/Simon/Developer/Cordova/getmydinner/platforms/ios/build/device
2020-06-21 14:00:46.780 xcodebuild[75874:4587091] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/h8/d5d9xk4171v7c6bl02ymm6980000gn/T/getMyDinner_2020-06-21_14-00-46.779.xcdistributionlogs'.
Exported getMyDinner to: /Users/Simon/Developer/Cordova/getmydinner/platforms/ios/build/device
** EXPORT SUCCEEDED **
Command finished with error code 0: xcodebuild -exportArchive,-archivePath,getMyDinner.xcarchive,-exportOptionsPlist,/Users/Simon/Developer/Cordova/getmydinner/platforms/ios/exportOptions.plist,-exportPath,/Users/Simon/Developer/Cordova/getmydinner/platforms/ios/build/device
No scripts found for hook "before_deploy".
Running command: xcodebuild -version
Command finished with error code 0: xcodebuild -version
Running command: ioreg -p IOUSB -l
Command finished with error code 0: ioreg -p,IOUSB,-l
Running command: ios-deploy --version
Command finished with error code 0: ios-deploy --version
Running command: ios-deploy -c -t 1
[....] Waiting up to 1 seconds for iOS device to be connected
[....] Found ca9050e715f7c2507b0c3507fb3d6d00bade6dc8 (D201AP, iPhone 8, iphoneos, arm64) a.k.a. 'Si-iPhone8' connected through USB.
Command finished with error code 0: ios-deploy -c,-t,1
Running command: unzip -o -qq /Users/Simon/Developer/Cordova/getmydinner/platforms/ios/build/device/getMyDinner.ipa
Command finished with error code 0: unzip -o,-qq,/Users/Simon/Developer/Cordova/getmydinner/platforms/ios/build/device/getMyDinner.ipa
Deploying to simulator
No target specified for emulator. Deploying to "iPhone-XR, 12.4" simulator.
Running command: /Users/Simon/Developer/Cordova/getmydinner/node_modules/ios-sim/bin/ios-sim launch /Users/Simon/Developer/Cordova/getmydinner/platforms/ios/build/emulator/getMyDinner.app --devicetypeid com.apple.CoreSimulator.SimDeviceType.iPhone-XR, 12.4 --log /Users/Simon/Developer/Cordova/getmydinner/platforms/ios/cordova/console.log --exit
Error: Unhandled error. ('[ios-sim] /Users/Simon/Developer/Cordova/getmydinner/platforms/ios/build/emulator/getMyDinner.app/Info.plist file not found.\n')

Command or Code

cordova run ios

Environment, Platform, Device

Mac OS 10.15.5, iOS@6.0.0, iPhone 8 13.5.1

Version information

Cordova 9.0.0 (cordova-lib@9.0.1) cordova-ios@6.0.0 no plugins, using sample project created via cordova create

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sc0ttdav3ycommented, Jun 25, 2020

As a workaround, I have found that I can manually deploy the app to a device by using ios-deploy directly.

cd platforms/ios/build/device

# extract the .app from the .ipa (creates Payload directory)
unzip "<Project Name>.ipa"
cd Payload

# deploy to device
ios-deploy --debug --bundle "<Project Name>.app"

See https://github.com/ios-control/ios-deploy for details.

0reactions
dpoguecommented, Jul 8, 2020

There’s not really a programming team, there’s a handful of volunteers. Speaking for myself, I can’t help debug this because I don’t have any physical devices to reproduce it with.

If someone wants to investigate further, one place to start would be reviewing the commits between 5.1.1 and 6.0.0 to see if anything changed around how we use ios-deploy (or maybe the version of ios-deploy itself?)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Cordova on Twitter: "Cordova iOS 6.1.0 Released ...
Still can't deploy to any physical device only simulator. github.com. cordova-ios 6.0.0/6.1.0 wont deploy on physical device only simulator ...
Read more >
Cordova iOS 6.0.0 Released!
We are happy to announce that we have just released Cordova iOS 6.0.0! This is Cordova's official platform for building iOS mobile ...
Read more >
iOS Simulator failed to install the application - Stack Overflow
Try manually launch the iOS Simulator and from the "iOS Simulator" menu, click "Reset content and settings" ...
Read more >
Cordova - Meteor Guide
How to build mobile apps using Meteor's Cordova integration. ... with Cordova to run your app on a physical device or the iOS...
Read more >
Can't deploy to iPhone (not availa… | Apple Developer Forums
Please reconnect the device." I'm trying to deploy a simple HelloWorld app to my iPhone 6s Plus running iOS 13.5 from Xcode 11.4.1...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found