SCADE

Project structure & Compilation

Project structure overview

Create a new project using File > New Scade Project

The typical SCADE mobile projects has the following structure

  • the root node is the project name
  • the products folder containing the final apps. It's only visible after the first build
  • the res folder holding resources such as images, icons etc
  • the src folder holding the entire source code
  • the start.swift file that starts the entire mobile application
  • the m1.build file with settings that influence the build

General guidelines

If you reference the file directory structure in code, always assume M1 as your home. That means to access an image dog.jpg in the res folder, you would use res/dog.jpg as the path

The start.swift file

The start.swift file contains the swift code that is executed when the application is started.

The build file

The build file contains important information that is used during the build process:

  • the private keys to sign the application when building for iOS
  • the location of the icons to be used when building an application

Building an app for iOS

To build for iOS, the most important prerequisite is that you provided the necessary keys for iOS code signing. See Code signing settings for setting up the keys.

  1. Choose the target you want to build. For iOS, choose iOS Device.
  2. Press the run button to start the compile process
  1. It will take a few seconds before the console output starts. The initial compilation takes about ~ 30 seconds depending on project size, later runs are faster. The entire .ipa file is built and during compilation, you see the output in the console. You should finally see:

The M1.ipa is now ready to be uploaded to iOS:

Additionally, the Scroll Lock issue might cause some irritation as the final log output is not shown. See here for more information Console Scroll Lock

Apple iOS AppId

The AppId that is generated for the app is following the naming structure com.scade.<projectName>, so if you have a project named MyMobileProject, the app id is com.scade.MyMobileProject. We don't have the ability to set the AppId manually, but looking into adding this shortly.

Building an app for Android

To build an Android app, make sure SDK and NDK are configured as described here Configure Android support

  1. Choose the target you want to build. Choose Android armeabi-v7a
  2. Press the run button to start the compile process
  1. It will take a few seconds before the console output starts. The initial compilation takes about ~ 30 seconds depending on project size, later runs are faster. The entire .apk file is built and during compilation, you see the output in the console. You should finally see:
  1. The Android app has been created and is available for upload in the products directory.

Console Scroll Lock

Console Scroll Lock

Sometimes your console scroll lock is activated, causing the impression as if the compilation process was stopped. If you see an console output similar to below, please make sure that console scroll lock is deactivated.

Please see Eclipse Scroll Lock for more details.

Upload apk file to Android

Hi, we will add this to the IDE shortly, but to upload the apk to your Android, the easiest way currently is to use the adb command

  1. Make sure your Android device is connected via USB cable
  2. Make sure developer mode is enabled
  3. Execute the following command adb install <filename for apk file>
  4. To get the file name and path, click on the apk file and use right click, and Properties
  1. Copy the file and path name and paste it into a console window
  1. The app is now successfully uploaded to Android !!!

Project structure & Compilation