问题描述
我正在考虑删除32位支持,以支持自动引用计数(仅支持64位二进制文件)。
I'm considering dropping 32-bit support for in favor for Automatic Reference Counting (which is only supported for 64 bit binaries).
我想请使用Mac App Store避免这两种情况:
I'd like to avoid these two scenarios with the Mac App Store:
对于旧的32位Mac 的用户:
For a user of an old 32-bit Mac:
-
谁购买了32位支援的旧版本:他们会在Mac应用程式中看到应用程式的更新讯息商店?
who did purchase the previous version with 32-bit support: Will they see an update message for the app in the Mac App Store? If so, the (now 64 bit only) update would not work for him/her.
尚未购买应用程式的使用者:
who has not purchased the app before: will they be able to purchase the app although it will not run on their system?
ARC 64位元:
ARC 64 bit only:http://developer.apple.com/library/mac/#releasenotes/ObjectiveC/RN-TransitioningToARC/_index.html#//apple_ref/doc/uid/TP40011226
编辑:
我发现一次有人能够下载一个64位的唯一应用程序到32位的MacBook,并显示一个错误信息无法完成购买。在这种情况下,它是一个免费的应用程序。我不知道何时会在付费应用程式(付款前后)显示此讯息。
I found one occasion of somebody being able to download a 64 bit only app to a 32 bit MacBook and being presented with an error message "Your purchase could not be completed". In this case it was a free app. I wonder when this message would pop up for a paid app (before or after the payment).
推荐答案
我还发现ARC需要64位处理器。但是,我设法构建一个胖二进制64位版本使用ARC和32位版本使用垃圾收集器。为此,我必须执行以下操作:
I've also found out that ARC requires 64bit processors. However, I managed to build a fat binary where the 64bit version uses ARC and the 32bit version uses the garbage collector. To do this I had to do the following:
- 设置仅使用GC的32位目标
-
- 添加32位目标作为64位目标的依赖
- 添加自定义构建阶段使用
lipo
从两个目标中的二进制文件汇编一个胖二进制文件的shell脚本
- set up a 32bit only target that uses GC
- set up a 64bit only target that uses ARC
- add the 32bit target as a dependency to the 64bit target
- add a custom build phase with a shell script that uses
lipo
to assemble a fat binary from the binaries in the two targets
两个目标使用相同的源,但是有必要使用一些 #ifdef __OBJC_GC __
语句。我确实不得不放弃合成的ivars为向后兼容性:(
Both targets use the same source, but a few #ifdef __OBJC_GC__
statements were necessary. I did have to give up synthesized ivars for backward compatibility :(
这篇关于Mac App Store:放弃32位支持赞成ARC,现有的32位版本的用户看到更新消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!