Skip to content

Instantly share code, notes, and snippets.

@shepting
Created March 29, 2013 18:38
Show Gist options
  • Save shepting/5272708 to your computer and use it in GitHub Desktop.
Save shepting/5272708 to your computer and use it in GitHub Desktop.
Basic app to exemplify a command-line Objective C app.
#!/usr/bin/env bash
# Compile
clang objc_program.m -o program -ObjC -std=c99 -framework Foundation
# Run
./program
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
NSLog(@"Hello world");
NSDictionary *details = @{@"key1": @"Value8492",
@"key2": @"Value912784"};
NSLog(@"Model data: %@", details);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment