--- title: Native extensions - Manifest Merge Tools brief: This manual describes how the merging of application manifests work --- # Application manifests For some platforms we support extensions supplying snippets (or stubs) of application manifests. It can be part of an `AndroidManifest.xml`, `Info.plist` or `engine_template.html` Each extension manifest stub will be applied one after another, starting with the application base manifest. The base manifest is either the default one (in `builtins\manifests\\...`), or a custom one supplied by the user. ## Naming and Structure The extension manifests must be placed in a certain structure for the extension to function as intended. /myextension ext.manifest /manifests /android AndroidManifest.xml /ios Info.plist /osx Info.plist /web engine_template.html ## Android The Android platform already has a manifest merging tool (based on `ManifestMerger2`), and we use it inside `bob.jar` to merge manifests. For a complete set of instructions on how to modify your Android manifests, please refer to [their documentation](https://developer.android.com/studio/build/manifest-merge) ::: important If you don't set your app's `android:targetSdkVersion` in your extension manifest, the following permissions will be added automatically: `WRITE_EXTERNAL_STORAGE`, `READ_PHONE_STATE`, `READ_EXTERNAL_STORAGE`. You can read more about it in the official documentation [here](https://developer.android.com/studio/build/manifest-merge#implicit_system_permissions). We recommend to use: `` ::: ### Example Base manifest ```xml ``` Extension manifest: ```xml ``` Result ```xml ``` ## iOS / macOS For the `Info.plist` we use our own implementation to merge lists and dictionaries. It is possible to specify merge marker attributes `merge`, `keep` or `replace` on keys, with `merge` being the default. ### Example Base Manifest ```xml NSAppTransportSecurity NSExceptionDomains foobar.net testproperty INT 8 REAL 8.0 BASE64 SEVMTE8gV09STEQ= Array1 Foobar a Array2 Foobar a ``` Extension manifest: ```xml NSAppTransportSecurity NSExceptionDomains facebook.com NSIncludesSubdomains NSThirdPartyExceptionRequiresForwardSecrecy INT 42 REAL 16.0 BASE64 Rk9PQkFS Array1 Foobar b Array2 Foobar b ``` Result: ```xml NSAppTransportSecurity NSExceptionDomains foobar.net testproperty facebook.com NSIncludesSubdomains NSThirdPartyExceptionRequiresForwardSecrecy INT 8 REAL 16.0 BASE64 SEVMTE8gV09STEQ= INT 42 Array1 Foobar a b Array2 Foobar a Foobar b ``` ## HTML5 For the html template, we named each section, so that we can match them (e.g. "engine-start"). You can then specify the attributes `merge` or `keep`. `merge` is the default. ### Example Base manifest ```html ``` Extension manifest ```html ``` Result ```html ```