MPMoviePlayerPlaybackDidFinishNotification not firing in iOS 4.3 - ios

I have added an observer for MPMoviePlayerPlaybackDidFinishNotification to determine if a movie has finished playing. It works fine in iOS 5, the notification fires when the movie has reached the end.
However, in iOS 4.3, the notification never fires. Has anyone experienced the same problem and come up with a workaround?

Related

UIScreen.capturedDidChangeNotification notification is not called on iOS simulator?

I am trying to detect when a user starts recording the screen and for that, I am adding observer for notification UIScreen.capturedDidChangeNotification. However UIApplication.userDidTakeScreenshotNotification notification is working fine in simulator. How should I test the app by recording the screen?

Playing long sound in local notification iOS10

I have a custom sound playing on local notification, in iOS 10 when the device is locked everything works fine and the sound plays till the end. But when the device is unlocked, as soon as the notification bar hides ( in about 5 Secs.) the sound stops playing.
PS. It works fine in iOS 9, the notification bar stays on top as long as the notification sound is playing.
Is it a bug or am I missing something?
EDIT:
I've tested with either UNUserNotificationCenter and deprecated UILocalNotification. Both the same result.

iOS 10 custome remote notifications sound not playing the whole file length

I am aware of the bug in iOS 10 that will prevent custom remote notifications sound from playing. The current solution seemed to be restart the device. That seemed to temporary fix. But this problem will reoccur again.
But my problem is that when it did play the custom sound, it did not play the whole file (30 seconds or less). It only plays 2-3 seconds and the notification view disappears.
It works fine under iOS 9.
Have you encountered this issue? Any suggestions?

AVPlayer pause live stream on iOS 9.3

Im having difficulties trying to resume live stream playback from previously paused moment.
On iOS 9.2 and below player continued to play from paused moment.
On iOS 9.3 and above, when i resume playing, i receive "playerBufferEmpty" and AVPlayerItemTimeJumpedNotification, and as a result playback doesnt continue from the paused moment.
This looks like an issue in AVPlayer since everything works on iOS versions 9.2 and below. I also tried playerItem.canUseNetworkResourcesForLiveStreamingWhilePaused , but it doesnt help.
Are there any changes in AVPlayer/AVPlayerItem regarding this from iOS 9.2 to iOS 9.3?
Thanks!

UILocalNotification with custom sound only works on iOS 6.1 and iOS 7.1, not iOS 7.0

I have developed an application where the user can select from a few custom notification sounds to sound. These notifications will either be shown in-app through a simple AVPlayer or through a UILocalNotification when the app is not in the foreground. The foreground alert ofcourse always works. The background alert did not work on one of my testers' iPhone 4S.
At first I thought it was a configuration problem on his phone but we couldn't find anything. When I started digging deeper into the problem I discovered he was running iOS 7.0.4. I tried to run the application on an emulator running iOS 7 instead of iOS 7.1 and I did not have any sound with a UILocalNotification neither. When I tried iOS 6.1 in my simulator there were no problems at all again. My hardware device running iOS 7.1 did not reproduce the problem either. The message and logo always show no matter what version, it's just the sound that's missing.
Then I thought the problem might be related by the fact that it wasn't running in the foreground thread of the app. performSelectorOnMainThread:withObject:waitUntilDone: did helped neither.
This is the relevant code:
+ (void)minimizedAppAlarm:(Settings *)settings;
{
UILocalNotification* notification = [[UILocalNotification alloc] init];
notification.alertBody = NSLocalizedString(#"WAKE_UP", #"Wake up!");
if (settings.playSound)
{
notification.soundName = #"somefile.mp3";
}
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
}
It seems it has to do with setting the badge number using the following call:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:number];
Currently I am not sure what exactly happens but I do a countdown from ten to zero when the app is minimized and perhaps setting the badge to zero just before the alarm it blocks.
I have been running my app without these lines of code and it's firing the background notifications in every version. Note that I have been testing this app on lower version in the simulator and I did need to do the following before I noticed any changes
Remove the app from the home screen
Reset contents and settings
Since the simulator does not have any settings for notifications I guess somehow 7.0 sets the notifications muted if I used setApplicationIconBadgeNumber. For now I can continue finishing the app without the countdown feature but I will continue testing so I know for sure I only need to disable iOS 7.0 or the problem exists on most versions if I start a version of the app that directly changes the badge number.

Resources