Closed Saulenco closed 1 year ago
Hi @Saulenco - thanks for the reproduction steps! Sorry to hear you are not able to trigger a deeplink when the app isn't running.
To make sure I understand the scenario correctly, I wanted to verify that I'm following your same workflow:
For your in-app message, you're using this Deep Link Into App
feature for your on-click behavior, correct?
When you have the app closed, you are tapping the push notification on your phone's lock/home screen and expecting to deeplink into the desired location of your app, but that's not happening?
If the above is correct, I'm unable to reproduce the same issue from our end. Could you also provide more details on what the implementation of your braze(_:shouldOpenURL:)
looks like?
Finally, since killing an app also cuts the connection to the Xcode debugger, are there any other visual cues or logging you can temporarily add to your braze(_:shouldOpenURL:)
method to verify that it's not being called upon returning? This could help narrow down whether it's an issue with the method not being called or with the deeplink.
Hi @jerielng,
yes we are using Deep Link Into App
and we have a button on in app message that has a Deep Link Into App
please see attached image:
and we have 2 scenarios: app is running, or it is in background:
braze(_:shouldOpenURL:)
is triggeredapp is killed, the app is not in Application stack
braze(_:shouldOpenURL:)
is not triggeredThanks for the additional info @Saulenco - unfortunately, we are still unable to reproduce this scenario.
Could you provide further details on your implementation? I notice you are using the following line:
braze.delegate = self
self
refers to?BrazeService
is set up since that appears to be a custom implementation?Might it be possible that the reference to the BrazeDelegate that is being assigned in this start
function may not be available at the time that your app is starting up and only after all the initialization is complete?
Hi guys :) I believe this is duplicated from this ticket that was closed recently without getting fixed: https://github.com/braze-inc/braze-swift-sdk/issues/39
We are also experiencing the same issue, deeplinks are broken. The delegate is assigned, we do it all before didFinishLaunch, etc. Any update on this? Thanks!
so after more digging i have notice that we hold a strong reference to braze window like so:
let brazeWindow = UIApplication
.shared
.connectedScenes
.flatMap { ($0 as? UIWindowScene)?.windows ?? [] }
.first { $0 is BrazeInAppMessageUI.Window }
and I have notice that if the app is from "cold start" this somehow disturbes the delegate, if i remove this, or use it as a getter without a strong reference it work as expected.
I also have an update. Our url was escaped. This seems to work fine when simulating push notifications on the simulator, but not on real Braze usage. After removing the escaping, it works as expected ✅
That's great to hear! It sounds like we have a solution in both cases, so I'll go ahead and close this issue, but feel free to reach back out if you have any further questions.
Platform
iOS
Platform Version
iOS 16.1
Braze SDK Version
5.11.1
Xcode Version
14.2
Computer Processor
Apple (M1)
Repro Rate
100%
Steps To Reproduce
after braze is initialised:
Expected Behavior
braze delegate method shouldOpenURL: should be called, like is called when push is receive when app in in foreground
Actual Incorrect Behavior
braze delegate method shouldOpenURL: should is not called called at first start .
Verbose Logs
No response
Additional Information
No response