Possible to launch Apple's default weather app from my application?

5.4k views Asked by At

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.

http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899

It would be great if someone confirm or give me a lead if it is possible.

5

There are 5 answers

1
JustSid On BEST ANSWER

Its not possible, the weather app doesn't have a known URL scheme and I dubt that it has an unknown one.

0
irom1 On

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>

1
Matthew Frederick On

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):

app lookup

Akosma iPhone URL Scheme Wiki

1
Gerry Shaw On

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.

2
lukeloewe On

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.