Packaging a BlackBerry (WebWorks) PhoneGap/Cordova application - blackberry

I'm working with PhoneGap/Cordova and the only options I see is to build to the emulator or to build for debuging to the device.
I want to package the app for further distribution and publishing. Any thoughts?
Thanks!!

First build with
ant blackberry build
Then, you need to get and install signing keys:
https://developer.blackberry.com/html5/documentation/signing_setup_smartphone_apps_1920010_11.html
Then finally, once you are able to code sign you need to use bbwp to sign and package the zip file generated by the build (the zip is in the build directory of the PhoneGap folder). So navigate to your sdk/bin directory and run:
bbwp C:\myapp\HelloWorld.zip -g mypassword -o C:\myapp\signed
This generates two folders in C:\myapp\signed which contain the signed files. You will need different files depending on the distribution method and a summary is here:
https://developer.blackberry.com/html5/documentation/distributing_your_app_1866990_11.html

https://developer.blackberry.com/html5/documentation/signing_landing_page.html
https://developer.blackberry.com/html5/documentation/distributing_your_app_1866990_11.html
You need to get a signing key from RIM in order to publish your apps to the Blackberry App World. My previous experiences was packaging the app with signing key and allow others to install the app with BlackBerry Desktop Manager using the .alx file generated.

cd into the top level directory of your project (the one that contains the www/ folder). Then call this command:
ant TARGET build
Where TARGET can be blackberry, playbook, or qnx (beta right now). This will create a build/ folder which should contain the needed files for further packaging.

Related

How to export and run iOS project from Kony Visualizer to Xcode?

I am not used to work with kony platform and I have created simple app but I want to export it and run it as native iOS .xcocdeproj.
Kony Visualizer gives you different ways of building and viewing your app, depending on your needs. In Kony Visualizer Enterprise, you can build your app either from the Product menu, or from a command line. And you can view your built app either by previewing it on a mobile device, or by using device emulators and simulators that you configure. Please refer to this docs link to build for iOS using Kony Visualizer.
Please do this below steps.
once Kar file was build. go to your visualizer installation folder and go to plugins and then you can find com.kony.ios_8.2.28.v201811051627.jar file if you are using 8.2.28 version just for example.
Copy above file and rename it as zip file and unzip it.
once unzip was done inside you can find another zip file please unzip. ( ex: 8.2.28.zip)
you can see folder called VMAppWithKonylib.
now go open command-line tool and go to VMAppWithKonylib location.
now go to gen folder location inside your commandline. gen folder will inside VMAppWithKonylib.
7.now run this command - perl extract.pl konyappiphone.KAR
once extract done now go to VMAppWithKonylib and open project in xcode.
let me know if you are facing any more issues.

Phonegap + Blackberry webworks : ant build not generating standardinstall.zip

