mattt/CargoBay

"Capturing 'self' strongly in this block" warnings in latest CocoaPods version

insanehunter opened this issue · 5 comments

Hi! I've installed CarboBay 0.2.1 via CocoaPods and I'm getting 2 warnings in Pods target:

CargoBay/CargoBay.m:1038:11: warning: capturing 'self' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]
    [[self class] unregisterDelegate:weakSelf];
      ^~~~
CargoBay/CargoBay.m:1033:5: note: block will be retained by an object strongly retained by the captured object
    _success = [^(NSArray *products, NSArray *invalidIdentifiers) {
    ^~~~~~~~
CargoBay/CargoBay.m:1046:11: warning: capturing 'self' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]
    [[self class] unregisterDelegate:weakSelf];
      ^~~~
CargoBay/CargoBay.m:1041:5: note: block will be retained by an object strongly retained by the captured object
    _failure = [^(NSError *error) {
    ^~~~~~~~
2 warnings generated.

As I see, those warnings were already fixed in master. Could you please consider releasing a new version?

Thank you.

Same here, @mattt would you mind updating the podspec?

For now you can always point at a specific commit or just master.
pod 'CargoBay', :git => 'git@github.com:mattt/CargoBay.git'

Just pushed 0.3.0 to the specs repo. Enjoy!

👍 Thanks!

Thank you!