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