2
-(void)notifyMe
{
    UILocalNotification *localNotification = [[UILocalNotification alloc] init];
    localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:0.1];
    localNotification.timeZone = [NSTimeZone defaultTimeZone];
    localNotification.alertBody = @"Alert";
    localNotification.alertAction = @"Local notification";
    localNotification.soundName = UILocalNotificationDefaultSoundName;
    localNotification.alertLaunchImage = nil;
    localNotification.userInfo = nil;
    [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
}

This is the method I am calling for local notification. This is working fine with other applications. But with my working one, notification is coming but with no sound.

I guess there is some problem with app setting, but I am unable to find it out.

Amar
  • 13,202
  • 7
  • 53
  • 71

1 Answers1

2

I found your question as I had run into the same problem. Turns out it was a simple fix on my part, my code was fine all I had to do was enable push notifications for my app (which I had already done but was getting no sound or badge), and then switch Badge App Icon and Sound to ON.

I'm surprised there have been no other answers to this question in 6 months.

PaulG
  • 6,920
  • 12
  • 54
  • 98
  • I'm having the same problem and it happens in some devices while other devices work fine and both sounds and badge are ON, but when i install the app on my iPad runs iOS 7.0.3 i can't hear sounds from local notification all i get is a message without a sound. can you please elaborate more on how to solve this issue ? thanks – 4mahmoud Apr 30 '14 at 22:56