When integrating third-party login, we will ask us to provide Universal Link. For example, the third-party login sharing of wechat and QQ needs to be adjusted to the original APP after success. What’s wrong with this?

1. The terminal creates a file

2. Open the file and write the following information

{ "applinks": { "apps": [], "details": [ { "appID": "TeamId.BundleID", "paths": [" name/path / * ", "/ qq_conn/QQ connected APPID / *"]}, {" APPID ":" TeamId. BundleID ", "paths" : [" name/path / * "]}]}}Copy the code
  • AppID: the splicing of TeamID and bundleID corresponding to bundleID. It is used for the system to call the corresponding APP.
  • Paths: Is an array where you can put multiple paths, such as “App name” and “/qq_conn/QQ connected APPID/*”.

3. Upload the file to the Aliyun server or other servers

Get a link to a file at: xxxx.oss-cn-shenzhen.aliyuncs.com

4.Xcode project Settings

Domains :xxxx.oss-cn-shenzhen.aliyuncs.com

5. Jump to this app from other apps

[UIApplication sharedApplication openURL: [NSURL URLWithString: @ "https://xxxx.oss-cn-shenzhen.aliyuncs.com/ path name"]].Copy the code

If the jump fails, please uninstall this app first and then reinstall it

Through the above operation, we successfully set up our current APP in another APP. The method here is also the solution to QQ Universal Link

The content set in the red box is xxxx.oss-cn-shenzhen.aliyuncs.com, but you need to set “paths” in the file created above: [“/ path name /*”,”/qq_conn/QQ interconnection APPID/*”], here /qq_conn/QQ interconnection APPID/ will be automatically spliced after xxxx.oss-cn-shenzhen.aliyuncs.com

We found the corresponding application in QQ Interconnection and successfully obtained QQ Universal Link through the above operations. After configuration in the project, QQ third-party login and sharing can be realized.