App clip: userActivity.webpageURL is "https://example.com" for no reason

Hi, when trying to test my app clip, if there's no link in the _XCAppClipURL environment variable in the scheme (Or TestFlight invocation), userActivity.webpageURL is "https://example.com" even though I don't have this link anywhere in my project.

This is my code for getting the link (I'm using UI:

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

    guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
       let incomingURL = userActivity.webpageURL else {
      return
      }
      print("Incoming URL: \(incomingURL)")
    }

I removed _XCAppClipURL from the environment variables in the scheme and when I run the code I get:

Incoming URL: https://example.com

Is this a bug? How can I get rid of this https://example.com URL?

Seems like this odd behaviour appears when the build configuration is set to "Debug", you can set it to "Release" to prevent the injection of "https://example.com" on userActivity.webpageURL. I can't find a way to disable it on "Debug" rather than injecting more code to handle that case.

I hope someone at Apple gives a real answer.

Did either of you manage to find a solution to this?

App clip: userActivity.webpageURL is "https://example.com" for no reason
 
 
Q