mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-22 02:38:45 -04:00
Update Settings.xm
This commit is contained in:

committed by
GitHub

parent
45991e71d8
commit
f4b911a0cd
@@ -688,7 +688,7 @@ static const NSInteger YTLiteSection = 789;
|
|||||||
// Import mode: Handle the import of settings from a text file
|
// Import mode: Handle the import of settings from a text file
|
||||||
NSString *fileType = [pickedURL resourceValuesForKeys:@[NSURLTypeIdentifierKey] error:&error][NSURLTypeIdentifierKey];
|
NSString *fileType = [pickedURL resourceValuesForKeys:@[NSURLTypeIdentifierKey] error:&error][NSURLTypeIdentifierKey];
|
||||||
|
|
||||||
if (UTTypeConformsTo((__bridge CFStringRef)fileType, kUTTypePlainText)) {
|
if (UTTypeConformsTo((__bridge CFStringRef)fileType, UTTypePlainText.identifier)) {
|
||||||
NSString *fileContents = [NSString stringWithContentsOfURL:pickedURL encoding:NSUTF8StringEncoding error:nil];
|
NSString *fileContents = [NSString stringWithContentsOfURL:pickedURL encoding:NSUTF8StringEncoding error:nil];
|
||||||
NSArray *lines = [fileContents componentsSeparatedByString:@"\n"];
|
NSArray *lines = [fileContents componentsSeparatedByString:@"\n"];
|
||||||
for (NSString *line in lines) {
|
for (NSString *line in lines) {
|
||||||
|
Reference in New Issue
Block a user