Install Scripts
note
This section is totally optional, and is only necessary if you need to edit the mobile builds directly.
In some cases, you may want to edit the mobile build whenever your component is installed. For example, the audio player component needs to add a setting under an iOS build's info.plist to enable background audio.
The way you can edit builds in Adalo is by using install scripts. In the adalo.json
or in the package.json
under the adalo
property, you can add install scripts for iOS and Android like so:
These scripts can be written in either javascript or typescript, and are run with the Deno
typescript runtime: https://deno.com/
We run these scripts with the following permissions:
- Read and write access to the mobile build project path
- Access to run
plutil
and/usr/libexec/PlistBuddy
- Access to reading environment variables with the project parameters
You can access the environment variables from the install scripts with Deno.env.getEnv
:
If you need to use plutil
or /usr/libexec/PlistBuddy
to edit your iOS app's Info.plist
, you can do so from your scripts with Deno.Command
:
That should be everything you need to modify the build directly.
important
We're using Deno v1.44.1
Check Deno's docs to understand the permissions your script has when running on our build servers: Permissions