Redirect to application if installed, otherwise to App Store

后端 未结 8 2550
渐次进展
渐次进展 2020-12-02 04:52

I know it\'s possible to link directly to an app in iOS by registering a custom scheme (e.g. so://) and it\'s also possible to link to the app in the appstore via itunes.

8条回答
  •  天涯浪人
    2020-12-02 05:23

    If you have a web page you link to from the email with the web page containing an iframe with the src set to the custom scheme for your App, iOS will automatically redirect to that location in the App. If the app is not installed, nothing will happen. This allows you to deep link into the App if it is installed, or redirect to the App Store if it is not installed.

    For example, if you have the twitter app installed, and navigate to a webpage containing the following markup, you would be immediately directed to the app. If you did not have the Twitter app installed, you would see the text "The Twitter App is not installed."

    
    
        
        iOS Automatic Deep Linking
        
        
            
            

    The Twitter App is not installed

    Here is a more thorough example that redirects to the App store if the App is not installed:

    
    
        
        iOS Automatic Deep Linking
        
        
        
        
        
        
        

    Website content.

提交回复
热议问题