Universal Links Issues

Hello, I'm having a hard time with Universal Links and my app.

This looks good:

$ curl -I https://www.bolsinga.com/.well-known/apple-app-site-association HTTP/1.1 200 OK Date: Mon, 12 Jun 2023 22:10:57 GMT Server: Apache/2.4.29 (Ubuntu) Last-Modified: Mon, 12 Jun 2023 20:53:38 GMT ETag: "1eb-5fdf4e9bcb926" Accept-Ranges: bytes Content-Length: 491 Content-Type: application/json

This looks good in my entitlements:

<key>com.apple.developer.associated-domains</key> <array> <string>applinks:www.bolsinga.com</string> </array>

The screenshot below good too (from Settings -> Developer -> Universal Links -> Diagnostics).

If I have a link like https://www.bolsinga.com/dates/sh624.html in Notes.app, and I tap on the link it will open in Safari. If I tap and hold, it will not suggest my application. It seems like my universal links should work. Am I doing it wrong? I thought it meant if I opened the URL in these ways it would open in my app.

Thanks for your help!

Answered by Vision Pro Engineer in 760094022

Hey @Bolsinga ,

You've got a capital 'L' in your AASA: it says "appLinks" instead of "applinks" so it looks like the CDN is not caching your AASA. Once you update that, you should be good to go! It will take a few days for the CDN to cache the AASA, as a heads up.

FWIW My app is a full SwiftUI lifecycle app, so it is using onOpenURL.

My app is on macOS too. By reading the transcripts of https://developer.apple.com/videos/play/wwdc2020/10098/, I found swcutil. Here is its output of sudo swcutil show --verbose. I have not denied it.

Service:              applinks
App ID:               D3F44CA7F4.gdb.SiteApp
App Version:          1.0
App PI:               <LSPersistentIdentifier 0x11f61dd80> { v = 0, t = 0x8, u = 0x7134, db = 2183ADB1-C496-48F1-B7FF-1301111FE8A7, {length = 8, bytes = 0x3471000000000000} }
Domain:               www.bolsinga.com
User Approval:        unspecified
Site/Fmwk Approval:   denied
Flags:                
Last Checked:         2023-06-12 21:37:13 +0000
Next Check:           2023-06-17 21:09:09 +0000

I found openul:

$ sudo swcutil --verbose openul -u https://www.bolsinga/com/dates/sh624.html
NSOSStatusErrorDomain -10814 {
	_LSLine: "763",
	_LSFunction: "+[LSAppLink(Internal) _openWithAppLink:state:completionHandler:]"
}

#wwdc20-10098

Accepted Answer

Hey @Bolsinga ,

You've got a capital 'L' in your AASA: it says "appLinks" instead of "applinks" so it looks like the CDN is not caching your AASA. Once you update that, you should be good to go! It will take a few days for the CDN to cache the AASA, as a heads up.

It works great now that the CDN has caught up. Thanks again!

For anyone coming across this post in the future and needs help debugging, please try reading this: TN3155: Debugging universal links | Apple Developer Documentation

Universal Links Issues
 
 
Q