Following regulatory changes in countries such as the European Union (Digital Markets Act) and South Korea (Telecommunications Business Act), with additional enforcement expected in further countries, Apple designed an eligibility system for determining the user's physical location, and therefore which features must be enabled for them. Early parts of this appeared in iOS 16.2 to comply with South Korea's TBA, with the most notable use of this system coming in iOS 17.4 to comply with the EU's Digital Markets Act.[1] While primarily for regulatory compliance, some non-regulatory features are rolled out using this eligibility system.
countryd
/usr/libexec/countryd determines the user's physical country based on multiple characteristics.
Quoting from man countryd
:
Receives country code updates from user location, mobile country code (when available) and nearby 802.11d wifi access points. This information is then stored in a cache and used to compute a country code estimate which combines both the on-device code computed from local sensors, and answers about which country nearby devices believe they are in.
Location signals are searched the following order. They are sorted in an order of strongest to weakest signal. The strongest signals are expected to be the most accurate to the user's true physical location, not the user's specified country or the country of purchase, and most difficult to spoof.
The following list may be incomplete. It should, however, be accurate to the weight each item has in the final decision.
- Last GPS coordinates received from Location Services
- Mobile country code (MCC) of cell towers found around the device
- Country identifier of Wi-Fi SSIDs broadcasting around the device
- MCC of SIM cards in the device, and eSIMs enrolled on the device
countryd uses a mix of all signals to decide which country is the most likely physical location of the device.
eligibilityd
/usr/libexec/eligibilityd uses the following signals to determine whether the device is eligible for country-specific features to be enabled. Which are used to determine eligibility of each domain is dependent on the com.apple.MobileAsset.OSEligibility configuration plist asset received by the device.
- The device model family (e.g. iPhone)
- Whether the device is a Chinese-market model
- The regulatory country, as determined by countryd
- Device model number region (doesn't cover all countries uniquely)
- The country or region specified by the user in Settings
- The country or region of the user's Apple ID payment method (the Apple Media Services storefront)
Features of the system needing to determine the region of the device use os_eligibility
functions to do so, which make XPC calls to eligibilityd. These are implemented in libsystem_eligibility.dylib
.
Each domain can define a grace period in seconds. This grace period will begin when the eligibility of a domain no longer matches. At the end of the grace period, the domain will be disabled. Currently, a grace period of 30 days is implemented for DMA features.[2]
There is an internal tool named eligibility_util
on non-customer builds of iOS, referenced in part of an open-source release for macOS 14.4.[3]
Domains
The following domains exist as of iOS 17.4. Most domains are named after the corresponding chemical element, offset by one. It is possible this is an attempt to obscure the corresponding purpose of each domain.
European Union and territories | European Economic Area | Russia | United States | South Korea |
Enum index | Domain | Introduced | Behavior | Device classes | Located countries | Billing countries | Model regions | Grace period |
---|---|---|---|---|---|---|---|---|
1 | Lot X | 17.4 | ? | iPad | EU | Any | None | |
2 | Hydrogen | 17.4 | Install marketplace-distributed apps | iPhone | EU | Any | None | |
3 | Helium | 17.4 | Update/restore marketplace-distributed apps | iPhone | EU | Any | 30 days | |
4 | Lithium | 17.4 | Update/restore web browser engine host apps | iPhone | EU | Any | 30 days | |
5 | Beryllium | 17.4 | Disabling Home Screen Web Apps | iPhone | None | Any | None | |
6 | Boron | 17.4 | Update/restore embedded web engine apps | iPhone | EU | Any | 30 days | |
7 | Carbon | 17.4 | Install web browser engine host apps | iPhone | EU | Any | None | |
8 | Nitrogen | 17.4 | Web browser choice prompt on first launch of Safari | iPhone | EU | Any | None | |
9 | Oxygen | 17.4 | ? | iPhone | EEA | Any | None | |
10 | Fluorine | 17.4 | ? | iPhone | EEA | Any | None | |
11 | Neon | 17.4 | ? | iPhone | EEA | Any | None | |
12 | Sodium | 17.4 | Contactless payment apps can use host card emulation (HCE) | iPhone | EEA | Any | None | |
13 | Magnesium | 17.4 | (Unknown - found in nfcd) | iPhone | EEA | Any | None | |
14 | Aluminium | 17.4 | Contactless payment apps can become default (opens on double-clicking side button) | iPhone | EEA | Any | None | |
15 | Silicon | 17.4 | Default contactless payment apps can be used | iPhone | EEA | Any | None | |
16 | Phosphorus | 17.4 | Apps permitted to use external purchase links | iPhone | EU | EU | Any | 30 days |
iPhone, iPad | Any | Russia | Any | |||||
iPhone, iPad | Any | United States | Any | |||||
iPhone, iPad | Iceland, Liechtenstein, Norway | Iceland, Liechtenstein, Norway, Austria | Any | |||||
17 | Sulfur | 17.4 | Apps permitted to use approved third-party billing | iPhone | EU | EU | Any | 30 days |
iPhone, iPad | South Korea | Any | Any | |||||
18 | Chlorine | 17.4 | Device and app analytics | iPhone | EU | Any | None | |
19 | Argon | 17.4 | Install apps distributed via the web | iPhone | EU | Any | None | |
20 | Potassium | 17.4 | Update/restore apps distributed via the web | iPhone | EU | Any | 30 days | |
21 | Calcium | 17.4 | Adds "(China)" suffix to Hong Kong, Macao, and Taiwan[4][5] | — | China (green-tea) | — | ||
22 | Scandium | 17.4 | ? | iPhone | EU | Any | None | |
23 | Titanium | 17.4 | Install embedded web engine apps | iPhone | EU | Any | None | |
— | Podcasts Transcripts | 17.4[6] | Enables machine learning transcripts of podcasts | Any | Any except Belarus, Russia | Any except Belarus, China, Russia | Any except China (CH) | — |
Domains 24 to 119 have constants defined in eligibilityd, filling out the remainder of chemical elements, but these are not referenced by anything. There is also a domain named TEST
, with index 120, that will only activate if os_variant_has_internal_content("com.apple.eligibilityd")
is true.
External Links
- Europe:
- Update on apps distributed in the European Union
- Using alternative payment options on the App Store in the European Union
- HCE-based contactless transactions for banking and wallet apps in the European Economic Area
- Using alternative browser engines in the European Union
- About the browser choice screen in iOS 17
- Distributing dating apps in the Netherlands
- United States:
- Asia:
References
- ^ https://9to5mac.com/2023/04/25/ios-16-restrict-features-based-on-location/
- ^ https://www.theverge.com/2024/3/7/24093437/apple-iphone-third-party-app-store-dma-eu
- ^ https://github.com/apple-oss-distributions/ICU/blob/de296b44597bf6855343b5b1e527886240deb0f8/icuSources/common/putil.cpp#L2610
- ^ https://github.com/apple-oss-distributions/ICU/blob/de296b44597bf6855343b5b1e527886240deb0f8/icuSources/common/locdspnm.cpp#L920-L953C7
- ^ https://github.com/apple-oss-distributions/ICU/blob/de296b44597bf6855343b5b1e527886240deb0f8/icuSources/data/region/en.txt#L302-L307
- ^ https://www.apple.com/newsroom/2024/03/apple-introduces-transcripts-for-apple-podcasts/