4

Following the instructions outlined here: http://docs.phonegap.com/en/2.1.0/guide_upgrading_ios_index.md.html

I am attempting to upgrade an existing iOS project from Cordova 1.9 to 2.0.

After following the instructions line by line I'm still getting the following error when attempting to run:

Lexical or Preprocessor Issue -- "#import <Cordova/CDVPlugin.h>" File Not Found

The line generating this error reads:

#import <Cordova/CDVPlugin.h>

I have already done the following in an attempt to solve this:

  • Ensured I am importing the CordovaLib project correctly into my parent project
  • Double checked that I'm using the correct import syntax with brackets, instead of the quotes
  • Ensured my CORDOVALIB directory is accurate
  • Did a project clean and a clean build folder
  • Tried adding my CORDOVALIB folder to User Header Search Paths, recursively. Did nothing

I have a project I created via command line to harvest the cordova-2.0.0.js file. That project runs fine and I've nearly gone line by line through the Build Settings comparing it to my existing project and can't come up with anything different.

Josh Lehman
  • 278
  • 5
  • 14
  • Have a look at my answer here: http://stackoverflow.com/a/13834636/1693477 Might be of some help to you. – A_B Dec 21 '12 at 07:38

2 Answers2

1

I am having a similar problem, one fix for many people is to make sure the Xcode preference "Xcode Preferences -> Locations -> Derived Data -> Advanced…" is set to "Unique"

jimbo
  • 1,018
  • 4
  • 18
  • 34
0

(Note: Phonegap 2.9.1 (Nov 2013))

I encountered the same problem while trying to make an open source "C" phone gap plugin work. The solution was to add the Cordovalib.xcodeproj to the target project, once done, click on your_project.xcodeproj - you will need to look in the Target Settings, under the Build Phases Tab, make sure that Cordovalib is added in Target Dependencies.

Once done it should allow the statement #import to work.

Paulo
  • 1,245
  • 10
  • 8