2011-01-24 142 views
0

我试图用默认声音(三音)以外的声音发送自己的远程通知。 但是,当我添加“声音”:“编钟”,我没有得到另一种声音?推送通知的另一个声音

有人可以帮助我把喇叭作为通知声音?

在此先感谢

回答

0

我不认为它是一个大的issue.You只需要下载一个波形文件与你喜欢的声音,并在资源文件夹和它相应的代码添加它。

- (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; 
} 
+0

但我想用苹果的标准声音。不只是三色调。或其他一些自定义声音 – NicoTjai 2011-01-24 11:35:46