【问题标题】:Apple Files Application "Raname" file/folder functionality not work in file provider extentionApple 文件应用程序“重命名”文件/文件夹功能在文件提供程序扩展中不起作用
【发布时间】:2018-02-05 11:27:13
【问题描述】:

当重命名 Apple Files 应用程序 vi 文件提供程序扩展中的任何项目不起作用时,它会显示以下错误

请求的操作无法完成,因为该功能是 不支持。

在我的FileProviderItem 课程中,我将功能设置如下

    var capabilities: NSFileProviderItemCapabilities {
        return .allowsAll
    }

如何通过我的文件提供程序扩展名重命名苹果文件应用程序中的文档?

【问题讨论】:

    标签: ios swift3 swift4 fileprovider-extension


    【解决方案1】:

    我没有在我的项目中实现此功能。 但是我相信你应该重写该方法

    func renameItem(withIdentifier itemIdentifier: NSFileProviderItemIdentifier, 
             toName itemName: String, 
    completionHandler: @escaping (NSFileProviderItem?, Error?) -> Void)
    

    在你的 NSFileProviderExtension 中。

    请参考: https://developer.apple.com/documentation/fileprovider/nsfileproviderextension/2882095-renameitem

    -nls

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-05
    • 1970-01-01
    • 2014-04-10
    • 1970-01-01
    • 2011-10-10
    相关资源
    最近更新 更多