所以我試圖將舊項目轉換爲自動引用計數。我正在嘗試使用xCode提供的轉換工具,但它表示要在轉換之前修復幾件事。我不知道如何解決這個錯誤。它是在鑰匙串文件的實現中。這個方法是返回錯誤的方法,具體來說就是SecItemCopyMatching。我得到的錯誤說:「不允許ARC使用指向'CFTypeRef *'(又名'const void **')的Objective-C指針的間接指針。我一直在尋找谷歌,蘋果文檔,和其他的廢話一堆,不能找到一個更好的辦法來獲取在鑰匙串現有的數據字典。任何幫助表示讚賞。謝謝!iPhone從鑰匙串獲取數據字典
-(NSMutableDictionary*)fetchDictionary {
NSMutableDictionary *genericPasswordQuery = [self buildSearchQuery];
NSMutableDictionary *outDictionary = nil;
OSStatus status = SecItemCopyMatching((__bridge_retained CFDictionaryRef)genericPasswordQuery, (CFTypeRef*)&outDictionary);
if (DEBUG) printf("FETCH: %s\n", [[self fetchStatus:status] UTF8String]);
if (status == errSecItemNotFound) return NULL;
return outDictionary;
}
可以ü建議我一些關於同樣的問題在這裏http://stackoverflow.com/questions/16780202/secitemcopymatching-still-leak-on-osx-under-arc – user170317