Carrier Info는 Android 및 iOS 기기에서 네트워크 유형, 네트워크 세대, 이동국가코드(MCC), 이동망코드(MNC) 등을 포함한 핵심 네트워크 및 장치 정보를 검색하는 Flutter 플러그인입니다. 다양한 플랫폼 간에 일관된 캐리어 정보에 접근할 수 있도록 하여 개발자가 네트워크 상태 또는 사용자 위치에 따라 앱을 적응시키는 데 도움을 줍니다. 이 패키지는 가볍고 pub.dev를 통해 Flutter 프로젝트에 쉽게 통합될 수 있으며, Android와 iOS 모두를 지원하여 크로스플랫폼 모바일 개발에 이상적입니다.
사용 사례
적응형 앱 동작을 위한 네트워크 유형 감지
MCC를 기반으로 사용자의 국가 식별
네트워크 세대에 따라 데이터 사용 최적화
운영자 데이터를 통한 위치 정보 기능 향상
지역별 콘텐츠 전달 구축
주요 기능
크로스 플랫폼 지원 (Android 및 iOS)
네트워크 유형 및 생성에 대한 액세스
MCC 및 MNC 검색
간단한 API 통합
경량이고 신뢰할 수 있음
적합한 대상
네트워크 인식이 필요한 모바일 앱
위치 기반 서비스
데이터 절약 기능
지역별 사용자 프로파일링
운영자 메타데이터가 필요한 앱
고려 사항
Android에서 적절한 권한이 필요합니다
장치 수준의 통신사 정보만 제한됨
운영자 데이터와 관련된 개인정보 보호 고려 사항
웹 또는 데스크톱 플랫폼에서는 사용할 수 없습니다
기반 운영체제 운송업자 API에 의존합니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
📱 Carrier Info
⚠️ IMPORTANT iOS 16.0+ NOTICE: Apple has deprecated CTCarrier starting with iOS 16.0. This means that most carrier-specific information (carrier name, country codes, network codes, etc.) will return nil or generic values on iOS 16.0 and later versions. This is an Apple platform limitation, not a plugin issue. See the iOS Limitations section for more details.
Carrier Info gets networkType, networkGeneration, mobileCountryCode, mobileCountryCode, e.t.c from both android and ios devices. It's a port from this js project and an improvement on the existing flt_telephony_info package.
IosCarrierData? carrierInfo = awaitCarrierInfo.getIosInfo();
// iOS 15.x and earlier - Full carrier information available
returns {
"carrierData": [
{
"mobileNetworkCode": "20",
"carrierAllowsVOIP": true,
"mobileCountryCode": "621",
"carrierName": "Airtel",
"isoCountryCode": "ng"
}
],
"supportsEmbeddedSIM": false,
"carrierRadioAccessTechnologyTypeList": ["LTE"],
"isSIMInserted": true,
"subscriberInfo": {
"subscriberCount": 1,
"subscriberIdentifiers": ["subscriber_id_here"],
"carrierTokens": ["token_here"]
},
"cellularPlanInfo": {
"supportsEmbeddedSIM": false
},
"networkStatus": {
"hasCellularData": true,
"activeServices": 1,
"technologies": ["LTE"]
},
"_ios_version_info": {
"ios_version": {...},
"ctcarrier_deprecated": false,
"deprecation_notice": "CTCarrier functionality is available on this iOS version."
}
}
// iOS 16.0+ - Limited carrier information due to CTCarrier deprecation
returns {
"carrierData": [
{
"mobileNetworkCode": null,
"carrierAllowsVOIP": null,
"mobileCountryCode": null,
"carrierName": null,
"isoCountryCode": null,
"_deprecated_notice": "CTCarrier is deprecated in iOS 16.0+. Carrier information is no longer available."
}
],
"supportsEmbeddedSIM": false,
"carrierRadioAccessTechnologyTypeList": ["LTE"],
"isSIMInserted": true,
"subscriberInfo": {
"subscriberCount": 1,
"subscriberIdentifiers": ["subscriber_id_here"],
"carrierTokens": ["token_here"]
},
"cellularPlanInfo": {
"supportsEmbeddedSIM": true
},
"networkStatus": {
"hasCellularData": true,
"activeServices": 1,
"technologies": ["LTE"]
},
"_ios_version_info": {
"ios_version": {...},
"ctcarrier_deprecated": true,
"deprecation_notice": "CTCarrier and CTSubscriber are deprecated in iOS 16.0+. Most carrier-specific information is no longer available for privacy and security reasons."
}
}
iOS Features
Available on All iOS Versions
SIM Detection
isSIMInserted: Boolean indicating if a SIM card is inserted and active
networkStatus: Real-time network connectivity information
carrierRadioAccessTechnologyTypeList: Current radio technology (2G, 3G, 4G, 5G)
Network Status
"networkStatus": {
"hasCellularData": true, // Cellular data available"activeServices": 1, // Number of active cellular services"technologies": ["LTE"] // Current radio access technologies
}
Subscriber Information (iOS 16.0+)
"subscriberInfo": {
"subscriberCount": 1, // Number of subscribers (dual SIM)"subscriberIdentifiers": ["subscriber_id"], // Subscriber identifiers"carrierTokens": ["token"] // Carrier authentication tokens
}
Cellular Plan Information
"cellularPlanInfo": {
"supportsEmbeddedSIM": true// eSIM support detection
}
iOS Version Detection
Use the _ios_version_info field to detect capabilities:
final iosInfo = awaitCarrierInfo.getIosInfo();
final versionInfo = iosInfo?.toMap()['_ios_version_info'] asMap<String, dynamic>?;
final isDeprecated = versionInfo?['ctcarrier_deprecated'] asbool? ?? false;
if (isDeprecated) {
// Handle iOS 16.0+ limitationsprint('SIM Inserted: ${iosInfo?.isSIMInserted}');
print('Network Status: ${iosInfo?.networkStatus?.hasCellularData}');
print('Radio Tech: ${iosInfo?.carrierRadioAccessTechnologyTypeList}');
} else {
// Full carrier information availableprint('Carrier: ${iosInfo?.carrierData?.first.carrierName}');
print('MCC: ${iosInfo?.carrierData?.first.mobileCountryCode}');
}
iOS Limitations
CTCarrier Deprecation (iOS 16.0+)
Starting with iOS 16.0, Apple has deprecated the CTCarrier class and related APIs for privacy and security reasons. This affects the following information:
❌ No longer available on iOS 16.0+:
Carrier name (carrierName)
Mobile country code (mobileCountryCode)
Mobile network code (mobileNetworkCode)
ISO country code (isoCountryCode)
VOIP allowance (carrierAllowsVOIP)
✅ Still available on iOS 16.0+:
SIM insertion detection (isSIMInserted)
Radio access technology types (carrierRadioAccessTechnologyTypeList)
Network status (networkStatus)
Subscriber information (subscriberInfo)
Cellular plan information (cellularPlanInfo)
Recommendations
Check iOS version: Use the _ios_version_info field to determine if you're running on iOS 16.0+ and handle the limitations accordingly.
Use available features: Focus on features that work across all iOS versions:
// These work on all iOS versionsfinal simInserted = iosInfo?.isSIMInserted ?? false;
final hasData = iosInfo?.networkStatus?.hasCellularData ?? false;
final radioTech = iosInfo?.carrierRadioAccessTechnologyTypeList ?? [];
Graceful degradation: Design your app to work without carrier-specific information on newer iOS versions.
Alternative approaches: Consider using network-based detection or user input for carrier information when needed.
Android alternative: For apps that require detailed carrier information, consider using the Android implementation which still provides full functionality.
New iOS Models
The plugin now includes enhanced models for iOS data:
IosCarrierData: Main container with all carrier information
CarrierData: Individual carrier information (nullable fields for iOS 16.0+)
SubscriberInfo: Subscriber and carrier token information
CellularPlanInfo: Cellular plan provisioning information
NetworkStatus: Real-time network connectivity status
Lots of PR's would be needed to make this plugin standard, as for iOS there's a permanent limitation for getting the exact data usage, there's only one way around it and it's super complex.