SCADE

Installation on OSX

July 2017 - SCADE Version 1.0 Beta4

Introduction - Up and running in 10 minutes

At SCADE, we are working on streamlining the installation over the next couple of versions. Thanks to all that provided valuable feedback. Please find the instructions below

All download links are included in the below instructions.

Prerequisites

Supported versions

SCADE 1.0 is supporting the following versions

  • NEW Swift 3.1
  • iOS 9.0 and greater
  • Android 5.0 and greater

Requirements

  • OS requirement : Swift, and therefore SCADE, requires OSX version 10.10 or higher
  • XCode 8.x including Swift 3.1 is installed on the machine
  • Android NDK R11c
  • Android SDK 24.4.1 or higher
  • CMake 3.1 or higher
  • Gradle > 2-14.1 but < 3.0
  • Java 8
  • Harddisk space: You need about 800 MB of harddisk space

Step 0 - Install brew & wget

  1. Open terminal
  2. Install homebrew if you don't have it
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Install makedepend
    brew prune
    brew install makedepend
    This will automatically link makedepend, however to confirm enter:
    brew link makedepend
  4. Install wget
    brew install wget

Step 1 - Install Android NDK

  1. Download wget http://dl.google.com/android/repository/android-ndk-r11c-darwin-x86_64.zip -q --show-progress
  2. Unzip in user directory unzip -qq ./android-ndk-r11c-darwin-x86_64.zip -d ~/
    Be patient, this is a big file and takes about 2 mins.

If unzipping fails, download an archiver or unzipping app. There are several available on the App Store for free.

You should now find a directory android-ndk-r11c in your user directory.

Step 2 - Install Android SDK

  1. Download sdk wget https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip -q --show-progress
  2. Unzip sdk unzip -qq ./android-sdk_r24.4.1-macosx.zip -d ~/
  3. Run Android SDK Manager using ~/android-sdk-macosx/tools/android
    3.1 You may be presented with an error dialog (image below). Select the "More Info..." option. This will take you the download page. Follow all instructions. You may be required to restart your computer to allow the installation of Java to be complete.
    3.2 Reenter ~/android-sdk-macosx/tools/android
  4. Uncheck all default selections and choose
    • Android 6.0 (API 23)
    • Tools / Android SDK Build-tools version 23.0.2
    • Extras / Android Support Repository
    • Extras / Google Play Services
    • Extras / Google Repository

Your selection windows should look like this

Now continue by pressing the Install 17 packages and accepting the licenses multiple times Finally, let's clear the android folder

  • The .android folder. The .android folder that exists in the home directory of the user holdes settings that aren't needed and we want to start with clean slate.
  • Delete the android folder using sudo rm -Rf ~/.android

Step 3 - Install Gradle

Gradle is our favourite build tool we use to build our Android and iOS app. If you are already using Gradle >= 2.14.1 and < 3.0 , you can skip this step.

Gradle can be installed in different locations. We use the local user directory

  1. Get Gradle using wget https://services.gradle.org/distributions/gradle-2.14.1-all.zip -q - -show-progress
  2. Unzip Gradle using unzip -qq ./gradle-2.14.1-all.zip -d ~/
  3. Export Gradle home using export GRADLE_HOME=~/gradle-2.14.1
  1. Edit bash using vi ~/.bash_profile
  1. In the VI edtor, after making the modifications, use :wq! to save and quit (Press Escape, type :wq! and press Return)
  2. Exit the terminal and open new terminal session for the bash setting to become active
  3. Use gradle -v to review your version Your output should look similar to this:

Step 4 - Install CMake

CMake is used to compile and build the Apple iOS software

  1. Execute brew install cmake
  2. You are done. cmake -version should give you cmake message stating a version higher than 3.4.1

Step 5 - Verify Swift 3.1 and XCode Location

Especially if you have multiple versions of Xcode installed, its critical that you are using the correct version. Doublecheck using these commands

  • swift -version
  • xcrun swift -version

All these commands should point to Swift 3.1

If this doesn't result in Swift 3.1 option, try setting the command line tools Command Line Tools Setup

Step 6 - Install SCADE

Download and extract SCADE from here

  1. Download SCADE here www.scade.io/download/
  2. The dmg file should now be in your Download folder (or similar folder)
  3. If your Mac did not automatically unzip the zip file, doubleclick to open the archive
  4. Scade.dmg becomes available in your folder

Run install

  1. Double click on Scade.dmg
  2. The Install dialog opens. Drag and drop Scade into the Applications folder
  1. Confirm that you want to overwrite any content

Start Scade

  1. Run SCADE from your applications directory
    You find SCADE using Command + Space and searching for SCADE

or through your Applications Directory. Start it

  1. When you start SCADE for the very first time, you need to confirm this dialog

Choose Workspace

You will now be asked to provide a workspace folder. The workspace folder will contain the following assets:

  • SCADE projects
  • SCADE SDK and binary built during compilation process

Choose a good workspace location

Workspace location

Please make sure that the workspace location you choose is OUTSIDE of the directory where SCADE resides. In this way, you can update the software without impacting your work.

Step 7 - Configure Android support

The following settings make it possible to compile to iOS and Android. Without the settings, you will be able to develop and run on iOS, but not be able to compile.

Open the preferences settings

and configure the paths. When you press the apply button, we do check the validity of the path.

Here are the default directories from the above installation steps:

Software Location
Android NDK /Users/<Username>/android-ndk-r11c
Android SDK /Users/<Username>/Library/Android/sdk
Gradle /Users/<Username>/gradle-2.14.1/bin/gradle
CMake /usr/local/bin/cmake
Make /usr/bin/make
  • You need to append /bin/gradle to the home directory path of Gradle
  • The default Android SDK path on MAC is /Users/<username>/Library/Android/sdk

Step 7.1 - Check XCode path for spaces

We use cmake for Android compilation, and unfortunately cmake cannot handle any spaces in the XCode path. Make sure that there are no whitespace in the XCode path, and if there are, rename the folder XCode is located in so that it doesn't contain spaces anymore.

Step 8 - Configure iOS support

Configure files

Apple requires two different files for compiling apps

  • a certificate file for signing the app, for instance cert.p12
  • a mobile provision file prov.mobileprovisioning

You need to specify the location of these files in the build file of your app.

  1. Open the build file <YourApp>.build that can be found in the root directory of your project
  2. Scroll to the codeSignSettings section at the end of the file
  3. Modify the entries as shown below to reflect the location of your files

Make sure certificate is in keychain

The certificate needs to be part of the keychain. Double click on it and make sure its part of your keychain:

Certificates and password support

Certificates can be password protected. Currently, we don't support password protected certificates, but will add this feature in the future.

Set Command Line Tool option

Sometime the command line tools use the wrong version. Here the step to set command line tools to use Swift 3.1

  1. Run XCode 8.3.1
  2. Set Command Line Tools to use 8.3.1

Troubleshooting tips

IDE complains about no such module ScadeKit

What went wrong:
You did not use new workspace folder

How to fix:
Switch to new unused workspace folder

Installation on OSX

July 2017 - SCADE Version 1.0 Beta4