We’re developing an iOS app. One requirement we have is, get the country of the user location to enforce restrictions in the app. One solution we’re thinking about is to gather the IP address and use it with a Geo-localization service to get the country. One partner told us that this kind of solution violates Apple policies. Could someone confirm this statement? Or, someone knows another way to gather just the country where the device user is located?
Use the Apple-provided location services to find the location of the user. It's by far more accurate than geocoding from IP addresses, it doesn't require a third party service (or your own service) and it provides an estimated Latitude and Longitude for the user that you can use on a map or similar.
Using the Apple-provided location services is only part of the solution. Since location services does not return a country you will need to use a service that takes the latitude and longitude to determine countries nearby. I have used this before for other purposes, but querying something like this web service with the latitude and longitude should return you a country nearby.
Apple has a reverse Geocoder API now CLGeocoder. It will convert longitude and latitude to a user-friendly representation. I would use the location services and CLGeocoder to get this information, so you won't have any problems later and don't need any third party API's.
You could use Google Reverse Geocoding API to get the country named based on the user location coordinates