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

2

5

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

Chartreuse answered 14/9, 2012 at 5:42 Comment(0)
P
8

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.

Plus answered 14/9, 2012 at 6:11 Comment(8)
Thanks for reply. Please wait. I will let you know the answer.Chartreuse
Let me know about your results. The thing is, since you're using version 2.0.0, sometimes you need to change several things :SPlus
Sorry. This time i got "#import <SenTestingKit/SenTestingKit.h>" this error.Chartreuse
oh... well I'll take a closer look at your issue. Give me some time :SPlus
Hey! it's you friend! (I've just realized it's you! XD... I answered so quickly :) ) Did you finally run a successful application with 2.0.0? I've just notice there seems to be something wrong with your file CDVPlugin.h. I feel like you have an old version of it? :SPlus
let us continue this discussion in chatChartreuse
hi friend. sorry for the delay.Chartreuse
Hi littm. Friend how are you. Good Morning.Chartreuse
O
0

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

Opisthognathous answered 3/7, 2013 at 15:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.