Make -[NSData hexString] a public API
| Originator: | nicolas.bouilleaud | ||
| Number: | rdar://19324941 | Date Originated: | 2014-12-22 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 8.2 |
| Classification: | Feature | Reproducible: | Always |
Summary: There’s no Apple-provided NSData-to-hexadecimal conversion API, and developers have been writing their own. In fact, even Apple engineers have rewritten it a dozen times. Steps to Reproduce: Search the docs for “-[NSData hexString]” Expected Results: Find such a method. Actual Results: Nothing :( Version: iOS 8.2b2 Notes: Ideally, “hexString”, “ “lowercaseHexStringWithoutSpaces” and “ uppercaseHexStringWithoutSpaces” would be public. See attached file for sample duplicates of this behaviour found in Apple-provided frameworks: this isn’t just needed by third-party devs, but also by Apple developers. Configuration: iOS Simulator 8.2
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Attached file
(lldb) po [@"Hello World" dataUsingEncoding:4] <48656c6c 6f20576f 726c64>
(lldb) po [[@"Hello World" dataUsingEncoding:4] lowercaseHexStringWithoutSpaces] 48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] uppercaseHexStringWithoutSpaces] 48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] CKHexString] 48656c6c 6f20576f 726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] MCHexString] 48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] CKUppercaseHexStringWithoutSpaces] 48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] hexString] 48656c6c 6f20576f 726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] mf_copyHexString] 48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] aa_hexString] 48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] hexEncoding] 48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] MSHexString] 48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] __imHexString] 48656C6C6F20576F726C64