To view the file, run:
xxd filename | less
To use Vim as a hex editor:
Open the file in Vim.
Run :%!xxd (transform buffer to hex)
Edit.
Run :%!xxd -r (reverse transformation)
Save.
Open file with Xcode and press Command + Shift + J
Right click file name in
left pane
Open as -> Hex