Skip to content

Delay SDK initialisation until protectedDataDidBecomeAvailableNotification #213

@ioannisj

Description

@ioannisj

Description

This came in from a user:

Oh one last thing I should have mentioned, weirdly the default for file creation on iOS is to make the file encrypted on disk until the device is first unlocked. More and more iOS is prelaunching apps so they load faster, and this often occurs before the device has even unlocked.

Apple isn’t entirely clear on whether prewarming actually runs before the first unlock after a restart. Moreover, Apple's documentation clearly states that prewarming is not intended to execute any application code, even though some online posts have reported that this is not the case (especially on early iOS 15 and scene-based applications)

Regardless, an app could be woken up in the background for other reasons such as:

  • Voip app receiving a voip push notification
  • Geofencing app receiving a region event
  • App may have manually requested a scheduled background task at a specific time

This could indeed interfere with PostHog’s initialisation, even though an edge case

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions