Giter VIP home page Giter VIP logo

raix-push's Introduction

DEPRECATED: This package is no longer maintained

Gi-SoftWare

raix:push Push notifications

Build Status semantic-release

Push notifications for cordova (ios, android) browser (Chrome, Safari, Firefox) - One unified api on client and server.

Status:

  • APN iOS
  • GCM/FCM Android
  • APN Safari web push (partially implemented)
  • GCM Chrome OS (partially implemented)
  • Firefox OS (partially implemented)
  • BPS Blackberry 10
  • MPNS Windows phone 8
  • MPNS Windows 8
  • ADM Amazon Fire OS
  • Meteor in app notifications

Contributing

We are using semantic-release following the AngularJS Commit Message Conventions - Following this pattern will result in better versioning, better changelog and shorter release cycle.

Updates For Android 8.0

Meteor must be version 1.6.1

Cordova Android must be version 6.3.0 Cordova IOS must be version 4.5.0

Meteor release 1.6.1 https://docs.meteor.com/changelog.html#changes-10 "The cordova-lib package has been updated to version 7.1.0, cordova-android has been updated to version 6.4.0 (plus one additional commit), and cordova-ios has been updated to version 4.5.4"

To verify the correct installation ADD [email protected] to your cordova plugins file.

After your app builds, Make the following changes to your build.gradle file. The simpliest solution to modify this file is in android studio.

The correct gradle file to modify has this line at the begining of the file:

apply plugin: 'com.android.application'

Add this two your dependencies:

classpath 'com.google.gms:google-services:4.1.0' // I added both of these
classpath 'com.google.firebase:firebase-core:11.0.1' // I added both of these

At the end of your build.gradle file add:

apply plugin: 'com.google.gms.google-services'

In case your run into errors with conflicting google libraries add:

configurations.all {
  resolutionStrategy {
    force 'com.android.support:support-v4:27.1.0'
  }
}

configurations {
  all*.exclude group: 'com.android.support', module: 'support-v13'
}

Other errors refer to:

https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#co-existing-with-plugins-that-use-firebase

Changes for the API: On the client make sure you add a android channel:

PushNotification.createChannel(
    () => {
        console.log('createChannel');
    },
    () => {
        console.log('error');
    },
    {
       id: Meteor.userId(), //Use any Id you prefer, but the same Id for this channel must be sent from the server, 
       description: 'Android Channel', //And any description your prefer
       importance: 3,
       vibration: true
      }
);

Server changes: Add the android_channel_id so the Push message like below:

Push.send({
	  from: 'test',
	  title: 'test',
	   text: 'hello',
          android_channel_id:this.userId,		//The android channel should match the id on the client
          query: {
              userId: this.userId
          }, 
          gcm: {
            style: 'inbox',
            summaryText: 'There are %n% notifications'
          },          
});  

Install

  $ meteor add raix:push
  $ meteor add cordova:[email protected]
  $ meteor add cordova:[email protected]
  # Note: you probably want to adjust the version numbers to the latest versions of the packages

Getting started

Depending on the platforms you want to work with you will need some credentials or certificates.

Have a look at the Basic example

Theres a good walkthrough by Arthur Carabott

Read the raix:push Newbie Manual by @harryward

Or check out the DEMO by @elvismercado (This example uses the deprecated config.push.json)

Example code for sound (todo: add in docs)

Note: Version 3 uses the cordova npm plugin phonegap-plugin-push

Note: Some of the documentation is outdated, please file an issue or create a pull request - same if you find a bug or want to add tests

Development

Watch the project progress for status or join development

Config

Use the Push.Configure function on client and server.

Client

For example in Meteor.startup() block of main.js

Push.Configure({
  android: {
    senderID: 12341234,
    alert: true,
    badge: true,
    sound: true,
    vibrate: true,
    clearNotifications: true
    // icon: '',
    // iconColor: ''
  },
  ios: {
    alert: true,
    badge: true,
    sound: true
  }
});

Additionally you have to touch mobile-config.js

App.configurePlugin('phonegap-plugin-push', {
  SENDER_ID: 12341234
});

This is due to changes in the cordova plugin itself

Server

For example in Meteor.startup() block of main.js

Push.Configure({
  apn: {
    certData: Assets.getText('apnDevCert.pem'),
    keyData: Assets.getText('apnDevKey.pem'),
    passphrase: 'xxxxxxxxx',
    production: true,
    //gateway: 'gateway.push.apple.com',
  },
  gcm: {
    apiKey: 'xxxxxxx',  // GCM/FCM server key
  }
  // production: true,
  // 'sound' true,
  // 'badge' true,
  // 'alert' true,
  // 'vibrate' true,
  // 'sendInterval': 15000, Configurable interval between sending
  // 'sendBatchSize': 1, Configurable number of notifications to send per batch
  // 'keepNotifications': false,
//
});

Note: config.push.json is deprecating

Common API

    // Push.debug = true; // Add verbosity

    Push.send({
        from: 'push',
        title: 'Hello',
        text: 'world',
        badge: 1, //optional, use it to set badge count of the receiver when the app is in background.
        query: {
            // Ex. send to a specific user if using accounts:
            userId: 'xxxxxxxxx'
        } // Query the appCollection
        // token: appId or token eg. "{ apn: token }"
        // tokens: array of appId's or tokens
        // payload: user data
        // delayUntil: Date
    });

When in secure mode the client send features require adding allow/deny rules in order to allow the user to send push messages to other users directly from the client - Read more below

Client API

    Push.id(); // Unified application id - not a token
    Push.setBadge(count); // ios specific - ignored everywhere else
    Push.enabled(); // Return true or false
    Push.enabled(false); // Will disable notifications
    Push.enabled(true); // Will enable notifications (requires a token...)

Security allow/deny send

This package allows you to send notifications from the server and client. To restrict the client or allowing the client to send use allow or deny rules.

When a client calls send on Push, the Push's allow and deny callbacks are called on the server to determine if the send should be allowed. If at least one allow callback allows the send, and no deny callbacks deny the send, then the send is allowed to proceed.

    Push.allow({
        send: function(userId, notification) {
            return true; // Allow all users to send
        }
    });

    // Or...
    Push.deny({
        send: function(userId, notification) {
            return false; // Allow all users to send
        }
    });

Meteor Methods

raix:push-update

