Skip to main content
Version: 8.1

Brand and publish mobile apps basics

Level: beginner

You can use your logos and names to brand a mobile app built on Mobile Creatio using the SDKConsole utility.

Set up the SDKConsole utility

In general, the procedure comprises the following steps:

  1. Perform the preliminary setup.
  2. Install and set up the SDKConsole utility.
  3. Run the SDKConsole utility.

1. Perform the preliminary setup

  1. Ensure you can publish the app. You must be enrolled into Apple Developer program to publish your app on iOS and have a Google Play developer account to publish the app on Android. Learn more on Apple and Android websites: Apple Developer Program, Google Play Console.

  2. Enable Firebase Cloud Messaging to send push notifications.

    1. Sign in to https://firebase.google.com/.

    2. Click Go to console in the top right.

    3. Create a project in the console.

    4. Add your Android and/or iOS app to the project.

    5. Download the config files for the app and save them for later. Specify the path to these files in the utility settings using the google_service_info_file property.

    6. Retrieve the server API key. To do this, click in the top left of the Firebase project dashboard → Project SettingsCloud Messaging tab → Project credentialsServer key.

    7. Save the server API key to the [PushNotificationService] table of the Creatio database. For example, you can do it using the following SQL query.

      SQL query
      UPDATE PushNotificationService SET Settings = '{"url":"https://fcm.googleapis.com/fcm/","apiKey":"Some_Api_Key"}'

      Some_Api_Key is your API key.

  3. Download and install Java development kit version 8.

  4. Register your app with App Store Connect (iOS only). To do this, follow the procedure in the official Apple documentation.

  5. Install the APNs certificates into Firebase (iOS only). iOS projects require you to install the development and production APNs certificates. To do this:

    1. Open the certificate configuration page: Certificate.
    2. Add and install development and production Apple Push Notification service SSL certificates into your Mac.

    You also need to generate, download and install provisioning profiles.

    Upload the *.p12 files exported from Keychain Access in the Firebase settings on the Cloud Messaging tab.

  6. Install J2ObjC (iOS only). The native functionality of the Mobile Creatio application is partly written in Java. The J2ObjC utility for Java code to Objective-C translation is required for shared use on iOS. Learn more about the utility in the official Google documentation. To install J2ObjC:

    1. Download the J2ObjC release version archive (2.0.5) to a Mac.
    2. Unpack the archive into your user home directory (MacintoshHD/Users/MyUser /). The unpacked archive must contain the dist directory.
    3. Rename the unpacked archive directory to j2objc.

2. Install and set up the SDKConsole utility

  1. Contact Creatio support (support@creatio.com) and specify the email address that is or will be associated with your GitLab account. The support team will send you a signup link. After the signup, you will be able to access the SDKConsole project.

  2. Sign up for GitLab. Open the link you received from the Creatio support and follow the instructions. If you sign in with a third-party service, make sure that you have a password set up for your GitLab account. To do this, click the profile icon in the top right → Edit profilePassword.

  3. Install the SDKConsole utility.

    Install the SDKConsole utility on Mac

    The utility supports iOS and Android on Mac. You will be requested an administrator password on your Mac during the installation. If you do not know or remember the password, ask your system administrator or the owner of the Mac.

    1. Download and install XCode.

    2. Download and install Git.

    3. Download the current version of the SDKConsole utility to a folder to which you have all permissions. To download the utility, run the following Git command:

      git clone https://gitlab.com/bpmonlinemobileteam/sdkconsole.git SDKConsole
    4. Open Terminal and go to the directory where the SDKConsole utility is located.

    5. Install brew by running the following command at the terminal:

      ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)
    6. Run the ./install command at the terminal.

    7. If the command was successful, install fastlane utility plugins. To do this, run the ./install_plugins command at the terminal. When asked whether fastlane should modify the Gemfile, enter y.

    Install the SDKConsole utility on Windows

    The utility supports only Android on Windows.

    1. Download and install/update Node.js.

    2. Download and install Git.

    3. Download and install Android Studio.

    4. Download the current version of the SDKConsole utility to any directory. To download the utility, use the following Git command:

      git clone https://gitlab.com/bpmonlinemobileteam/sdkconsole.git SDKConsole
    5. Open the command prompt and go to the directory where the SDKConsole utility is located.

    6. Run the npm install command at the command prompt.

  4. Update the SDKConsole utility.

    1. Back up the SDK.config file that contains the user settings. That way you will not have to reconfigure the utility.
    2. Download the utility archive from the Git repository.
    3. Unpack the archive into your utility folder.
    4. Move the SDK.config backup to the utility folder.

