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:
'CDVPlugin.h' file not found
The problematic part is as follows:
#import <Foundation/Foundation.h>
#ifdef CORDOVA_FRAMEWORK
#import <Cordova/CDVPlugin.h>
#else
#import "CDVPlugin.h"
#endif
What am I missing?
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)
Click on the project icon in the Project Navigator,
select your Project, then select the "Build Settings" tab
Enter "Header Search Paths" in the search field
Add "$(CORDOVALIB)/Classes"
and check the Recursive checkbox - for the Header Search Paths value
optional
Add "-all_load"
and "-Obj-C"
- for the Other Linker Flags value
see detailed description (step 17)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With