简体   繁体   中英

Compiler Error with LLVM 5.1 “Deprecated isa”

I am getting compiler errors with libJSONKit and in JSONKit.m . The errors are thrown with this: "Assignment to Objective-C's isa is deprecated in favor of object_setClass()" .
There is also a secondary error: "Direct access to Objective-C's isa is deprecated in favor of object_getClass()".

Any advice on workarounds or solutions?

Simply follow the advice in the error message:

Change:

object->isa  = SomeClass;

to:

object_setClass(object, SomeClass);

You might have to remove the 64 bit architecture from your project settings.

This is happening because Apple added arm64 as part of the standard architectures updating to iOS 7.1 and Xcode 5.1. You might have to manually set it to armv7, armv7s... JSONKit does not support arm64 yet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM