Question

I am new to phonegap2.0. Now i want to create iphone app using phonegap. I am using xcode4.2 on snow leopard mac. I installed phonegap on my mac. But now i am following Embedding Cordova Webview on IOS using this below link:

 "http://docs.phonegap.com/en/2.0.0/guide_cordova-webview_index.md.html#Embedding%20WebView"

But when i run the coding in xcode4.2 Iphone 5.0 Simulator. I got #import"PGPlugin.h" "file not found" error.

"#ifdef PHONEGAP_FRAMEWORK
    #import <PhoneGap/PGPlugin.h>
#else
    #import "PGPlugin.h"
#endif".

I have attached the error page Screen Shot for your reference. enter image description here

Was it helpful?

Solution

Change this part:

#ifdef PHONEGAP_FRAMEWORK
    #import <PhoneGap/PGPlugin.h>
#else
    #import "PGPlugin.h"
#endif

with the following:

#import <Cordova/CDVPlugin.h>

Also, since you're using version 2.0.0 of cordova, you may need to change everything beginning with PG (for example: PGPlugin) to CDV (ex: PGPlugin --> CDVPlugin).

The thing is the previous versions of plugins used to begin with PG.

Let me know if this works.

OTHER TIPS

This doesn't work for the most recent versions of Cordova / Phonegap.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top