How can i get the timestamp of when an application was compiled for iphone
At the moment I've got this method on my app delegate
- (NSDate*) compiledAt {
NSDateFormatter *k= [[NSDateFormatter alloc] init];
[k setDateFormat:@"MMM d yyyy HH:mm:ss"] ;
NSString *dateString = [[[NSString stringWithUTF8String:__DATE__] stringByAppendingString: @" "] stringByAppendingString:[NSString stringWithUTF8String:__TIME__]];
NSDate *d=[k dateFromString:dateString];
NSLog(@"%@",d);
[k release];
return d;
}
Which works but seems unnecessary given that all I really need is a constant that is defined automatically at compile time.