BundleInfo.md 14.9 KB
Newer Older
W
wenjun 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345
# BundleInfo<a name="ZH-CN_TOPIC_0000001055678086"></a>

## **Overview**<a name="section575980651093529"></a>

**Related Modules:**

[BundleManager](BundleManager.md)

**Description:**

Defines the bundle information. 

## **Summary**<a name="section1116726467093529"></a>

## Data Fields<a name="pub-attribs"></a>

<a name="table1993934851093529"></a>
<table><thead align="left"><tr id="row67061902093529"><th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.1"><p id="p1041023431093529"><a name="p1041023431093529"></a><a name="p1041023431093529"></a>Variable Name</p>
</th>
<th class="cellrowborder" valign="top" width="50%" id="mcps1.1.3.1.2"><p id="p1860694337093529"><a name="p1860694337093529"></a><a name="p1860694337093529"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row1531676915093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1411975632093529"><a name="p1411975632093529"></a><a name="p1411975632093529"></a><a href="BundleInfo.md#a6f953f1be6da55f3b0afb292ae36d30f">isKeepAlive</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p94843643093529"><a name="p94843643093529"></a><a name="p94843643093529"></a>bool&nbsp;</p>
</td>
</tr>
<tr id="row1522062773093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p426452945093529"><a name="p426452945093529"></a><a name="p426452945093529"></a><a href="BundleInfo.md#a4c9154f98628fff6b2016d9fe3e6bc23">isNativeApp</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1195664289093529"><a name="p1195664289093529"></a><a name="p1195664289093529"></a>bool&nbsp;</p>
</td>
</tr>
<tr id="row274555872093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p2138302924093529"><a name="p2138302924093529"></a><a name="p2138302924093529"></a><a href="BundleInfo.md#a4c469e7cb5dbea185de3a70f18adeeb4">uid</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p339592897093529"><a name="p339592897093529"></a><a name="p339592897093529"></a>int32_t&nbsp;</p>
</td>
</tr>
<tr id="row643336629093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p736001760093529"><a name="p736001760093529"></a><a name="p736001760093529"></a><a href="BundleInfo.md#a9d43b35b1e8310173e75a3fd3e9e2e5d">gid</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p656654587093529"><a name="p656654587093529"></a><a name="p656654587093529"></a>int32_t&nbsp;</p>
</td>
</tr>
<tr id="row2090473003093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p779796824093529"><a name="p779796824093529"></a><a name="p779796824093529"></a><a href="BundleInfo.md#ae4572da0f7c456734c7fcc6158e5a5f1">isSystemApp</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1346628644093529"><a name="p1346628644093529"></a><a name="p1346628644093529"></a>bool&nbsp;</p>
</td>
</tr>
<tr id="row1196736719093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p2084900964093529"><a name="p2084900964093529"></a><a name="p2084900964093529"></a><a href="BundleInfo.md#af672c11317ab2608732ebfadf0bfdc94">compatibleApi</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1372855942093529"><a name="p1372855942093529"></a><a name="p1372855942093529"></a>int32_t&nbsp;</p>
</td>
</tr>
<tr id="row802839044093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1824321464093529"><a name="p1824321464093529"></a><a name="p1824321464093529"></a><a href="BundleInfo.md#a7cbe4debddb5d278af13ca09e55409c9">targetApi</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1123156927093529"><a name="p1123156927093529"></a><a name="p1123156927093529"></a>int32_t&nbsp;</p>
</td>
</tr>
<tr id="row75953261093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1479374184093529"><a name="p1479374184093529"></a><a name="p1479374184093529"></a><a href="BundleInfo.md#a10ebbd5523a9f9f7b38b04ac365fa9ee">versionCode</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1397097803093529"><a name="p1397097803093529"></a><a name="p1397097803093529"></a>int32_t&nbsp;</p>
</td>
</tr>
<tr id="row1438863466093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1267869477093529"><a name="p1267869477093529"></a><a name="p1267869477093529"></a><a href="BundleInfo.md#a5381cbf05a30ee5cb5bc1a7daa18084e">versionName</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p679052357093529"><a name="p679052357093529"></a><a name="p679052357093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row490546844093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1254650108093529"><a name="p1254650108093529"></a><a name="p1254650108093529"></a><a href="BundleInfo.md#aec3498345b5e999424348aff0a723db7">bundleName</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p258107047093529"><a name="p258107047093529"></a><a name="p258107047093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row362757267093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p714841293093529"><a name="p714841293093529"></a><a name="p714841293093529"></a><a href="BundleInfo.md#a008c2aab5a80d72a283ebb033f3a00e9">label</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p432132989093529"><a name="p432132989093529"></a><a name="p432132989093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row1263323940093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1632331081093529"><a name="p1632331081093529"></a><a name="p1632331081093529"></a><a href="BundleInfo.md#a8e34521fed8544d56fe744e895504940">bigIconPath</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1345140715093529"><a name="p1345140715093529"></a><a name="p1345140715093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row982007517093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1522198229093529"><a name="p1522198229093529"></a><a name="p1522198229093529"></a><a href="BundleInfo.md#a48870c542ef26637af24b6e424af9e66">codePath</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p458975710093529"><a name="p458975710093529"></a><a name="p458975710093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row1305403016093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1313768930093529"><a name="p1313768930093529"></a><a name="p1313768930093529"></a><a href="BundleInfo.md#ac4fcbb75da508f66f815c275d3e53888">dataPath</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p932330865093529"><a name="p932330865093529"></a><a name="p932330865093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row31829550093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1693832860093529"><a name="p1693832860093529"></a><a name="p1693832860093529"></a><a href="BundleInfo.md#aa82cb2180789691e20e75d0371dec7cd">vendor</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p329305616093529"><a name="p329305616093529"></a><a name="p329305616093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row2101751716093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1815659560093529"><a name="p1815659560093529"></a><a name="p1815659560093529"></a><a href="BundleInfo.md#a7f558b993f8ffd70264b490ea079e178">moduleInfos</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p2061713256093529"><a name="p2061713256093529"></a><a name="p2061713256093529"></a><a href="ModuleInfo.md">ModuleInfo</a> *&nbsp;</p>
</td>
</tr>
<tr id="row972283450093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1110373880093529"><a name="p1110373880093529"></a><a name="p1110373880093529"></a><a href="BundleInfo.md#ae6d0d5a10be24006397e1436a757f899">numOfModule</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p272058098093529"><a name="p272058098093529"></a><a name="p272058098093529"></a>int32_t&nbsp;</p>
</td>
</tr>
<tr id="row522310012093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p260487576093529"><a name="p260487576093529"></a><a name="p260487576093529"></a><a href="BundleInfo.md#a0eb19a04c7e83b61b95b502283b42e15">sharedLibPath</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1372283339093529"><a name="p1372283339093529"></a><a name="p1372283339093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row484142422093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p660926944093529"><a name="p660926944093529"></a><a name="p660926944093529"></a><a href="BundleInfo.md#ad0eff56be21d5023221ce20da5ab9efb">appId</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p558585045093529"><a name="p558585045093529"></a><a name="p558585045093529"></a>char *&nbsp;</p>
</td>
</tr>
<tr id="row1438557391093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p234654886093529"><a name="p234654886093529"></a><a name="p234654886093529"></a><a href="BundleInfo.md#a3ada4a71ec78f2f2d6c78b8db9406d40">abilityInfos</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p1828623604093529"><a name="p1828623604093529"></a><a name="p1828623604093529"></a><a href="AbilityInfo.md">AbilityInfo</a> *&nbsp;</p>
</td>
</tr>
<tr id="row1714855189093529"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p1466861641093529"><a name="p1466861641093529"></a><a name="p1466861641093529"></a><a href="BundleInfo.md#a0691b2c2822bc661f6618b7d376010b9">numOfAbility</a></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p93829950093529"><a name="p93829950093529"></a><a name="p93829950093529"></a>int32_t&nbsp;</p>
</td>
</tr>
</tbody>
</table>

