How to load web api result data every 3 sec?

json
swift

(Isaacraja15) #1

How to load web api json result data every 3 sec ?
I have realtime vehicles Position WebAPI, That api is every 3 sec lat long will update in tat api . so i need to get that latlong and pin in mapkit . How can i work that realtime feed , in the swift any option ?
or we will set api function every 3 sec ?


(Max Moiseev) #2

This is not Swift specific, but perhaps https://developer.apple.com/documentation/foundation/timer could help.