Skip to content

SwiftUI App not tracking Application Opened event #122

@Tronicnotes

Description

@Tronicnotes

Describe the bug
When integrating the analytics library into our SwiftUI app, the "Application Opened" event is not being triggered. It appears the UIApplication.didFinishLaunchingNotification notification is not being received and triggering the iOSLifecycle protocol method didFinishLaunchingWithOptions to track the event.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new SwiftUI App with App Delegate.
  2. Add the analytics-swift package.
  3. Initialise Analytics in the didFinishLaunchingWithOptions delegate method.
  4. Launch app and observe the "Application Opened" event is not tracked.

Note: The "Application Foregrounded" and "Application Backgrounded" events are triggered as expected.

Expected behavior
On Application launch, the "Application Opened" event should be triggered.

Screenshots
N/A

Platform (please complete the following information):

  • Library Version in use: 1.1.2
  • Platform being tested: iOS (tested against iOS 14.5 and iOS 15.4 simulators, and iPhone 12 Pro device - iOS 15.3.1)
  • Integrations in use: Firebase

Additional context
N/A

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions