-
-
Notifications
You must be signed in to change notification settings - Fork 10
Usage Generate
Once you have installed your packages the generate
commands allow you to generate certain configuration files for your application. These commands will analyse all of the packages you have installed and add the appropriate entries into the specified output.
The most useful of these commands will be the generation of the application descriptor.
apm generate app-descriptor
The application descriptor is the file that contains all the details about your application, including name, version, icon imagery, initial view settings, platform settings such as manifest additions for Android, and the included extensions.
The process for creating app descriptor includes merging all the following and resolving conflicts where possible:
- dependencies
- Android manifest additions
- iOS Info Additions and Entitlements
- required configuration variables to be inserted into the above
Once complete you will have an application descriptor with all the required Android manifest additions, iOS InfoAdditions and Entitlements and extension IDs ready for use in your application.
What currently works?
Android merging with all package manifests is complete and you should expect to get a valid android
manifestAdditions
entry in your application descriptor.The
extensions
node should be correctly populated with all theextensionID
entries.We are still looking for suggestions to better handle the output destination and suggestions on handling reading existing values. Currently we read the application descriptor destination and make modifications to it. We were considering building from a supplied template but figure the destination file probably is a good place for this.
iOS merging is not implemented.
By default the output will be written to src/${filename}-app.xml
. filename
will either be the value of the filename
property in your project definition file, or the value of name
(with all whitespace removed).
The command can be run with an optional output file to redirect the output to another location:
apm generate app-descriptor example-app.xml
In either case, the process will read any content that is found at the destination file and only overwrite the appropriate sections including:
id
versionNumber
-
versionLabel
(if specified) -
android
/manifestAdditions
-
iPhone
/InfoAdditions
-
iPhone
/Entitlements
extensions
Other sections will remain the same, eg if you have a list of icons in the file they will remain.
You may wish to add in other configuration items, such as additional manifest entries. This can be done by supplying some additional configuration files.
If you wish to provide additional manifest entries you can add a file at the following location alongside your project.apm
:
project.apm
config
|___ android
|___ AndroidManifest.xml
The AndroidManifest.xml
file at this location will be merged with all the other manifest files from the other packages and added into your manifest additions. For example you may wish to set a specific minSdkVersion
or targetSdkVersion
for your application, you could then set the contents of this file to be:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
</manifest>
Or you may wish to use this approach to integrate extensions that aren't supplied as an airpackage.
Coming soon
Background
Client
Development