Contents

getAuthorizationStatus(forPhoneNumber:completion:)

Returns the current authorization status for a phone number without presenting any UI.

Declaration

class func getAuthorizationStatus(forPhoneNumber phoneNumber: String, completion completionHandler: @escaping  @Sendable (CTCellularPlanStatusAuthorization, (any Error)?) -> Void)
class func authorizationStatus(forPhoneNumber phoneNumber: String) async throws -> CTCellularPlanStatusAuthorization

Parameters

  • phoneNumber:

    A phone number in T REC E (for example, +15550001234).

  • completionHandler:

    A closure the framework calls with the current authorization status and any error that occurs.

Discussion

Call this method before calling getHintForPhoneNumber(_:completion:) to check whether the person already approved your app’s request to check cellular plan status for their phone number.

The completion handler receives the same CTCellularPlanStatusAuthorization value as requestAuthorization(forPhoneNumber:completion:), but without presenting UI.