Issue Description
When the type Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND is defined and the sound property is not defined in the scheduleLocalNotification function, the device is not making the default sound and the device vibration on the alert.
Expected behavior
The device should make the sound alert and vibrate.
Steps to Replicate:
1. Create a new titanium classic project
2. Grab the app.js file
3. Replace the code with the testcase code
4. Run the application on iOS device
Test Case
// Check if the device is running iOS 8 or later, before registering for local notifications
if (Ti.Platform.name == "iPhone OS" && parseInt(Ti.Platform.version.split(".")[0]) >= 8) {
Ti.App.iOS.registerUserNotificationSettings({
types: [
Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT,
Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND,
Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE
]
});
}
var notification = Ti.App.iOS.scheduleLocalNotification({
alertAction: "update",
alertBody: "New content available! Update now?",
badge: 1,
date: new Date(new Date().getTime() + 6000),
//sound: "/ahem_x.wav",
});
var mainWindow = Ti.UI.createWindow();
var mainView = Ti.UI.createView({backgroundColor:"white"});
var desclabel = Ti.UI.createLabel({text:"Press the home or lock button and wait for the alert "});
mainWindow.add(mainView);
mainView.add(desclabel);
mainWindow.open();
[~rramirez] Have you tried to set the sound property to "default"? Please try if not! EDIT: This is what we're doing under the hood:
So providing "default" as the value of the "sound"-property should fix the issue.
Closing this issue, since [~rramirez] have been able to fix the issue by setting the
sound
property to "default".