I am trying to build a BlackBerry 7 and earlier project that uses the WebWorks SDK using Phonegap 2.9; but the build doesn't generate the StandardInstall.zip file as it's supposed to.
The project I'm trying to build is the example app found in the Phonegap 2.9 download (phonegap-2.9.0\lib\blackberry\bbos\example).
I followed the instructions in the Phonegap documentation and there is an overview of my environment:
My OS is Windows XP, I've got JDK, ANT and BlackBerry device manager installed. I've also installed the BlackBerry Webworks SDK and I've setup my Signing Keys (sigtool.csk and sigtool.db are in the bin folder of the webworks installation).
I also updated the project.properties file as explained in the documentation.
When I try to build the app, It doesn't print any error message, but the OTAInstall and StandardInstall folders are not generated (all I get is the zipped application folder and a widget folder).
I also tried deploying to simulator and to device, the errors thrown confirm just that the build step doesn't generate the files it should.
Screenshots: http://i.stack.imgur.com/XpN4M.png
Solutions I already tried:
JDK version problem
I downgraded JDK to 1.6.0_30 version (it seems that the Webworks SDK doesn't work with upper versions); but it didn't change anything.
White spaces
I also tried to avoid white spaces in paths like advised in other posts but it doesn't work:
C:
├ \ant
├ \java
└ \webworks
I don't know what else to do, any help would be much appreciated !
To make a blackberry phonegap project, the things you need are:
Phonegap (cordova libs)
BlackBerry WebWorks SDK
Ant, through which you will build your project.(Also add 'ANT' in you environment variables).
The steps to create a phonegap build:
Open the phonegap sample that came with it. Follow the location -
phonegap-2.3.0\lib\blackberry\sample
Copy cordova folder as you see the sample folder
Copy lib and www folder also. The lib folder contains the cordova library. The www folder is the only place for your files.
It contains your html, css, js and the config.xml
Copy blackberry.xml, build.xml and project.properties files.(change the properties in these files as per your project configurations)
'Build' folder is created once you run the script 'ant blackberry build'(To build the project) or 'ant blackberry load-simulator'(Build and run on simulator) or 'ant blackberry load-device'
Once you have built the project you can run it on device using the .cod files.
When you run the above build scripts you get the build folder in your PhonegapBlackberry project which looks like:
Setting the correct Java jdk home path in bbwp.properties file of my <BlackBerry SDK>/bin folder works for me.
Thanks,
prodeveloper.

Blackberry 10 Webworks SDK command line generate build with package and signing

So I already was able to build the .bar file, but now I want to build the .bar file to be sent to the store with the package and signing.
So far I've tried this.
bbwp C:\xampp\htdocs\maddash\packaged\maddash.zip -g (password) -b 1.0.0 -o C:\xampp\htdocs\maddash\packaged\
and my error is..
failed to find signing key file
Did you register your keys from RIM and put them in the default location (%HOMEPATH%\Local Settings\Application Data\Research In Motion for Windows)
Did you update your SDK? Then check your keys in bbwp\bin and rename sigtool to author and move your file to the default location.
If not sufficient, try installing the native IDE and use the UI for managing the keys in the preferences
My personal opinion about this problem.
First. If you have your signing key, great for you, because BB changed the system of signing apps. (Now they use BBtokenID, related with your BBID and, in this moment, the webworks framework is the only one that doesn't support this tokens) (Come on, Hip, Hip, Hurrah! :P).
According to your command, one comment
bbwp C:\xampp\htdocs\maddash\packaged\maddash.zip -g (password) -b 1.0.0 -o C:\xampp\htdocs\maddash\packaged\
In the first paramenter yoy must add the FOLDER of your source code, not your zipped code.
If you have your keys where it corresponds, it will generate a bar file signed.
NOW, you must package it in a zip file. If you need more help with that, tell me :)

Xcode, Git, Jenkins, PhoneGap 1.5.0 Build Error

I have developed an application with phonegap 1.5.0 previously and now we just pushed into git repository. The app was build successfully in xCode and I was able to install the app and run it on the iPad but when we tried to build it from Jenkins, we got this error
/Users/...../Classes/AppDelegate.m:28:
/Users/......./Classes/AppDelegate.h:31:13: fatal error: 'Cordova/CDVViewController.h' file not found
#import <Cordova/CDVViewController.h>
I really don't know why is this happening. Did I not include any file into gitt that causes this problem? or is there any extra steps that I need to take to put the codes into git? Any advice on this is deeply appreciated.
My PhoneGap project is able to build and generates .ipa.
Here's what I have done for my CI integration using Jenkins:
Install Xcode integration plugin for Jenkins (manage Jenkins --> Manage Plugins --> Available --> Xcode integration).
In your Job configuration, click the Add build Step button and choose Xcode.
In Xcode configuration:
3.1. Add Clean before build.
3.2. Add Target of your project (e.g.: SamplePhonegap).
3.3. Add SDK (e.g.: iphoneos6.1).
3.4. Add Configuration as Debug or Release.
3.5. Add Xcode Project Directory which contain .xcodeproj (e.g.: ${WORKSPACE}).
3.6. Build output directory (e.g.: ${WORKSPACE}/build) [Mandatory Step for PhoneGap App].
3.7. Add Build IPA.
3.8. Add Code Signing Identity (e.g.: iPhone Developer: S*** ** (6**)).
3.9. Add Unlock KeyChain.
3.10. Add keyChain Path (e.g.: ${HOME}/Library/Keychains/login.keychain).
3.11. Add Keychain password.
Finally build your app - it will build and generate the .ipa file.
Note:
3.6 step is mandatory because a PhoneGap project has two build paths: one is our project build path and another one is cordova build path. Jenkins tough to find the path default (In native not need to specify, because it has only one build path Jenkins can easily find). So it's mandatory to provide Build output directory path.
What you can do is to try to clone the git repo to your local machine and build from there. If it's ok, it means that you need to check Jenkins setting/configuration.
This by far the best solution i found.Original Answer
Xcode 6.x
add $(OBJROOT)/UninstalledProducts/include to BuildSettings->Header Search Paths
Xcode 7.x
add $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include to BuildSettings->Header Search Paths
1.Double click the and you can add this in.
2.Change $(OBJROOT)/UninstalledProducts/include to $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include

How to Sign OTA Files for Blackberry?

How do I sign blackberry files in the OTAInstaller folder? I am using phone gap and I have a
\build\OTAInstall folder that contains 1 jar file and a whole lot of .cod files.
How do I sign those cod files?
I followed this tutorial on how to setup signing but I don't know how actually run it to sign.
After following the steps within that tutorial go to...
https://build.phonegap.com/people/edit#pane=signing
Then add BlackBerry Signing key to Phonegap
CSK file and DB file can be found at
C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK 2.3.1.5\bin
sigtool.csk
sigtool.db
Set BlackBerry Signing Keys as default, run build again.
This is what my signing page looks like after setting a key as default.
Go in your command line to the /bin dir of the webworks sdk, for example
C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK 2.3.1.5\bin
then run the signature tool:
java -jar SignatureTool.jar
open any of your .cod files and use 'request signature', it will sign both your standard and otainstall files
make sure to run the tool with java 6, not java 7, it crashes on the later

Resources