App Clip Scene Delegate URLs

I have an app clip set up and working properly with my website’s smart banner successfully directing urls either to open in my app clip or in my full app. But I have a problem with the NSUserActivity object received by my SceneDelegate. If I send it a url I’ve used previously, it does not update and instead reports the last “different” url it received.

For example, if I send it these urls in order:

mysite.com/?txt=abc
mysite.com/?txt=def
mysite.com/?txt=ghi
mysite.com/?txt=jkl

it receives each new url as expected. But if I then try to send it one of the first three again (abc, def, ghi) it opens the app, but SceneDelegate reports that it still has jkl.

It looks like they’re being cached somewhere and ignored if they’re previously cached?

func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {

let incomingURL = userActivity.webpageURL
print("Scene received: \(incomingURL!.absoluteString)")
respondTo(userActivity)

}

I’m a bit new to this, so probably missing something obvious?

Thanks.
Hey @andsoff! I'm seeing the same exact problem with our app clip implementation. We thought maybe it had something to do with our web implementation in React of the smart app banner, but we're not sure. The example you've provided is reproducible for us on both web through the smart app banner and through iMessage links to the app clip.

Through logging, we were able to determine that the app clip is receiving a URL in
Code Block
func scene(_ scene: UIScene, continue userActivity: NSUserActivity)
but not the correct URL for that page.

i.e.

mysite.com/?txt=abc -- app clip receives mysite.com/?txt=abc
mysite.com/?txt=def -- app clip receives mysite.com/?txt=def
mysite.com/?txt=ghi -- app clip receives mysite.com/?txt=ghi
mysite.com/?txt=jkl -- app clip receives mysite.com/?txt=jkl
mysite.com/?txt=abc -- app clip receives mysite.com/?txt=jkl
mysite.com/?txt=ghi -- app clip receives mysite.com/?txt=jkl

It seems like there is a cache somewhere that recognizes a certain link is tied with the app clip, and knows to open that app clip, but always passes in the last used URL.
I raised a Bug Report for this: FB8787332.

Apple DTS have now confirmed that this is a bug and that it should be fixed in iOS 14.2.

I've tested with iOS 14.2 beta 4 and it seems to work properly.
App Clip Scene Delegate URLs
 
 
Q