Skip to content

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

@parteek-refixd

Description

@parteek-refixd

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions