I'm failing to open data URL:s in iOS/Safari.
NSString* stringUrl = @"data:text/html;base64,PGh0bWw+DQo8Ym9keT4NCjxzY3JpcHQgbGFuZ3VhZ2U9IkphdmFTY3JpcHQiPg0KZG9jdW1lbnQubG9jYXRpb249J2h0dHA6Ly93d3cuZ29vZ2xlLmNvbSc7DQo8L3NjcmlwdD4NCjwvYm9keT4NCjwvaHRtbD4=";
NSURL* url = [NSURL URLWithString:stringUrl];
NSLog(@"Got url: %@", url);
const BOOL STATUS = [UIApplication.sharedApplication openURL:url];
NSLog(@"STATUS: %d", STATUS);
This is supposed to open Safari on an iOS device. The resulting page would be:
<html>
<body>
<script language="JavaScript">
document.location='http://www.google.com';
</script>
</body>
</html>
However openURL fails, STATUS returns NO/0. How do we fix this?