3. Run the SDKConsole utility

  1. Configure the SDKConsole utility. Before you run the utility, configure the settings in the SDK.config file. Make sure that you do not use a single backslash (\) in your file paths. Learn more about the utility settings in a separate article: SDKConsole utility settings.

    Example of the SDK.config file
    {
    "name": "Creatio beta",
    "web_resources_path": "res/web",
    "tasks": ["prepare", "build", "deploy"],
    "use_extended_logging": true,
    "server_url": "https://mysite.creatio.com/",
    "iOS": {
    "repository_path": "https://gitlab.com/bpmonlinemobileteam/ios.git",
    "source_path": "",
    "google_service_info_file": "",
    "launch_storyboard_image_path": "res//LaunchStoryboard.png",
    "app_identifier": "com.myapp.mobile",
    "app_icon_path": "../res/AppIcon.png",
    "version_number": "7.13.9",
    "build_number": "2"
    "app_store_login": "some@gmail.com",
    "certificate_path": "/Users/your_user_dir/ios_distribution.cer",
    "certificate_password": "private_key_password_of_certificate",
    "apple_2FA_specific_password": "apple_specific_password",
    "testflight_changelog": "My what's new"
    },
    "Android": {
    "build_type": "debug",
    "repository_path": "https://gitlab.com/bpmonlinemobileteam/android.git",
    "source_path": "",
    "google_service_info_file": "",
    "package_name": "com.myapp.mobile",
    "version_number": "1.1.1",
    "build_number": 2,
    "native_resources_path": "res/android/res",
    "key_file": "C:/hybrid/platforms/android/androidappkey",
    "store_password": "android_app_distribution_password",
    "key_alias": "some_key_alias",
    "key_password": "key_password"
    }
    }
  2. Run the SDKConsole utility.

    Run the SDKConsole utility on Mac
    1. Open Terminal and go to the directory where the SDKConsole utility is located.
    2. Run the ./build command at the terminal.

    The result of the utility execution depends on the specified tasks:

    • If prepare is the only task in the task list, the utility only performs rebranding. You will get a finished project for the corresponding platform, but you will need to build and publish the app manually.
    • If the task list contains build, the utility will add an *.ipa iOS app file and/or *.apk Android app file to the utility directory.
    • If the task list contains deploy (iOS only), the utility will publish the application to TestFlight immediately using the authentication parameters specified in the SDK.config file.
    Run the SDKConsole utility on Windows
    1. Open the command line and go to the directory where the SDKConsole utility is located.
    2. Run the node SDKConsole.js command at the terminal.

    The result of the utility execution depends on the specified tasks:

    • If prepare is the only task in the task list, the utility only performs rebranding. You will get a finished Android project, but you will need to build and publish the app manually.
    • If the task list contains build, the utility will add an *.apk Android app file to the utility directory.

Description of the solutions for typical errors

View the solutions for typical errors in the table below.

The solutions for typical errors

Error description

Error correction

The Unable to determine Android SDK directory error on Mac

  1. Open Terminal.
  2. Run the following commands at the terminal:
echo "export ANDROID_HOME=~/Library/Android/sdk;export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools:$ANDROID_HOME/platforms;" >> ~/.bash_profile source ~/.bash_profile

The Couldn't find the specified scheme 'bpm'online'. Please make sure that the scheme is shared… error when running the build for an iOS project on Mac

Re-run the build. If this does not help, take the following steps:

  1. Open the iOS project (BPMonlineMobile.xcworkspace) in XCode.
  2. Select the current build scheme. If the [bpm’online] scheme is not selected, select it in the list.
  3. Click the current scheme once more and select Edit scheme… in the list.
  4. Select the Shared checkbox.
  5. Close XCode.
  6. Run the ./build command at the Terminal.

Remove the permission denied message for my build in the Mac Terminal

Run the following command at the terminal:

chmod -R +x build

The function fs.copyFileSync is undefined error during the build on Mac

Run the following commands at the Terminal:

brew link --overwrite node
brew postinstall node

The Unable to determine Android SDK directory error on Windows

Specify the ANDROID_HOME environment variable where you need to provide the path to the Android SDK specified during the installation of Android Studio.


Resources

Official Apple Developer Program website

Official Google Play Console website

Official Firebase website

Java development kit version 8

Official App Store Connect documentation

J2ObjC command-line tool (official Google documentation)