1. I wonder why serviceSubscriberCellularProviders
is not
deprecated which has a returning type of CTCarrier
and CTCarrier
itself is deprecated. So what will happen exactly once CTCarrier
gets
removed?
2. What would happen if, for example CTCarrier
gets removed in iOS
17, and user with iOS 17 installs our old app or has the previous
version of the app that is using serviceSubscriberCellularProviders
?
Our usual pattern for removing an API is:
-
Deprecate the API.
-
Stub out the implementation. For example, in the UIDevice.name
property, we have it return a dummy value. This may or may not be gated by a linked-on-or-later check or an entitlement.
-
Remove the API from the SDK headers.
-
Remove the API implementation entirely.
That last step usually only happens during architecture changes — for example, when moving from Intel and Apple silicon on the Mac — because otherwise it prevents apps with conditional code from launching.
As to how things will pan out in this specific case, I can’t predict the future (alas!) and so I’m not going to comment on that.
3. We would really need to keep using this CTCarrier
class (we need
the mobileCountryCode
and mobileNetworkCode
fields) as we need to
identify mobile carrier used to connect to the internet, so we can
call a carrier specific API.
If you have a hard dependency on these values I recommend that you:
-
File a bug report with the details of this issue. Please post the bug number here, just for the record.
-
Make sure that the carrier you’re working with understands this risk. They may want to make changes or raise this issue with their contacts at Apple.
Is there anything else we are able to use for this ?
No. That’s what Deprecated with no replacement
means.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"