## **Details**<a name="section811709423093529"></a>

## **Field Documentation**<a name="section1660633955093529"></a>

## abilityInfos<a name="a3ada4a71ec78f2f2d6c78b8db9406d40"></a>

```
[AbilityInfo](AbilityInfo.md)* BundleInfo::abilityInfos
```

 **Description:**

Pointer to the ability information about the application. The ability information is encapsulated in  [AbilityInfo](AbilityInfo.md)  objects. 

## appId<a name="ad0eff56be21d5023221ce20da5ab9efb"></a>

```
char* BundleInfo::appId
```

 **Description:**

Application ID, which uniquely identifies an application. It is a combination of the bundle name and signature of the application. 

## bigIconPath<a name="a8e34521fed8544d56fe744e895504940"></a>

```
char* BundleInfo::bigIconPath
```

 **Description:**

Pointer to the big icon of the application 

## bundleName<a name="aec3498345b5e999424348aff0a723db7"></a>

```
char* BundleInfo::bundleName
```

 **Description:**

Pointer to the bundle name of the application 

## codePath<a name="a48870c542ef26637af24b6e424af9e66"></a>

```
char* BundleInfo::codePath
```

 **Description:**

Pointer to the installation path of the application, which is in the  **/app/run/bundle name**  format 

## compatibleApi<a name="af672c11317ab2608732ebfadf0bfdc94"></a>

