Open ndevr opened 9 years ago
make sure to set the --mobile-server http://x.x.x.x
Where is you config.push.json located? When I'am locking into the xcode sources at ".meteor/local/cordova-build/platforms/ios/www/application/push.config.web.cordova.js" then the content looks like the default one:
Push.Configure({ "gcm": { "projectNumber": "" }, "production": false, "sound": true, "badge": true, "alert": true, "vibrate": true });
gcm is missing the apiKey?
skip the sound/badge/alert/vibrate flags for now...
i did not setup somthing there. Thats what the project was building.
Moment...
my config.push.json at the root folder of the project:
{ "apn": { "passphrase": "123456", "key": "testKey.pem", "cert": "testCert.pem", "gateway": "gateway.sandbox.push.apple.com" }, "gcm": { "apiKey": "", "projectNumber": "" }, "production": false, "badge": true, "sound": true, "alert": true, "vibrate": true }
Create
config.push.json
in your app folder--mobile-server
Can i disable android for now?
Notes:
Add Push.debug = true;
on client+server and read the console
If the server doesnt receive the push token when the app startup the you need to debug the client, if the token is sent to the server then fire up meteor shell
and look at the data Push.appCollection.find().fetch();
If the data is in there and apiKey is set in your config it should work. Begin debugging your network ports could be stopped by firewalls or you might havent set the meteor flag --mobile-server
Also try using Push.send
in the meteor shell - unless you havent removed the insecure package.
Okay i did everything but nothing happens. Should there be a debug log entry on the xdebug console and could you tell me what is in you ".meteor/local/cordova-build/platforms/ios/www/application/push.config.web.cordova.js" file ? I think the client will not setup correct.
The https://github.com/raix/push/issues/20#issuecomment-68905933 looks ok - please debug as explained in https://github.com/raix/push/issues/20#issuecomment-68907510 - and read the server and browser console log
You could test if app gets token: On the client:
Push.addListener('token', function(token) {
alert(JSON.stringify(token));
});
ps. remember to do --mobile-server http://x.x.x.x:port if you're running this with another port other than 80 ;-)
In my case i can only see the token when i run meteor.startup function
Meteor.startup(function () {
Push.addListener('token', function(token) {
alert(JSON.stringify(token));
});
});
Using development certification, hope this helps
The meteor.startup should not matter, it will emit when ready
Nothing helped yet. Strange :/ can you tell me where i can find the config of the apn on the ios project which is created from config.push.json?
Well ok i think i found the problem. I didn't received the dialog for the push notifcations. With that script i receive a token: https://gist.github.com/ndevr/b3187f244dfb0f77dd34
Any idea why i not received the dialog?
Are we talking apn or gcm?
apn
Check if the app have notification options under settings on the iphone/iOS if not certs etc is not configured correctly.
Now I'am receiving messages when i register the handler and doing a manually push-update with the token. Looks like the handler is not registered correctly, but i need abit more time for debugging.
I'm just catching up to this issue. I don't think your client is connected to the server. Please make sure of that first of all.
I'll be able to pay more attention to this tomorrow. Don't worry, you're close :)
I'm reading this again.
@ndevr Are you saying you have a client token in the collection on your server?
Push.appCollection.find().fetch();
What is the return?
Yes, i pushed the token into the collection with Meteor.call('raix:push-update') and can send notifications from server/client. But I had to re-register the handlers.
This should all happen pr. default, the device should register etc. - is this still an issue on the latest version?
I just had 1 out of 4 devices not self-register, very odd, but it must still be happening.
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