美文网首页Mac开发云集
Mac-每次获取新的值

Mac-每次获取新的值

作者: dev_wave | 来源:发表于2016-12-12 16:42 被阅读16次
    NSString *bundlePath = [NSBundle mainBundle].bundlePath;
    NSError *error = nil;
    NSDictionary *dict = [[NSFileManager defaultManager] attributesOfItemAtPath:bundlePath error:&error];
    NSUInteger number = [dict fileSystemFileNumber];
    NSLog(@"%tu",number);
    NSAlert *alert = [[NSAlert alloc] init];
    alert.messageText = [NSString stringWithFormat:@"%tu",number];
    [alert runModal];

每次安装都会获取一个新的value,可以用来做很多操作.

相关文章

网友评论

    本文标题:Mac-每次获取新的值

    本文链接:https://www.haomeiwen.com/subject/fdgmmttx.html