Can't build IOS apps, CDV.h not found

I have built a great app, but I can’t get it (or anything) to build for IOS. Android is not a problem.

I’ve tried xcode 7, 8, 9 and now 10.

Any help is appreciated!

I type:

meteor run ios

I get:

=> Errors executing Cordova commands:

While running Cordova app for platform iOS with options --emulator:
Error: Command failed: /Users/admin/src/ --emulator
/Users/admin/src/ file not found.


More importantly, all builds result for apple result in Swift errors, and CDV.h not found.

I don’t build for IOS, but there’s a bunch of stuff on Google which may be relevant.

No opportunity to try on an actual device?

Well, I’m glad you brought it up! All of my xcode builds fail with SWIFT errors. I’ve tried with many versions of xcode, and I cannot get it to work.

I’d be so happy to have ANY ios related builds working.

Is there anyone who has a working build setup who can tell me the actual versions of xcode and swift they are using? I’m coming up on deadlines and I’ve been searching for the answers for weeks.

Once I find any version that works, I’ll set up a VM for compilation.

I filed a bug report here:

I have had no responses and I’m not sure if I filed it correctly.

I am currently using the following versions successfully:

xCode 9.4.1
Swift 3.3

Thanks very much! It’s a little late, but I’m going to try to clean my machine of xCode and Swift, and then install those versions. I’ll post an update!

@rjdavid, Are you sure you’re on swift 3.3?

I’m just checking the swift releases page, and the last 3.x version I see is 3.1.1

I don’t remember downloading swift by itself.

Doing a quick search, Swift 3.x is a stop gap solution by Apple for developers to continue using Swift 3 under xCode 9.x

When I tried Swift 4.x, that was when I got errors. With Swift 3.x, I only got deprecation warnings

Amazing. It appears that swift relies on python, and for some reason, my apple system python cannot find some of its libraries. I’m investigating if this is the underlying problem.

Thanks so much for you help. I’ll post back.

Because of this, I now saw posts all over referencing to swift 3.4. I’m now figuring out how because only 3.3 and 4.1 where available when I tried before

Ultimately, I’ll be using command line tools, and I don’t mind if they’re seperate from my xcode install.

I’m trying out xcode 7.3.1 command line tools since they are the latest version to include a 3.x version of swift. Fingers crossed!

nope… I still need xcodebuild, so I guess I need a full xcode install.

Okay… I’m on 8.4.3 which includes Swift 3.1. I feel confident that this should work, but I get the same errors I’ve gotten from every version I’ve tried:

/Users/admin/src/ error: ‘Cordova/CDV.h’ file not found

#import <Cordova/CDV.h>


<unknown>:0: error: failed to import bridging header ‘/Users/admin/src/’

Some cordova reports say that the answer is to remove and re-add the ios platform. Trying…


CDV.h definitely exists under .meteor/local/cordova-build/platforms/ios/CordovaLib/Classes/Public

I wonder why it didn’t exist before, but it appears to be related to a Cordova bug.

About to check if I can compile now.

I still cannot compile. The required CDV.h file is in the project under .meteor/local but it is NOT in the xcodeproject created by running meteor build ios

Running meteor run ios-device results in the same CDV.h related errors under xcode.

It looks like, for some reason, meteor assembles broken IOS projects on my machine regardless of software versions. They are missing CDV.h

After further investigation, CDV.h does exist in the project. Perhaps it is just not on the lib serach path for some reason.

I don’t know how to add a path to the project. Can anyone help with that? Shouldn’t meteor/cordova produce projects with the correct path set?

I have double checked and the path for CDV.h is clearly definied in the project under Header Search Paths, and the file CLEARLY exists.

Why can’t swift find it?

At this point I may have understood enough to move this to the swift forum, but if I find a solution, I will post it here.