1# Bundle Management Subsystem Changelog 2## cl.bundlemanager.1 Field metadata in the ApplicationInfo struct Deprecated 3 4The **metadata** field is deprecated since API version 10. You are advised to use **metadataArray** instead. 5 6**Change Impact** 7 8The **metadata** field in the **ApplicationInfo** struct is no longer maintained since API version 10. 9 10**Key API/Component Changes** 11 12The **metadata** field in the **ApplicationInfo** struct is deprecated since API version 10. 13 14**Adaptation Guide** 15 16Use the **metadataArray** field to replace the **metadata** field. 17 18```ts 19import bundleManager from '@ohos.bundle.bundleManager'; 20import { BusinessError } from '@ohos.base'; 21import hilog from '@ohos.hilog'; 22let bundleName = 'com.example.myapplication'; 23let appFlags = bundleManager.ApplicationFlag.GET_APPLICATION_INFO_WITH_METADATA; 24let userId = 100; 25 26try { 27 bundleManager.getApplicationInfo(bundleName, appFlags, userId, (err, data) => { 28 if (err) { 29 hilog.error(0x0000, 'testTag', 'getApplicationInfo failed: %{public}s', err.message); 30 } else { 31 hilog.info(0x0000, 'testTag', 'getApplicationInfo successfully: %{public}s', JSON.stringify(data)); 32 hilog.info(0x0000, 'testTag', 'metadataArray is: %{public}s', JSON.stringify(data.metadataArray)); 33 } 34 }); 35} catch (err) { 36 let message = (err as BusinessError).message; 37 hilog.error(0x0000, 'testTag', 'getApplicationInfo failed: %{public}s', message); 38} 39``` 40