Skip to content

Commit 6df9266

Browse files
Merge pull request #259 from Countly/carrierName-fix
Fixed carrier name '--' static value issue on deprecated calls from iOS 16.4 version
2 parents 325eb25 + 267f20a commit 6df9266

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Added a call to enroll users to A/B tests when getting a remote config value: 'getValueAndEnroll'
44
- Added a call to enroll users to A/B tests when getting all remote config values: 'getAllValuesAndEnroll'
55

6+
- Fixed sending '--' as carrier name due to platform changes from iOS version 16.4. This version and above will now not send any carrier information due to platform limitations.
67
- Mitigated an issue where users could not enroll to an A/B tests if enrollment request has failed
78

89
## 23.8.2

CountlyDeviceInfo.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,15 @@ + (NSString *)carrier
240240
#if (!TARGET_OS_MACCATALYST)
241241
#pragma GCC diagnostic push
242242
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
243-
return CountlyDeviceInfo.sharedInstance.networkInfo.subscriberCellularProvider.carrierName;
243+
//Note: "carrierName" is deprecated and returns '--' value for apps that are built with the iOS 16.4 SDK or later.
244+
if (@available(iOS 16.4, *))
245+
{
246+
return nil;
247+
}
248+
else
249+
{
250+
return CountlyDeviceInfo.sharedInstance.networkInfo.subscriberCellularProvider.carrierName;
251+
}
244252
#pragma GCC diagnostic pop
245253
#endif
246254
#endif

0 commit comments

Comments
 (0)