List of available sounds for iOS push notifications

前端 未结 2 1595
挽巷
挽巷 2020-12-18 18:06

I\'m trying to change the sound for my push notifications, but I don\'t know what the names are to use. I want to use the \"electronic\" sound, but what do I put in the sou

2条回答
  •  忘掉有多难
    2020-12-18 18:43

    The answer above may be wrong.

    You CAN specify a built in sound, the problem I'm looking into is figuring out all the names.

    This APNS Python code for example works:

    APNSmessage = Message([u1.push_notification_token], sound="chime", alert=sender+" Private Messaged You: "+messagePushNotification, badge=u1.unread_badge_count, custom={'slug':slugChannel})
    

    Notice that sound is set to chime and not default. This works for iOS 7 and above and don't see why not that it should work for iOS 8 as well.

    When I first wrote this code I just took a wild guess and entered chime which low and behold worked.

提交回复
热议问题