【问题标题】:iCloud Document Picker: App folders are disabled on importiCloud 文档选择器:应用文件夹在导入时被禁用
【发布时间】:2015-12-16 08:10:10
【问题描述】:

我在尝试从 iCloud 导入时遇到应用文件夹被禁用的问题,请参见下图:

我检查了谷歌驱动器的 iCloud 导入,它没有被禁用,如下图所示:

我需要从其他应用的文件夹中获取文档,我做错了什么?

这是我在 info.plist 中的当前设置:

代码:

UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.item"] 
                  inMode:UIDocumentPickerModeImport];

documentPicker.delegate = self;

documentPicker.modalPresentationStyle = UIModalPresentationFormSheet;

[self presentViewController:documentPicker animated:YES completion:nil];

【问题讨论】:

    标签: ios objective-c xcode icloud uidocumentpickervc


    【解决方案1】:

    你需要在 UIDocumentPickerViewController 中添加 Utils

    UIDocumentPickerViewController *picker=[[UIDocumentPickerViewController alloc] 
          initWithDocumentTypes: @[(__bridge NSString *) kUTTypeContent,
                                   (__bridge NSString *) kUTTypeData,
                                   (__bridge NSString *) kUTTypePackage,
                                   (__bridge NSString *) kUTTypeDiskImage,
                                   @"com.apple.iwork.pages.pages",
                                   @"com.apple.iwork.numbers.numbers",
                                   @"com.apple.iwork.keynote.key"] inMode:UIDocumentPickerModeImport];
    

    【讨论】:

    • 我无法在 iOS 9 中导入文档,您知道发生了什么吗?
    • @BryanPosas 你能解释一下关于导入的一点吗?你要导入什么样的文件?
    • 我发现了我的问题,如果您在登录您的 iCloud 帐户后不合并,文档将在 iCloud 文档选择器中加载时卡住
    • 另一个问题,有一些keynote项无法检索,文档选择器委托返回一个带有斜线的url some/path/to/file/keynote.key/和url这种格式不能检索,有的能检索,有的不能。你以前遇到过这个问题吗? Dropbox 可以检索导致上述问题的相同文件,也可以将其成功上传到他们的服务器中
    猜你喜欢
    • 2019-05-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-19
    • 1970-01-01
    • 2014-11-22
    • 1970-01-01
    • 2015-05-31
    • 2021-08-14
    相关资源
    最近更新 更多