Reputation: 41
I have downloaded and installed the APN Free Tester app as i am trying to debug my Push Notification setup:
The Tester debug screen displays the following without errors however it does not how the message nor does the message appear on the app.
I can conclude that the token and the certificate are both correctly set otherwise it would generate an error
Any advise would really be appreciated
Payload sent:
{
"aps":{
"alert":"Hello from APNs Tester.",
"badge":"1"
}
}
2016-04-04 09:55:15 +0000: Connected
2016-04-04 09:55:17 +0000: Token: <1dc3651f 54cdead8 65g5cc35 7287376d d796f3a2 2afabab1 ff80ddd4 e55eeab1>
2016-04-04 09:55:17 +0000: Written 92 bytes sending data to gateway.sandbox.push.apple.com:2195
2016-04-04 09:55:17 +0000: Disconnected from server gateway.sandbox.push.apple.com:2195
Upvotes: 3
Views: 1926
Reputation: 16864
I highly prefer for APNS testing tool is open source code compile and run the OSX application Push Me Baby
.
Then follow the step.
Right-click on the Resources folder in Xcode and select Add Existing Files…. Select the aps.developer.identity.cer
file that you have downloaded earlier
In the ApplicationDelegate.m file, modify the code as shown below:
- (id)init {
self = [super init];
if(self != nil) {
self.deviceToken = @"38c866dd bb323b39 ffa73487 5e157ee5 a85e0b7c e90d56e9 fe145bcc 6c2c594b";
self.payload = @"{"aps":{"alert":"You got a new message!","badge":5,"sound":"beep.wav"},"acme1":"bar","acme2":42}";
self.certificate = [[NSBundle mainBundle]
pathForResource:@"aps_developer_identity" ofType:@"cer"];
}
return self;
}
Press Command-R to test the application. You will be asked to grant access to the certificate. Click Always Allow
If the message is pushed correctly, you should see the notification
May this helps lot.
Upvotes: 1
Reputation: 719
APN Tester Free doesn't show the sending result, it only tries to send data without confirmation. Make sure you certification and token are both for development or production.
Upvotes: 0