mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Update uYouPlusSettings.xm
This commit is contained in:
parent
9950cc2200
commit
51a3522ee7
1 changed files with 3 additions and 1 deletions
|
|
@ -250,8 +250,10 @@ extern NSBundle *uYouPlusBundle();
|
|||
// Import Settings functionality
|
||||
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.text"] inMode:UIDocumentPickerModeImport];
|
||||
documentPicker.allowsMultipleSelection = NO;
|
||||
__weak typeof(self) weakSelf = self;
|
||||
documentPicker.didPickDocumentHandler = ^(NSArray<NSURL *> * _Nonnull urls) {
|
||||
if (urls.count > 0) {
|
||||
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||
if (strongSelf && urls.count > 0) {
|
||||
NSURL *url = urls.firstObject;
|
||||
NSError *error = nil;
|
||||
NSString *settingsString = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&error];
|
||||
|
|
|
|||
Loading…
Reference in a new issue