Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Block implicitly retains 'self' warnings on Xcode 9 #78

@battlmonstr

Description

@battlmonstr

Compiling a version of the Pod from develop branch (commit
6d24e1c ) under Xcode 9.4.1 generates a bunch of warnings:

.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:61:17: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        value = _readyState;
                ^
                self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:79:18: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        result = _inputPaused;
                 ^
                 self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:85:28: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if (inputPaused != _inputPaused) {
                           ^
                           self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:86:13: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            _inputPaused = inputPaused;
            ^
            self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:97:18: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        result = _outputPaused;
                 ^
                 self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:103:29: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if (outputPaused != _outputPaused) {
                            ^
                            self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:104:13: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            _outputPaused = outputPaused;
            ^
            self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:217:12: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if(_opened || _readyState != PSWebSocketReadyStateConnecting) {
           ^
           self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:217:23: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if(_opened || _readyState != PSWebSocketReadyStateConnecting) {
                      ^
                      self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:222:9: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        _opened = YES;
        ^
        self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:231:13: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if(!_opened || _readyState == PSWebSocketReadyStateConnecting) {
            ^
            self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:231:24: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if(!_opened || _readyState == PSWebSocketReadyStateConnecting) {
                       ^
                       self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:237:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            [_driver sendText:message];
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:239:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            [_driver sendBinary:message];
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:248:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            [_pingHandlers addObject:handler];
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:250:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        [_driver sendPing:pingData];
         ^
         self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:259:12: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if(_readyState >= PSWebSocketReadyStateClosing) {
           ^
           self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:263:28: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        BOOL connecting = (_readyState == PSWebSocketReadyStateConnecting);
                           ^
                           self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:264:9: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        _readyState = PSWebSocketReadyStateClosing;
        ^
        self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:268:13: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            _closeCode = code;
            ^
            self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:269:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            [_driver sendCloseCode:code reason:reason];
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:296:71: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        result = CFWriteStreamCopyProperty((__bridge CFWriteStreamRef)_outputStream, (__bridge CFStringRef)key);
                                                                      ^
                                                                      self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:302:12: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if(_opened || _readyState != PSWebSocketReadyStateConnecting) {
           ^
           self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:302:23: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if(_opened || _readyState != PSWebSocketReadyStateConnecting) {
                      ^
                      self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:306:61: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        CFWriteStreamSetProperty((__bridge CFWriteStreamRef)_outputStream, (__bridge CFStringRef)key, (CFTypeRef)property);
                                                            ^
                                                            self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:317:38: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            customTrustEvaluation = [_delegate respondsToSelector:@selector(webSocket:evaluateServerTrust:)];
                                     ^
                                     self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:506:13: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            _closeCode = error.code;
            ^
            self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:507:13: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            _closeReason = error.localizedDescription;
            ^
            self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:508:33: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            [self closeWithCode:_closeCode reason:_closeReason];
                                ^
                                self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:508:51: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            [self closeWithCode:_closeCode reason:_closeReason];
                                                  ^
                                                  self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:515:16: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            if(_readyState != PSWebSocketReadyStateClosed) {
               ^
               self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:516:17: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                _failed = YES;
                ^
                self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:517:17: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                _readyState = PSWebSocketReadyStateClosed;
                ^
                self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:640:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        [_delegate webSocketDidOpen:self];
         ^
         self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:645:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        [_delegate webSocket:self didReceiveMessage:message];
         ^
         self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:650:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        [_delegate webSocket:self didFailWithError:error];
         ^
         self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:655:10: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        [_delegate webSocket:self didCloseWithCode:code reason:reason wasClean:wasClean];
         ^
         self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:660:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if ([_delegate respondsToSelector:@selector(webSocketDidFlushInput:)]) {
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:661:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            [_delegate webSocketDidFlushInput:self];
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:667:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if ([_delegate respondsToSelector:@selector(webSocketDidFlushOutput:)]) {
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:668:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            [_delegate webSocketDidFlushOutput:self];
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:675:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
        if ([_delegate respondsToSelector:@selector(webSocket:evaluateServerTrust:)]) {
             ^
             self->
.../Pods/PocketSocket/PocketSocket/PSWebSocket.m:676:23: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
            result = [_delegate webSocket:self evaluateServerTrust:trust];
                      ^
                      self->
43 warnings generated.

screen shot 2018-10-31 at 14 18 53

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions