Been going deep into how TikTok detects region/location on iPhones lately and honestly… I’m starting to think the whole “TikTok reads your SIM card directly” thing might be outdated now.
Back in the day on iOS (pre-iOS 16) you could pull SIM info using CTCarrier:
Problem is Apple basically killed this in iOS 16+:
https://developer.apple.com/documentation/coretelephony/ctcarrier
On modern iPhones it now returns empty values / nil / 65535.
So if you’re building a normal iOS app today using public APIs, you pretty much CANNOT reliably get real SIM data anymore.
At first I thought TikTok might be using private APIs through Objective-C runtime tricks (objc_msgSend etc) where apps dynamically call hidden methods without importing private headers. Technically possible. But realistically TikTok probably wouldn’t risk openly breaking Apple ToS at that scale. If Apple caught them using private telephony APIs that would be a massive issue.
Also ruled out a few other theories:
Curious if anyone else here has tested this deeper on newer iPhones/iOS versions.
Back in the day on iOS (pre-iOS 16) you could pull SIM info using CTCarrier:
- isoCountryCode
- mobileCountryCode
- mobileNetworkCode
Problem is Apple basically killed this in iOS 16+:
https://developer.apple.com/documentation/coretelephony/ctcarrier
On modern iPhones it now returns empty values / nil / 65535.
So if you’re building a normal iOS app today using public APIs, you pretty much CANNOT reliably get real SIM data anymore.
At first I thought TikTok might be using private APIs through Objective-C runtime tricks (objc_msgSend etc) where apps dynamically call hidden methods without importing private headers. Technically possible. But realistically TikTok probably wouldn’t risk openly breaking Apple ToS at that scale. If Apple caught them using private telephony APIs that would be a massive issue.
Also ruled out a few other theories:
- Phone number access → impossible publicly on iOS
- Reading cellular settings → private APIs only
- Locale/timezone/App Store storefront → useful signals but not real SIM data
Curious if anyone else here has tested this deeper on newer iPhones/iOS versions.