MacDev.GarbageCollectionIsDeprecated-WhenXcodeCompileMacAppProject

Garbage Collection is not supported

当Xcode编译Mac OSX App时报错:"Garbage Collection is not supported" 的解决办法:

1. 不需要迁移到ARC仍然可以编译通过

"If your project is imported from Xcode 3.x and you want to use ARC, you will have the following error at compile time :


1

2

Garbage Collection is deprecated;

use the "Convert to Objective-C ARC" menu command to switch to Automatic Reference Counting

To get rid of this, edit the project and remove anything you see under GCC_ENABLE_OBJC_GC.

This will remove the -fobjc-gc parameter from the gcc commands and you will be able to use the smart ARC." Ref[2]

2. Mac Apps不能再使用garbage collection

"Beginning May 1, 2015, new Mac apps and app updates submitted to the Mac App Store may no

longer use garbage collection, which was deprecated in OS X Mountain Lion. Instead, migrate

your apps to Automatic Reference Counting, using the migration assistant in Xcode to help with this transition.

Apps may continue to use retain/release for manual memory management. For more information,

read theTransitioning to ARC Release Notes."  Ref[1]


Reference

1. Mac Apps That Use Garbage Collection Must Move to ARC

https://developer.apple.com/news/?id=02202015a

2.  MyVeryLittleTricks Miscellaneous

http://myverylittletricks.net/code/?page_id=79

时间: 2024-08-07 21:22:41

MacDev.GarbageCollectionIsDeprecated-WhenXcodeCompileMacAppProject的相关文章

iOS - 使用TFHpple解析html - 转

使用TFHpple解析html https://github.com/topfunky/hpple 前期准备工作 引入静态库文件 添加库文件的 header search paths(注意,必须选中 All) 将从github上下载的源码包拖入工程当中 准备工作结束 使用详情 我们来解析网址 http://www.cnblogs.com/YouXianMing/ 中的title标签哦. 思路是这样子的: 1. 将网页转换成NSData 2. 按照标签值在NSData中数据进行查询 3. 检索出想

常见编辑错误汇总

转载自CSDN --andyweike 1. 编译iPad真机时,选择了 Architetures:Standard(armv6) BaseSDK:iPhoneDevice3.2 TargetDeviceFamily:iPad. 若编译出现如下错误: Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 则修改 GCC4.2CodeGeneral区域中的Co

[转]多线程

原文地址:http://d3caifu.com/ebook/MultiThread.html 随着计算机/移动设备不断发展,提供了越来越强大的计算能力和资源,从硬件层面来看首先是CPU的芯片集成度越来越高,提供更快的处理能力;其次是多核化多CPU发展;最后剥离一些图片动画渲染等到独立的协处理器处理,硬件的提升促进了操作系统软件OS的不断进化,更好的利用硬件能力和资源,提高系统的性能,多线程多任务处理就是最为关键的技术. 线程分为主线程和后台线程2种:一个应用只有唯一的一个主线程,其它线程都是后台

使用TFHpple解析html

使用TFHpple解析html https://github.com/topfunky/hpple 前期准备工作 引入静态库文件 添加库文件的 header search paths(注意,必须选中 All) 将从github上下载的源码包拖入工程当中 准备工作结束 使用详情 我们来解析网址 http://www.cnblogs.com/YouXianMing/ 中的title标签哦. 思路是这样子的: 1. 将网页转换成NSData 2. 按照标签值在NSData中数据进行查询 3. 检索出想

真机调试问题 错误集合

1. 编译iPad真机时,选择了 Architetures:Standard(armv6) BaseSDK:iPhoneDevice3.2 TargetDeviceFamily:iPad. 若编译出现如下错误: Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 则修改 GCC4.2CodeGeneral区域中的ComplieForThumb为非选中. 已

iOS面试题,希望给面试的同学一点帮助。

iOS基础面试题 1.用objective-c写一个插入法排序 2.写一个NSString类的实现 + (id)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding; + (id)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding{ NSString *

对Objective-C中Block的追探

对Objective-C中Block的追探 http://www.cnblogs.com/biosli/archive/2013/05/29/iOS_Objective-C_Block.html 最近看了很多block相关的文章,都在说block怎么用,写的都很精彩.blogs:Block编程值得注意的那些事儿 (使用相关)http://www.cocoachina.com/macdev/cocoa/2013/0527/6285.htmliOS中block实现的探究(内部结构分析)http://