Giter Club home page Giter Club logo

Comments (10)

HeidaLay avatar HeidaLay commented on June 12, 2024

请问你解决了吗 我也是在vite环境中无法自动解析ipa文件 么得办法让手动填写了

from app-info-parser.

yangshenggirl avatar yangshenggirl commented on June 12, 2024

from app-info-parser.

chenquincy avatar chenquincy commented on June 12, 2024

@yangshenggirl @HeidaLay vite 还没有去适配过,不过看起来应该是打包的问题导致的,更优解是暂时采用 cdn 的方式去引入 app-info-parser。

from app-info-parser.

chenquincy avatar chenquincy commented on June 12, 2024

可以用 unpkg 的 cdn 先试试: https://unpkg.com/browse/[email protected]/dist/app-info-parser.min.js 。引入后直接使用全局变量 AppInfoParser 即可。

from app-info-parser.

yangshenggirl avatar yangshenggirl commented on June 12, 2024

from app-info-parser.

yangshenggirl avatar yangshenggirl commented on June 12, 2024

vite的编译使用的是另外一个开源的包rollup,开发时dev server是不会去使用cdn的代码的,只会引用我们安装的node_modules内部的代码,所以引入cdn之后使用AppInfoParser 会失败

from app-info-parser.

arrosev avatar arrosev commented on June 12, 2024

我在node环境下解析没问题,在浏览器下解析ipa同样报“Buffer is not defined”,我看了下用的plist库的源码,https://github.com/TooTallNate/plist.js/blob/0a322c3918c7c0dc3d8ec36b3da98048b9b7dde3/lib/parse.js 这个文件第207行用了Buffer,我拷贝了它的源码,然后在浏览器环境(我的项目是用vite2和vue3搭建的)把Buffer类型改成uint8array就不会报错了

from app-info-parser.

chenquincy avatar chenquincy commented on June 12, 2024

@yangshenggirl @arrosev 不好意思忘记跟进了,可以的话麻烦提供个最小的复现 demo,我看一下

from app-info-parser.

arrosev avatar arrosev commented on June 12, 2024

@yangshenggirl @arrosev 不好意思忘记跟进了,可以的话麻烦提供个最小的复现 demo,我看一下

demo: https://github.com/arrosev/TestFilePod

from app-info-parser.

chenquincy avatar chenquincy commented on June 12, 2024

@arrosev vite 并没有支持 node 环境的打算,可以参考这个 issue 里我的回复,我也没办法去让所有的依赖库提供 esm 的构建产物,因此使用 vite 的时候不要用 import 的方式使用 app-info-parser,直接使用 script 标签引入 cdn 文件,然后使用 window.AppInfoParser 来解析。

from app-info-parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.