SWHighlightCenterDelegate never gets called

I did see a checklist in another post (see below) that I did verify as being configured correctly, but my delegate never gets called. I have confirmed that my universal link is working correctly as tapping on it in Messages does cause the app to open and handle it by going to the appropriate screen.

A couple of details:

  • My universal link is new and am testing it using Developer -> Associated Domains Development
  • I am rewriting my app using SwiftUI including @main being a struct derived from App

What else am I missing?


  1. is Shared with You enabled for your app? Preferences > Messages > Shared with You and see if the toggle for your APP is enabled?
  2. is Shared with You enabled for the conversation where these universal links are shared
  3. In the conversation where the universal links are shared, is the participant a Contact?
  4. If you have sent the link, then you will need to "Pin" the link for it to surface in Shared with You.

Accepted Reply

I don't know if its the solution, but when I changed my apple-app-site-association file to a different structure (both seem to work fine for regular universal links.

Did not work for ShareWithYou

{
	"applinks": {
		"details": [
			{
				"appIDs": ["ABCDEFGHIJK.com.hotngui.ItsAlmostTime"],
				"components": [
					{
						"/": "/mobile/*", 
						"comment": "Universal links"
					}
				]
			}
		]
	}
}

This structure does work:

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "ABCDEFGHIJK.com.hotngui.ItsAlmostTime",
        "paths": [
          "/mobile/*"
        ]
      }
    ]
  }
}

Replies

@hotngui which Seed build are you seeing this issue on?

  • I just tried Beta 3 of Xcode and iOS 16, same issue.

Add a Comment

Beta 2 of Xcode and iOS.

I don't know if its the solution, but when I changed my apple-app-site-association file to a different structure (both seem to work fine for regular universal links.

Did not work for ShareWithYou

{
	"applinks": {
		"details": [
			{
				"appIDs": ["ABCDEFGHIJK.com.hotngui.ItsAlmostTime"],
				"components": [
					{
						"/": "/mobile/*", 
						"comment": "Universal links"
					}
				]
			}
		]
	}
}

This structure does work:

{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "ABCDEFGHIJK.com.hotngui.ItsAlmostTime",
        "paths": [
          "/mobile/*"
        ]
      }
    ]
  }
}

Do I need to implement SWCollaborationMetadata for Shared With You to work? I have the universal link set up and all the items you list above but my highlightCenterHighlightsDidChange delegate method is not getting called with content that appears in Messages that has a universal link that does open my app but nothing shows in my Shared With You shelf.

I do not deal with SWCollaborationMetadata at all in my code. I will say that there did to be some times during debugging where I was not getting my delegate called, or it took a lot of time before it got called. I don't think I am seeing issues now that its in production, but will continue to monitor.

  • How is your universal link connected to the HightlightCenter. For example, once your App Delegate recognizes your universal link with your shared content, do you pass that link to the HightLight center or do something else with it?

Add a Comment

Any updates to this question. I am facing the same issue. 1) How did you get the HightlightCenter.highights initialized with the incoming links. 2)Do you know when the delegate is called? or 3) Does your app also have to be installed on contacts phone?