Last active
August 29, 2015 14:24
-
-
Save mikeabdullah/af8be11f4aa1ac7b6234 to your computer and use it in GitHub Desktop.
Parsing a .webloc file
This file contains hidden or 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
- (NSURL *)URLFromWeblocFileData:(NSData *)data { | |
NSDictionary *dict = [NSPropertyListSerialization propertyListWithData:data | |
options:NSPropertyListImmutable | |
format:NULL | |
error:NULL]; | |
NSString *urlString = dict[@"URL"]; | |
return [NSURL URLWithString:urlString]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment