Last active
December 12, 2015 02:49
-
-
Save mikeabdullah/4701971 to your computer and use it in GitHub Desktop.
Retrieving bookmark data's last known path
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
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 | |
#define NSURLPathKey @"_NSURLPathKey" | |
#endif | |
NSDictionary *values = [[NSURL resourceValuesForKeys:@[NSURLPathKey] | |
fromBookmarkData:bookmarkData] | |
NSString *path = [values objectForKey:NSURLPathKey]; | |
#undef NSURLPathKey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment