Class RuntimeBuilderSettings
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionfinal PlainKString
Descriptive text of the app, use text table externalized for multiple languagesfinal String
Specifies the app's reverse-domain identifier, e.g.final String
Specifies the app's reverse-domain identifier, e.g.final String
Specifies the app's reverse-domain identifier, e.g.final PlainKString
Name of the app displayed to the user.final String
Short name of the app without spaces.final String
Base text table for iiziRun texts.final String
The Assets folder for "icons" and "splash" screens.final String
Email to author for app.final String
Website of author for app.final PlainKString
Name of author.final boolean
Builds the customized iiziRun for Android, default true.final int
When build Android for release, this value should be1
(one) if a Bundle (AAB) should be created,0
(zero) means an APK, and2
means BOTH formats.final boolean
Builds the customized iiziRun for iOS, default true.final String
Specifies the address of the Remote iiziRun Builder machine.final boolean
Build all remotely.final boolean
Secured with TLS.final int
Targets to build: 0=debug, 1=release, 2=both.final String
Full version number expressed in major.minor.patch notation (default 1.0.0).final String
Certificate "C": Two letter country code, e.g.final String
The Common Name of the author for certificates.final String
Certificate "L": Locality (city) name, e.g.final String
Certificate "O": Large organization name, e.g.final String
Certificate "OU": Small organization name, e.g.final String
Certificate "ST": State name, e.g.final int
The operation that are allowed for Deep Linking.final String
Enables Deep Linking by means of an URL scheme.final String
Default locale for the app: "en-US".final boolean
Flag for Firebase Analytics Collection enabled.final boolean
Flag for Firebase Crashlytics Collection enabled.final boolean
Flag for Firebase Performance Collection enabled.static final String[]
Adaptive icon densities for Android.static final int[]
Adaptive icon sizes for Android.static final String[]
The transparent icon names for Android required in the icons directory.static final String[]
The transparent icon names for Common use (Web, etc) required in the icons directory.static final String[]
The opaque icon names for iOS required in the icons directory.final boolean
Flag indicating critical push notifications alerts are enabled, if the user allows it, default false.final String
The development team name for Debug builds.final String
The development team name for Release builds.final String
Path to the root of the Java 1.8 to 11 Development Kit.final String
The initial password for a default login.final String
The initial user name for a default login.final String
Path where the build output of the customized iiziRun will be placed.final boolean
Enables Barcode Scanner.final boolean
Enables taking pictures and for choosing images from the system's image library.final boolean
Enables fingerprint authentication with Android Fingerprint scanner or iOS Touch ID.final boolean
Enables push notifications, analytics, event tracking, crash reporting and more from Google Firebase.final boolean
Enables flashlight on the device.final boolean
Enables the geolocation functions.final boolean
This plugin provides the ability to record and play back audio files on a device.final boolean
This plugin provides access to the device's audio, image, and video capture capabilities.final boolean
Enables you to open OS settings on iOS and Android, e.g.final boolean
Enables simple vibrations on the device.final boolean
Enables advanced Wi-Fi functions.final RuntimeBuilderProps
The settings property.final String
Address of the iiziServer.final int
Server port number, normally 443 for secure TLS connections (default), otherwise e.g.final boolean
Indicates the server port is configured for secure TLS communication, default true.final boolean
Validates that the server is really present and an iiziServer.final String
The iiziServer App Description.final String
The iiziServer App ID.protected TextTable
The text table, null if it comes from a remote party.static final int
Count of icons needed (for wizard to display).boolean
Flag for adaptive bgcolor.xml to be used.Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionstatic File
generateAndroidDebugKeyStore
(RuntimeBuilderProps props, File assetsDir) Generates the Android debug key store and saves it to the properties.generateAndroidDebugKeyStore
(File assetsDir) Generates the Android debug key store and saves it to the properties.static File
generateAndroidReleaseKeyStore
(RuntimeBuilderProps props, X500Principal owner, File assetsDir) Generates the Android release key store and saves it to the properties.generateAndroidReleaseKeyStore
(X500Principal owner, File assetsDir) Generates the Android release key store and saves it to the properties.Gets the Android app owner used when signing release builds, an X.500 principal used for certificate creation.static String
Gets the Android debug code alias in the keystore ("androiddebugkey").static X500Principal
Gets the Android Debug owner for signing apps.static String
Gets the Android debug code signing password.static String
Gets the Android release code alias in the keystore ("iizi").Gets the Android release code signing password.static String
Gets the Android release code signing password.Gets the projects subdirectory in the Assets folder.Gets all tables in all open projects that derives from this text table.getLocalizedString
(PlainKString pks, String languageCode) Resolves a PlainKString that refers to the text table with the specified language code.Gets the output directory where to place the builds.Gets the text table.boolean
hasAndroidKeyStore
(boolean isRelease) Checks for presence of Android keystore of debug or release type.static boolean
hasAndroidKeyStore
(RuntimeBuilderProps props, boolean isRelease) Checks for presence of Android keystore of debug or release type.boolean
Checks for internal build.void
verify
(boolean isDesigner, boolean doCheckAll, File projectDir, Set<String> textTableIDs, ArrayList<BuilderError> errors) Performs verification of the settings.static String
writeAndroidKeyStore
(RuntimeBuilderProps props, File file, boolean isRelease) Writes an Android KeyStore to file.writeAndroidKeyStore
(File file, boolean isRelease) Writes an Android KeyStore to file.
Field Details
ICONS_COMMON
The transparent icon names for Common use (Web, etc) required in the icons directory.ICONS_ANDROID_STANDARD
The transparent icon names for Android required in the icons directory.ICONS_ANDROID_ADAPTIVE_SIZE
public static final int[] ICONS_ANDROID_ADAPTIVE_SIZEAdaptive icon sizes for Android.ICONS_ANDROID_ADAPTIVE_DENSITY
Adaptive icon densities for Android.ICONS_IOS
The opaque icon names for iOS required in the icons directory.Note that there are TWO names that begins with "ios/" and needs a subdirectory. These icons are not square.
TOTAL_ICONS_COUNT
public static final int TOTAL_ICONS_COUNTCount of icons needed (for wizard to display).props
The settings property.build_version
Full version number expressed in major.minor.patch notation (default 1.0.0).build_android
public final boolean build_androidBuilds the customized iiziRun for Android, default true.build_android_release
public final int build_android_releaseWhen build Android for release, this value should be1
(one) if a Bundle (AAB) should be created,0
(zero) means an APK, and2
means BOTH formats. Please note that it takes almost twice the time to build both formats.Android App Bundles (AAB) is a publishing format and you can't install the AAB file on a device, only APK files.
build_ios
public final boolean build_iosBuilds the customized iiziRun for iOS, default true.build_target_types
public final int build_target_typesTargets to build: 0=debug, 1=release, 2=both. Please note that it takes almost twice the time to produce both build types, and when combined for both Android AAB and APK formats for the release version, it will take about three times longer.build_remote
Specifies the address of the Remote iiziRun Builder machine. Format is 'addr:port'. All communication is done over secured TLS connections.build_remote_tls
public final boolean build_remote_tlsSecured with TLS.build_remote_all
public final boolean build_remote_allBuild all remotely.app_id
Specifies the app's reverse-domain identifier, e.g. 'com.iizix.run.devel'. This name cannot be changed once the app has been published.app_name
Short name of the app without spaces. This name cannot be localized. This name cannot be changed once the app has been published.default_locale
Default locale for the app: "en-US".app_textTable
Base text table for iiziRun texts. When multiple languages are used, this is the base language text file.textTable
The text table, null if it comes from a remote party.assets_folder
The Assets folder for "icons" and "splash" screens.app_locName
Name of the app displayed to the user. The name can contain spaces and can be localized. It can also be changed after publishing of the app.app_descr
Descriptive text of the app, use text table externalized for multiple languagesauthor_name
Name of author. Use text table to localize name.author_email
Email to author for app.author_href
Website of author for app.cert_CN
The Common Name of the author for certificates. If unspecified, it is the author's name in the default language (English). This is only used for Android.cert_O
Certificate "O": Large organization name, e.g. "Onizuka, Inc.". If unspecified, it is the author's name in the default language (English). This is only used for Android.cert_OU
Certificate "OU": Small organization name, e.g. "Purchasing". This is only used for Android.cert_L
Certificate "L": Locality (city) name, e.g. "Palo Alto". This is only used for Android.cert_ST
Certificate "ST": State name, e.g. "California". This is only used for Android.cert_C
Certificate "C": Two letter country code, e.g. "CH". This is only used for Android.server_addr
Address of the iiziServer. The address can be a DNS name (recommended) but can also be an IP address. This address does not necessarily have to be public on the internet.server_port
public final int server_portServer port number, normally 443 for secure TLS connections (default), otherwise e.g. 80 for unsecure connections.server_secure
public final boolean server_secureIndicates the server port is configured for secure TLS communication, default true.server_validate
public final boolean server_validateValidates that the server is really present and an iiziServer. This is done in order to ensure that the server settings are correct. Default is true.srv_app_id
The iiziServer App ID. This value MUST be specified and VALID.srv_app_descr
The iiziServer App Description.null
or an empty string means that no description is available. This value is used merely for the interface on the client side for choosing the app, when this is possible.login_user
The initial user name for a default login.In order to avoid a login prompt and to handle the login process inside the app, provide a valid and authorized User name and Password. This user should just have access to the app initially.
The default is "iiziRun Developer" with "secret" password.
login_password
The initial password for a default login.The default is "iiziRun Developer" with "secret" password.
deepLink_urlscheme
Enables Deep Linking by means of an URL scheme. The user can use the browser on the device to perform operations when clicking on special links.null
means not enabled.deepLink_op
public final int deepLink_opThe operation that are allowed for Deep Linking. Be very careful when choosing the 'run another' or 'redefine' as this could present a security risk for users, unless the server is controlled in e.g. a private or corporate network (i.e. not the internet).Values:
- 0 = launch (default)
- 1 = run another
- 2 = redefine
output_path
Path where the build output of the customized iiziRun will be placed. The default is the directory 'iiziRun' in the module project.jdk_path
Path to the root of the Java 1.8 to 11 Development Kit. The default will attempt to use the Eclipse settings.plugin_camera
public final boolean plugin_cameraEnables taking pictures and for choosing images from the system's image library.plugin_firebase
public final boolean plugin_firebaseEnables push notifications, analytics, event tracking, crash reporting and more from Google Firebase.plugin_geolocation
public final boolean plugin_geolocationEnables the geolocation functions.Enabled by default.
plugin_media
public final boolean plugin_mediaThis plugin provides the ability to record and play back audio files on a device.plugin_media_capture
public final boolean plugin_media_captureThis plugin provides access to the device's audio, image, and video capture capabilities.WARNING: Collection and use of images, video, or audio from the device's camera or microphone raises important privacy issues. Your app's privacy policy should discuss how the app uses such sensors and whether the data recorded is shared with any other parties. In addition, if the app's use of the camera or microphone is not apparent in the user interface, you should provide a just-in-time notice before the app accesses the camera or microphone (if the device operating system doesn't do so already). That notice should provide the same information noted above, as well as obtaining the user's permission (e.g., by presenting choices for 'OK' and 'No Thanks'). Note that some app marketplaces may require your app to provide just-in-time notice and obtain permission from the user prior to accessing the camera or microphone.
plugin_native_settings
public final boolean plugin_native_settingsEnables you to open OS settings on iOS and Android, e.g. allow you to open the keyboard settings, Wi-Fi, bluetooth, etc.plugin_fingerprint
public final boolean plugin_fingerprintEnables fingerprint authentication with Android Fingerprint scanner or iOS Touch ID.plugin_vibration
public final boolean plugin_vibrationEnables simple vibrations on the device.plugin_barcode_scanner
public final boolean plugin_barcode_scannerEnables Barcode Scanner.plugin_wifi
public final boolean plugin_wifiEnables advanced Wi-Fi functions.plugin_flashlight
public final boolean plugin_flashlightEnables flashlight on the device.app_id_android
Specifies the app's reverse-domain identifier, e.g. 'com.iizix.run.devel'. This name cannot be changed once the app has been published. This name is used to override the Android app ID. This name can be null, in which case the default "app_id" is used instead.useAdaptiveBGColor
public boolean useAdaptiveBGColorFlag for adaptive bgcolor.xml to be used.app_id_ios
Specifies the app's reverse-domain identifier, e.g. 'com.iizix.run.devel'. This name cannot be changed once the app has been published. This name is used to override the iOS app ID. This name can be null, in which case the default "app_id" is used instead.iOS_criticalAlerts
public final boolean iOS_criticalAlertsFlag indicating critical push notifications alerts are enabled, if the user allows it, default false.iOS_debug_developmentTeam
The development team name for Debug builds.iOS_release_developmentTeam
The development team name for Release builds.fb_analyticsCollection
public final boolean fb_analyticsCollectionFlag for Firebase Analytics Collection enabled.fb_performanceCollection
public final boolean fb_performanceCollectionFlag for Firebase Performance Collection enabled.fb_crashlyticsCollection
public final boolean fb_crashlyticsCollectionFlag for Firebase Crashlytics Collection enabled.
Constructor Details
RuntimeBuilderSettings
The constructor.- Parameters:
pc
- The runtime builder properties container.
Method Details
verify
public void verify(boolean isDesigner, boolean doCheckAll, File projectDir, Set<String> textTableIDs, ArrayList<BuilderError> errors) Performs verification of the settings.- Parameters:
isDesigner
- Flag for Designer.doCheckAll
- Final check-all verification to also check URL's etc.projectDir
- The project directory (for Eclipse, for Remote Server it is null.textTableIDs
- Text table IDs required, null for no checking.errors
- The errors array to fill in.
getOutputDirectory
Gets the output directory where to place the builds.- Returns:
- The directory, it might not to be present, but the parent directory is.
getLocalizedString
Resolves a PlainKString that refers to the text table with the specified language code.- Parameters:
pks
- The plain KString.languageCode
- The language code supported by the application, null for default English or if language code is not found.- Returns:
- The localized String.
Note: If the text fails to resolve, a severe error is logged, and the original raw string is returned instead.
getAssetsSubdirectory
Gets the projects subdirectory in the Assets folder.- Returns:
- The directory, or null if not verified.
hasAndroidKeyStore
public boolean hasAndroidKeyStore(boolean isRelease) Checks for presence of Android keystore of debug or release type.- Parameters:
isRelease
- true for release, false for debug.- Returns:
- true if created, false otherwise.
hasAndroidKeyStore
Checks for presence of Android keystore of debug or release type.- Parameters:
props
- The runtime builder properties.isRelease
- true for release, false for debug.- Returns:
- true if created, false otherwise.
getAndroidDebugAlias
Gets the Android debug code alias in the keystore ("androiddebugkey").- Returns:
- The alias "androiddebugkey".
getAndroidReleaseAlias
Gets the Android release code alias in the keystore ("iizi").- Returns:
- The alias "iizi".
getAndroidDebugPassword
Gets the Android debug code signing password.- Returns:
- The password "android".
getAndroidReleasePassword
Gets the Android release code signing password.- Returns:
- The password, null if no code signing is configured.
getAndroidReleasePassword
Gets the Android release code signing password.- Parameters:
props
- The runtime builder properties.- Returns:
- The password, null if no code signing is configured.
getAndroidDebugOwner
Gets the Android Debug owner for signing apps.- Returns:
- The Android owner.
getAndroidCertificateOwner
Gets the Android app owner used when signing release builds, an X.500 principal used for certificate creation.- Returns:
- The principal.
- Throws:
Exception
- For errors.
generateAndroidDebugKeyStore
public File generateAndroidDebugKeyStore(File assetsDir) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, IllegalStateException, SignatureException, KeyStoreException, CertificateException, IOException, PropException Generates the Android debug key store and saves it to the properties.- Parameters:
assetsDir
- The directory where the project Assets are located, to write the android-debug.p12 file into. If null, no such PKCS#12 file is created.- Returns:
- "The keystore.p12" file name written, null for none.
- Throws:
IOException
- For I/O errors.CertificateException
- If any of the certificates in the keystore could not be saved.NoSuchAlgorithmException
- If the algorithm used to check the integrity of the keystore cannot be found.KeyStoreException
- If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.SignatureException
- If the signature is in error.IllegalStateException
- If the state is invalid to generate a keystore.NoSuchProviderException
- If no provider for the certificate is available.InvalidKeyException
- If the key in invalid.PropException
- If there is a Property Exception.
generateAndroidDebugKeyStore
public static File generateAndroidDebugKeyStore(RuntimeBuilderProps props, File assetsDir) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, IllegalStateException, SignatureException, KeyStoreException, CertificateException, IOException, PropException Generates the Android debug key store and saves it to the properties.- Parameters:
props
- The runtime builder properties.assetsDir
- The directory where the project Assets are located, to write the android-debug.p12 file into. If null, no such PKCS#12 file is created.- Returns:
- "The keystore.p12" file name written, null for none.
- Throws:
IOException
- For I/O errors.CertificateException
- If any of the certificates in the keystore could not be saved.NoSuchAlgorithmException
- If the algorithm used to check the integrity of the keystore cannot be found.KeyStoreException
- If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.SignatureException
- If the signature is in error.IllegalStateException
- If the state is invalid to generate a keystore.NoSuchProviderException
- If no provider for the certificate is available.InvalidKeyException
- If the key in invalid.PropException
- If there is a Property Exception.
generateAndroidReleaseKeyStore
public File generateAndroidReleaseKeyStore(X500Principal owner, File assetsDir) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, IllegalStateException, SignatureException, KeyStoreException, CertificateException, IOException, PropException Generates the Android release key store and saves it to the properties.- Parameters:
owner
- The certificate owner.assetsDir
- The directory where the project Assets are located, to write the android-release.p12 file into. If null, no such PKCS#12 file is created.- Returns:
- "The keystore.p12" file name written, null for none.
- Throws:
IOException
- For I/O errors.CertificateException
- If any of the certificates in the keystore could not be saved.NoSuchAlgorithmException
- If the algorithm used to check the integrity of the keystore cannot be found.KeyStoreException
- If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.SignatureException
- If the signature is in error.IllegalStateException
- If the state is invalid to generate a keystore.NoSuchProviderException
- If no provider for the certificate is available.InvalidKeyException
- If the key in invalid.PropException
- If there is a Property Exception.
generateAndroidReleaseKeyStore
public static File generateAndroidReleaseKeyStore(RuntimeBuilderProps props, X500Principal owner, File assetsDir) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, IllegalStateException, SignatureException, KeyStoreException, CertificateException, IOException, PropException Generates the Android release key store and saves it to the properties.- Parameters:
props
- The runtime builder properties.owner
- The certificate owner.assetsDir
- The directory where the project Assets are located, to write the android-release.p12 file into. If null, no such PKCS#12 file is created.- Returns:
- "The keystore.p12" file name written, null for none.
- Throws:
IOException
- For I/O errors.CertificateException
- If any of the certificates in the keystore could not be saved.NoSuchAlgorithmException
- If the algorithm used to check the integrity of the keystore cannot be found.KeyStoreException
- If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.SignatureException
- If the signature is in error.IllegalStateException
- If the state is invalid to generate a keystore.NoSuchProviderException
- If no provider for the certificate is available.InvalidKeyException
- If the key in invalid.PropException
- If there is a Property Exception.
writeAndroidKeyStore
public String writeAndroidKeyStore(File file, boolean isRelease) throws NotFoundException, KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException Writes an Android KeyStore to file.- Parameters:
file
- Destination file for a PKCS#12 KeyStore (i.e. "file-name.p12").isRelease
- The release KeyStore when true, debug when false.- Returns:
- The password for the keystore.
- Throws:
NotFoundException
- If properties are not found.IOException
- For I/O errors.CertificateException
- If any of the certificates in the keystore could not be saved.NoSuchAlgorithmException
- If the algorithm used to check the integrity of the keystore cannot be found.KeyStoreException
- If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.
writeAndroidKeyStore
public static String writeAndroidKeyStore(RuntimeBuilderProps props, File file, boolean isRelease) throws NotFoundException, KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException Writes an Android KeyStore to file.- Parameters:
props
- The runtime builder properties.file
- Destination file for a PKCS#12 KeyStore (i.e. "file-name.p12").isRelease
- The release KeyStore when true, debug when false.- Returns:
- The password for the keystore.
- Throws:
NotFoundException
- If properties are not found.IOException
- For I/O errors.CertificateException
- If any of the certificates in the keystore could not be saved.NoSuchAlgorithmException
- If the algorithm used to check the integrity of the keystore cannot be found.KeyStoreException
- If no Provider supports a KeyStoreSpi implementation for the PKCS#12 type.
getTextTable
Gets the text table.- Returns:
- The text table used, null for none.
getDerivedTextTables
Gets all tables in all open projects that derives from this text table.In runtime, this method returns an empty array!
- Returns:
- An array of all derived tables, in runtime always empty, only defined in the Designer!
isInternalBuild
public boolean isInternalBuild()Checks for internal build.- Returns:
- true if internal build, false for external.