0
我的iOS應用程序聲音文件的放置位置有問題。在Android上,我不得不把它們放在platform/android/res/raw
文件夾中,它工作。在iOS上,我在Xcode上打開了我的project.xcodeproj
,但是當我將.mp3文件拖到Xcode項目中時,在我的iPad上清理,構建和運行項目時,我無法使自定義聲音起作用,我有默認聲音。iOS定製聲音通知位置
我PushInit:
var push = PushNotification.init({
"android": {
"senderID": "xxxxx",
"alert": "true",
"badge": "true",
"sound": "true"
},
"ios": {
"gcmSandbox": "true",
"senderID": "xxxxx",
"alert": "true",
"badge": "true",
"sound": "true"
},
這是我的工作負載:
{
"registration_ids":["xxxxx"],
"notification":
{
"title":"Message",
"body":"Nouvelle intervention",
"vibrate":1,
"sound":"sirene"
},
"data":
{
"uid":"5811e9c946755",
"quittance":0
},
"priority":"high",
"content_available":true
}
聲音 「Sirene酒店」 是一個文件的.caf。
我在哪裏必須把聲音文件?我只是將他們拖到項目中,然後添加到目標中。
如果我點擊我的聲音,路徑爲:
它放在這裏自動。
它仍然無法正常工作。我把它們放在資源文件夾中,添加到目標中,然後清理,構建並在我的iPad上運行。我應該刪除應用程序並重新安裝嗎? – Komarzer
不應該不需要。我相信當定製自定義聲音時,iOS所選擇的Android需要文件擴展名。嘗試添加它... – iCediCe
你是對的,非常感謝。這不是寫在他們的文件。再次感謝 ! – Komarzer