What is a Standalone Mobile App?
Usually all Simplifier Apps are mobile ready and can be opened directly with the Simplifier Mobile Client.
If you don’t want to use the Simplifier Mobile Client App, you can build a “Standalone” Distribution for Android and iOS Mobile Devices.
When do i need “Standalone”?
- If you want to publish your App into the Google Play Store or Apple Store with your Company as Issuer, as well with own logo and name
- Your customers should not use the App-in-App-Concept / Simplifier Mobile App
Prerequisites
To export and build a mobile app as a single distribution package, you have to prepare your client with the needed build tools:
Software:
- Installed Cordova Build Tool (Installation Manual)
- Android Studio for building Android Apps (Installation Manual)
- Apple xCode (More Information)
Hardware:
- Windows or Linux Client and/or
- Mac for Apple xCode
You also need an
- Google Developer Account
- Apple Developer Account
Setup Metadata
Key | Example Value | Further Information |
Server URL | https://mysimplifier.mycompany.com | The full Web Address (URI) of the Simplifier Productive Server |
Bundle ID | com.companyname.myAppName | A bundle ID otherwise known as a package is the unique identifier for your Simplifier app. It needs to be unique as when you upload it to App Store it identifies and publishes your app using the package name as the unique app identification. |
Bundle Version | 1 | Enter the build version number of the App, which identifies an iteration (released or unreleased) of the Application. The version is specified in the common format of a string containing numbers separated by dots (eg, 4.3.2). |
Prepare Build Environment
Download App Sources
The download of the app sources is described here.
Check Corodova
cordova --version
It should be Version 10 or higher
Create Workspace
Create a new directory for your App Project “myworkpace”
Copy your Simplifier Mobile Export to Workspace
copy the complete directories and files to workspace
config.xml package.json hooks www
Create Keystore File for Android
Put it under folder signing/android/release.keystore
Add Screen and Icons
res/icons/<android/ios>
res/screens/<android/ios>
and add the icons and images as reference path in your download config.xml
Check complete Build Configuration
Open the File config.xml in an XML Editor like Android Studio, Notepad++ or Visual Studio Code
Check the XML Parameter
android-targetSdkVersion
– at least you should select API Version 30 or higher see Version History
and author
<authoremail="dev@cordova.apache.org"href="http://cordova.io"> Apache Cordova Team </author>
For iOS Builds it the following settings is recommended
<preference name="DisallowOverscroll" value="true" />
Set to true if you don’t want the interface to display any feedback when users scroll past the beginning or end of content. On iOS, overscroll gestures cause content to bounce back to its original position. on Android, they produce a more subtle glowing effect along the top or bottom edge of the content.
For more information about the Config Options refer to the official documentation.
Clean your projects (optional)
If you already did a build within your workspace, clean the results before:
rm -rf platforms rm -rf plugins rm -rf node_modules rm package-lock.json
Init the NPM Modules
NOTE: Only required for Simplifier <= v6.5!
To update the latest sources, switch to your workpace directory and enter
npm run init
Download Cordova Plugins
NOTE: Only required for Simplifier <= v6.5!
To download cordova plugins, enter
npm run fetch
Build your App for Android
If you prepared your environment, you can start the build process
Step 1 Add Android Platform
Add Android Platform to your build project
cordova platform add android
After this step, a new android project have been created in folder platforms/android
Step 2 Create build.json
For signing the app, you have to provide your certificate in the build process
The easiest way is to create a new file build.json with the following contents
Here’s a sample of a build configuration file:
{ "android": { "release": { "keystore": "../android.keystore", "storePassword": "", "alias": "mykey2", "password" : "password", "keystoreType": "" } } }
Parameter | Flag | Description |
---|---|---|
Keystore | --keystore |
Path to a binary file which can hold a set of keys |
Keystore Password | --storePassword |
Password to the keystore |
Alias | --alias |
The id specifying the private key used for signing |
Password | --password |
Password for the private key specified |
Type of the Keystore | --keystoreType |
Default: auto-detect based on file extension Either pkcs12 or jks |
Step 3 Start Android Build
Enter
cordova build android
to compile the app via android studio. The apk will be created unter
<yourworkspace>/platforms/android/app/build/outputs/apk
Build your App for iOS
For iOS you have to install xCode before – the build process can only run on MacOS
Step 1 Add iOS Platform
Go to console, switch to your workspace and enter
cordova platform add ios
After that, the xCode Project and iOS Ressource will be created
Step 2 – Add ios Build Config to build.json
Open or create the build.json in your workspace
{ "ios": { "release": { "codeSignIdentity": "iPhone Developer", "developmentTeam": "FG35JLLMXX4A", "packageType": "app-store", "automaticProvisioning": true, "buildFlag": [ "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES", "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO", "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\"" ] } } }
For more explanation see table below
Parameter | Flag | Description |
---|---|---|
Code Sign Identity | --codeSignIdentity |
Code signing identity to use for signing. It can be created with Xcode and added to your keychain. Starting with Xcode 8 you should use --codeSignIdentity="iPhone Developer" both for debug and release . |
Development Team | --developmentTeam |
The development team (Team ID) to use for code signing. You would use this setting and a simplified Code Sign Identity (i.e. just ‘iPhone Developer’) to sign your apps, you do not need to provide a Provisioning Profile. |
Packaging Type | --packageType |
This will determine what type of build is generated by Xcode. Valid options are development (the default), enterprise , ad-hoc , and app-store . |
Provisioning Profile | --provisioningProfile |
(Optional) GUID of the provisioning profile to be used for manual signing. It is copied here on your Mac: ~/Library/MobileDevice/Provisioning\ Profiles/ . Opening it in a text editor, you can find the UUID which needs to be specified here if using manual signing. |
Code Sign Resource Rules | --codesignResourceRules |
(Optional) Used to control which files in a bundle should be sealed by a code signature. For more details, read The OS X Code Signing In Depth article |
Automatic Provisioning | --automaticProvisioning |
(Optional) Enable to allow Xcode to automatically manage provisioning profiles. Valid options are false (the default) and true . |
Step 3 – Start the Build Process
Start the build process with
cordova build ios