爱意满满的作品展示区。
wipbssldo

写了一个 App 包托管服务

  •  
  •   wipbssldo · Aug 9, 2021 · 2384 views
    This topic created in 1757 days ago, the information mentioned may be changed or developed.
    先来地址: https://github.com/E13Lau/Dragon-Li

    主要是用于团队内部移动端 CD 的一部分。

    Vapor 和 Web 页面都是边学边做的,所以项目比较粗糙。
    目前自己团队里面部署到内网一台打包的 Mac 上,还算满足需求。
    5 replies    2021-08-12 18:23:18 +08:00
    lework1234
        1
    lework1234  
       Aug 11, 2021
    晒出些 demo 图片更好了,已 star
    wipbssldo
        2
    wipbssldo  
    OP
       Aug 11, 2021
    @lework1234 感谢!好建议,周末准备部署个 demo 到 VPS 上。
    但是有个痛点我一直没解决,就是 Swift 服务端代码下我还不清楚怎么解压缩 IPA 包和 APK 包然后读取里面的信息,这样的话上传接口就不需要在 header 里面提交资料。
    NouveauNom
        3
    NouveauNom  
       Aug 12, 2021
    @wipbssldo ipa 比较简单,直接解压了读里面的 info.plist 就行,apk 也有现成的。
    参考 https://github.com/rock-app/fabu.love
    NouveauNom
        4
    NouveauNom  
       Aug 12, 2021
    @wipbssldo

    <input type="file" name="file" id="file" onchange="fileSelect()">
    <script src="/dist/app-info-parser.js"></script>
    <script>
    function fileSelect () {
    const files = document.getElementById('file').files
    const parser = new AppInfoParser(files[0])
    parser.parse().then(result => {
    console.log('app info ----> ', result)
    console.log('icon base64 ----> ', result.icon)
    }).catch(err => {
    console.log('err ----> ', err)
    })
    }
    </script>
    wipbssldo
        5
    wipbssldo  
    OP
       Aug 12, 2021
    @NouveauNom 这种方式确实也可以,但是不适用。
    因为我这里上传是通过 HTTP 接口以二进制的方式提交的。在 Jenkins 那一端也是通过 shell 脚本 cURL 上传,中间没有 JS 执行的空间。
    我本来想在服务器端解压读取信息,但是 Swift 环境下太难了,不太懂,也没找到相关的资料。你提供的资料确实给了我参考。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5600 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 01:28 · PVG 09:28 · LAX 18:28 · JFK 21:28
    ♥ Do have faith in what you're doing.