Deploying to IOS from Meteor 1.8 app

I’m Back using Meteor

I have been away trying to pay the bills so did not have an opportunity to implement in Meteor. However, i just started a project 3 weeks ago working off of one of the boilerplate templates that support Angular, and Typescript.
While I like to always be current in the versions that I’m using, I began my project and did not realize that Meteor is now on version 10. So, when I deployed my app to XCode I got the following error:

SWIFT_VERSION ‘3.0’ is unsupported, supported versions are: 4.0, 4.2, 5.0.

So I figured that perhaps the latest version of Meteor supports Swift versions 4 or 5. However, when I upgrade my app to that version of Meteor I get all kinds of errors.

Open to suggestions. How would you guys go about upgrading to Swift 4.0 or 5.0.

  • Should I upgrade to Meteor 10.
  • Should I hack the XCode code that Cordova generates to the Swift version I want
  • Should I start a new project in Meteor 10 and migrate all my code.

Any help is appreciated.

Hello, welcome back!

Between Meteor 8 and 10 we do have some big changes but I believe it would not take a lot of your time to upgrade it.

Meteor 9 updated Node.js from 8 to 12 so you should check if your NPM libraries are compatible with Node 12, most of them are.

Meteor 10 updated Cordova from 7 to 9 and also Swift is now set by default to 5, what will fix your issue.

If for some reason you can’t migrate to 10 you can set manually your Swift version on XCode and probably most of the code you will be able to fix using XCode auto fix tool.

If you have specific questions let us know here but I really recommend you to update to Meteor 10.

Check the history to be sure you know everything that was changed https://github.com/meteor/meteor/blob/devel/History.md

Man. Thanks for your quick response. So I type meteor update and got a slew of errors. I’m running on Mac OX.

> meteor update
Below are some of the errors:

^
16 warnings and 6 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit
(/Users/andressosa/.meteor/packages/angular-compilers/.0.3.2.5mnqgf.bq5l3++os+web.browser+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-scss-compiler/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:311:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/Users/andressosa/.meteor/packages/meteor-tool/.1.10.1.57l7nr.4f4le++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node"
"/Users/andressosa/.meteor/packages/angular-compilers/.0.3.2.5mnqgf.bq5l3++os+web.browser+web.cordova/plugin.Angular_Compilers.os/npm/node_modules/meteor/angular-scss-compiler/node_modules/node-gyp/bin/node-gyp.js"

Hi, could you please remove your node_modules and also run meteor reset?

Sometimes the caches can get in a bad state.

That did not work. I deleted the node_modules and also did the Meteor reset. But I got the same error messages.