UNPKG

call-screen

Version:

Capacitor plugin for full-screen call UI with Accept/Reject buttons, OneSignal integration, and cross-platform support

49 lines (37 loc) 1.26 kB
# iOS Resources Directory This directory contains resources for the Call Screen Plugin iOS implementation. ## Adding Custom Ringtones To add custom ringtones to your iOS app: 1. Add your `.mp3` or `.wav` ringtone files to this directory 2. Update the `playRingtone()` method in `CallScreen.swift` to use your custom file: ```swift private func playRingtone() { // Use custom ringtone if available guard let ringtoneURL = Bundle.main.url(forResource: "your_custom_ringtone", withExtension: "mp3") else { // Fallback to system sound AudioServicesPlaySystemSound(1005) return } do { audioPlayer = try AVAudioPlayer(contentsOf: ringtoneURL) audioPlayer?.numberOfLoops = -1 audioPlayer?.volume = 1.0 audioPlayer?.play() } catch { print("Error playing ringtone: \(error)") AudioServicesPlaySystemSound(1005) } } ``` ## Supported Audio Formats - MP3 - WAV - M4A - CAF ## File Naming Convention Use descriptive names for your ringtone files: - `default_ringtone.mp3` - `custom_ringtone.wav` - `notification_sound.m4a` ## Note Make sure your audio files are properly licensed for use in your application.