ios - iCloud 文档选择器 : App folders are disabled on import
<p><p>我在尝试从 iCloud 导入时遇到应用文件夹被禁用的问题,请参见下图:</p>
<p> <a href="/image/7KFey.jpg" rel="noreferrer noopener nofollow"><img src="/image/7KFey.jpg" alt="My App iCloud import"/></a> </p>
<p>我检查了谷歌驱动器的 iCloud 导入,它没有被禁用,如下图所示:</p>
<p> <a href="/image/43rfG.jpg" rel="noreferrer noopener nofollow"><img src="/image/43rfG.jpg" alt="Google Drive iCloud import"/></a> </p>
<p>我需要从其他应用的文件夹中获取文档,我做错了什么?</p>
<p>这是我在 info.plist 中的当前设置:</p>
<p> <a href="/image/BCKoG.png" rel="noreferrer noopener nofollow"><img src="/image/BCKoG.png" alt="My info.plist"/></a> </p>
<p>代码:</p>
<pre><code>UIDocumentPickerViewController *documentPicker = [ initWithDocumentTypes:@[@"public.item"]
inMode:UIDocumentPickerModeImport];
documentPicker.delegate = self;
documentPicker.modalPresentationStyle = UIModalPresentationFormSheet;
;
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>你需要在 UIDocumentPickerViewController 中添加 Utils</p>
<pre><code>UIDocumentPickerViewController *picker=[
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];
</code></pre></p>
<p style="font-size: 20px;">关于ios - iCloud 文档选择器 : App folders are disabled on import,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/34306818/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/34306818/
</a>
</p>
页:
[1]