Good Dynamics SDK Part 2: Building Your First Good-Secured App

01.26.16 / EK Choi


Welcome to Good Dynamics Application Development!

I am excited to share how to create a Good-Secured app as part of the Good Dynamics SDK series. If you haven’t already, check out part 1: Good Dynamics SDK Overview.

Let’s get right to it.

Step 1. Sign up for Good Developer Online Account. It’s Free!

Your first step is to register for the Good Developer Network community. Your Good developer online account will give you access to a variety of online resources including Good SDKs and plugins.

Step 2. Install Good Dynamics SDK

The Good Dynamics Platform provides a range of SDKs and plugins, allowing developers to build native, hybrid or web apps on iOS, Androids and Windows. You can download the Good SDKs and plugins here. Check out the Getting Started Guide for each platform to learn how to install the Good Dynamics binaries and supported features for the platform.

Step 3. Create a New App using Good Dynamics Template via Xcode(iOS)

The next step is to build the Good-secured app. I’ve created a simple Good-Secured iOS app using the Good Dynamics app template (Figure 1) from the Xcode project.

good_sdk_image1Figure 1: Good Dynamics App Template in Xcode

Step 4. Configure App to Run in Enterprise Simulation Mode
Once you create a project using the Good Dynamics (GD) template, you have a Good-secured app. The app will have to go through the same secure activation process that all users of Good-secured apps experience.  When you first run the application, it will prompt you to activate the app on the Good Dynamics infrastructure.  To fully test that process, you will need to set up the Good Dynamics platform environment. However, you can skip this step for now if you just want to prove that the app works.

To get around the full activation process and test the app, run the app in Enterprise Simulation mode. This allows testing of Good-secured apps prior to a full deployment of the Good Dynamics Platform management infrastructure.

To enable Enterprise Simulation mode, browse to the project’s Info.plist file in Xcode, add a new row, enter the values as below, rebuild the app and run it in the simulator.

Key: GDLibraryMode
Type: String (default)
Value: GDEnterpriseSimulation

Step 5. Build and Run your Good-Secured App
That’s it – you can now build your first Good-secured app and get it running.

Step 6. Activate and Provision the App
When your app is running for the first time on the iOS simulator, you’ll still be prompted to activate the app, but this time you can enter any email address and any 15-character access key to complete the activation process (Figure 2).


Figure 2: Good-Secured App Activation in Enterprise Simulation Mode

The app will go through the enterprise activation process and once the app has been activated, you’ll be prompted to create a password to access the app. The “Password Requirements” link at the bottom of the screen provides guidance on required password complexity. Password complexity is controlled via policies managed by the IT Admin via Good Control management, which is a topic for another blog. For now you can just choose a simple 4-character password (Figure 3).


Figure 3: Enterprise Activation and Password Requirements

Step 7. You’re Done!

Where do you go from here? Depending on your level of interest, here are some suggestions:

  • Browse through the sample app to get familiar with how the Good Dynamics classes are used. Modify the code to see what changes in the app. The sample apps are available with the Good Dynamics SDK distribution.  On iOS, the apps are in the /Good Technology/Good.platform/Examples directory. On Android, look in the “samples” sub-directory in the directory where the Good Dynamics SDK is installed
  • Make your own app into a Good-secured app: Use code snippets from the Good Dynamics sample app to start porting your existing app to the Good Dynamics Platform
  • Extend sample apps: Add in functionality to make your own Good-secured app

To test your app on a physical device, just remove the plist entry for the GDLibraryMode key and rebuild the app. You will also need to set up a Cloud Good Control or Good Controls and Good Proxy for on premise deployment. The Cloud Good Control only works for apps without server backend. That’s for another post.

That’s it. Stay tuned for our next Good SDK series.


EK Choi

About EK Choi

EK is a member of the Enterprise Solutions Team, helping developers to create secure applications using BlackBerry solutions and services.