I'm testing a custom URL scheme in my app, and I'd like to add a homescreen icon that calls that url. Whenever I request my custom URL, it opens my app, and then reverts Safari's address bar to the previously shown URL.
I tried to skirt this issue by editing the properties of another URL, e.g.
But this fails because you can't edit the URL assigned to the homescreen app.
As a fallback, I thought about just having a bookmark to the application, so I tried to bookmark a website and then edit the URL like this:
but this fails because on the iOS simulator, you can't edit the URL of a bookmark (although you can do this on the device for some reason).
update: As tkanzakic points out, you can edit user-added bookmarks, just not the predefined bookmarks
Ideally, I'd like a homescreen app, but would settle for a bookmark instead.
Also, due to firewall restrictions, I can't connect this device to my Apple account, meaning I can't sync my Safari bookmarks either.
Ah, figured it out. You can get a webapp on the homescreen pointing to any URL by following these steps:
/Users/<USERNAME>/Library/Application Support/iPhone Simulator/6.1/Library/WebClips
URL
and Title
) as desired.When you next relaunch the simulator, you homescreen webapp will point to the new URL.
Optionally, you can change the icon.png to change the webapp's icon.
As a fallback, I thought about just having a bookmark to the application, so I tried to bookmark a website and then edit the URL like this:
- Open Safari
- Navigate to http://google.com
- Tap the action button, and then "Bookmark"
but this fails because on the iOS simulator, you can't edit the URL of a bookmark (although you can do this on the device for some reason).
That is not true, it is possible to change the URL a bookmark, check this article to see how you can do it. I have done this on the Simulator and on a Device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With