Stores a token associated with an application and optionally, a userId.

Parameters:

options - An object containing the necessary data to store a token. Fields:

  • id - String (optional) - a record id for the Application/Token document to update. If this does not exist, will return 404.
  • token - Object - { apn: 'TOKEN' } or { gcm: 'TOKEN' }
  • appName - String - the name of the application to associate the token with
  • userId - String (optional) - the user id so associate with the token and application. If none is included no user will be associated. Use raix:push-setuser to later associate a userId with a token.

Returns:

recordId - The id of the stored document associating appName, token, and optionally user in an object of the form:

{
  result: 'recordId'
}

raix:push-setuser

Associates the current users ID with an Application/Token record based on the given id.

Parameters:

id - String - The ID of the Application/Token record

raix:push-metadata

Adds metadata to a particular Application/Token record.

Parameters

data - Object containing the following fields:

  • id - String - the ID of the Application/Token record to update
  • metadata - Object - The metadata object to add to the Application/Token document

More Info

For more internal or advanced features read ADVANCED.md

For maintainers

We have a slack channel to keep communication tight between contributors - it's on https://meteoropensourcecomm.slack.com in channel #raixpush

Kind regards

Morten (aka RaiX)

raix-push's People

Contributors

bergjs avatar challett avatar creitz avatar cristiancedenogallego avatar cunneen avatar da314pc avatar danilopaez avatar dennisharrison avatar dependabot[bot] avatar funkyeah avatar guilhermedecampo avatar jraede avatar larsbuur avatar oskareke avatar ppryde avatar renanccastro avatar rodrigok avatar sampaiodiego avatar shivang007 avatar storytellercz avatar tdenovan avatar thebstar avatar timbotnik avatar totoide avatar twavis avatar urossmolnik avatar wrannaman avatar zodern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raix-push's Issues

Device not registering

My device (Ipad IOS 7.0) does not register or prompt to register push notifications. I followed the advice from the iOS Micro Walkthrough

  • Tested cert and key (Verify return code: 0 (ok))
  • set bundle identifier and provisioning profile in Xcode
  • Deploy to name.meteor.com:
meteor run ios-device --mobile-server name.meteor.com
  • Device is connected to server as indicated by Meteor.status().status

Console says:

Push: APN configured
GCM configured

When sending via meteor shell:

Push: Send message "Congratulations" via query {}
Push: Sent message "Congratulations" to 0 ios apps 0 android apps
Push, GUIDE: The "Push.appCollection" is empty - No clients have registred on the server yet...

Xcode output says:

PushPlugin.register: Push notification type is set to none

Any idea what could be the reason for not registering?

Where should the files be stored

I'm starting out using this package, so this is quite confusing to me. When configuring config.push.json...

  1. Where do you place the apn key and cert .pem files? I'm assuming some places are not suitable as the key must be in a secure location.
  2. Where do we place the file config.push.json, since it contains the apn passphrase

APN: Need some help / more detailed sample, pls

@raix thanks heaps for this package.

This is my first time trying to get APN up and running. Rushing to get beta running with TestFlight before the weekend ends and Apple shut it down till the 29 Dec.

Anyway, wondering if you have an example or some additional code snippets, please?

For example, is "pushId" meant to be something like my app identifier
I was not sure what the webServiceUrl is too?

apn: {
            pushId: 'com.push.server'
            webServiceUrl: 'http://some.server.com'
        },

I have put a push.js file in my server directory with your Push.init code:

Push.init({
    /*gcm: {
        pushId: 'xxxxxxxxx'
    },*/
    apn: { // setting this on client throws security error
        passphrase: 'my passphrase',
        // pem files are placed in the app private folder
        certData: Assets.getText('certfile.pem'),
        keyData: Assets.getText('keyfile.pem'),
        production: false, // or...
        gateway: 'gateway.push.apple.com',
    }
});

I am seeing the following in the console:
WARNING: Push APN is configured to production mode - but server is running from localhost

Anyway a "hello APN" type of example would be awesome :-)

thanks again, looking forward to getting this up and running.

Why only send one notification object at a time?

We can specify send interval in config options, but even so at that interval we should send all unsent notifications in the queue each time instead of just one.

Is there a performance reason that you are only sending one notification object per loop?

Ideas for optimal dev environment?

Any recommendations on optimal dev environment for getting this working?

eg localhost + ngrok or something else?

I have been deploying to a test server on AWS but it's a pain and takes a long time for me as I have a slow-up/fast-down internet connections.

Any thoughts? recommendations?

Error: Unknown asset: private/apnDevKey.pem

I get an error when I try to run meteor.
Error: Unknown asset: private/apnDevKey.pem

I have double-checked about million times the file names and path.

config.push.json

{
  "apn": {
    "passphrase": "devdev",
    "key": "private/apnDevKey.pem",
    "cert": "private/apnDevCert.pem", 
    "gateway": "gateway.sandbox.push.apple.com"
  },
  "production": false
}

My folder structure.

Repo
https://github.com/mvaisanen/SimplePushApp

The full terminal output:

$ meteor
[[[[[ ~/Devaus/meteor/myapp ]]]]]             

