I am trying to send myself a remote notification with another sound than the default sound(tri-tone). But when I add "sound" : "chime", I'm not getting another sound?开发者_如何学Go
Can someone help me to put the Horn as notification sound?
Thanks in advance
I don't think its a big issue.You just need to download one wave file with the sound you like and add it in the the resource folder and code it accordingly.
- (id)init
{
self = [super init];
if(self != nil)
{
self.deviceToken1 = @"your token key";
self.payload = @"{\"aps\":{\"alert\":\"You got a new message!\",\"badge\":5,\"sound\":\"beep.wav\"},\"acme1\":\"bar\",\"acme2\":42}";
// self.payload = @"{\"aps\":{\"alert\":\"This is some fany message.\",\"badge\":1}}";
self.certificate = [[NSBundle mainBundle] pathForResource:@"certi_identity(2)" ofType:@"cer"];
}
return self;
}
精彩评论