码迷,mamicode.com
首页 > 移动开发 > 详细

MacDev.GarbageCollectionIsDeprecated-WhenXcodeCompileMacAppProject

时间:2015-06-13 21:28:24      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/cwgk/p/4574005.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!