Isa discard compatibility in JSONKIT

Source: Internet
Author: User

BUG Description: Direct access to objective-c's isa is deprecated in favor of object_setClass () and object_getClass ()

Solution: In Build Settings of target, Change Build ActiveArchitecture Only to YES.

Processing result: running successfully

Other methods:

1. Change the code

Convert array-> isa = _ JKArrayClass;

Replace it with object_setClass (array, _ JKArrayClass );

Set dictionary-> isa = _ JKDictionaryClass;

Replace it with object_setClass (dictionary, _ JKDictionaryClass );

2. Other online descriptions

Xcode upgrade 4.6 references static library. a reports the error ld: file... not contain a (n) armv7s slice: xxx. afor architecture armv7s

Because the iPhone 5 A6 processor uses the new Armv7s architecture, XCode4.6 uses this architecture by default when creating a Project. When a third-party static library is compiled, the system prompts "ld: file... Not containa (n) armv7s slice: xxx. a for architecture armv7s "error.

Therefore, before a third-party class library is compatible with the Armv7s architecture update, we can solve the problem by using the following methods:

Method 1. The. a file involved in the upgrade is compatible with Armv7s.

Method 2: Change Build ActiveArchitecture Only to YES in Build Settings of target.

Method 3: Change $ (ARCHS_STANDARD_32_BIT) of ubuntures to armv7 in BuildSetting of XCode 4.5.

Therefore, if it is an open-source library, it is best to directly include the source code into the project, so that such a problem will not occur.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.