braze-inc / braze-swift-sdk

Braze SDK for the Apple ecosystem, including: iOS, macOS, iPadOS, visionOS, tvOS
https://www.braze.com
Other
52 stars 19 forks source link

[Bug]: Braze creates new session after dismissing Apple Pay pop-up #124

Closed andre-alves closed 7 months ago

andre-alves commented 7 months ago

Platform

iOS

Platform Version

IOS 17.4.1

Braze SDK Version

8.2.1

Xcode Version

Xcode 15.2

Computer Processor

Apple (M1)

Repro Rate

100% of the time

Steps To Reproduce

We offer Apple Pay to our customers as a payment type. Example:

image

We noticed that Braze starts a new session after dismissing the pop-up. We find this behavior surprising because the user never left the app, nor it was sent to the background.

To reproduce you can:

  1. Listen to Braze session updates (using subscribeToSessionUpdates);
  2. Present Apple Pay pop-up;
  3. Dismiss the pop-up and check session updates.

Expected Behavior

Expected Braze to not create a new session after dismissing the Apple Pay pop-up.

Actual Incorrect Behavior

Braze creates a new session after dismissing the Apple Pay pop-up.

Verbose Logs

No response

Additional Information

No response

hokstuff commented 7 months ago

Hi @andre-alves,

Thanks for raising this. Can you contact support@braze.com with more information around:

  1. Your app's verbose logs so we know your configuration and the events that the Braze SDK is running
  2. Does this also occur in your app if it doesn't call subscribeToSessionUpdates?
  3. Also please link this Github issue so the Support team can more easily link the context
lowip commented 7 months ago

Hi @andre-alves,

This is actually an expected behavior. We rely on the applicationState to determine whether the app moves to the background and back to the foreground. At the OS level, presenting a system sheet such as the Apple Pay does move the application in the background. This is also the case when the user displays the notification center or the control center.

Please let us know if can think of a technically feasible alternative that would better suit your needs.

Best,