You can grab the full source of the BlackBerry 10 Cascades helper class from our GitHub account.
Otherwise just download the library and header files to include in your project.
Please not that this library is for Cascades projects and depends on QtCore being available as a library.
If you downloaded the full source from our GitHub account then locate the 2 folders called Simulator-Debug and Device-Release under the CBHelper folder.
Copy both these folders in your porject's directory. In our example we have put them under a libs folder in the project.
In the Momentics IDE refresh your project, then right click on it and select configure -> Add Library...
In the first screen select External library and click next.
In the device library field select the .a file included in the device-release folder and in the simulator library field use the .a file in the simulator-debug folder.
In the include folders field click add and select the header folder for both the device-release and the simulator-debug folder.
Open the Add Library dialog again and select the Standard BlackBerry Platform library option.
From the list select BlackBerry Device Info and Qt Core from the Common Services section. Follow the cheat sheet as in the previous step to update your configuration.
The LIBS item in your .pro configuration file should end-up looking like this
LIBS += -lbbdevice -lbbnetwork -lbbsystem -lcurl -lQtLocationSubset -lCBHelper
Make sure you bar descriptor allows access to the Device Identifying Information, GPS Location and Internet.
Use the Cloudbase namespace to access the CBHelper object.
#include "CBHelper.h" using namespace Cloudbase; CBHelper* helper = new CBHelper("my-app-code", "12345AppUniqCode23455"); // You will need to generate the md5 hash of the password string before // sending it to the helper class helper->setPassword(md5PasswordVar);