OS and iOS Internals - Code Snippets
More Coming soon.
Note on compiling for iOS: I use the following shell script and call it "gcc-iphone":
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv7 -framework IOKit -framework CoreFoundation -F /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks -I /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest/Symbols/usr/include -L /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib -L /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system $*
It is straightforward to change the SDK version (you could put that in a variable). This makes it easier to compile from the command line or a Makefile, rather than mucking around with XCode projects..

Forum About the Book Notes News Code Samples Downloads Resources Get the book from Amazon dock