=> Started proxy.                             
=> Started MongoDB.                           
W20150120-18:08:59.792(2)? (STDERR)           
W20150120-18:08:59.899(2)? (STDERR) /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:173
W20150120-18:08:59.899(2)? (STDERR)                         throw(ex);
W20150120-18:08:59.900(2)? (STDERR)                               ^
W20150120-18:08:59.900(2)? (STDERR) Error: Unknown asset: private/apnDevKey.pem
W20150120-18:08:59.900(2)? (STDERR)     at Object.Future.wait (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:323:16)
W20150120-18:08:59.900(2)? (STDERR)     at getAsset (/Users/Mika/Devaus/meteor/myapp/.meteor/local/build/programs/server/boot.js:150:20)
W20150120-18:08:59.900(2)? (STDERR)     at Object.Assets.getText (/Users/Mika/Devaus/meteor/myapp/.meteor/local/build/programs/server/boot.js:155:16)
W20150120-18:08:59.901(2)? (STDERR)     at app/push.config.os.js:3:21
W20150120-18:08:59.901(2)? (STDERR)     at app/push.config.os.js:10:3
W20150120-18:08:59.901(2)? (STDERR)     at /Users/Mika/Devaus/meteor/myapp/.meteor/local/build/programs/server/boot.js:175:10
W20150120-18:08:59.901(2)? (STDERR)     at Array.forEach (native)
W20150120-18:08:59.901(2)? (STDERR)     at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20150120-18:08:59.902(2)? (STDERR)     at /Users/Mika/Devaus/meteor/myapp/.meteor/local/build/programs/server/boot.js:86:5
W20150120-18:08:59.902(2)? (STDERR)     - - - - -
W20150120-18:08:59.902(2)? (STDERR)     at getAsset (/Users/Mika/Devaus/meteor/myapp/.meteor/local/build/programs/server/boot.js:144:19)
W20150120-18:08:59.902(2)? (STDERR)     at Object.Assets.getText (/Users/Mika/Devaus/meteor/myapp/.meteor/local/build/programs/server/boot.js:155:16)
W20150120-18:08:59.903(2)? (STDERR)     at app/push.config.os.js:3:21
W20150120-18:08:59.903(2)? (STDERR)     at app/push.config.os.js:10:3
W20150120-18:08:59.903(2)? (STDERR)     at /Users/Mika/Devaus/meteor/myapp/.meteor/local/build/programs/server/boot.js:175:10
W20150120-18:08:59.904(2)? (STDERR)     at Array.forEach (native)
W20150120-18:08:59.904(2)? (STDERR)     at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20150120-18:08:59.905(2)? (STDERR)     at /Users/Mika/Devaus/meteor/myapp/.meteor/local/build/programs/server/boot.js:86:5
=> Exited with code: 8

Push Notification Does Not Alert When Meteor App Is Active

Hi Morten,

I finally got the bar notification working for Android. However, I notice that when I am on the Meteor app the notification does not trigger until I am on a different app or the phone is locked.

Is this an intended behavior?

RangeError: Maximum call stack size exceeded on first connection of cordova client

I have a hybrid meteor app with Android and iOS clients. The first time after the installation of the app one of these clients connects my server it throws an error and restarts. This is the log that I get:

W20150323-14:03:25.841(10)? (STDERR)
W20150323-14:03:25.842(10)? (STDERR) /Users/BastiR/.meteor/packages/meteor-tool/.1.0.43.1v54ord++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20150323-14:03:25.842(10)? (STDERR)                        throw(ex);
W20150323-14:03:25.842(10)? (STDERR)                              ^
W20150323-14:03:25.843(10)? (STDERR) RangeError: Maximum call stack size exceeded

I only have this error with the push package installed and it only happens with Cordova clients not a web client. After the server has restarted the responsible Cordova client connects fine. It's just the first connection that provokes the restart. It seems to me that it has something to do with the push setup for new clients. Push itself works fine afterwards for Android and iPhone. I only have development certificates for push and push is in development mode. Any ideas what causes this behaviour?

No APN token received

Hello,

first of all - great project.

I was following these steps: https://github.com/raix/push/wiki/iOS-Micro-Walkthrough but i didn't received an token. I check everything 3x times and created new profiles, certificates etc. but nothing helps. Is there something what i can do to send a token manually from my phone? Is there a special case for the app for deploying to my phone?

Regards ndevr

Add client-side notifications send api

Check out "devel" much of this is already implemented there. But the basic concept is to have a collection for notifications. Both the client and sever can add notifications to this based on Push.allow and Push.deny rules.
The server can then throttle the notifications being sent and provide small send statistics on the notification.

increment badge using +n

How do I increment the badge number in a send? I tried +1 and '+1' and neither work. If the badge is already 1 and then another message arrives, I need it to increment up by 1.

'+1' gets rejected because it is a string. +1 just sets it to 1 every time or has no effect.

Thanks,
Don

Stuck on loading screen

I've got an existing app that runs fine on iOS prior to adding this package. However, when I add raix:push to the app it hangs on the loading screen. The prompt to give the app permission to send push notifications never appears. The app still runs fine in the browser.

In xcode output I get the logs: active and Attempting to badge the application icon but haven't received permission from the user to badge the application

The thing that has got me stumped is that I was able to get push notifications working on a very basic app.

I've set Push.debug = true; on both client and server but I'm not getting any output there.

Any debugging help would be greatly appreciated! Thanks

Doc team

If you think this package needs more documentation:

Documentation is currently maintained in the docs folder and the main README.md - I take pull requests here.

If you think the wiki is a better place then join the team and help maintain this package :)

If you think theres an area that needs better docs, then add a comment here,

Todo:

  • Add documentation for: The "Push.appCollection" is empty #24
  • Document how to solve "unable to get local issuer certificate" #41
  • Better documentation for how to play a sound #36
  • Where should the files be stored #34
  • No tokens in Push.appCollection, sample app for iOS #33 (+ #26)
  • basic example question #28 (much like #33 but with metadata explained)

Kind regards Morten

How to use properly the query object for multiple ids?

Hi,

i'm struggling with the query object, i want to use it to send a push to multiple ids of Meteor.users collection.

Let's say i have an array users = [ 'id1', 'id2', 'id2'];

I tried to set the push.send like this

//in my method pushAddExpense
Push.send({
                from: 'x',//not used
                title: 'Expense Added',
                text: 'title',
                badge: 1,
                payload: {
                    groupId: groupId,
                    userId: userId
                },
                query: {
                    userId: {$in : users} 
                }
            });

As you can see i'm using mongo syntax to make the query object but i get the following error

Exception while invoking method 'pushAddExpense' Error: key $in must not start with '$'

In the stack trace

at [object Object].Mongo.Collection.(anonymous function) [as insert] (packages/mongo/collection.js:574:1)

Probably i'm missing something, am i?

Feature: Meteor collection backed notifications with generic UI and easily replaceable templates

I've got a decent start on this when using the Meteoric package.

When the app is open the notification shows up as a sub-header, tapping the x will dismiss it, tapping the notification text will perform an action based on the payload type - default being to navigate to the notification url.

It's pretty tied into the project it's a part of, but I'd really like to move the parts that make sense into push.

Next step would be the browser based notifications for Chrome, Safari, etc. And let the client decide which method to use for display of notification.

@raix Are you interested?

Error while parsing query

@adeelraza: I'm having the same issue. Upgrading to 2.6.5 starts giving a different error in Modulus logs:

Exception in setInterval callback: Error: Push: Error while parsing query string

