remote notification sound 설정

apwierk·2023년 11월 10일
0

개인 공부

목록 보기
19/20

remote notification sound 설정 방법.

  1. 사운드 파일 이름.caf 파일을 추가

  2. project - TARGETS - Build Phases - Copy Bundle Resouces -> '+'추가 - 사운드 파일 이름.caf

  3. payload 에 사운드 추가.

{
    "to": "token값",
    "priority": "high",
    "notification" : {
    "title" : "알림입네다",
    "body" : "테스트입네다 당황하지마시고,,,,",
    "sound" : "voice.caf"
  },
  "data" : {
    "type_string" : "deeplinkurl",
    "link_url" : "https://myapp.onelink.me/"
  }
}

참고-stackoverflow
사운드 출처

profile
iOS 꿈나무 개발자

0개의 댓글