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

MacDev.GarbageCollectionIsDeprecated-WhenXcodeCompileMacAppProject的更多相关文章

  1. MacDev.Mach-O.Programming-Part-III:MachOView-v2.4.9200.dmg-crash

    MachOView-v2.4.9200.dmg Crash 在OS X(其版本号: 10.11.6 (15G31))下载MachOView-2.4.9200.dmg后,打开Fat Binary后,Ma ...

  2. MacDev.GetArchOfLibrary

    1. static library How to check target architecture of a static library http://changhoward.blogspot.c ...

  3. 介绍MFSideMenu左右滑动控件的使用

    昨天刚写完侧滑菜单的实例,今天在CocoaChina网站上看到一篇非常好的侧滑菜单设计案例文章,分享给大家.http://www.cocoachina.com/macdev/uiue/2013/071 ...

  4. iOS 开发设计常用软件及工具整理

    1, xCode 2, AppCode 3, Skech 原型设计软件 4, Hype 动画设计工具 5, fontawsome 免费图表 6, Prepo icon, images.catlog 生 ...

  5. OSX 鼠标和键盘事件

    本文转自:http://www.macdev.io/ebook/event.html 事件分发过程 OSX 与用户交互的主要外设是鼠标,键盘.鼠标键盘的活动会产生底层系统事件.这个事件首先传递到IOK ...

  6. 使用TFHpple解析html

    使用TFHpple解析html https://github.com/topfunky/hpple 前期准备工作 引入静态库文件 添加库文件的 header search paths(注意,必须选中 ...

  7. [转] 你应该知道的应用UI动态设计规则

    转自 CocoaChina http://www.cocoachina.com/macdev/uiue/2014/0505/8315.html 你应该知道的应用UI动态设计规则 这篇文章中,我主要阐述 ...

  8. iOS html格式解析

    使用TFHpple解析html https://github.com/topfunky/hpple 前期准备工作 引入静态库文件 添加库文件的 header search paths(注意,必须选中 ...

  9. Visual Studio 2019 for Mac 离线更新方法

    当你打开Visual Studio 2019 for Mac检查更新时,如果下载更新包很慢,可以尝试如下操作: 打开Finder(访达),找到~/Library/Caches/VisualStudio ...

随机推荐

  1. Ubuntu下好的PDF阅读器介绍

    我们经常要学习,看论文,如果有好的PDF阅读器,可以做笔记,对以后查看和记忆是有帮助的 这里推荐用:okular 这里是基本操作哦 1: 安装 sudo apt-get install okular ...

  2. centos 7.4安装教程

    1. 2. 3. 4. 5. 6. 7. 8.

  3. java 开学第四周

    package english; import java.io.File; import java.util.Scanner; import java.io.FileNotFoundException ...

  4. php图片转base64

    /*读取问价家图片生澈哥哥js文件 */header("Access-Control-Allow-Origin: *");$i=0;$handle = opendir('./ima ...

  5. ARM9/ARM11/Cortex A8处理器(转载) .

    //toppic:推荐几个值得中小企业使用的ARM9/ARM11/Cortex A8处理器 // 作者:gooogleman //原文地址:http://blog.csdn.net/goooglema ...

  6. 关于python中的is和==的区别

    Python 中的比较:is 与 ==   在 Python 中会用到对象之间比较,可以用 ==,也可以用 is .但是它们的区别是什么呢? is 比较的是两个实例对象是不是完全相同,它们是不是同一个 ...

  7. appium API接口

    appium API接口 标签(空格分隔): appium常用api 1.contexts contexts(self) 返回当前会话的上下文,使用可以识别H5页面的控件: driver.contex ...

  8. MVC005之页面调用控制器中的方法

    描述:控制器在传给页面数据时,有时我们需要对传过来的数据进行二次处理 如: 1:传过来部门编码,但页面上要显示为部门名称 2:格式转换等 我们在写aspx时一般在cs文件中写一个protected的方 ...

  9. python3 文件读写,编码错误UnicodeDecodeError

    问题:python3 with open文件进行读写,报编码错误 /usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Version ...

  10. linux下外接显示器亮度调节

    下载Brightness Controller 即可调节. 还可以通过如下命令: 使用xrandr | grep -v disconnected | grep connected命令查看连接的显示设备 ...