0

我正在尝试使用使用 Angular 8 PWA 生成的构建来创建 SharePoint Online 渐进式 Web 应用程序。我能够让服务人员和应用程序正常工作。但是,网络清单文件未正确加载。

我在 SharePoint 中创建了一个新的 ASPX 页面,并以这种方式添加了 webmanifest 文件:

<link rel="manifest" href="https://tenant.sharepoint.com/sites/SC/SiteName/mobile/SitePages/manifest.webmanifest" />

在 chrome 开发者工具中,manifest 文件总是等待下载:

没有这个,我在从移动设备浏览时无法获得“添加到主屏幕”功能。

4

1 回答 1

0

是的。SharePoint 支持清单文件。它不工作的原因被视为跨源请求。

在清单链接末尾添加 crossorigin="use-credentials" 解决了这个问题:

<link rel="manifest" href="./manifest.webmanifest" crossorigin="use-credentials" />
于 2019-10-21T13:48:49.027 回答