advanced userid query

If setting the query to something like userId:{$in:[x,y,z]}, we get an error when server tries to save the notification request to the notifications collections (because in mongodb you can't have fields with dot or amp in them).
to fix this the server must first JSON.stringfy(query) and after reading it should JSON.parse(query)

Push & Herald

Hi @raix, this package is looking really good!

This is exactly what I was hoping see or build for Herald. I am likely going to create a wrapper for this package that Herald users can use. I don't know what your overall plans are but if you want to keep this a generic push server/api and we can let Herald handle things like automation.

The Herald crew just started talks about Herald v2 work starting up in January. Let us know if you want anything from the Herald side. Also if I could help in anyway just ping me.

Ps. Sorry for creating an issue, it just seem the best place.

Startup error after 'meteor add raix:push'

After "meteor add raix:push", I type "meteor" and get the error below (followed by a long stack trace):

Error: Version string must look like semver (eg '1.2.3'), not 'https://github.com/raix/PushPlugin/tarball/c4e3aa69c66bde45472e81ac303a9e39020c9cc7'.

This seems to be coming from the Cordova.depends definition in package.js, and I'm not sure why it is throwing this error because it looks like the tarball is being referenced in exactly the way specified by Meteor docs.

I'm using latest Meteor 1.0.3.1. Any suggestions?

Question (not bug) Any thoughts on badgecount / performance impact?

Hi,

this is more a best practices type of question - not sure if I should be posting here, but it's directly related to this package.

wondering what the best way would be to handle badges, in a situation where there could be a high volume of notifications?

One option is when you send a push notification you can just could just see how many unread notifications a user has (assuming folk would be tracking this in a separate "notifications" collection) and then set the badge count to that number. Although, this would be referentially correct, it seems like an expensive thing to do each time someone does something like comment/send a message - assuming you wanted to have push notifications for the capability.

Are there any better ways that would require less processing per push notification and se the badge count?

BTW, I do see Push.setBadge(count); for iOS... but doing this client side would not update the App icon/badge... ie guess another option is doing this once ever X seconds (so the bade would be out of sync between updates?

mobile-config.js and push.config.json

Hi Morten,

what do you think about moving push.config.json into mobille-config.js within App.configurePlugin function?

This is example from meteor docs

// Pass preferences for a particular PhoneGap/Cordova plugin
App.configurePlugin('com.phonegap.plugins.facebookconnect', {
  APP_ID: '1234567890',
  API_KEY: 'supersecretapikey'
});

So I guess something like:

App.configurePlugin('com.phonegap.plugins.push', {
  "apn": {...},
 "gcm": {
    "apiKey": "myApiKey",
    "projectNumber": "myProjectNumber"
  }
});

The "Push.appCollection" is empty

What does this mean?

Push: Send message "test" via query {}
Push: Sent message "test" to 0 ios apps 0 android apps
Push, GUIDE: The "Push.appCollection" is empty - No clients have registred on the server yet...
Push: Send message "test" via query {}
Push: Sent message "test" to 0 ios apps 0 android apps
Push, GUIDE: The "Push.appCollection" is empty - No clients have registred on the server yet...
Push: Send message "test" via query {}
Push: Sent message "test" to 0 ios apps 0 android apps
Push, GUIDE: The "Push.appCollection" is empty - No clients have registred on the server yet...

High Level Overivew of Package

I am trying to understand the functions in the ADVANCED docs, could someone please explain what is the purpose of the listeners and how they could be utilized in the app.

For example under the server section, why is the listener for the token necessary when the config file has the that information?

Morten is probably really busy, so if anyone else using this package knows the answer, please jump in.

Thanks

Getting Exit code 1 on Push.send from browser console

Hi,

I am using Push 2.3.2 on local server.

I am trying to debug why my second app on a different device does not seem to be registering the token, so I was just using the browser console on my laptop to send a message, like so:
Push.send({from:"adam", title:"test1", count:22,text:"hello1",query:{userId:"2b3b4baad159b8a6d0352ad9"}})

This is what I see on the console:

I20141230-14:36:29.529(11)? info: Push: Send message "test1" via query userId=2b3b4baad159b8a6d0352ad9
I20141230-14:36:29.532(11)? info: send to token apn=7f4d6e8afd3e27aa3251481059d9fcee46cdb18fd0742ab7829304940128a217
I20141230-14:36:29.534(11)? info: Push: Sent message "test1" to 1 ios apps 0 android apps
=> Exited with code: 1

I checked Push.appCollection.find().fetch() and I see:

> Push.appCollection.find().fetch()
[ { _id: '8tiSHNaT2vN7T44Xt',
    appName: 'main',
    createdAt: Tue Dec 30 2014 13:52:19 GMT+1100 (AEDT),
    token: { apn: '7f4d6e8afd3e27aa3251481059d9fcee46cdb18fd0742ab7829304940128a217' },
    updatedAt: Tue Dec 30 2014 14:19:06 GMT+1100 (AEDT),
    userId: '2b3b4baad159b8a6d0352ad9' } ]

Any ideas?

Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /

I am following the iOS Micro Walkthrough. When I try to verify .pem files, I will get this error:

CONNECTED(00000003)
depth=1 C = US, O = "Entrust, Inc.", OU = www.entrust.net/rpa is incorporated by reference, OU = "(c) 2009 Entrust, Inc.", CN = Entrust Certification Authority - L1C
verify error:num=20:unable to get local issuer certificate
verify return:0

But I think it's irrelevant. However, when I run ios-device, the app works expect the push notifications. Here is the terminal log:

$ meteor run ios-device --mobile-server 192.168.1.6:3000

Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /
    at Object.parse (native)
    at Package (packages/configuration/plugin/push.configuration.js:135:1)
    at __bottom_mark__ (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/parse-stack.js:92:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:735:43
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at compileUnibuild (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:321:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:131:26
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at Object.compiler.compile (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:127:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:2022:24
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:264:13
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:257:29
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:255:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:246:23
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.capture (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:245:19)
    at Object.exports.bundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1974:31)
    at getBundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:336:30)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:761:18
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:327:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:326:36
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.enterJob (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:317:26)
    at buildCordova (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:749:16)
    at Object.cordova.buildTargets (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:128:3)
    at Command.doRunCommand [as func] (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands.js:274:15)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/main.js:1285:23
Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /
    at Object.parse (native)
    at Package (packages/configuration/plugin/push.configuration.js:135:1)
    at __bottom_mark__ (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/parse-stack.js:92:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:735:43
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at compileUnibuild (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:321:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:131:26
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at Object.compiler.compile (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:127:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:2022:24
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:264:13
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:257:29
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:255:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:246:23
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.capture (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:245:19)
    at Object.exports.bundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1974:31)
    at getBundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:336:30)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:761:18
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:327:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:326:36
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.enterJob (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:317:26)
    at buildCordova (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:749:16)
    at Object.cordova.buildTargets (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:128:3)
    at Command.doRunCommand [as func] (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands.js:274:15)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/main.js:1285:23
Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /
    at Object.parse (native)
    at Package (packages/configuration/plugin/push.configuration.js:135:1)
    at __bottom_mark__ (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/parse-stack.js:92:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:735:43
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at compileUnibuild (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:321:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:131:26
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at Object.compiler.compile (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:127:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:2022:24
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:264:13
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:257:29
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:255:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:246:23
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.capture (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:245:19)
    at Object.exports.bundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1974:31)
    at getBundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:336:30)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:761:18
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:327:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:326:36
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.enterJob (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:317:26)
    at buildCordova (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:749:16)
    at Object.cordova.buildTargets (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands-cordova.js:128:3)
    at Command.doRunCommand [as func] (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands.js:274:15)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/main.js:1285:23
WARNING: You are testing your app on a remote device.For the mobile app to be able to connect to the local server, make sure your device is on the same network, and that the
         network configuration allows clients to talk to each other (no client isolation).
[[[[[ ~/Devaus/meteor/myapp ]]]]]             

=> Started proxy.                             

Your project has been opened in Xcode so that you can run your app on an iOS device. For further instructions, visit this wiki page:
https://github.com/meteor/meteor/wiki/How-to-run-your-app-on-an-iOS-device

=> Started app on iOS Device.                 
Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /
    at Object.parse (native)
    at Package (packages/configuration/plugin/push.configuration.js:135:1)
    at __bottom_mark__ (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/parse-stack.js:92:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:735:43
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at compileUnibuild (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:321:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:131:26
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at Object.compiler.compile (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:127:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:2022:24
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:264:13
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:257:29
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:255:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:246:23
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.capture (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:245:19)
    at Object.exports.bundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1974:31)
    at bundleApp (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:507:34)
    at [object Object]._.extend._runOnce (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:543:35)
    at [object Object]._.extend._fiber (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:758:28)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:365:12
Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /
    at Object.parse (native)
    at Package (packages/configuration/plugin/push.configuration.js:135:1)
    at __bottom_mark__ (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/parse-stack.js:92:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:735:43
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at compileUnibuild (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:321:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:131:26
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at Object.compiler.compile (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:127:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:2022:24
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:264:13
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:257:29
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:255:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:246:23
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.capture (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:245:19)
    at Object.exports.bundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1974:31)
    at bundleApp (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:507:34)
    at [object Object]._.extend._runOnce (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:543:35)
    at [object Object]._.extend._fiber (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:758:28)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:365:12
Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /
    at Object.parse (native)
    at Package (packages/configuration/plugin/push.configuration.js:135:1)
    at __bottom_mark__ (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/parse-stack.js:92:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:735:43
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at compileUnibuild (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:321:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:131:26
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at Object.compiler.compile (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:127:5)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:2022:24
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:264:13
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:257:29
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:255:18
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:246:23
    at [object Object]._.extend.withValue (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:112:14)
    at Object.capture (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:245:19)
    at Object.exports.bundle (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1974:31)
    at bundleApp (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:507:34)
    at [object Object]._.extend._runOnce (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:543:35)
    at [object Object]._.extend._fiber (/Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:758:28)
    at /Users/Mika/.meteor/packages/meteor-tool/.1.0.38.zbazwc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:365:12
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:3000/

Better documentation for how to play a sound

It wasn't obvious to me how to play a sound on ios, here's the requirement:

  1. Place your sound in public/, e.g. pubic/beep.wav
  2. Reference your sound by including www/application/ e.g. www/application/beep.wav

No tokens in Push.appCollection

I followed the basic example. When trying to Push.send() via Meteor shell:

Push.send({
  from: 'Test',
  title: 'Hello',
  text: 'World',
  badge: 12,
  query: {}
});

It fails. Here is the terminal output.

=> Started app on iOS Device.                 
=> Started MongoDB.                           
W20150123-11:49:30.537(2)? (STDERR) WARNING: Push APN is in development mode
=> Started your app.

=> App running at: http://localhost:3000/
I20150123-11:57:15.575(2)? Push: Send message "Hello" via query {}
I20150123-11:57:15.583(2)? Push: Sent message "Hello" to 0 ios apps 0 android apps
I20150123-11:57:15.588(2)? Push, GUIDE: The "Push.appCollection" is empty - No clients have registred on the server yet...

When I added Push.addListener() to client side, I got an alert with correct token.

  Push.addListener('token', function(token) {
    alert(JSON.stringify(token));
  });

If I find objects in the collection via Meteor shell. It's empty.

> Push.appCollection.find().fetch()
[]

Here is the xcode console output
https://gist.github.com/mvaisanen/f42b27f9c55fae802863

And here is the full repo:
https://github.com/mvaisanen/SimplePushApp

Error when i starting the demo app

I have a long error message on my console when i run the meteor command to start the demo app meteor-raix-push-demo but i'm sure that these errors come from the raix:push package (because i tried to add the package to a new meteor project), any idea?

Thanks

giggioz@MacGiggioz:~/Spaghetti/meteor-raix-push-demo$ meteor
[[[[[ ~/Spaghetti/meteor-raix-push-demo ]]]]]

=> Started proxy.

=> A patch (Meteor 1.0.3.2) for your current release is available!
Update this project now with 'meteor update --patch'.
Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /
at Object.parse (native)
at Package (packages/configuration/plugin/push.configuration.js:147:1)
at bottom_mark (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/parse-stack.js:92:14)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:739:43
at Array.forEach (native)
at Function..each..forEach (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at compileUnibuild (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:325:5)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:135:26
at Array.forEach (native)
at Function..each..forEach (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at Object.compiler.compile (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:131:5)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:2023:24
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:264:13
at [object Object]..extend.withValue (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:115:14)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:257:29
at [object Object]..extend.withValue (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:115:14)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:255:18
at [object Object]..extend.withValue (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:115:14)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:246:23
at [object Object]..extend.withValue (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:115:14)
at Object.capture (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:245:19)
at Object.exports.bundle (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1975:31)
at bundleApp (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:508:34)
at [object Object]..extend._runOnce (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:544:35)
at [object Object]..extend.fiber (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:771:28)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:366:12
Push configuration, Error: Unexpected token / SyntaxError: Unexpected token /
at Object.parse (native)
at Package (packages/configuration/plugin/push.configuration.js:147:1)
at _bottom_mark (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/parse-stack.js:92:14)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:739:43
at Array.forEach (native)
at Function..each..forEach (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at compileUnibuild (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:325:5)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:135:26
at Array.forEach (native)
at Function..each..forEach (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at Object.compiler.compile (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/compiler.js:131:5)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:2023:24
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:264:13
at [object Object]..extend.withValue (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:115:14)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:257:29
at [object Object]..extend.withValue (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:115:14)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:255:18
at [object Object]..extend.withValue (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:115:14)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:246:23
at [object Object]..extend.withValue (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/fiber-helpers.js:115:14)
at Object.capture (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/buildmessage.js:245:19)
at Object.exports.bundle (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/bundler.js:1975:31)
at bundleApp (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:508:34)
at [object Object]..extend._runOnce (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:544:35)
at [object Object]..extend._fiber (/Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:771:28)
at /Users/giggioz/.meteor/packages/meteor-tool/.1.0.40.e5ymkv++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/run-app.js:366:12

APN - Unable to push to connected devices from server

//config.push.json

{
  "apn": {
    "passphrase": "AWESOMEPASS",  
    "key": "pushKEY.pem",
    "cert": "pushCERT.pem",
    "gateway": "gateway.sandbox.push.apple.com"
  },
  "production": false
}

//CLIENT init & alert w/ token

Push.init({});
  Push.addListener('token', function(token) {
    if (token.apn) {
      alert('Got ios token ' + token.apn);
    } 
  });

//TEMPLATE EVENT

Template.layout.events({
    "click .push-link": function () {
      Push.send({from: 'push',title: 'Hello',text: 'World',badge: 99,query: {}});
    }
  });

//SERVER init & Debug flag

if (Meteor.isServer) {
  Meteor.startup(function () {
    Push.debug=true;
    console.log(Push.send({
      from: 'Test',
      title: 'Small message',
      text: 'Hello world',
      query: {} // Query the appCollection
    }));

    Push.allow({
        send: function(userId, notification) {
            return true; // Allow all users to send
        }
    });

  });
}

//CONSOLE OUTPUT

20150102-15:15:49.264(-6)? (STDERR) WARNING: Push APN is in development mode
I20150102-15:15:49.339(-6)? QFdPio68DGKawvCJ9
=> Meteor server restarted
I20150102-15:16:04.294(-6)? Push: Send message "Small message" via query {}
I20150102-15:16:04.296(-6)? Push: Sent message "Small message" to 0 ios apps 0 android apps
I20150102-15:16:34.304(-6)? Push: Send message "Hello" via query {}
I20150102-15:16:34.306(-6)? Push: Sent message "Hello" to 0 ios apps 0 android apps

//METEOR SHELL - Push.appCollection.find()

{ _mongo: 
   { _connectCallbacks: [ [Function] ],
     _observeMultiplexers: 
      { '{"ordered":false,"collectionName":"_raix_push_notifications","selector":{},"options":{"transform":null}}': [Object],
        '{"ordered":false,"collectionName":"_raix_push_app_tokens","selector":{},"options":{"transform":null}}': [Object],
        '{"ordered":false,"collectionName":"meteor_accounts_loginServiceConfiguration","selector":{},"options":{"transform":null,"fields":{"secret":0}}}': [Object],
        '{"ordered":false,"collectionName":"photos","selector":{},"options":{"transform":null}}': [Object],
        '{"ordered":false,"collectionName":"users","selector":{},"options":{"transform":null,"fields":{"profile":1,"username":1}}}': [Object] },
     _onFailoverHook: { nextCallbackId: 10, callbacks: [Object] },
     _docFetcher: 
      { _mongoConnection: [Circular],
        _callbacksForCacheKey: {} },
     _oplogHandle: 
      { _oplogUrl: 'mongodb://127.0.0.1:3001/local',
        _dbName: 'meteor',
        _oplogLastEntryConnection: [Object],
        _oplogTailConnection: [Object],
        _stopped: false,
        _tailHandle: [Object],
        _readyFuture: [Object],
        _crossbar: [Object],
        _lastProcessedTS: [Object],
        _baseOplogSelector: [Object],
        _catchingUpFutures: [] },
     db: 
      { domain: null,
        _events: {},
        _maxListeners: 10,
        databaseName: 'meteor',
        serverConfig: [Object],
        options: [Object],
        _applicationClosed: false,
        slaveOk: false,
        bufferMaxEntries: -1,
        native_parser: false,
        bsonLib: [Object],
        bson: [Object],
        bson_deserializer: [Object],
        bson_serializer: [Object],
        _state: 'connected',
        pkFactory: [Object],
        forceServerObjectId: false,
        safe: false,
        notReplied: {},
        isInitializing: true,
        openCalled: true,
        commands: [],
        logger: [Object],
        tag: 1420233349176,
        eventHandlers: [Object],
        serializeFunctions: false,
        raw: false,
        recordQueryStats: false,
        retryMiliSeconds: 1000,
        numberOfRetries: 60,
        readPreference: [Object] },
     _primary: '127.0.0.1:3001' },
  _cursorDescription: 
   { collectionName: '_raix_push_app_tokens',
     selector: {},
     options: { transform: null } },
  _synchronousCursor: null }

On starting the app the iOS device alerts token, I can push to it via APN tester using the dev cert for this app ID.

How else can I debug this?

Are sounds implemented yet?

HI,

anything I am missing to get sounds to work?

here's my init:

Push.init({

            bagde: true,
            sound: true,
            alert: true
        });

BTW, they seem to work fine on iOS if I am using one with push simulators.

Using $in in send query fails

Hi! How do I push to multiple userIds? I've tried this:

Push.send({
     from: 'Hello',
     title: 'World',
     text: 'Hello, World!',
     query: {
          userId: ["1234", "5678"]
    }
});

Callback not invoked when in background mode

Hi folks,

moving some steps forward with this package : now i'm able to correctly send push notification to an android device, when my app is in foreground everything works fine and the following listener is called

Push.addListener('message', function (notification) {
        console.log(JSON.stringify(notification));
        Dialogs.alert(notification.message, function(){}, notification.payload.title, 'OK');
    });

Dialogs is a meteor package :

hybrid:dialogs 1.0.3 Cross-platform dialogs: alerts, confirms, and prompts (Cordova).

Unfortunatly when my app is in background i still receive the notification on the status bar but when i tap on it and my app pops in foreground the above callback is not called.

I did some googling and found this interesting post

http://stackoverflow.com/questions/24234944/cordova-push-plugin-callback-not-invoked-when-the-app-is-in-background

extracting the best suggestions from there i tried:

  • [...] I had to clear the dalvik cache and restart my phone. Happened to me twice so far. Seems to a known issue in android, phonegap-build/PushPlugin#35.
  • [...] I had a similar issue with Cordova 3.5.0 and PushPlugin 2.2.0: notifications worked when the app was in the foreground but not when it was in the background or not running. I found the solution by reading the source code of PushPlugin (file src/com/plugin/gcm/GCMIntentService.java): the notification's payload must include "message" and "msgcnt" keys.

but none seems working for me.

Do you have the same issue? Do you know a viable solution for this?

Thanks as usual!

basic example question / issue - 0 ios apps 0 android apps

I am trying to get the basic example working:

In the server console I get:

GCM configured

I call a server side method to do the push:

 sendNotification: (beer) ->
    if Roles.userIsInRole(Meteor.user(), ["editor", "admin"])
        title = beer.name + ' is now on tap.'
        Push.send
          from: "Tin Whiskers Brewing"
          title: title
          text: "We've got one waiting for you."
          # badge: 12
          query: {}

and then in the console I get:

Sent message "PushTest Beer is now on tap." to 0 ios apps 0 android apps

My config.push.json has what I belive to be the required fields:

{
  "apn": {
    "passphrase": "XXXXXXXX",
    "key": "prodAPNkey.pem",
    "cert": "prodAPNCert.pem"
  },
  "gcm": {
    "apiKey": "XXXXXXXXXXXXXXXXX",
    "projectNumber": "32933758074"
  },
  "production": true,
  "sound": true,
  "alert": true,
  "vibrate": true
}

Do I have to call something from the client to "register" device with the server or why might pushing to 0 devices be symptomatic of? There are a number of people with the app downloaded including myself.

Thanks for any help in advance!

How to detect whether something is being send

So this is my question posted on stackoverflow:
I have also put my configuration in that post.
http://stackoverflow.com/questions/29386665/nothing-happening-when-sending-push-notification-with-raixpush

When I try pushing on the browser console with the following call:
Push.send({from: "pushfrom", title:"hello", text:"world", token:{apn: "3fa36d95e69e522a0b11856c22a72da26524aee304965c3ded59c5850598e902"}}); "RxLY6eieiB6ojgcmx"

And literally nothing happens. No errors. Nothing happen on the phone.

Error: Push.sendGCM.... has no method 'sendGCM' - EDIT FOUND WORKAROUND

EDIT - FOUND WORKAROUND! See one of my comments, below.

I had push notifications working on Android in one of your old packages, but not anymore. Here's the error I'm getting. I'll post my setup below. Note the method 'sendMessage' is a server side method that I'm calling from the client to send a push notification (I'm sending notifcations out from the server).

I'm getting the following error with Push.sendGCM and Push.sendAPN. I'm also not able to get Push.send to work.

Here's my effort with Push.sendGCM. Scroll much further down below to see my setup for Push.send

error in the server console

I20150109-19:10:39.952(-5)? Exception while invoking method 'sendMessage' TypeError: Object #<EventEmitter> has no method 'sendGCM'
I20150109-19:10:40.930(-5)?     at Meteor.methods.sendMessage (app/server/server.js:160:12)
I20150109-19:10:40.931(-5)?     at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1599)
I20150109-19:10:40.931(-5)?     at packages/ddp/livedata_server.js:648
I20150109-19:10:40.932(-5)?     at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
I20150109-19:10:40.932(-5)?     at packages/ddp/livedata_server.js:647
I20150109-19:10:40.932(-5)?     at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56)
I20150109-19:10:40.933(-5)?     at _.extend.protocol_handlers.method (packages/ddp/livedata_server.js:646)
I20150109-19:10:40.936(-5)?     at packages/ddp/livedata_server.js:546

App Structure

client\client.js
server\server.js
lib
private
public
resources
config.push.json
mobile-config.js

client.js

Meteor.call("sendMessage", options, function (err, res) { ... };

Push.addListener('token', function(token) {
    if (token) {
        Meteor.call("updatePushToken", token, function(err, res) {});
    };
});

Push.id(); // Unified id - not a token

server.js

Push.debug = true;

// Internal events
// do we need this both on client and server?
Push.addListener('token', function(currentToken, newToken) {
    // Token is { apn: 'xxxx' } or { gcm: 'xxxx' } or null
    // if newToken is null then the currentToken is invalid
    // if newToken is set then this should replace the currentToken
    if (newToken) {
        Meteor.users.update( { _id: this.userId }, { $set: { pushToken: newToken } } );
    };
});

Meteor.methods({
    'updatePushToken': function(token) {
        Meteor.users.update( { _id: this.userId }, { $set: { pushToken: token } } )
    },
    'sendMessage': function(options) {
        //some code that looks up the gcm token of the recipient has been ommitted
        //code code code

        Push.sendGCM(
            { gcm: 'the token for the user I am sending to }', 
            {
                from: options.stuff,
                title: options.title,
                text: options.text
            }
        );
    }
});

config.push.json

{
  "apn": {
    "passphrase": "myPassword",  
    "key": "myKey",
    "cert": "myCert"
  },
  "gcm": {
    "apiKey": "myAPIKey",
    "projectNumber": myNumber
  },
  "production": false,
  // "badge": true,
  // "sound": true,
  "alert": true,
  "vibrate": true
}

Here's my effort for Push.send. Everything is the same except the end of the server method "sendMessage". This successfully writes to the collection "_raix_push_notifications" but I never receive a notification.

server/server.js

//inside the server method "sendMessage"
Push.send({
    from: senderUsername,
    title:  'New BCBC video!',
    text:   oRecipientVideo.title,
    // query: {}
    token:  token object from elsewhere in the code // token: appId or token eg. "{ apn: token }"
    // tokens: array of appId's or tokens
    // payload: user data
});

_raix_push_notifications

{
  from: "stuff",
  title: "stuff",
  text: "stuff",
  count: 0,
  createdAt: ISODate("2015-01-10T00:32:04.000Z"),
  createdBy: "<SERVER>",
  token: {
    gcm: "token string"
  },
  _id: "id stuff"
}

Only Bar Notification Available - Android

Sorry for all the posts Morten.

I am trying to enable alerts and badges, so I added the following init code to the client. However, I only get the top bar alert. This might be due to this issue I reported here.

Push.init({ gcm: { "projectNumber": 917501955460 }, alert: true, bagde: true });

Thanks for your help and the package. Happy Holidays.

Notifications with Sound error when app is open

2015-03-19 11:59:22.960 MappSkeletor[5166:2285775] Notification received
2015-03-19 11:59:22.961 MappSkeletor[5166:2285775] Msg: {"alert":"This notification has been sent from the SERVER","badge":"11","sound":"www/application/communicator.wav","ejson":"{\"notificationId\":\"There Should Be An Id Here\"}","messageFrom":"push",foreground:"1"}
2015-03-19 11:59:22.972 MappSkeletor[5166:2285775] Uncaught Error: TypeError: Object is not a constructor (evaluating 'new Media(notification.sound)'):366:http://meteor.local/packages/raix_push.js?1331304cc9edac408362af29980480e0569c0980

Feature: Badge count

Add automated badge counter.

There are two different ways of thinking about counters:

  • Non-specific messages increments a "count" - this is reset on app open
  • Trackable messages sets an id in the "counter" object - The app actively sets id as read

The badge is the sum of these two and is kept updated automatically.

We want an option to set a limit on the sum of unread messages, this could be set as one of three:

  • Total unread limit - the limit of the sum of both counters
  • Total unread of Non-specific
  • Total unread of Trackable

If the limit is reached the server will skip messages for that user, at the same time we want a force option on send - but this should only be allowed on the server send api.

error "enabledRemoteNotificationTypes is not supported in iOS 8.0 and later."

Hi, I just updated to Push 2.2.0. So I am now using the config file vs push.init.

When I open the app on my phone, I get a spinning wheel. I am not 100% sure what's causing it but I see following in the Xcode console:
enabledRemoteNotificationTypes is not supported in iOS 8.0 and later.

I did see http://stackoverflow.com/questions/24454033/registerforremotenotificationtypes-is-not-supported-in-ios-8-0-and-later I have not dug into the revised code yet... so thought I'd ask incase other have hit this too

GCM - "Push.appCollection" is empty

Hi!
I have tried to connect my app using the basic guide but still ends up with "Push.appCollection" is empty...

I have created an app in Developer Console.
I have enabled Google Cloud Messaging for Android.
In my config.push.json I have:

{
  "gcm": {
    "apiKey": "AIzaSyCD4fDb2OZPzvRQxjWxxQ_XXXXXXXXX",
    "projectNumber": 150189635563
  },
  "production": false,
  "sound": true,
   "alert": true,
  "vibrate": true
}

In my client/client.js I have:

Push.addListener('token', function(token) {
  console.log('Token: ' + JSON.stringify(token));
  alert('Token: ' + JSON.stringify(token));
});
console.log('Push.id(): ' + Push.id());

In my server/pushServer.js I have:

Push.allow({
  send: function(userId, notification) {
    return true; // Allow all users to send
  }
});
Push.debug = true;

And in client/details.js I call the Push.send like so:

function sendPush(pushObject){
    console.log('Pushing: ' + JSON.stringify(pushObject));
    Push.send({
        from: pushObject.from,
        title: pushObject.title,
        text: pushObject.text,
    query: {}
    });
}

And the console outputs:

=> App running at: http://localhost:3000/
I20150408-13:11:24.084(2)? Push.Configure { gcm: { apiKey: 'AIzaSyCD4fDb2OZPzvRQxjWxxQ_XXXXXXXXX' },
I20150408-13:11:24.086(2)?   production: false,
I20150408-13:11:24.086(2)?   sound: true,
I20150408-13:11:24.086(2)?   alert: true,
I20150408-13:11:24.086(2)?   vibrate: true }
I20150408-13:11:24.086(2)? GCM configured
I20150408-13:11:44.735(2) (android:http://meteor.local/client/client.js:5) Push.id(): tANjKGjGT67XDL28M
I20150408-13:12:53.843(2)? Push: Send message "Aktivitet tillagd" via query {}
I20150408-13:12:53.844(2)? Push: Sent message "Aktivitet tillagd" to 0 ios apps 0 android apps
I20150408-13:12:53.847(2)? Push, GUIDE: The "Push.appCollection" is empty - No clients have registred on the server yet...

Where XXXXXXXXX is just for posting this issue.

Could you guide me in the right direction?
I have also tried uploading the app to heroku, but with the same result.
/Pelle

Refactor pushId in Push.init into pushKey

The reason for this change is to avoid confusion about pushId/tokens/Push.id() in the api.
The Push.init requires some keys in order to get access, its more consistent with google / apples documentation.

Open SSL Verify Return Code Error Solved | Add to iOS-Micro-Walkthrough

This would be helpful to add to the https://github.com/raix/push/wiki/iOS-Micro-Walkthrough.

Answer based on:
http://stackoverflow.com/questions/23343910/is-this-an-error-verify-errornum-20unable-to-get-local-issuer-certificate

Problem:
When executing the following command:
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert cert.pem -key key.pem

I was getting this error:
screen shot 2015-03-06 at 7 47 13 am

Solution:
Go to : https://www.entrust.net/downloads/root_request.cfm
Download the file :
screen shot 2015-03-06 at 7 48 50 am

Place it in the same location as your cert and key.
Use the following command:
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -CAfile entrust_2048_ca.cer -cert cert.pem -key key.pem

Results in:
screen shot 2015-03-06 at 7 50 13 am

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.