Need help debugging Universal Links

Hi!

Instead of using username/password authentication, I wanted to use a magic link to authenticate users of my app to simplify the process.

However, on the app review, it got rejected because of the magic link:

Guideline 2.1 - Performance - App Completeness
Issue Description


The app exhibited one or more bugs that would negatively impact App Store users.


Bug description: The Magic Link failed to open the installed app.


Review device details:


- Device type: iPad Air (5th generation)

- OS version: iPadOS 18.1


Next Steps


Test the app on supported devices to identify and resolve bugs and stability issues before submitting for review.


If the bug cannot be reproduced, try the following:


- For new apps, uninstall all previous versions of the app from a device, then install and follow the steps to reproduce.

- For app updates, install the new version as an update to the previous version, then follow the steps to reproduce.


Resources


- For information about testing apps and preparing them for review, see Testing a Release Build.

- To learn about troubleshooting networking issues, see Networking Overview.

I had no luck to reproduce this. The magic links trigger my application on all my testing devices. I also had external testers using TestFlight and it works for all of them as well.

The only time where I can see it failing is if I archive the IPA and install it on an external service like AWS Device Farm or BrowserStack App Live. But here it is very hard to debug because I think I cannot get the sysdiagnose file and I don't know if it is even supposed to work in this case because those devices are not associated with my developer account.

I read countless links, tutorials and discussions on this topic but it did not really help. https://developer.apple.com/documentation/technotes/tn3155-debugging-universal-links https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content

Here is my set-up:

  1. I added the Associated Domains capability to my app.

There under Domains I put applinks:subdomain.domain.com

  1. Under https://subdomain.domain.com/apple-app-site-association and https://subdomain.domain.com/.well-known/apple-app-site-association I host this file with JSON content header:
{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "<TEAM>.<TestAppIdentifier>",
        "paths": [
          "/magiclink/*",
          "/activate/*"
        ]
      },
      {
        "appID": "<TEAM>.<Identifier>",
        "paths": [
          "/magiclink/*",
          "/activate/*"
        ]
      }
    ]
  }
}

My main entry point of the app has a

.onOpenURL { url in
                    handleOpenURL(url)
                }

on the ContentView()

  1. If I go to https://app-site-association.cdn-apple.com/a/v1/subdomain.domain.com, I see the file correctly as I specified it above.

  2. If I go on my development phone to Settings > Developers > Universal Links > Diagnostics and I enter one of the "magic links" into the field, it says with a checkmark Opens Installed Application.

  3. https://getuniversal.link/ says my AASA file is valid.

Any suggestion on what I could do to further debug or resolve this is highly appreciated.

Thanks for the post. I notice you haven't provided the links to your server, which I'll need to review to troubleshoot the links and ensure the AASA file is correct. Could you please post the following:

  1. The links to your server.
  2. The app links you're using in your configuration.

This will allow me to go over the list thoroughly. If you have privacy concerns, please let me know, and we can arrange a private discussion.

I'd like you to suggest to submit a code-level support request so we can discuss this further privately. When you create the request, indicate that you were referred by Albert Pascual at Apple and make sure to include a link to this thread.

If you like to continue the conversation on the forums, I would need all the correct links to your server to download the AASA file.

Albert Pascual 
 Worldwide Developer Relations.

Thank you very much for your quick reply.

  1. The domain is app.cozybrushery.com, the AASA file is hosted at those locations:

https://app.cozybrushery.com/apple-app-site-association

https://app.cozybrushery.com/.well-known/apple-app-site-association

  1. Those links should trigger it:

https://app.cozybrushery.com/magiclink/1320804f1b9d8262821159c36575c218109408ad339db0f9ac4e11f48be28375a

https://app.cozybrushery.com/activate/6047ce9f-ab8a-4849-b0f4-8ef69362ad81

If you need anything else, please let me know.

Regards

Matt

maddo7,

I have received your code-level request, I'll reply today to you directly. Thanks

Need help debugging Universal Links
 
 
Q