Changed openURL logic to be more updated/proper for iOS