7 Replies
      Latest reply on Aug 23, 2019 1:55 AM by eskimo
      mungbeans Level 1 Level 1 (10 points)

        All the examples I've seen of using pushes use [NSData description] to obtain the push token in order to send to the server.

        However when an app is built with XCode 11 the result of this is different than when built with Xcode 10, similarly for [NSString stringWithFormat].

         

         

        Example:

         

         

            NSData* theToken = ...
            ....
            NSString* stringWithFormat = [NSString stringWithFormat"@"%@", theToken];
            NSString* description = [theToken description];

         

        When compiled with Xcode 10 and run, the results for both are :

         

         

            @"<44154da7 32345001 53106883 ffc1071f a59c0d24 a70871e5 aa8dbb41>"

         

         

        However when compiled with Xcode 11 and run the results are:

         

         

            @"{length =32, bytes = 0x44154da7 32345001 53106883 ffc1071f ... a70871e5 aa8dbb41}"

         

         

        (This latter result does not occur if the code is compiled with Xcode 10 and then run on iOS 13.)

         

         

        How can you convert the NSData to NSString when compiled with Xcode 11 that will give the same results as XCode10, or how can you extract just the bytes section into an NSString from the return result if compiled with Xcode 10?