@seayoo-web/app-info 0.6.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,8 +9,7 @@ import { AndroidAppParser } from "@seayoo-web/app-info";
9
9
 
10
10
  // file 类型 Uint8Array | ArrayBuffer | Blob;
11
11
  const parser = new AndroidAppParser(file);
12
- // 可选 options 参数,可以设置忽略图标分析以节约解析时间
13
- const appInfo = await parser.parse({ ignoreIcon: false });
12
+ const appInfo = await parser.parse();
14
13
 
15
14
  if (appInfo instanceof Error) {
16
15
  console.log("apk parse error", appInfo.message);
@@ -34,8 +33,9 @@ const fileContent = await parser.readFile("AndroidManifest.xml", "text");
34
33
  ```ts
35
34
  import { IosAppParser } from "@seayoo-web/app-info";
36
35
 
36
+ // 由于资源保护,.ipa 文件不解析图标资源
37
37
  const parser = new IosAppParser(file);
38
- const appInfo = await parser.parse({ ignoreIcon: false });
38
+ const appInfo = await parser.parse();
39
39
 
40
40
  if (appInfo instanceof Error) {
41
41
  console.log("ipa parse error", appInfo.message);
@@ -70,6 +70,7 @@ const fileContent = await parser.readFile("ComboConfig.json", "text");
70
70
  import { HosAppParser } from "@seayoo-web/app-info";
71
71
 
72
72
  const parser = new HosAppParser(file);
73
+ // 设置 ignoreIcon: true 可以忽略图标解析以节约解析时间
73
74
  const appInfo = await parser.parse({ ignoreIcon: false });
74
75
 
75
76
  if (appInfo instanceof Error) {
@@ -88,7 +89,6 @@ if (appInfo instanceof Error) {
88
89
  }
89
90
  // 读取 app 下文件
90
91
  const fileContent = await parser.readFile("pack.info", "blob");
91
-
92
92
  // 读取主包下的文件
93
93
  const fileContent = await parser.readEntryHapFile("pkgInfo.json", "text");
94
94
  ```