DEVELOPERS BLOG

Troubleshooting BlackBerry Dynamics Applications for Developers

You’ve downloaded a recent version of the BlackBerry Dynamics SDK and followed the instructions in the Developer Guide to secure your application.
You run the application and it doesn’t connect to your server or it crashes right away.
What do you do?

I’ve been helping customers resolve Dynamics SDK issues since it was launched about 8 years ago. Hopefully, my blog will help you too.

In order to begin troubleshooting, you need to know the basics.

The Dynamics infrastructure consists of the following components:

1. The BlackBerry SDK - used to secure your application(s)

2. The BlackBerry Dynamics NOC – routes traffic between the app and your network

3. The BlackBerry UEM server – allows IT admins to configure users, apps, policies, etc

4. Optionally, an application server to which your application connects

(Check out the Architecture Overview page for detailed information)

Debug Logs

The most important step in order to debug an application is to enable debug logging. Debug logging prints Dynamics-SDK logs to your IDE’s output window.

For iOS apps, debug logging is enabled by adding the GDConsoleLogger key to your application’s info.plist, and setting its value to GDFilterNone.
Here’s a screenshot:

Rebuild the application and run it using Xcode. The logs get printed to the Xcode output window and lines contain ‘DBG’ in them:
 

The very first error in the debug logs will typically pinpoint the issue, especially if it’s a crash. I usually search the logs for the following keywords: failed, error.
The logs also print the version of the SDK that the app is using just like in the screenshot above.

Note: The logs are formatted so that they can be easily copy/pasted into Excel for further analysis/filtering

Search the Knowledge base

If the logs haven’t helped you to figure out the issue, search the support knowledge base (KB) for the errors. Whenever we close a support ticket, we make sure that we document the solution in a knowledge base article to help other developers

Eg. If your application crashes on launch, this KB article usually resolves the issue:

https://support.blackberry.com/community/s/article/42805

Search using Google

Remember that Dynamics applications are native applications built with the Dynamics SDK. Not all errors that you encounter are specific to the SDK and so you may find your answer using Google.

Sample Applications

The Dynamics SDKs are shipped with sample applications that can be built on your computer. iOS Sample apps are installed on your Mac when you install the SDK. They can be found at the following location:
~/Library/Application Support/BlackBerry/Good.platform/iOS/Examples

Android and Cordova SDKs contain sample apps in the downloaded SDK folders.

Sample applications are useful in the following ways:

1. They demonstrate the use of Dynamics features using Dynamics API calls. If I’m unsure of the usage of an API call, I often search my Mac for the specific call in case it’s used in a sample app. Spotlight finds it right away.

2. They can be built and run in your own environment to do an end-to-end test of your environment including your IDE and UEM server configuration

3. When you report a bug with Dynamics, you can modify a sample app and send it to us to reproduce the issue easily

Note: Dynamics apps are native apps and can be run in the simulator as long as they are not dependent on hardware features like the camera or dependent on App Store apps.
They do not have to be run on a physical device during development.

Open a Support Ticket

If you’ve tried everything and are still stuck, we’d like to help you resolve the issue.

1. Login to myaccount.blackberry.com

2. Open a ticket using the following categories “BlackBerry SDKs” > “BlackBerry Dynamics SDK”

3. Please make sure you provide a clear, high-level description of the issue and include a copy of Xcode debug logs

4. If you can provide steps to reproduce the issue, or modify a sample app to reproduce the issue, it’ll be much faster to resolve

If you are not a named caller in your company’s portal, ask your UEM admin to open the ticket for you and cc your email address in the ticket.

Note: If you are an ISV Partner, you can use the form on https://blackberry.com/isvhelp to open a ticket.

Mayank Bhatia

About Mayank Bhatia

Mayank is an application software engineer who has helped enterprise developers integrate the BlackBerry Dynamics SDK to secure their iOS apps. He now manages the SDK support team at BlackBerry.

Mayank joined Good Technology in 2011 as the first Developer Support Engineer for the Good Dynamics SDK. Good was acquired by BlackBerry in 2015.