3

I'm using a submodule (JsonKit) that doesn't compile on Xcode 5.1, because it uses a depreciated assignment (isa). Obviously, this problem only appears for arm64. As I don't need arm64, is there a way to remove it until this submodule gets updated ?

What should I do ? :/

Thanks

Nicolas Roy
  • 3,773
  • 5
  • 27
  • 42
  • Do you want to remove the code causing the problem? Or are you asking how to compile the code to non-arm64? – Black Frog Mar 12 '14 at 14:38
  • I'm asking how to compile the code to non-arm64 – Nicolas Roy Mar 12 '14 at 15:23
  • To build a 32-bit only app: http://stackoverflow.com/questions/22341511/how-to-link-with-framework-without-arm64-support-in-xcode-5-1 – ohho Mar 13 '14 at 02:45
  • possible duplicate of [Arm64 architecture in xcode 5.1](http://stackoverflow.com/questions/22323039/arm64-architecture-in-xcode-5-1) – M. Porooshani Mar 25 '14 at 04:29
  • It's a duplicate question: [arm64 in xcode 5.1](http://stackoverflow.com/questions/22323039/arm64-architecture-in-xcode-5-1/22370158#22370158) – M. Porooshani Mar 25 '14 at 04:30

3 Answers3

8

According to apple's release note, see the following note point.

Note:

Be aware of the following architectures issues when opening your existing projects in Xcode 5.1:

  • When building for all architectures, remove any explicit architectures setting and use the default Standard Architectures setting. For projects that were previously opted-in using “Standard Architectures Including 64-Bit”, switch back to the “Standard architectures” setting.
  • When opening an existing project for the first time, Xcode 5.1 may display a warning about the use of the Xcode 5.0 architectures setting. Selecting the warning provides a workflow to revise the setting.
  • Projects not able to support 64-bit need to specifically set the architectures build setting to not include 64-bit.

So you've to set architecture as below to support libs architecture.

enter image description here

Reference from post1, post2

Community
  • 1
  • 1
Mani
  • 17,549
  • 13
  • 79
  • 100
  • I posted an almost identical answer in another thread if you need more help: http://stackoverflow.com/questions/22323039/arm64-architecture-in-xcode-5-1/22580609#22580609 – jsherk Mar 22 '14 at 17:02
  • @jsherk Hey man, you've posted on Mar 24, but i'd posted on Mar 13. Why do we wait for your answer? – Mani Mar 24 '14 at 04:58
1

First of all, if you can stop using JSONKit, you should! Switch to NSJSONSerialization if you can.

But I actually have a very similar issue. I am using cocoa pods to import a dependency that uses JSONKit - so I am stuck with it too! As Mani pointed out, if you want to not build JSONKit for arm64, you need to remove it from the ARCHS build setting. Also, JSONKit no longer builds until you disable the 'isa' error which is just a build setting: CLANG_WARN_DIRECT_OBJC_ISA_USAGE = NO.

Disabling arm64 and 'isa' errors with cocoapods

For myself, since I used cocoa pods to get JSONKit I needed to change those build settings in my Pods project. I found a blog post on disabling arm64 in cocoa pods, and I modified the code from that post to also disable the 'isa' warning: (this code goes in your Podfile)

# Remove 64-bit build architecture and 'isa' errors from Pods targets
post_install do |installer|
    installer.project.targets.each do |target|
        target.build_configurations.each do |configuration|
            target.build_settings(configuration.name)['ARCHS'] = '$(ARCHS_STANDARD_32_BIT)'
            target.build_settings(configuration.name)['CLANG_WARN_DIRECT_OBJC_ISA_USAGE'] = 'NO'
        end
    end
end
Richard Venable
  • 8,310
  • 3
  • 49
  • 52
0

Open your project Build Settings, select Valid Architectures, and remove arm64

mbuster
  • 170
  • 14
  • I believe that Valid Architectures indicates the type of chip that is on the device where the app will run. If you remove arm64 from Valid Architectures your app will not run on the new iPhones or iPad Air with the 64bit chip. – JScarry Apr 22 '14 at 23:03
  • 1
    Incorrect. ARMv8 is backwards compatible with ARMv7 http://www.realworldtech.com/arm64/2/ – Jonathan Crooke Apr 23 '14 at 21:20