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. JS----获取DOM元素的方法(8种)

    什么是HTML DOM 文档对象模型(Document Object Model),是W3C组织推荐的处理可扩展置标语言的标准编程接口.简单理解就是HTML DOM 是关于如何获取.修改.添加或删除 ...

  2. Binary Logging Formats

    [Binary Logging Formats] The server uses several logging formats to record information in the binary ...

  3. 四、Factory Method 工厂方法模式

    需求:对象的创建由工厂统一创建,会使用到模板模式 代码清单: 工厂: public abstract class Factory { public abstract Product createPro ...

  4. 766. Toeplitz Matrix

    A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given ...

  5. Django 之多对多关系

    1. 多对多关系 作者 <--> 书籍 1. 表结构设计 1. SQL版 -- 创建作者表 create table author( id int primary key auto_inc ...

  6. Postman 测试swagger类接口技巧

    测试情景: 公司的项目接口越来越多,由于开发周期短,时间紧,缺乏接口文档,直接使用swagger记录所有接口信息.那么: 1. 我们如何更快的测试动辄300+数量的接口,如何分组管理和维护这些接口? ...

  7. 录音器 AudioRecorder

    实现录音器有两种方式可以选择: 1.AudioRecord(基于字节流录音) 优点:可以实现语音的实时处理,进行边录边播,对音频的实时处理. 缺点:输出的是PCM的语音数据,如果保存成音频文件是不能被 ...

  8. 打印信息,通过.jasper工具将集合输出到PDF文件 然后利用打印机打印文件

    我们上一次成功的利用iReport工具制作了一张报表,并且预览了报表最后的效果,也生成了格式为“jrpxml”.“jrxml”与“jasper”的文件.这次,我们使用jasper提供的java的api ...

  9. H5外部浏览器直接调起微信——通过url协议 weixin:// 判断是否安装微信及启动微信

    前言: h5分享到微信,h5使用微信支付这些功能,都需要先判断是否安装微信客户端,如果已安装就启动微信,如果没有安装微信,就提示用户前去安装. 我们可以通过访问微信提供的URL协议(weixin:// ...

  10. f5 Syslog管理

    1.本地log保存7天.可输出至syslog服务器      local traffic 对应ltm