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

Writing too much data to UserDefaults results in crash on tvOS #787

Open
hakonk opened this issue Jun 1, 2023 · 3 comments
Open

Writing too much data to UserDefaults results in crash on tvOS #787

hakonk opened this issue Jun 1, 2023 · 3 comments
Assignees
Labels
type:enhancement New features or improvements to existing features.

Comments

@hakonk
Copy link

hakonk commented Jun 1, 2023

Is your feature request related to a problem? Please describe.
Yes. UserDefaults.standard is used in this library to persist data pertaining to the Snoplow tracking. However, it is likely the app that links against the Snowplow tracking library also stores data in the same UserDefaults suite. On tvOS this can lead to crashes since the available size is quite limited. Attempting to write more than is available will lead to a crash. See e.g.: microsoft/appcenter-sdk-apple#2483 for a detailed explanation.

Describe the solution you'd like
The Snowplow library should scope persistence in UserDefaults to its own suite. With this approach one has more control of mechanism needed to for instance purging stale data to preserve space. One is also not dependent of how much data the app has written to the .standard instance.

Describe alternatives you've considered
N/A

@hakonk hakonk added the type:enhancement New features or improvements to existing features. label Jun 1, 2023
@mscwilson
Copy link
Contributor

Hi, thanks for reporting this, and sorry about the delay in replying! We'll look into it

@zenangst
Copy link

Any updates on this?

@mscwilson
Copy link
Contributor

Hi, unfortunately we have no plans to address this at the moment. If you're a Snowplow customer then please submit a Support request. Otherwise, PRs are always welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New features or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

3 participants