1# Application Configuration File Overview (FA Model) 2 3 4Each application project must have configuration files in its code directory. These configuration files provide basic application information for OpenHarmony build tools, the operating system, and application markets. 5 6 7The application configuration file must contain the following information: 8 9 10- Basic information of the application, including the bundle name, vendor, and version number. Such information must be set under the **app** tag. 11 12- Component information of the application, including all abilities, device types, component types, and syntax types in use. 13 14- Device-specific information of the application. Such information affects the functioning of the application on the device. 15 16 17When developing an application in the Feature Ability (FA) model, you must declare the package structure of the application in the **config.json** file. 18 19 20## Configuration File Internal Structure 21 22The **config.json** file consists of three mandatory tags, namely, **app**, **deviceConfig**, and **module**. 23 24| Name| Description| Data Type| Initial Value Allowed| 25| -------- | -------- | -------- | -------- | 26| [app](app-structure.md) | Application-wide configuration. Different HAP files of an application must use the same **app** configuration. | Object| No| 27| [deviceConfig](deviceconfig-structure.md) | Device-specific configuration. | Object| No| 28| [module](module-structure.md) | HAP configuration. It is valid only for the current HAP file.| Object| No| 29 30Example of the **config.json** file: 31 32 33```json 34{ 35 "app": { 36 "vendor": "example", 37 "bundleName": "com.example.demo", 38 "version": { 39 "code": 1000000, 40 "name": "1.0.0" 41 } 42 }, 43 "deviceConfig": { 44 }, 45 "module": { 46 "mainAbility": ".MainAbility_entry", 47 "deviceType": [ 48 "tablet" 49 ], 50 "commonEvents": [ 51 { 52 "name": ".MainAbility", 53 "permission": "ohos.permission.GET_BUNDLE_INFO", 54 "data": [ 55 "com.example.demo", 56 "100" 57 ], 58 "events": [ 59 "install", 60 "update" 61 ] 62 } 63 ], 64 "abilities": [ 65 { 66 "skills": [ 67 { 68 "entities": [ 69 "entity.system.home" 70 ], 71 "actions": [ 72 "action.system.home" 73 ] 74 } 75 ], 76 "orientation": "unspecified", 77 "visible": true, 78 "srcPath": "MainAbility_entry", 79 "name": ".MainAbility_entry", 80 "srcLanguage": "ets", 81 "icon": "$media:icon", 82 // $string:MainAbility_entry_desc is a resource index. 83 "description": "$string:MainAbility_entry_desc", 84 "formsEnabled": false, 85 // $string:MainAbility_entry_label is a resource index. 86 "label": "$string:MainAbility_entry_label", 87 "type": "page", 88 "launchType": "standard" 89 } 90 ], 91 "distro": { 92 "moduleType": "entry", 93 "installationFree": false, 94 "deliveryWithInstall": true, 95 "moduleName": "myapplication" 96 }, 97 "package": "com.example.myapplication", 98 "srcPath": "", 99 "name": ".myapplication", 100 "js": [ 101 { 102 "mode": { 103 "syntax": "ets", 104 "type": "pageAbility" 105 }, 106 "pages": [ 107 "pages/index" 108 ], 109 "name": ".MainAbility_entry", 110 "window": { 111 "designWidth": 720, 112 "autoDesignWidth": false 113 } 114 } 115 ] 116 } 117} 118``` 119