The article is written in Objective-C
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#import <Foundation/Foundation.h>

int main(void)
{
	@autoreleasepool
	{
		NSFileHandle *_stderr = [NSFileHandle fileHandleWithStandardError];
		NSString *string = @"hello, world\n";
		NSData *data = [string dataUsingEncoding:[NSString defaultCStringEncoding]];
		[_stderr writeData:data];
	}
	return EXIT_SUCCESS;
}