Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#import"PGPlugin.h" "file not found" error in phonegap2.0 on xcode4.2

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

like image 520
sathis Avatar asked Sep 14 '12 05:09

sathis


1 Answers

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.

like image 173
Littm Avatar answered Sep 30 '22 13:09

Littm