braze-inc / braze-swift-sdk

https://www.braze.com
Other
48 stars 19 forks source link

[Bug]: braze:shouldOpenURL not being called when app is closed #106

Open miquelalvarado opened 5 months ago

miquelalvarado commented 5 months ago

Platform

iOS

Platform Version

iOS 17.2

Braze SDK Version

7.5.0

Xcode Version

Xcode 15

Computer Processor

Apple (M1)

Repro Rate

100% of the time

Steps To Reproduce

Example:

  1. App is closed and waiting to be run.
  2. Send a push notification from Braze with a Deeplink on it.
  3. Tap on the received push notification.

Expected Behavior

App is opened, Braze is able to handle the push notification and deeplink to the section

Actual Incorrect Behavior

Home view is opened, no deeplink is processed

Verbose Logs

No response

Additional Information

When the application is in background it calls the delegate method as expected but when the app is completely closed it doesn't call it. One thing worth to say is that we delay the initialisation of the SDK but even so, we are capturing any push notification received before Braze is initialised and forward it once it is ready. Attaching a screenshot so that you see the process:

image (1)

As you can see in the screenshot we retain any userInfo and/or response received and once both braze and its delegate are ready and set, we call the required methods. As a result we received a true indicating that the payload has been handled by Braze so we would expect BrazeDelegate's method shouldOpenURL to be called but it doesn't.

jacksonemiller commented 5 months ago

Hi, thanks for bringing this to our attention and for taking the time to make this thread. I would like to ask if you could please file a support issue via support@braze.com as I think we'll be needing much more information in order to provide you adequate support here. Having additional info on code surrounding your SDK integration as well as push and deeplink set-ups - as examples - would be very helpful for us.

Currently, we do not officially support this kind of delayed SDK initialization, so we can't guarantee the issue with this particular use case can be solved, but the additional info would help us out a lot.

Thank you!