我正在构建一个包含 PowerPoint 演示文稿的 iOS 应用程序,这些演示文稿存储在服务器端。当用户从我的应用程序中选择一个演示文稿时,它需要在 PowerPoint iPad 应用程序中打开。我使用 powerpoint iPad 应用程序的 URL 方案来传递所选演示文稿的 url。但是 iPad 中的 PowerPoint 总是显示:
"The Server you are trying to access is not supported by this version of Office."
let urlString = "ms-powerpoint:https://kahanicloud.com/CustomPresentation/Download?id=58006a40775efb09d0200659&parentId=system-all-files&fileName=shared.pptx"
let DocUrl = URL(string: urlString)
let canOpen = UIApplication.shared.canOpenURL(DocUrl!)
if canOpen
{
UIApplication.shared.openURL(DocUrl!)
}
我尝试了上面的 Swift 代码来实现这个,但是失败了。
最佳答案
您没有为 Url 架构提供足够的参数。请尝试以下操作:
ms-powerpoint:ofe|u|https://kahanicloud.com/CustomPresentation/Download?id=58006a40775efb09d0200659&parentId=system-all-files&fileName=shared.pptx|a|App
您可以从 here 中获得所需参数的更多详细信息
关于ios - 无法使用 iOS 应用程序中的 Url 方案从 Web URL 打开 Microsoft PowerPoint iPad 应用程序中的 powerpoint 演示文稿,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40767463/