Skip to content

Instantly share code, notes, and snippets.

@gchaturvedi
Created October 17, 2015 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gchaturvedi/3dbc5339cce67ae4ab2e to your computer and use it in GitHub Desktop.
Save gchaturvedi/3dbc5339cce67ae4ab2e to your computer and use it in GitHub Desktop.
//
// main.m
// TimeAfterTime
//
// Created by Gaurav Chaturvedi on 10/17/15.
// Copyright © 2015 Gaurav Chaturvedi. All rights reserved.
//
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSHost *host = [NSHost currentHost];
NSString *hostStr = [host localizedName];
NSLog(@"My computer host name is %@", hostStr);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment