Welcome!

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

Web and WebWorks Development

Reply
New Contributor
d6ff4672
Posts: 4
Registered: ‎11-25-2012
My Device: Simulator
Accepted Solution

PhoneGap (Cordova) + BlackBerry 10 QNX Build Issues with Ant

[ Edited ]

Hello;

 

I am experienced in building applications for the BlackBerry platform, and am currently trying to deploy a sample application with PhoneGap (Cordova) with BlackBerry WebWorks for the BlackBerry 10 Beta (QNX) without much success. I am following the instructions at the PhoneGap Getting Started Guide for BlackBerry guide, linked from their developer blog.

 

At the sixth step of the mentioned guide above, I am getting some issues where theorg.apache.cordova feature cannot be found, as well as all blackberry.* features:

 

D:\Work\Development\PhoneGap\workspace\sample>ant qnx build
Buildfile: D:\Work\Development\PhoneGap\workspace\sample\build.xml

qnx:

build:

generate-cod-name:
     [echo] Generated name: cordovaExample.bar

clean:
   [delete] Deleting directory D:\Work\Development\PhoneGap\workspace\sample\build

package-app:
    [mkdir] Created dir: D:\Work\Development\PhoneGap\workspace\sample\build\widget
     [copy] Copying 24 files to D:\Work\Development\PhoneGap\workspace\sample\build\widget
     [copy] Copying 1 file to D:\Work\Development\PhoneGap\workspace\sample\build\widget
     [copy] Copying 1 file to D:\Work\Development\PhoneGap\workspace\sample\www\js
      [zip] Building zip: D:\Work\Development\PhoneGap\workspace\sample\build\cordovaExample.zip

build:
     [exec]
     [exec] D:\Work\Development\PhoneGap\workspace\sample>"C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9\dependencies\node\node.exe" "C
:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9\lib\bbwp.js" D:\Work\Development\PhoneGap\workspace\sample\build\cordovaExample.zip -o D:\
Work\Development\PhoneGap\workspace\sample\build
     [exec] [INFO]    Populating application source
     [exec] [INFO]    Parsing config.xml
     [exec] [WARN]    Build ID set in config.xml [version], but no signing password was provided [-g]. Bar will be unsigned
     [exec] [WARN]    Failed to find feature with id: org.apache.cordova
     [exec] [WARN]    Failed to find feature with id: blackberry.find
     [exec] [WARN]    Failed to find feature with id: blackberry.identity.phone
     [exec] [WARN]    Failed to find feature with id: blackberry.pim.Address
     [exec] [WARN]    Failed to find feature with id: blackberry.pim.Contact
     [exec] [WARN]    Failed to find feature with id: blackberry.io.file
     [exec] [WARN]    Failed to find feature with id: blackberry.utils
     [exec] [WARN]    Failed to find feature with id: blackberry.io.dir
     [exec] [WARN]    Failed to find feature with id: blackberry.app.event
     [exec] [WARN]    Failed to find feature with id: blackberry.system.event
     [exec] [WARN]    Failed to find feature with id: blackberry.widgetcache
     [exec] [WARN]    Failed to find feature with id: blackberry.media.camera
     [exec] [WARN]    Failed to find feature with id: blackberry.media.microphone
     [exec] [INFO]    Generating output files
     [exec] [INFO]    Info: Package created: D:\Work\Development\PhoneGap\workspace\sample\build\simulator\cordovaExample.bar
     [exec] [INFO]    Info: Package created: D:\Work\Development\PhoneGap\workspace\sample\build\device\cordovaExample.bar
     [exec] [INFO]    BAR packaging complete

BUILD SUCCESSFUL
Total time: 8 seconds

D:\Work\Development\PhoneGap\workspace\sample>

 

Notice that the org.apache.cordova feature cannot be found, as well as all blackberry.* features.

 

Ignoring the warnings and deploying to the BB10 simulator results in this error: http://i.imgur.com/aUcPM.png

 

It should be noted that none of the warnings above or the error upon execution occurs when deploying for the PlayBook instead of BlackBerry 10.

 

It would be appreciated if any guidance can be given to help towards the resolution of this issue.

 

Thank you very much.

Contributor
Gerii
Posts: 33
Registered: ‎04-30-2012
My Device: PlayBook, DevAlpha

Re: PhoneGap (Cordova) + BlackBerry 10 QNX Build Issues with Ant

[ Edited ]

You can ignore those warnings as it packages the bar file successfully. As far as i know, the blackberry.* features that can't be found are only required for BB7 and below (e.g. to access the camera blackberry.invoke.card is being used on BB10 instead of blackberry.media.camera). It should be safe to delete those blackberry.* features from the config.xml if you only deploy to BB10.
To deploy the app to the DevAlpha you have to call ant qnx load-device or ant qnx debug-device if you want to use the WebInspector.
If you're using the simulator, call ant qnx load-simulator.
Please note that you also have to either install a debug token on your device or specify the password for the signing tool in the project.properties file.

New Contributor
d6ff4672
Posts: 4
Registered: ‎11-25-2012
My Device: Simulator

Re: PhoneGap (Cordova) + BlackBerry 10 QNX Build Issues with Ant

Thank you for the response.

I understand that the BB10 WebWorks SDK is still in beta and not all features are currently supported.

We however have an existing PhoneGap app for the PlayBook that we wish to port over to BB10. The official blog post I linked to unfortunately led us to believe that this is fully supported already.

Either way, would you be aware if there are any major negative effects of removing the line referencing "org.apache.cordova"? Like the blackberry.* features, the org.apache.cordova feature also ended up with a warning for BB10.
Contributor
Gerii
Posts: 33
Registered: ‎04-30-2012
My Device: PlayBook, DevAlpha

Re: PhoneGap (Cordova) + BlackBerry 10 QNX Build Issues with Ant

[ Edited ]

It is fully supported, it just uses a different implementation internally (that's why it needs different feature ids compared to PB and BB7 and below).
I haven't removed the line org.apache.cordova as it doesn't cause any harm to my app.
I think the WebWorks packager tries to find org.apache.cordova in the WebWorks SDK folder to copy it into the bar file, while in reality org.apache.cordova already exists in your www folder which is also being copied into the bar file. (Nevertheless I still think this line is still needed to access the Cordova API on the device)

New Contributor
d6ff4672
Posts: 4
Registered: ‎11-25-2012
My Device: Simulator

Re: PhoneGap (Cordova) + BlackBerry 10 QNX Build Issues with Ant

You were very helpful, thank you very much.
Contributor
Gerii
Posts: 33
Registered: ‎04-30-2012
My Device: PlayBook, DevAlpha

Re: PhoneGap (Cordova) + BlackBerry 10 QNX Build Issues with Ant

No problem, just ask if you have any other questions.