Creating a hex dump in Objective-C

I want to create a hexadecimal dump of a binary on Mac OS X.

In all Mac OS applications, when you go to / Contents / Resources /, there is a file (or more) with the same name as the application.

I want to write an application in Objective-C that can read this file and convert it to some kind of hexadecimal dump, for example, using the hexdump terminal.

Does anyone know a way to create such a hex dump using Objective-C? (or perhaps an open source hex editor written in Objective-C?)

Thanks in advance.

+4
source share
2 answers

Use NSData to read the file as raw data, and then display the bytes you need (for example, using a format string ).

+1
source

Hex Fiend integrates if it's the editor you need.

+3
source

All Articles