6

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.

palaniraja
  • 10,432
  • 5
  • 43
  • 76

5 Answers5

1

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

JustSid
  • 25,168
  • 7
  • 79
  • 97
  • Not true anymore with iOS 16 and macOS Ventura. See my answer below. https://stackoverflow.com/a/76245636/265940 – Gerry Shaw May 14 '23 at 03:08
1

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

Matthew Frederick
  • 22,245
  • 10
  • 71
  • 97
0

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>
irom1
  • 9
  • 2
0

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.

lukeloewe
  • 1
  • 1
  • You can use https instead of weather: on the current iOS and macOS versions as the app supports Universal Links now. – Gerry Shaw May 14 '23 at 03:11
0

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.

Gerry Shaw
  • 9,178
  • 5
  • 41
  • 45