请教一个 Sparkle 2 的 appcast.xml 问题

191 天前
 Livid

具体需要做什么设置,才能让每次检查更新的时候可以显示一个这样的 release notes 呢?这个 release notes 可以从一个远程服务器上加载么?

貌似如果只有 sparkle:fullReleaseNotesLink 是不够的:

https://opensource.planetable.xyz/planet-insider/appcast.xml

1318 次点击
所在节点    Xcode
3 条回复
FaiChou
191 天前
https://sparkle-project.org/documentation/publishing/#publishing-an-update

## Embedded release notes

```
<item>
<title>Version 2.0 (2 bugs fixed; 3 new features)</title>
<link>https://myproductwebsite.com</link>
<sparkle:version>2.0</sparkle:version>
<description><![CDATA[
<h2>New Features</h2>
...
]]>
</description>
...
</item>
```
vitovan
191 天前
不懂强答:

https://sparkle-project.org/files/sparkletestcast.xml

官方的 Release Notes 是放在了 description 里,没见你的 xml 有这个东西呢?

https://opensource.planetable.xyz/planet-insider/appcast.xml



另外那个 sparkle:fullReleaseNotesLink 是整个的更新历史,对于单独某个版本应该是 sparkle:releaseNotesLink ?
Livid
191 天前
终于试出来了。自己解答一下:

1. 可以从远程服务器上加载,需要 appcast.xml 里有 sparkle:releaseNotesLink 这个元素。但是这个远程页面的 CSS 和 JS 貌似都不会生效:



https://opensource.planetable.xyz/planet-insider/appcast.xml

需要一个非常纯粹的只有 <li> 元素的 HTML 页面。

2. 可以用 xmlstarlet 来给 appcast.xml 加这个元素:

brew install xmlstarlet
xmlstarlet ed --inplace \
-s "/rss/channel/item" -t elem -n "sparkle:releaseNotesLink" -v "http://example.com/release-notes" \
appcast.xml

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/986787

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX