Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 169
Registered: ‎03-25-2011
My Device: Playbook, Z10 L.E.
My Carrier: Vodafone NL

C/C++ Native AND BB10 development on the same machine - beginners tip

Hello fellow beginner developers,

today I finally started messing around with C/C++ development for BlackBerry and it's quite exciting. It's been almost 10 years since I did C/C++ development. Good old times.


As any beginner (n00b) I was stuck with some pretty basic stuff which is SO obvious that is not clearly documented. On the split page, there's a small "tablet" logo and a "bb10" logo on the C/C++ Native box and just the "bb10" logo on Cascades. How could I miss that?! Anyway...


My goal is to make an app that runs on Playbook and on Dev Alpha. Here's an extremely basic info for understanding your development environment:


  1. You need to download both SDKs from the website: Native(Playbook) and Cascades(Dev Alpha). For now. In the future, when Playbook is considered BB10, only one SDK will be needed. There's a way around it though.
  2. You must install each SDK on a separate folder. Now you have two distinct installations of the QNX Momentics IDE (bbndk.bat for Win or bbndk.command for Mac). Don't be fooled by Desktop Shortcuts! You can open/load wrong projects on the IDE but it won't build.
  3. I recommend creating separate workspace folders for each, this way is easier to know which project runs on a device.
  4. You can use the same signing keys and certificates for both IDEs. Your debug token must have both devices registered.

That's it! As I said: extremely basic info.


Now comes the interesting part which is not so basic: what would be the best approach nowadays to create and app that runs on both devices? My general idea is to create three separete projects:

  1. A C/C++ shared libary with all the generic functionality of my app. The main functionalities, settings, etc.
  2. A Playbook specific project wich links with the shared library above. This one would have assets and UI optimized for the device. IT could use plain Qt for the UI.
  3. The same as item 2 but for the Dev Alpha and using Cascades for the UI.

Please leave your thoughts on the topic and help other beginners like me figure out this brave old world.



Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: C/C++ Native AND BB10 development on the same machine - beginners tip



Even if you are targetting only one platform, it's still a good idea to separate your logic from your UI. As your app matures you'll notice that you are repeating the same core logic. It makes sense to abstract htat code to be re-usable. In general, a single piece of code should do only one thing, and it should be the only piece of code that does that.


When you go to port from one platform/form factor/framework to another, you'll be able to re-use the stuff you had already written and build only those new parts that are really different.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands