Graham Lee and several others pointed me to two standard solutions: you can use the linker to embed the files in the __text section of the Mach-O binary, or you can use a tool called
xxdto convert the file’s data to a C array, and include that directly in your source code. I ended up with the second solution, which I will explain further below. I didn’t investigate using the linker, but Quinn “The Eskimo!” assures me that you use
getsectXXXAPIs to extract the data at run time. (Update: Daniel Jalkut has a post describing this approach.)
Stay up-to-date by subscribing to the Comments RSS Feed for this post.