AppsFlyerSDK / appsflyer-react-native-plugin

AppsFlyer plugin for React Native
MIT License
284 stars 202 forks source link

Appsflyer listener appsFlyer.onDeepLink() is not listening in react native IOS #592

Open parteek-refixd opened 3 days ago

parteek-refixd commented 3 days ago

Hi there, For my react native IOS project, the direct deep linking is not working as expected, but the deferred deep linking seems to be working fine. Here the listener appsFlyer.onDeepLink() is not listening in react native IOS. In my case it is opening the app, but not able to see the logs for this onDeepLink() method.

this is the react-native version and appsflyer plugin version "react-native": "0.71.3", "react-native-appsflyer": "^6.10.3",

This is our Info.plist regarding the linking

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>astrosadhana-staging</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleURLName</key>
            <string>com.sadhana.astro.vsf.staging</string>
        </dict>
    </array>

This in our project entitlements file

<key>com.apple.developer.associated-domains</key>
    <array>
        <string>applinks:astrosadhana-staging.onelink.me</string>
    </array>

This is the init part

useEffect(() => {
appsFlyer.onInstallConversionData((res) => {
    console.log('APPSFLYER INSTALL CONVERSION', res);
  });
appsFlyer.onDeepLink((res) => {
           console.log('APPSFLYER DEEPLINK', res);
        });
        const options = {
    devKey: APPSFLYER_DEV_KEY,
    isDebug: true,
    appId: APPSFLYER_APP_ID, // for IOS
    onInstallConversionDataListener: true, //Optional
    onDeepLinkListener: true, //Optional
    timeToWaitForATTUserAuthorization: 10, //for iOS 14.5
  };
        appsFlyer.initSdk(
            options,
            (result) => {
                console.log(result);
            },
            (error) => {
                console.log(error);
            },
        );
}, [])

For the above code, i only see the logs for onInstallConversionData method, but not onDeepLink method.

github-actions[bot] commented 1 day ago

👋 Hi @parteek-refixd and Thank you for reaching out to us. You can contact AppsFlyer support through the Customer Assistant Chatbot for assistance with troubleshooting issues or product guidance. To do so, please follow this article.