我正在尝试UIDocument使用a 导出我的子类UIDocumentPickerViewController.子类将数据写入a FileWrapper并且其UTI符合com.apple.package.
但是,所提供的文档选择器显示"iCloud Drive中的文档无法使用,因为iCloud Drive设置已禁用."

正如我从导出的容器包中看到的那样,文档已成功写入缓存.
当我更改文档子类和自定义UTI以符合单个文件(例如public.plain-text)时,文档选择器工作正常,我可以导出文件.所以问题似乎与文档类型或导出的UTI有关.
我做错了什么或这是一个错误?
的Info.plist
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>Custom Doc</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.zxzxlch.documentsandbox.customdoc</string>
</array>
<key>LSTypeIsPackage</key>
<true/>
</dict>
</array>
...
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>com.apple.package</string>
</array>
<key>UTTypeDescription</key>
<string>Custom Doc File</string>
<key>UTTypeIdentifier</key>
<string>com.zxzxlch.documentsandbox.customdoc</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>zzz</string>
</array>
</dict>
</dict>
</array>
Run Code Online (Sandbox Code Playgroud)
CustomDocument.swift
private let textFilename = "contents.txt"
class CustomDocument: UIDocument {
var content = "Test"
override func load(fromContents contents: Any, …Run Code Online (Sandbox Code Playgroud) 考虑以下:
view.html.erb:
<%= make_backwards do %>
stressed
<% end %>
Run Code Online (Sandbox Code Playgroud)
helper.rb:
def make_backwards
yield.reverse
end
Run Code Online (Sandbox Code Playgroud)
视图呈现stresseddesserts而不是仅仅desserts.如何在yield不渲染代码块的情况下使用内容?