URL scheme is not working
When I am running below code under IOS 9.2, I can't make quora run:
I tried 'quora://' in Launcher, it worked. So the URL should be right.
I remembered long ago(maybe IOS 8.x, not sure) the URL scheme worked.
I'm using Pythonista 1.5 on iPhone 6S.
Will anybody help? Thanks
import webbrowser webbrowser.open('quora://')
Works as expected for me.
@ccc May I have your Pythonista version, IOS version and device type? Thanks
Pythonista version 1.6 (160037) on iOS 9.2 on an iPad3,4.
@ccc Thanks. I tried the code on my friend's IOS9.2 IPhone, it also worked.
Tried to uninstall Pythonista and reinstall, with no luck. I even reseted my phone's settings, still with no luck.
Notice there is change on URL scheme on IOS9:Querying URL Schemes With canOpenURL.
With bellow code:
import webbrowser print webbrowser.can_open('pythonista://') webbrowser.open('pythonista://')
I got False result to any known URLs. Seems the result matches with that been told in the link.
I remember I used a loop to check 'com.slovoed.api.%d' % i URL some time ago. This may cause False result of webbrowser.can_open(), but it should not cause webbrowser.open() fail.
In version 1.5,
can_openis "throttled" on iOS 9, so if you previously used it in a loop, it's possible that Pythonista got "blacklisted", and
False– in which case
open()also fails. In the next update,
can_open()is deprecated, and
open()should not be affected by this "blacklisting".
@omz Thanks for the information. That should be the cause.