Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reachability notification name clashes with the Apple example #359

Closed
grigorye opened this issue Nov 29, 2018 · 4 comments
Closed

Reachability notification name clashes with the Apple example #359

grigorye opened this issue Nov 29, 2018 · 4 comments

Comments

@grigorye
Copy link

grigorye commented Nov 29, 2018

NSString *kADJReachabilityChangedNotification = @"kNetworkReachabilityChangedNotification";

kADJReachabilityChangedNotification is defined as "kNetworkReachabilityChangedNotification". This presents a potential issue for any code that integrates Adjust and uses Reachability.m as defined by Apple.

The issue is that any client code that relies on Apple example for Reachability and that observes
all "kNetworkReachabilityChangedNotification" notifications (e.g. passing nil as object to -[NSNotificationCenter addObserver:forName:object:queue:usingBlock:] will get extra notification from Adjust (beware that the client and Adjust might or might not observe different reachability configurations, depending on the situation).

I suggest to change the notification value to something different (like "kADJReachabilityChangedNotification") to avoid the potential clash.

For the reference, there're quite a few mentions of "kNetworkReachabilityChangedNotification" in the Rechability-related examples posted on the Internet, and at quick glance, it's not mentioned anywhere that it's better to use client-specific notification name.

https://www.google.nl/search?q=knetworkreachabilitychangednotification

@grigorye grigorye changed the title Notification name clashes with Apple example Reachability notification name clashes with the Apple example Nov 29, 2018
@uerceg uerceg added the support label Nov 29, 2018
@uerceg
Copy link
Contributor

uerceg commented Nov 29, 2018

Hi @grigorye

Thanks for reporting this. Makes sense. Will be changed in upcoming v4.17.0 release of our SDK. Will keep you posted in here on update progress.

Cheers

@grigorye
Copy link
Author

Thanks, @uerceg! Beware though that it might affect clients that happen to (implicitly) depend on Adjust triggering that very notification, due to e.g. a bug in their own reachability tracking. In other words, it might be a "breaking change in case for misbehaving clients".

@uerceg
Copy link
Contributor

uerceg commented Nov 29, 2018

Of course and thanks for the comment. It will definitely be mentioned in release notes and CHANGELOG.md entry of the upcoming update.

@uerceg uerceg mentioned this issue Dec 4, 2018
@uerceg
Copy link
Contributor

uerceg commented Dec 10, 2018

@grigorye

This issue is addressed in our latest release, sorry for late ping: #360

Thank you one more time for reporting this.

Cheers! 🍺

@uerceg uerceg closed this as completed Dec 10, 2018
uerceg pushed a commit that referenced this issue May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants