“'CDVPlugin.h' file not found” in Cordova as component (Cleaver)

前端 未结 9 1175
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 03:10

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         


        
9条回答
  •  悲哀的现实
    2020-12-05 03:38

    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 
    #import 
    //#import 
    
    #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.

提交回复
热议问题