Closed daviddickson closed 4 years ago
Cordova Platforms : ios 4.5.5
You are running cordova-ios 4.5.5, this is fixed in cordova-ios 5.0.x.
@dpogue I must be missing something. I ran npm install cordova-ios@latest
and according to package.json it is at 5.0.1 - "cordova-ios": "^5.0.1"
. Am I updating the wrong thing?
I ran
npm install cordova-ios@latest
[…]
I think that will not work on a Cordova project.
I highly recommend that you start with another “blank” project, with a limited number of plugins, and do cordova platform add ios@latest
or ionic cordova platform add ios@latest
.
In case of continued problems, please give us a more exact set of commands that we have to do to install the Ionic CLI, create the project, add the plugins, and reproduce your issue. Most of us do not actively support use with Ionic.
@brodybits ionic cordova platform add ios@latest
worked in a new blank project and in the current project I'm working on (after removing the platform first). Thanks!
Thanks @daviddickson. I think this needs to be documented by the Ionic project.
That your Ionic tool gave you old cordova-ios version indicates to me that you have an old version of Ionic CLI installed. I just tried the following steps:
npm i -g ionic
ionic start helloWorld blank --type=ionic-angular
cd helloWorld
ionic cordova platform add ios
and the following piece of output indicates to me that it does use cordova-ios@5, as required:
Using cordova-fetch for cordova-ios@^5.0.0
I highly recommend that you install recent version of Ionic CLI and ensure that you installed recent version of other tools such as Cordova CLI.
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
This is 4 months old.
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
This is 9 months old.
I have the same issue with a project. I have this error when i do ionic cordova build ios
:
[...]
[16:20:48] lint finished in 4.49 s
> cordova build ios
Reading build config file:
Cannot read property 'toLowerCase' of undefined
[ERROR] An error occurred while running subprocess cordova.
cordova build ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
My ionic info:
Ionic:
ionic (Ionic CLI) : 4.5.0
Ionic Framework : ionic-angular 3.9.8
@ionic/app-scripts : 3.2.4
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4, ios 4.5.5
Cordova Plugins : no whitelisted plugins (16 plugins total)
System:
Android SDK Tools : 26.1.1 (/Users/_<<myUser>>_/Library/Android/sdk)
ios-deploy : 1.9.2
NodeJS : v10.16.3 (/usr/local/bin/node)
npm : 3.10.10
OS : macOS Mojave
Xcode : Xcode 11.0 Build version 11A420a
@MiguelGonzalezAravena just remove the platform ios and then run below command
ionic cordova platform add ios@latest
as stated by @dpogue above it is fixed in cordova-ios 5.0.x
Cordova Platforms : ios 4.5.5
You are running cordova-ios 4.5.5, this is fixed in cordova-ios 5.0.x.
Thanks!
Thanks @daviddickson you really saved me a hell lot of time
Thanks man ! I was stuck for so long. @daviddickson
@brodybits
ionic cordova platform add ios@latest
worked in a new blank project and in the current project I'm working on (after removing the platform first). Thanks!
Thanks, work here!
I was using node 6.3.1
and cordova 6.5.0
Once I tried to use ios@5.0.x
I got an error asking for module cordova-common
Then I tried to rebuild the whole cordova project with node 10.x
and cordova 9.0.0
again with node and then I was able to use ios@5.0.x
platform.
warning: I would suggest to make a backup for your current cordova build before rebuilding.
Updating ios to the latest worked for me~
1) cordova platform remove ios
// To remove existing ios lib.
2) ionic cordova platform add ios@latest
// Update to latest
Or we can try these:
cordova platform remove ios
cordova platform add ios@latest
in my case, the problem was in the file 'platforms/ios/cordova/lib/list-emulator-build-targets' line 53 app.
if (device.name === deviceType.name.replace(/\-inch/g, ' inch') && device.availability) {
when availability is doesn't exists.
i change the line for this one.
if (device && device.name === deviceType.name.replace(/\-inch/g, ' inch') && device.isAvailable) {
Bug Report
Running
ionic cordova build ios
within a new, blank project does not work. This is a continuation of #642Problem
When running
ionic cordova build ios
the following error occurs:What is expected to happen?
The build should run to completion.
What does actually happen?
The build does not run completion.
Information
ionic cordova platform add ios
.cordova-ios
to the latest version (5.0.1 at the time of this writing).ionic cordova build ios
. The same TypeError appears.Command or Code
Environment, Platform, Device
Version information
Checklist