Change notification sound in iOS Flutter - ios

I want to use my own sound in push notification in iOS platform of Flutter. Since I have no experience in iOS development, I am struggling with it.
In my app settings there are 3 notification sound options, so that user can choose notification sound. I have already implemented local_notifications package and although I am getting notifications in my app, I couldn't find how to use custom sound in push notification for iOS platform.

You should replace this default given sound name to your sound name.
var iOSPlatformChannelSpecifics = IOSNotificationDetails(sound: 'slow_spring_board.aiff'); //put your own sound text here
(Before this, your sounds should be added to your project using Xcode)
Here is the link how to add custom sound to your project for iOS devices using Xcode: https://medium.com/#dmennis/the-3-ps-to-custom-alert-sounds-in-ios-push-notifications-9ea2a2956c11
Note: Sound duration should be less than 30 seconds otherwise it will not work

Related

iOS flutter_local_notifications not making default sound or .caf sound

I am using flutter_local_notifications 9.4.1 in my flutter mobile application
I am deploying successfully to Android and iOS 14.2
My use case is simple - to provide a local notification with a sound when a specific task has completed.
Android - everything works fine - my mp3 sound plays when the notification appears just as I want. Perfect.
iOS - I have everything working except for sound. I have added a custom sound (a CAF file converted from a .AIF file, using the Apple recommended procedure ... afconvert). I added the sound file to the Flutter project the correct way - by using XCode to include it into the top level folder with the target ticked. In my flutter code, I already have the modification to the appDelegate.swift, and in the IOSNotificationDetails I have ensured that presentSound is true and presentAlert is true. I am also specifying sound: 'mysound.caf'. But actually even if I don't specify a custom sound, according to the documentation, the default sound will be used. But no sound occurs, default or otherwise.
On the iPhone device, I have checked silent mode is off, I have checked the app permissions - everything set as it should be - sound is enabled, notifications are enabled. I have even copied the CAF file manually to the iOS device to be sure it plays and that I can hear it! I have no build errors or run-time errors. So I must be missing something.
I don't know of a way to check that the sound file is actually deployed to the device - is this possible?
Is there something in the setup or deployment process I have missed? I have not posted code up because I have spent hours comparing my code to the documentation and finding no differences. I am hoping someone has experienced this and found an undocumented step.

Custom notification sound no longer working

I have a Windows service which will send notifications to our iOS app using Apple's push notification service. We were using a custom notification sound which was playing when the notification appeared on the device. Last week after the iOS 10.3.3 update was released, we've found that the custom sound is no longer being played. This is the message we're sending to APS:
{
{
"aps": {
{
"alert": "Alert message",
"badge": 5,
"sound": "mysound.mp3"
}
},
"acme1": "bar",
"acme2": 42
}
}
Our app has not changed, and the custom sound is no longer playing even on devices which have not yet updated to iOS 10.3.3, including devices that can't update past iOS 9.
I'm not exactly sure were to start looking to diagnose the issue; the mobile app is built using Cordova.
I'm surprised it ever worked at all with the mp3 file type.
According to the docs:
You can package the audio data in an aiff, wav, or caf file. Because they are played by the system-sound facility, custom sounds must be in one of the following audio data formats:
Linear
PCM
MA4 (IMA/ADPCM)
µLaw
aLaw
Try converting it to one of the supported formats and packages and it should start working again. See the docs for details on how to do that.
iOS Notifcation custom sound is worked (When app in Foreground,Background,and Terminated)
Local and remote notifications can specify custom alert sounds to be played when the notification is delivered. You can package the audio data in an aiff, wav, or caf file. Because they are played by the system-sound facility, custom sounds must be in one of the following audio data formats:
Linear PCM
MA4 (IMA/ADPCM)
µLaw
aLaw
Note:-
Custom sounds must be under 30 seconds when played. If a custom sound is over that limit, the default system sound is played instead.
Add files to the Xcode project root.
Add file to Xcode
Make sure Add to targets is selected when adding files so that they are automatically add to the bundle resources
add the file to copy bundle resource
After that you need to set custom Sound name in app Payload:-
payload
{
aps = {
alert = "Hello World";
badge = 1;
sound = "iosTune.aiff"; // default;
};
}
Final:- when notification will receive in any stage of application then custom sound will play instead of Default sound.

Is there a way to use iOS/Siri voice to text capabilities to add a voice interface into an app?

For example, I would like to build an app to remind me to pick up a kid from daycare. I'd like to touch a button inside the app and dictate instructions that "Daycare closes at 3pm tomorrow" and I can then process the text rather than making them select from pulldowns. Is this possible in some iOS kit?
A speech recognition API is shipping with Xcode 8.
WWDC Video
Example Project
You can download the beta build now or wait till it ships this fall.

How to set iOS system alert sounds as push notification sound like Whatsapp does

I'm aware of Apple documentation about setting custom push notification sound for iOS from here. They said you can set sounds that are located either in app's main bundle or in Library/Sounds folder from app's data container.
However, as can be seen in the images below, WhatsApp for iOS allows the user to select sounds that are the same as alert system sound for iOS, for example, popcorn, circles and so on.
My question is, is there a way to use system sounds for push notifications alert or WhatsApp just copy/paste the same sounds to its main bundle?
As far as I know, you have to just copy/paste the same sounds to your app's main bundle. However, be careful about the legal issues of the sounds you use.
There is also a question's answer here where you might find how to do it.

Continue Playing Music Whilst Inactive in Titanium Mobile iOS

I have a Titanium Mobile project for iOS devices and would like to make the music continue playing whilst the application is inactive, and if possible whilst the device is locked.
The audio files are within the application only, not in the iTunes library.
You'll have to set the background modes in the .plist file that is generated as part of the XCode project.
See this link
http://www.codeproject.com/Articles/124159/Hour-21-Building-Background-Aware-Applications
and look for the section called Adding the Background Modes Key
Background audio playing must be a fundamentally important part of your app's functionality to use this, otherwise it will be rejected when you apply to submit it to the app store.

Resources