I added Cordova as a component to my iOS project. Adding a custom plugin leads to the error, despite that the plugin works in a Cordova-only project:
\'CDVPl
For xcode7 add "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
to your Header Search Paths (and you may need to set Enable Bitcode to No - was necessary for me, but may be related to different problem with xc7)
Change your header file to:
#import <Cordova/CDVPlugin.h>
it is working in my application.
replace
with (
OR
I had this issue using Cordova. Come to find out my CordovaLib folder under the ios platform directory vanished.
I did:
cordova platform remove ios
then
cordova platform add ios
...and this fixed the issue.
In xcode 8 and 8 + simply commenting the line worked for me:
#import ...
This is specifically useful if you are trying to extend IOS app build using ionic or cordova to have watchkit or widget control natively.
Have a look at my answer here:
I had the same problem while installing the ShareKit plugin on Xcode 4.5, cordova 2.1.0 & JQM 1.2.0. The problematic block was:
#ifdef CORDOVA_FRAMEWORK
#import <Cordova/CDVPlugin.h>
#import <Cordova/CDVPluginResult.h>
//#import <Cordova/JSONKit.h>
#else
#import "CDVPlugin.h"
#import "CDVPluginResult.h"
#import "JSONKit.h"
#endif
What worked for me is commenting out the #ifdef line as well as commenting out the whole #else block.
Also, the #import line was already commented out in the source code that I downloaded with the plugin, so I didn't bother messing with that.
Might be of some help to you.