[Solved] Cordova app won't compile for iOS after upgrade to Meteor 1.3.5 and 1.5

I upgraded my Meteor 1.2 app to Meteor 1.3.5. Unfortunately, the Swift code Meteor is using is not compatible with Xcode 8.3.3. It throws a lot of errors. So I upgraded to Meteor 1.51, but I’m still getting these errros. Is Meteor still compatible with Xcode 8.3.3 and Swift 3?! It was working fine up to Meteor 1.2, which was using Objective-C IIRC.

We are building our Cordova iOS app just fine using Meteor 1.5.1 with Xcode 8.3.2 (assume 8.3.3 works as well). You may also need to install cocoapods, see https://guide.meteor.com/mobile.html#installing-prerequisites-ios

It would help if you posted list of build errors.

Edit: Noticed link was broken in Meteor Guide to dependency on Cocoapods so submitted a PR to fix it, but here is some info on phonegap plugin push that created this dependency.

@skirunman: Thanks for your reply. I found out why the app won’t compile anymore. This is because from Meteor 1.3 on, Meteor introduced a Swift bridging header, which wasn’t mentioned in the upgrade guide. As long as your own app doesn’t use Swift in other plugins, this works fine. But we are using plugins that also require Swift and hence use their own bridging header. Since Meteor relies on its own header being untouched (and doesn’t merge bridging headers automatically), this caused my app to break. I now wrote a Cordova script that consolidates the header files.

Regarding the cocoapods requirements: Thanks for that hint, I wasn’t aware of this, and this wasn’t mentioned in the upgrade guide either. I was wondering why Meteor broke push notifications, too. Now I know :slight_smile:

BTW: I just tried to install Cocoapods as described in the Meteor upgrade guide:

sudo gem install cocoapods

but this only resulted in this error message:

ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/xcodeproj

Any ideas why this may happen? I have Xcode 8.3.3 installed. Didn’t work without sudo either.

EDIT: Found this issue for the installation: https://github.com/CocoaPods/CocoaPods/issues/3692

The installation worked with

sudo gem install cocoapods -n /usr/local/bin
1 Like