簡體   English   中英

使用XCode 5.0.2將問題從非ARC遷移到ARC

[英]Migrating issue from non ARC to ARC with XCode 5.0.2

我聽說過ARC,我也將它與XCode 4.2一起使用,但是現在有幾天我需要將非ARC代碼轉換為ARC格式。 我已經按照一些步驟將代碼轉換為ARC格式,但是以某種方式我沒有成功。

我按照以下步驟將代碼轉換為ARC:

1. “Preferences” -> “General” -> check “continue building after error”.   This step is fundamental to avoid an huge waste of time repeating the next steps every time an error is encountered!
2. “Edit” -> “Refactor” -> “Convert to Objective-C ARC”
3. “Select targets to convert” (check them)
4. Click “precheck” – “Cannot Convert to Objective-C ARC” (Xcode found N issues that prevent conversion from proceeding. Fix all ARC readiness issues and try again.)  You will see this message at least once, because your code contains calls that are forbidden by ARC.
5. Fix them using suggestions (click on errors to open the popup containing the tip). Then repeat from step 1.
6. “Convert to automatic reference counting” window will appear (once issues have been fixed)
7. Click next
8. Review automatic changes

我的項目的所有HEADER文件中仍然存在關於@property和@synthesize的錯誤。 我必須手動完成所有HEADER文件中的所有更改,而不是僅通過自動執行上述步驟即可實現。

請幫助我,讓我知道您是否對此有任何適當的解決方案。

謝謝,

Nilesh M.Prajapati

XCode無法自動修復這些錯誤。 因此,您只需要在繼續操作之前手動修復它們即可。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM