3 Replies
      Latest reply: Nov 2, 2016 3:29 AM by eskimo RSS
      vsrinivasan Level 1 Level 1 (0 points)

        I am doing some R&D to detect whether we can detect sim swap in the phone. From my tests it looks like this property returns different values for different SIM cards. Will there be any issues using this API to detect SIM card change?

         

        Here is the sample code

         

              let sub = CTSubscriberInfo.subscriber()

                if let token = sub.carrierToken {

                  

                    let carrierToken:NSString? = NSString(data: token, encoding: NSUTF8StringEncoding)

                    print(carrierToken)

                }

        • Re: Can carrierToken property of CTSubscriberInfo be used to detect SIM Swap?
          eskimo Apple Staff Apple Staff (7,530 points)

          The carrier token is not intended to be used as a mechanism to detect SIM changes.  Rather, it is intended to be used by carriers for their own authentication schemes.  Unless you’re working on behalf of a carrier, I recommend you steer clear of it.

          Two points:

          • Just FYI, on the devices here in my office the carrierToken property is always nil.

          • The format of the carrier token is not documented; you cannot, for example, assume that it’s a UTF-8 string, as you do in the code you posted.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"