Reputation: 10492
One of my client wants to open Apple's native weather app from our application. After few I don't see a possible way, unless we need to go with any 3rd party apps which provides custom url scheme.
It would be great if someone confirm or give me a lead if it is possible.
Upvotes: 6
Views: 6320
Reputation: 9378
At least with iOS 16.4 on device and in macOS Ventura you can open a URL like the following and it will act as a Universal Link and open the native Weather app showing weather close the given coordinate.
https://weather.apple.com/?lat=50.237&long=-122.022
I discovered this URL by using the Maps app on the simulator and long pressing the weather badge. This brings up a larger weather panel and if you tap that Maps.app tries to open the URL but fails on the simulator.
Upvotes: 1
Reputation: 1
If someone else is searching for an answer: weather://weather.apple.com/?lat=37.323&long=-122.03218 did it for me. This way you can link to a specific location.
Upvotes: 0
Reputation: 9
You can open the weather app with this URL: weather://
Here is a codepen demo I got to work: https://codepen.io/irom1/pen/KKeZBMW
<a href="weather://" target="_blank">Open weather</a>
Upvotes: 0
Reputation: 22305
The website handleOpenURL is an excellent resource for custom iOS URL schemes; use this link to search for the known Apple app schemes.
Unfortunately the weather app is not among them.
Another couple of sites with schemes (handleOpenURL seems to be the most complete, but it can't hurt to check the others):
Upvotes: 1
Reputation: 25318
Its not possible, the weather app doesn't have a known URL scheme and I dubt that it has an unknown one.
Upvotes: 1