I'm strugling about the way how to code notifications for my weather aplication. I use data from my server that receives weather changing values from my own weather station and want to notify user of my app when eg strong wind will **** or temperature go under eg 3℃ etc. The weather station has 8 sensors so there is sometimes a lot of data changing in particular minute that i set to parse data from server and notify user about it. But the notifications only works only when app is on and couple minutes after locking display. So please what could i use strategy for the app to works even when the app sleeps ?
Weather Notifications
It seems your issue is not with notifications, but actually with the ability to get the weather data from your station.
Apps will suspend a short time after going to the background or the screen getting locked. Once suspended, they cannot perform any operations on the network (assuming you are using WiFi to get the data). While there are methods to wake up an app in the background at times, those methods are nowhere near the granularity you would need to detect weather alerts.
Outside of communicating with the weather station or the "server" via Bluetooth, it won't be possible to wake up your app for an even on the server.
To understand why, you may want to read about iOS Background Execution Limits