-1

This is a copy of another question from AskDifferent, since I'm being adviced to put this question here instead.


This has been asked once elsewhere but nobody could give the guy an answer... and I Google seem to only know that single occurrence of the problem!

So I'm the second guy in history to experience this and my problem is:

  • I'm running XCode 3.2.3 on Snow Leopard 10.6.4 (I think, it's the minimal required OS version for this XCode version) with iOS SDK 4.0.2
  • I create a new empty Cordoba (PhoneGap) project
  • I set up my Base SDK in Project Settings to iPhone Simulator 4.0 per instructions on PhoneGap's website
  • I don't change any other setting at all
  • when I hit "Build and Run" button, XCode starts compilation and finished with 3 errors and 10 warnings

Now, I don't mind those warning, but I cannot successfully compile because of those 3 errors now. No idea how to fix this, I'm totally new to PhoneGap or Mac OS for that matter.

The errors I get are:

/Users/[name]/Documents/CordovaLib/Classes/CDVLocation.m:123:32 /Users/[name]/Documents/CordovaLib/Classes/CDVLocation.m:123:32: error: use of undeclared identifier 'kCLAuthorizationStatusAuthorized'
/Users/[name]/Documents/CordovaLib/Classes/CDVCapture.m:783:70 /Users/[name]/Documents/CordovaLib/Classes/CDVCapture.m:783:70: error: use of undeclared identifier 'NSEC_PER_MSEC'
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1

I would appreciate any advice from you guys, as I'm completely at a dead-end here.

Community
  • 1
  • 1
Zathrus Writer
  • 4,311
  • 5
  • 27
  • 50

1 Answers1

1

CLAuthorizationStatus, and thus kCLAuthorizationStatusAuthorized are only available in 4.2 and later.

Check this for more info: https://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/c/econst/kCLAuthorizationStatusAuthorized

As to your other error, google pulls up this: How to resolve Phonegap error while Building the app

Community
  • 1
  • 1
Steven Saric
  • 156
  • 1
  • 7
  • does that mean that I need an older PhoneGap version of can I somehow workaround this by adding that piece of code into a JS file somewhere? – Zathrus Writer Mar 13 '12 at 08:46
  • I have no idea about PhoneGap, sorry. Never used it. Finding another page, seems to be a problem with versions of xCode prior to 3.2.6. – Steven Saric Mar 13 '12 at 10:40