Is ASWebAuthenticationSession compatible with App Clips?

Question: Do App Clips support receiving callbacks from ASWebAuthentictionSession's redirectCallbackURL?

Context: I'm trying to get CloudKit working in an app clip. Read support is done, but it would be nice for the user to see the capabilities before full download.

Presently, I have the CloudKit Web Services successfully invoking redirectURL within SafariViewController, but I haven't figured out how to get it to direct to something the App Clip can get a hold of.

CloudKit allows you to specify three different callbackURLs:

  • https:// [freeform]
  • http:// localhost[freeform]
  • cloudkit-icloud.:// [freeform]

I am new to AuthenticationSerivces framework so I may have missed something. The desired OAuth doesn't need to be CloudKit/iCloud but any provider.

Everything is working except the redirect URL.

It is referenced in this video to in fact use ASWebAuthenticationSession but I haven't found any useful information in the documentation on how to get it setup with the callback yet: https://developer.apple.com/videos/play/wwdc2020/10174/?time=909

I shared my code with my main app target and specified a custom url scheme matching the cloudkit-icloud.[containername]://authToken and I see my ASWebAuthenticationSession getting invoked with the new token. So I know that code is wired up properly and functional

It is stated in the Exploring App Clips video that they do not support URL Schemes, when I have the same URL scheme specified, safari says "Safari cannot open the page because the address is invalid." which makes sense if the App Clip isn't registering the URL with the system.

When I try to use the https:// [advanced-app-clip-invocation-url] safari view controller is redirecting to my web page that matches the app clip url--not the app clip itself. Universal links are also explicitly not supported by App Clips either as per the same app clip video.

I know there is a lot of interest in App Clips + CloudKit so I'll continue to post my findings.

Is ASWebAuthenticationSession compatible with App Clips?
 
 
Q