Xcode 7.3 cannot create __weak reference in file using manual reference counting

 
原帖地址 http://stackoverflow.com/questions/36147625/xcode-7-3-cannot-create-weak-reference-in-file-using-manual-reference-counting

Set Build Settings -> Apple LLVM 7.1 - Language - Objective C -> Weak References in Manual Retain Release to YES.

Visual example

Taken from Apple Developers Forums - Xcode 7.3b4, non-arc, cannot create __weak reference.

shareimprove this answer
 
    
I thought there would be a flag for it lol Thanks – REALFREE Mar 23 at 8:36
6  
This still doesn't work for me :( could there be another compiler flag that overrides this setting that I might have enabled? I do have these -Wall -Wextra -Wno-unused-parameter Warning flags enabled. – Kdawgwilk Mar 24 at 5:45
5  
@Kdawgwilk You sure you turn on that flag correctly? If its in your project you can just simply delete __weak keyword tho. I didnt try but you can also try to turn on the flag in Pod project if you are using Pod – REALFREE Mar 24 at 16:38 
    
This didn't worked for me! – Jayprakash Dubey Apr 5 at 6:59
2  
Note if you currently run pod install / pod update then Weak References in Manual Retain Release is set to NO for each pod target - and you will have to edit the build settings again. – Damo Apr 21 at 16:13
posted @ 2016-06-20 19:28  天牛  阅读(643)  评论(0编辑  收藏  举报