adjust / ios_sdk

This is the iOS SDK of
http://www.adjust.com
MIT License
623 stars 294 forks source link

ADJUtil never calling requestTrackingAuthorizationWithCompletionHandler completion handler #573

Open o15a3d4l11s2 opened 3 years ago

o15a3d4l11s2 commented 3 years ago

I think this method could be improved: https://github.com/adjust/ios_sdk/blob/43c5bb5eb8f77c72da856637dac5c46087c27848/Adjust/ADJUtil.m#L1409 At the moment if it gets called with iOS version < 14, where App Tracking Transparency does not exist, then the method just returns, but never calls completion. This could cause problems and I think if there is a completion, then it should be called in all cases, with the appropriate result.

uerceg commented 3 years ago

👍 Makes sense, thank you for suggestion. Returning -1 in that case seems like a proper way to go.

o15a3d4l11s2 commented 3 years ago

@uerceg, do you want me to provide a PR in the next days?

uerceg commented 3 years ago

Absolutely, every contribution is more than welcomed. In case you find some time, sure thing and we'll put it into next SDK release.

maximgavrilov commented 1 year ago

You should precede both return inside function block with callback call.