how to get alerts from Weather kit? (rain now, tornado etc)

150 views Asked by At

I setup notifications in my swiftui app, I tested them with the new Push notification console from apple and THEY ARE WORKING.

The only thing I don't understand is HOW TO GET THE ALERT from weather kit.

I know they have this endpoint to get an alert,

https://developer.apple.com/documentation/weatherkitrestapi/get_api_v1_weatheralert_language_id

but I want alerts in real time, like a webhook and I'll push the notification when it happens.

tornado notification->weatherkit sends notificatin to my app->my app catches the payload and shows the notification

how can I do this?

1

There are 1 answers

1
Tanvir A On

Go to Settings > Privacy & Security > Location Services > Weather, then tap Always.

Turn on Precise Location to receive the most accurate notifications for your current location.