首页 > 移动平台 > 详细

MacDev.GarbageCollectionIsDeprecated-WhenXcodeCompileMacAppProject

时间:2015-06-13 21:25:09      阅读:234      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!