twilio / twilio-voice-react-native

Other
72 stars 27 forks source link

The ringtone for the IOS application does not change. #376

Closed AlekseiEDT closed 2 months ago

AlekseiEDT commented 3 months ago

Description

Hi everyone. I was trying to change the ringtone for an app (ios) using a key (callKitRingtoneSound). Here is my code

  import { Voice } from '@twilio/voice-react-native-sdk';

  const token = getAccessToken();
  const voice = new Voice();

  voice.setCallKitConfiguration({'callKitRingtoneSound': 'tone‘})

  await voice.register(token);

This code works without any errors, but the ringtone does not change. I tried with different file formats (wav, mp3)

Here is my file in Xcode image

I added tone.wav to xcode in this way image then image

Software and Device Information

Please complete the following information.

Additional Context

Also I tried these docs (https://github.com/twilio/twilio-voice-react-native/blob/latest/docs/play-outgoing-call-ringback-tone.md) and in this case everything works fine

bobiechen-twilio commented 3 months ago

Hi @AlekseiEDT

Other than including the file into the Xcode project, the app also needs to specify the file extension in the setCallKitConfiguration() method.

mhuynh5757 commented 2 months ago

Hi @AlekseiEDT I would like to close this issue as stale for now since we've provided a solution for this issue. If you need further assistance, please feel free to reopen this issue.