admin管理员组文章数量:1124376
Summary
Link click tracking is not working on iOS with @config-plugins/react-native-branch.
We are implementing a customer referral system using Branch.io, where app users can invite others using an invitation link. To configure the link, we followed the basic configuration described in the plugin project's README and consulted some community issues for additional insights.
We configured Branch.io as shown in the screenshots below:
In iOS, in Apple Developer, we enabled the "Associated Domains" option in the App ID configuration and confirmed other information, such as the Bundle Identifier and Apple App Prefix.
In the app, we use the plugin in two scenarios:
- We created a component that initializes branchUniversalObjectParams to generate the share link, including the user's code. This is working correctly.
- In the main route of the app, we check the link using
branch.getLatestReferringParams()
. The flow works correctly on Android. However, on iOS, the data returned is empty.
For example, when a new user clicks on the link and downloads the app from the AppStore, the received data is empty.
When a new user click on Googleplay:
Now, I will show how the plugin was implemented in the app's entry route and other relevant information:
useEffect(() => {
const fetchAndStoreReferralParams = async () => {
try {
const params = await branch.getLatestReferringParams();
registerLogs({ params });
if (params?.referralId) {
await storage.create("REFERRAL_USER_ID", params.referralId as string);
}
} catch (error) {
// Error handling
}
};
fetchAndStoreReferralParams();
}, []);
In the app.config.ts file:
ios: {
bundleIdentifier: "br.smartsave",
googleServicesFile: process.env.APPLE_SERVICES_JSON,
associatedDomains: [
"applinks:smartsave.app.link",
"applinks:smartsave-alternate.app.link",
],
},
name: "SmartSave",
scheme: "smartsave",
android: {
package: "br.smartsave",
googleServicesFile: process.env.GOOGLE_SERVICES_iOS,
},
plugins: [
[
"@config-plugins/react-native-branch",
{
apiKey: process.env.BRANCHIO_APIKEY,
iosAppDomain: "smartsave.app.link",
},
],
],`
Versions used:
"expo": "^51.0.38",
"react-native-branch": "^6.2.1",
"@config-plugins/react-native-branch": "^8.0.0",
"react": "18.2.0",
"react-native": "0.74.5"
Thank you for any help :)
本文标签: iOS Deep Linking Issue with Branchioreactnativebranch IntegrationStack Overflow
版权声明:本文标题:iOS Deep Linking Issue with Branch.ioreact-native-branch Integration - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736626084a1945678.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论