Application.OpenURL fails silently for Youtube and Facebook URLs
For Unity v5.2.1f1, on iOS with iOS Pro, I've noticed that Application.OpenURL simply does nothing for certain URLs. Specifically, all youtube.com URLs and most facebook.com URLs seem to be blocked. They all work fine in the editor, but fail silently with no xcode log when testing on an iPhone 5c.
The following behavior is seen in a fresh test project, without messing with any project or xcode settings:
"http://www.google.com", // Works
"https://www.facebook.com", //Works
"https://www.youtube.com", //FAILS
"https://www.youtube.com/watch?v=<urlescaped param>", //FAILS
"https://www.youtube.com/user/<user>", //FAILS
"fb://profile/<profile #>", //FAILS
"https://www.facebook.com/<user>", //FAILS
If anyone could explain this behavior, it would be a huge help!
Answer by DigitalInteractiveUnityDevs · Oct 22, 2015 at 07:18 PM
Finally figured it out. Turns out that on my device, both the Facebook and Youtube apps were installed, but had failed to update (due to lack of memory), and were therefore in an unusable state.
So, Unity was attempting to open the links in those applications, but couldn't, resulting in the above behavior.