```
int32_t BundleInfo::compatibleApi
```

 **Description:**

Pointer to the minimum API version required for running the application 

## dataPath<a name="ac4fcbb75da508f66f815c275d3e53888"></a>

```
char* BundleInfo::dataPath
```

 **Description:**

Pointer to the path for storing data files of the application. The data path is  **/app/data**. 

## gid<a name="a9d43b35b1e8310173e75a3fd3e9e2e5d"></a>

```
int32_t BundleInfo::gid
```

 **Description:**

Application group ID allocated during application installation 

## isKeepAlive<a name="a6f953f1be6da55f3b0afb292ae36d30f"></a>

```
bool BundleInfo::isKeepAlive
```

 **Description:**

Whether the application is kept alive 

## isNativeApp<a name="a4c9154f98628fff6b2016d9fe3e6bc23"></a>

```
bool BundleInfo::isNativeApp
```

 **Description:**

Whether the application is a local application. A local application refers to an application developed using C++ in the system. The value  **true**  indicates a local application, and  **false**  indicates a non-local application. 

## isSystemApp<a name="ae4572da0f7c456734c7fcc6158e5a5f1"></a>

```
bool BundleInfo::isSystemApp
```

 **Description:**

Whether the application is a system application. System applications cannot be uninstalled. The value  **true**  indicates a system application, and  **false**  indicates a non-system application. 

## label<a name="a008c2aab5a80d72a283ebb033f3a00e9"></a>

```
char* BundleInfo::label
```

 **Description:**

Pointer to the application name visible to users 

## moduleInfos<a name="a7f558b993f8ffd70264b490ea079e178"></a>

```
[ModuleInfo](ModuleInfo.md)* BundleInfo::moduleInfos
```

 **Description:**

Pointer to the HAP package information about the application. The HAP information is encapsulated in  [ModuleInfo](ModuleInfo.md)  objects. 

## numOfAbility<a name="a0691b2c2822bc661f6618b7d376010b9"></a>

```
int32_t BundleInfo::numOfAbility
```

 **Description:**

Number of  [AbilityInfo](AbilityInfo.md)  objects in the application 

## numOfModule<a name="ae6d0d5a10be24006397e1436a757f899"></a>

```
int32_t BundleInfo::numOfModule
```

 **Description:**

Number of  [ModuleInfo](ModuleInfo.md)  objects included in the application 

## sharedLibPath<a name="a0eb19a04c7e83b61b95b502283b42e15"></a>

```
char* BundleInfo::sharedLibPath
```

 **Description:**

Pointer to the shared library path 

## targetApi<a name="a7cbe4debddb5d278af13ca09e55409c9"></a>

```
int32_t BundleInfo::targetApi
```

 **Description:**

Pointer to the target API version for running the application 

## uid<a name="a4c469e7cb5dbea185de3a70f18adeeb4"></a>

```
int32_t BundleInfo::uid
```

 **Description:**

UID allocated during application installation 

## vendor<a name="aa82cb2180789691e20e75d0371dec7cd"></a>

```
char* BundleInfo::vendor
```

 **Description:**

Pointer to the vendor name of the application 

## versionCode<a name="a10ebbd5523a9f9f7b38b04ac365fa9ee"></a>

```
int32_t BundleInfo::versionCode
```

 **Description:**

Version code of the application, which is the internal version number 

## versionName<a name="a5381cbf05a30ee5cb5bc1a7daa18084e"></a>

```
char* BundleInfo::versionName
```

 **Description:**

Pointer to the version name visible to users