【发布时间】:2018-07-12 11:07:44
【问题描述】:
我想在我的 iOS 应用程序中使用一个文件,它是 iMessage 扩展名,这怎么可能?使用应用程序组/共享容器。请有人写几行。在我的应用程序中,我将数据保存到一个文件中,我想将其加载到我的 iMessage 扩展程序中。
let url = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
url.appendingPathComponent(PersistanceFileName)
我将此代码用于我的 iOS 应用程序,但我知道 iMessage 扩展程序无法打开它。那么解决办法是什么?
【问题讨论】: