Can’t use Application.OpenURL on iOS 18 [SOLVED]

Hey all,

I’m trying to open a URL in my game using Application.OpenURL which works in the editor in macOS. But when trying to do the same on device, no URL gets opened and Xcode prints this error out:

BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).

My test device is an iPhone 15 Pro on iOS 18, I’m building with Unity 2022.3.20 and Xcode version 16.0.

Any ideas?

Thanks!

2 Likes

Same issue here. No idea how to fix it. Do let me know if you find the fix for this, Thanks!

1 Like

Linking my thread here if some of the solutions help you in some way

Thread Link

I just found this to be the error through XCode. Dunno how to solve that. Adding it here for visibility

BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).

Yeah I was seeing that as well. Not sure if Unity needs to update how they are opening URLs on the iOS side. Seems like UIApplication.openURL is completely deprecated in iOS 18 now.

1 Like

Oh damn! Are there no alternatives to this?

Unity seems to be updated for this in latest versions.

1 Like

Yup, I updated to 2022.3.47 and built off of that, and this works now! Thank you!

2 Likes

Thanks for letting us know. Just scared to update my project lol