Created
September 29, 2019 03:50
-
-
Save TimOliver/ec972773a5de9e425a3c8cf6f8900c63 to your computer and use it in GitHub Desktop.
The necessary code to set up access to the document identifier of files in the iOS file system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <sys/stat.h> | |
chflags(filePath.UTF8String, UF_TRACKED); | |
NSURL *url = [NSURL fileURLWithPath:filePath]; | |
id value = nil; | |
[url getResourceValue:&value forKey:NSURLDocumentIdentifierKey error:nil]; | |
NSLog(@"%@", value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment