Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Custom Notification Sound

Discussion in 'iOS and tvOS' started by wwu39, Jul 24, 2019.

  1. wwu39

    wwu39

    Joined:
    Nov 21, 2018
    Posts:
    25
    I'm using this Mobile Notification Package for my iOS project.
    I want to set a notification with custom sound to the user but it doesn't seem like it allows me to set the notification sound.
    Is there other way to send notification with custom sound?
     
  2. wwu39

    wwu39

    Joined:
    Nov 21, 2018
    Posts:
    25
    the package's link:
    docs.unity3d.com/Packages/com.unity.mobile.notifications@1.0/manual/index.html
     
  3. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    505
    You can specify the sound file when you call the iOS API, but it does require you to write your own iOS plugin. It is not something you can easily add to the Unity’s official package.
     
  4. wwu39

    wwu39

    Joined:
    Nov 21, 2018
    Posts:
    25
    I opened their package files there is actually a TODO to add a way to specify custom sound.
     
    Last edited: Jul 25, 2019
  5. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    505
    That's what I expected. I think they are still working on how to intuitively provide a sound file in C# player scripts.
     
  6. wwu39

    wwu39

    Joined:
    Nov 21, 2018
    Posts:
    25
    I can edit the package's files in the Xcode Project to make custom notification sound. But every time I rebuild the project my edits are all gone. Is there a way to change the package content in Unity?
     
  7. MohHeader

    MohHeader

    Joined:
    Aug 12, 2015
    Posts:
    41
  8. Vagner_

    Vagner_

    Joined:
    Apr 8, 2015
    Posts:
    7
    did you made it?
     
  9. wwu39

    wwu39

    Joined:
    Nov 21, 2018
    Posts:
    25
    It's shipped so long ago. iirc I just did it in Xcode.