segmentio / analytics-ios

The hassle-free way to integrate analytics into any iOS application.
https://segment.com/libraries/ios
MIT License
402 stars 334 forks source link

Instance property used to get network.carrier has been deprecated #1048

Open gideonkylejeffrey opened 2 years ago

gideonkylejeffrey commented 2 years ago

In checking for my own purposes how Segment populates network.carrier, I found that the instance property used in https://github.com/segmentio/analytics-ios/blob/e35f1c984687f3216810145c8f1a8360fad20a72/Segment/Internal/SEGUtils.m#L368 - that is, subscriberCellularProvider - has been deprecated.

See documentation at https://developer.apple.com/documentation/coretelephony/cttelephonynetworkinfo/1616900-subscribercellularprovider (Apple recommends using serviceSubscriberCellularProviders instead).