12-11-2013 03:16 PM - edited 12-11-2013 04:01 PM
Hello! I'm trying to use the Push Service plugin in my app. I added the plugin through the command line, and checked that the com.blackberry.push folder was infact inside my plugins folder in my project. I ran the app in my device and the Web Inspector gave the next error:
TypeError: 'undefined' is not an object (evaluating 'window.webworks.defineReadOnlyField')
This error appears when the plugin tries to define the push constants like SUCCESS or INVALID_PPG_SUBSCRIBER_STATE, so obviously the plugin never starts to work and I can't use the push service.
I have my Push credentials fine (they work fine in my OS 7 app), and I was very carefull when I wrote the config.xml file. Here it is:
<author email="firstname.lastname@example.org" href="http://www.something.com">Something</author>
<preference name="fullscreen" value="true"/>
<preference name="webviewbounce" value="true"/>
<feature id="blackberry.push" />
<feature id="blackberry.system" />
<feature id="blackberry.invoked" />
<feature id="blackberry.ui.dialog" />
<feature id="org.apache.cordova" required="true" version="1.0.0" />
<rim: permit>access_shared</rim: permit>
<rim: permit>post_notification</rim: permit>
<rim: permit system="true">_sys_use_consumer_push</rim: permit>
<rim: permit>read_device_identifying_information</rim: permit>
<rim: permit>access_pimdomain_messages</rim: permit>
<rim: permit>bbm_connect</rim: permit>
<rim: permit>run_when_backgrounded</rim: permit>
<!-- Have an invoke entry here for when a notification is clicked on in the BlackBerry Hub -->
<!-- This will cause the application to be opened -->
What I did notice was that the function "window.webworks.defineReadOnlyField" is located in the webworks-188.8.131.52.js file wich I don't have included in my project because I'm using cordova.js as the new SDK suggested. So I think that maybe the push plugin is not updated for the new SDK or I'm missing something as well.
Any ideas? Thanks in advanced
*I put a space in the <rim: permit></rim: permit> tags to avoid having a smiley showing in the post, so it's easier to read. In my project there is no spaces between the ":" and the "p"
Solved! Go to Solution.
12-12-2013 09:57 AM
An update was just pushed to the cordova registry which should fix this problem.