phonegap / phonegap-webview-ios

Native iOS + PhoneGap Template
Apache License 2.0
36 stars 32 forks source link

compiling phonegap with Swift #15

Open willenglishiv opened 8 years ago

willenglishiv commented 8 years ago

So I have followed the instructions in the video and documentation to a T:

http://docs.phonegap.com/develop/1-embed-webview/ios/#swift

When I go to build the app, it says "CDVViewController.h not found"

I've tried changing it to #import <Cordova/CDVViewController.h> which works, but then switching from UIViewController to CDVViewController in the swift file doesn't allow the app to be compiled.

I've also tried turning off 'use_frameworks'. in the Podfile as well. Combinations between all three of these moves will allow for me to compile the app, but I'm not sure if I'm breaking something else.

Any insight would be awesome.

StevenApple commented 8 years ago

I have the same problem.

StevenApple commented 8 years ago

How did you resolve your problem, can you please write it?

hollyschinsky commented 8 years ago

Hi @willenglishiv -

Not sure if you've already been able to get past this but if not I uploaded a sample project using Swift with Cordova in case it helps as a reference at all - https://github.com/hollyschinsky/swift-cordova.

Thanks! Holly

yaroslav-v commented 7 years ago

FYI This issue is related to problems with configuration of Build Settings -> Header Search Paths. Probably something is changed in Pods configuration during this time.

It can be easily fixed by adding "${PODS_ROOT}" with recursive modifier to Build Settings -> User Header Search Paths. So compiler will be able to find all necessary headers.