Created
June 28, 2022 20:10
-
-
Save petermolnar-dev/f59e8073de7d281081ee25dfeef0ec56 to your computer and use it in GitHub Desktop.
Detect the country without geolocation, from the Contacts framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Contacts | |
class CountryDetector { | |
func detectCountryWithoutLocation() -> String { | |
CNContactsUserDefaults.shared().countryCode | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment