how to specify a region for iOS app to operate in

126 views Asked by At

I currently have an app that report road hazards, and sends an email to the relevant local authority. Is there any way to use the region manager functions in Xcode to specify a rectangle which the app will function in, but if the user accesses it outside this area, then the app will not send the email.

1

There are 1 answers

4
Raptor On BEST ANSWER

There are several ways to do so:

  1. Detect user's location, requires user to allow & turn on Location Service. May consume a lot of battery as you'll have to update user's location in background.

  2. Detect user's data IP and cross-check IP-Country database. This cannot be done in background as Apple does not allow this ( Apple allows background task for location & music only ). Thus, user's location can only be updated when user opens the App.