Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple "Format String Issue" warnings in JSONKit.m after upgrading to PhoneGap 2.0 on iOS

Tags:

xcode

cordova

We just upgraded to PhoneGap/Cordova 2.0 on iOS, but we're seeing multiple warnings in JSONKit.m.

There are two classes of warnings: (1) "Format String Issue" and (2) "Semantic Issue."

Here is an example of the "Format String Issue":

/Users/macuser/Documents/CordovaLib/Classes/JSON/JSONKit.m:745:180: Format specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')

Here is an example of the "Semantic Issue":

/Users/macuser/Documents/CordovaLib/Classes/JSON/JSONKit.m:2600:11: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()

We're on Lion, Xcode 4.4.

Any clues why this warnings are happening now whereas they didn't before?

Thanks!

like image 384
Crashalot Avatar asked Jul 31 '12 07:07

Crashalot


3 Answers

From a user on Google Groups:

Xcode 4.4 uses an updated compiler which is more strict. It's harmless (for now) but this issue was fixed: https://issues.apache.org/jira/browse/CB-1164

like image 153
Crashalot Avatar answered Oct 21 '22 08:10

Crashalot


Here you can find how to remove the warnings: https://github.com/johnezang/JSONKit/issues/79

like image 31
Awsed Avatar answered Oct 21 '22 08:10

Awsed


This is JSONKit files without xcode 4.4 warnings

like image 33
Igor Avatar answered Oct 21 '22 06:10

Igor