BranchMetrics / sdk-release

TUNE iOS, Android, and Windows native SDKs
https://developers.tune.com/sdk/quick-starts/
GNU General Public License v3.0
56 stars 46 forks source link

Cache user agent across app session while on same iOS version #43

Closed adam-zethraeus closed 5 years ago

adam-zethraeus commented 6 years ago

This commit uses TuneUserDefaultUtils within TuneUserAgentCollector to cache a mapping between iOS version and Safari UserAgent.

e.g.

If this mapping exists, the user agent is then returned from it instead of instantiating a UIWebView to find it.

Risk: The user agent has to date only been updated with a corresponding iOS change, indeed the iPhone OS version is part of the user agent string. This patch assumes that it's safe to say that that won't change.

ghost commented 6 years ago

Thanks for this! We are going to take a look at this internally and see if we'd like to pull this into the main SDK. It might take us a few weeks to get an answer because we have a few other major initiatives in flight at the moment.

adam-zethraeus commented 6 years ago

Sounds good! Thanks for letting me know.

adam-zethraeus commented 5 years ago

Was this considered / found to be potentially useful?