-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deep link invocation when app is in quit state on iOS is not working #145
Comments
|
@Bucimis // App.js
const linking = {
prefixes: [
'{myApp}://',
],
async getInitialURL() {
ReactAppboy.getInitialURL(brazeLink => {
if(brazeLink) {
// ** log check : received the braze deep link**
};
});
return '{myApp}://splash';
},
subscribe(listener) {
const onReceiveURL = ({ url }) => listener(url);
Linking.addEventListener('url', onReceiveURL);
return () => {
Linking.removeEventListener('url', onReceiveURL);
};
},
....
// config settings
};
const App = () => {
const handleOpenUrl = event => {
// **log check : received the braze deep link = event.url**
};
useEffect(() => {
Linking.addEventListener('url', handleOpenUrl);
Linking.getInitialURL()
.then(url => {
if (url) {
handleOpenUrl({ url });
}
})
.catch(err => console.error('Error getting initial URL', err));
const listener = DeviceEventEmitter.addListener(
'inAppMessageReceived',
function (event) {
const inAppMessage = new ReactAppboy.BrazeInAppMessage(
event.inAppMessage,
);
ReactAppboy.logInAppMessageClicked(inAppMessage);
ReactAppboy.logInAppMessageImpression(inAppMessage);
ReactAppboy.logInAppMessageButtonClicked(inAppMessage, 0);
},
);
return () => {
listener?.remove();
Linking.removeEventListener('url', handleOpenUrl);
};
}, []);
};
|
@claire-euni if you print "hello world" logs from your didFinishLaunching and UserNotificationFramework delegates in your native iOS code, do you at least see those? Once you see those, you should be able to trace how the deep link flows through the system and where it stops working/gets dropped. |
@Bucimis I have sorted it out! The problem was that I did not set the correct function to get initial link using Appboy so it did not return the deep link. Now deep linking is working very well on quit state. I really appreciate your help! :) |
@claire-euni Would you mind sharing more details please? May be code block of the correct function. Would really appreciate it. Thanks. |
@claire-euni hi! mind sharing the details on your solutin? my case is, it seems that the get initial url doesn't seem to return the deep link too. Thanks before |
For me this works:
|
Hi guys,
I installed Braze React Native SDK and added Integrating push notifications in React Native according to the guide . I have tested push notifications on dashboard, deep link invocation works very well when app is active on both foreground and background, except for the situation when app is quit state (killed). I was able to receive push notification when app is killed, however when I clicked push, it only opens and does not navigate to a specific deep link destination.
Could anyone tell what I have done wrong in code?
"react-native-appboy-sdk": "^1.33.1"
"react-native": "0.66.3"
The text was updated successfully, but these errors were encountered: