AppAuth-iOS icon indicating copy to clipboard operation
AppAuth-iOS copied to clipboard

several "Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior" warnings

Open sspitzer opened this issue 8 years ago • 4 comments

Thanks for AppAuth-iOS, this is very useful pod!

When I build AppAuth (0.92.0) with Xcode Version 9.2 (9C40b) I get the following warnings:

/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/iOS/OIDAuthorizationUICoordinatorIOS.m:98:7: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/iOS/OIDAuthorizationUICoordinatorIOS.m:100:10: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/iOS/OIDAuthorizationUICoordinatorIOS.m:106:10: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/OIDAuthState.m:481:9: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/OIDAuthState.m:485:11: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/OIDAuthState.m:488:16: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/OIDAuthState.m:490:14: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/OIDAuthState.m:497:21: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/OIDAuthState.m:498:28: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
/Users/sspitzer/Workspace/ShopStyle-App/Pods/AppAuth/Source/OIDAuthState.m:499:9: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior

sspitzer avatar Feb 14 '18 18:02 sspitzer

I created a PR to address this: https://github.com/openid/AppAuth-iOS/pull/203

seanmcneil avatar Feb 16 '18 18:02 seanmcneil

Hi, Any update on this? Facing the same issue..

priyankamistry09 avatar Mar 23 '18 07:03 priyankamistry09

Recently I faced the same issue and figured out that one of the dependent GEM XCODEPROJ was setting the CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF to YES which can be changed manually by editing the Build Settings in Xcode. However in Continuous integration environments its not possible to change the CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF flag to NO at run time.

So in order to isolate the issue i tried by checking all the dependent GEMS and figured out that gem XCODEPROJ version 1.5.7 sets the CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF to YES whenever pod install command is executed. The solution for this is reverting the XCODEPROJ to earlier version 1.5.1 by executing sudo gem install xcodeproj -v 1.5.1 Once reverted just execute pod install and the flag will be set to NO always.

bhuvandaruwala avatar Mar 29 '18 13:03 bhuvandaruwala

Fixed by #230.

WilliamDenniss avatar Jun 04 '18 17:06 WilliamDenniss