'Cordova/CDV.h' file not found after adding Share Extension

841 views
Skip to first unread message

jwacar...@gmail.com

unread,
Aug 8, 2016, 11:52:25 AM8/8/16
to phonegap

Cordova 6.1.1

XCode 7.3.1


I have added a new Share Extension Target (Swift) to my Cordova iOS project. 


However now I am receiving the following error in my Bridging-Header when I build in XCode:


'Cordova/CDV.h' file not found


The error occurs in the following file:

https://github.com/jmcrthrs/cordova-swift-share-extension-test/blob/d2cd7f44d308fbb6ddb91f727b6f0b878a238eb7/HelloCordova/Bridging-Header.h


I have added the iOS project to GitHub, so if anyone wants to clone and investigate themselves they can do so:



To create this iOS project I did the following:

  1.  Create a new Cordova project

$ cordova create MyApp
$ cordova platform add ios

2. Open MyApp/platforms/ios in XCode 7.3.1


3. File > New > Target > Share Extension


3.1 Set Language to Swift


3.2 If asked to Activate "{target_name}" scheme, click Cancel


4. Project > Clean


5. Project > Build


Here are my Header Search Paths:


HEADER_SEARCH_PATHS =
"$(TARGET_BUILD_DIR)/usr/local/lib/include"
"$(OBJROOT)/UninstalledProducts/include"
"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
"$(BUILT_PRODUCTS_DIR)"

I am really hoping someone with XCode experience can help me out with this one. I have tried a number of different path structures in the Bridging-Header file. e.g.


#import <Cordova/CDV.h>
#import "Cordova/CDV.h"
#import <CDV.h>
#import "CDV.h"



Blaydator

unread,
Oct 28, 2017, 12:15:47 PM10/28/17
to phonegap
Solved it ? Running in the exact same issue...
Reply all
Reply to author
Forward
0 new messages