我正在使用该方法
File.Copy(url.Path, localAppDataPathWithFile)
在类AppDelegate.cs中的方法OpenUrl中(我使用Xamarin进行开发)。 这在 iOS 12 及更低版本中工作,不幸的是在 iOS 13 中我遇到了以下异常:
System.IO.FileNotFoundException: /private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Downloads/catalog.zip does not exist
当我之前检查文件是否存在( File.Exists(url.Path) )时,我得到了 true。
有谁知道如何解决这个问题或者 iOS 13 发生了什么变化?
最佳答案
我可以通过将 info.plist 键“LSSupportsOpeningDocumentsInPlace”从 true 设置为 false 来解决该问题。
关于c# - 在 iOS 13 中访问(File.Copy)共享文件失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58408239/