meteor / meteor

Meteor, the JavaScript App Platform
https://meteor.com
Other
44.39k stars 5.19k forks source link

Update cordova version #5017

Closed Tarang closed 9 years ago

Tarang commented 9 years ago

The version of cordova included in projects seem to be 3.7.0. Is there a way to update this to 3.8.0 or if possible to the latest version (5.1.1).

The included version is nearly a year old.

I'm not at all sure how to debug this. I tried a clean install of Meteor and deleted the cordova-build directory, in case it's an old version being transferred on.

Repro:

curl https://install.meteor.com | sh
cd ~/Desktop
meteor create test
cd test
meteor add-platform ios
meteor run ios

Connect up and check up window.cordova.version

gabrielalmeida commented 9 years ago

A Cordova update is planned to v1.1.1 release, check History and https://github.com/meteor/meteor/commit/641cc4c3337d1a0551594593b168575df21fc448 and also https://github.com/meteor/meteor/issues/4723 for the latest version.

When you do window.cordova.version it does return the version of the Cordova's platform you're running. In your case, ios@3.7.0, you can check it by doing this from project root:

$ cat .meteor/local/cordova-build/platforms/ios/CordovaLib/VERSION
3.7.0

Or if you have cordova installed globally:

$ cd .meteor/local/cordova-build
$ cordova platform
Installed platforms: ios 3.7.0
Available platforms: amazon-fireos, android, blackberry10, browser, firefoxos

Cordova has been updated to 4.x since https://github.com/meteor/meteor/commit/d155e46627b4807ed28e6f6df47644becd48bd8b from Dec 2014.

Check this post about confusion on cordova version. :smile:

Tarang commented 9 years ago
$ cat .meteor/local/cordova-build/platforms/ios/CordovaLib/VERSION
3.7.0

@gabrielalmeida How can I update it? There's an iframe bug in 3.7.0.

gabrielalmeida commented 9 years ago

I do not know if this would cause any issue to Meteor, but it should be as simple as this on vanilla Cordova(if you have cordova global with a version greater than 4.3):

$ pwd
/Users/gbr/Dev/sample-meteor-project/.meteor/local/cordova-build

$ cordova platform update ios
npm http GET https://registry.npmjs.org/cordova-ios
npm http 200 https://registry.npmjs.org/cordova-ios
npm http GET https://registry.npmjs.org/cordova-ios
npm http 200 https://registry.npmjs.org/cordova-ios
Updating ios project...
iOS project updated with cordova-ios@3.8.0

$ cat platforms/ios/CordovaLib/VERSION
3.8.0

Then open the project on Xcode and try to run the app.

Although, it would be replaced to 3.7.0 again on each build, so that doesn't help much..

You can try to run meteor from a master(which is using cordova 5.0.0) checkout and it would use ios@3.8.0 as default(according to this).

martijnwalraven commented 9 years ago

For the Meteor 1.2 release, the included Cordova tools will be updated to the latest version 5.2.0. This includes Cordova Android 4.1 and Cordova iOS 3.9.

A release candidate should be out really soon now.

jaskinn commented 9 years ago

Eagerly awaiting 1.2 - specifically for the Cordova update.

lorensr commented 9 years ago

1.2 has been released, this issue can be closed.

martijnwalraven commented 9 years ago

Yep, you're right, happy to close this!

array-addu commented 8 years ago

i'am using meteor version 1.1.0.1 which has cordova version 3.7.0 by default so i've updated the cordova to 4.0.1 using cordova platform update iOS. The problem is, when i add plugin cordova-plugin-3dtouch it was added successfully but when i did meteor run ios it gives me following error :

Error while running for mobile platforms: Error running
/Users/anubhavg/.meteor/packages/meteor-tool/.1.1.3.1a7qqpw++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/cordova-scripts/cordova.sh Error: 404 Not Found: cordova-plugin-3dtouch at RegClient. (/Users/anubhavg/.meteor/packages/meteor-tool/.1.1.3.1a7qqpw++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:304:14) at Request._callback (/Users/anubhavg/.meteor/packages/meteor-tool/.1.1.3.1a7qqpw++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65) at Request.self.callback (/Users/anubhavg/.meteor/packages/meteor-tool/.1.1.3.1a7qqpw++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/request.js:236:22) at Request.emit (events.js:98:17) at Request. (/Users/anubhavg/.meteor/packages/meteor-tool/.1.1.3.1a7qqpw++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/request.js:1142:14) at Request.emit (events.js:117:20) at IncomingMessage. (/Users/anubhavg/.meteor/packages/meteor-tool/.1.1.3.1a7qqpw++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/request.js:1096:12) at IncomingMessage.emit (events.js:117:20) at _stream_readable.js:944:16 at process._tickCallback (node.js:442:13)

Fetching plugin "cordova-plugin-3dtouch@1.0.1" via plugin registry

Any help would be appreciated in adding this plugin.

martijnwalraven commented 8 years ago

@array-addu: I would really advise you to upgrade to Meteor 1.3, because the Cordova integration and hot code push implementation have been hugely improved. Manually updating the Cordova version isn't really supported under 1.1, because the project will be regenerated on every build.

Also, it seems cordova-plugin-3dtouch is at version 1.3.4 now, so you may want to install that instead of 1.0.1.

array-addu commented 8 years ago

Thank you, with upgrading Meteor to version 1.2.1, Cordova version is updated to 3.9 for iOS and 4.1 for Android & plugin is also working fine.