2014-11-03 106 views

回答

0

,你發送推送通知

例如請從服務器代碼中刪除聲音放慢參數

{ 
    "aps": { 
     "badge": 15, 
     "alert": "Hello World", 
     **"sound": "push.caf" // Remove this sound paramter** 
    } 
} 
0

如果您使用Objective C,則需要將其從AppDelegate.m中刪除,並在其中註冊通知。你的代碼應該讀一些類似

[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; 
    [[UIApplication sharedApplication] registerForRemoteNotifications]; 

你可以從這裏取出的聲音閱讀

[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; 
    [[UIApplication sharedApplication] registerForRemoteNotifications]; 

希望這有助於