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

Add an option to override platform context properties #866

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

matus-tomlein
Copy link
Contributor

Issue #865

This PR adds a way to override properties of the platform context using a PlatformContextRetriever object with callbacks for each property.

There are two motivations for this feature:

With the release of the iOS tracker version 6, we will remove automatically tracking the available and total storage in the platform context due to potential fingerprinting use. It would be good to keep an option for users to set these values.
There are requests for being able to set some properties (mostly the IDFA) from our wrapper trackers (React Native and Flutter). Using these callbacks, it'd be possible to pass these values.

Copy link
Contributor

@mscwilson mscwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -264,8 +268,14 @@ public class TrackerConfiguration: SerializableConfiguration, TrackerConfigurati
/// It is called repeatedly (on each tracked event) until a UUID is returned.
@objc
public var advertisingIdentifierRetriever: (() -> UUID?)? {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not important, but it's kind of a convenience function. On the background it uses the new API anyway.

@matus-tomlein matus-tomlein merged commit 20231c6 into release/6.0.0 Jan 30, 2024
10 checks passed
@matus-tomlein matus-tomlein deleted the issue/platform_context_overrides branch January 30, 2024 09:05
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

Successfully merging this pull request may close these issues.

2 participants