How to use Facebook deferred deep linking feature for new installs and to test the same before publishing iOS App to appStore?

后端 未结 3 900
逝去的感伤
逝去的感伤 2020-12-28 08:23

I have done some exploration and have found the following things, this is what I have done so far:

  1. Implemented custom URL, like myApp://

3条回答
  •  旧巷少年郎
    2020-12-28 09:05

    1. Login to your facebook
    2. Then Click https://developers.facebook.com/tools/app-ads-helper
    3. Select an app you want to test from drop down
    4. Hit submit
    5. At the bottom you will find 'Deep Link Tester' under Developer Tools.
    6. Hit 'Test Deep Link' and in the dialog you can enter your deep link.
    7. Select both 'Send Notification' and 'Send Deferred' check marks.

      Then you will get a notification to your facebook app.

    8.Add bellow keys to your info.plist

    CFBundleURLTypes
            
                
                    CFBundleURLSchemes
                    
                        **Your URL Scheme** 
                        **Your FB app id** 
                    
                
            
    

    URL scheme Like "testScheme://......."

    FB app id Like "fb........."

    Now we can test 2 cases.

    1. app already install in your device with deferred link implementation

    2. New install

    for 1st case, install your app and then click facebook notification, it is redirected to your app.

    for 2nd case, For new installs

    1. Uninstall your app and Connect your device to xcode

    2. Then click deeplink facebook notification, it is redirected to appstore, don't install from appstore because your published app doesn't have app deep link implementation

    3. Then you can run app from xcode, once it is installed, it is open your deeplink as 1st case.

    Thats it....

    Note: don't forgot to implement

    - (void)applicationDidBecomeActive:(UIApplication *)application {
    [FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url,NSError *error){
                if(url)
                {
                    // redirect to where you want 
                }
            }];
          ...........
    }
    

提交回复
热议问题