About behavior of Dynamic Links

半城伤御伤魂 提交于 2019-12-24 20:07:24

问题


Xcode version: 9.3.1

Firebase SDK version: 5.0.1

Firebase Component: Dynamic Links

Component version: 3.0.0

I implemented Dynamic links in project. I have a problem, I don't know the behavior that is true. Could you help me resolve it?

Steps to reproduce:

  1. Install App from App store.
  2. Share a link for project.
  3. Delete App on device.
  4. Tap an link share at above (2)
  5. Move to App store and install again app.
  6. App receiver the content of link shared from Dynamic links.
  7. Delete App on device.
  8. Open App store and install again app, (Move to App store not via dynamic links).
  9. App still receiver the content of link shared from Dynamic links.

The function

-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options

it's alway return the link for share when i removed and install app again.

At step 9 : "App still receiver the content of link shared. " , In my opinion, i think that is wrong.

Let me know your opinion and If it's wrong , please help me resolve this.


回答1:


I temporarily resolved this problem but I not sure this is root core. I used property "mathType" to check.

@property(nonatomic, assign, readonly) FIRDLMatchType matchType;

FIRDynamicLink *dynamicLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
 if (dynamicLink) {
       if (dynamicLink.url && dynamicLink.matchType == FIRDLMatchTypeUnique) {
             // to check App install when tap an link shared.
       } 
       if (dynamicLink.url && dynamicLink.matchType == FIRDLMatchTypeWeak) {
             // to check App install via App store (not tap an link shared).
       } 
}


来源:https://stackoverflow.com/questions/51149078/about-behavior-of-dynamic-links

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!