GM release of Xcode 6 compile

前端 未结 21 2421
难免孤独
难免孤独 2020-12-02 15:37

I just downloaded the GM release of Xcode 6 and it won\'t compile with this error:

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault         


        
21条回答
  •  鱼传尺愫
    2020-12-02 16:21

    I think it occured for many reasons, what I have encountered is this situation,hope it could help you.

    dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) ){ [weak self] in
    
            // ...
            dispatch_async(dispatch_get_main_queue()) { [weak self] in
    
                // ...
                return
    
            }
        }
    

    In the upper code,just delete "[weak self]" called capture list will remove the compiler error. It works for me.

    dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) ){ [weak self] in
    
            // ...
            dispatch_async(dispatch_get_main_queue()) {
    
                // ...
                return
    
            }
        }
    

    xCode version is 6.1.1

提交回复
热议问题