-3

I'm new to the IOS (swift) world. If someone can give me an idea it would be wonderful. I'm trying to push notifications to all users within a radius. For example, if I'm in a park I want to send a notification to the people using my app in that specific park. If I move the notification is sent to devices on my new location.

I understand that "UNLocationNotificationTrigger" triggers notifications if a user enters in a determinate region, but that's not really what I want.

Thank you for your help

Gaby
  • 25
  • 1
  • 5

1 Answers1

1

This should be done on the server side. You must track the location of all devices. And when necessary, you calculate the distance of each user to a particular device and send them a notification. You should not load one device with such logic.

  • Thank you for your answer. Yes, I was afraid of storing users' locations on my backend. I know it violates their privacy. – Gaby Jun 04 '20 at 21:08
  • Then,on backend you could store maybe some kind of curent area of user, and work with that area. You track location of user inside app, and you dynamically change his *curent area* – Alexey Kolchedanstev Jun 04 '20 at 21:16