我正在使用 theos [application_swift] 开发一个应用程序,并希望在沙箱之外访问文件系统。
据我了解,将 [application_swift] 与 theos 一起使用应该可以让我访问沙箱外的文件,但我尝试使用 FileManager.default.fileExists(atPath:)
访问文件我喜欢,结果是找不到文件。
值得一提的是,我显然在运行 11.2 的越狱设备上运行。
我错过了什么吗?
最佳答案
我已经能够通过将 com.apple.private.security.no-container
添加到我的权利文件并使用 codesign 添加它们来解决这个问题。
codesign --entitlements app.entitlements -f -s "iPhone 开发者:xxxxxxxxxxxxxxxxx"MyApp.app
关于iOS - 在越狱设备上访问沙箱外的文件系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53028840/