UIScreen.capturedDidChangeNotification notification is not called on iOS simulator? - ios

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?

Related

In IOS Simulator i cant able to view the notification is there any setting on simulator to get the notification in notification bar

In ios simulator, I cant able to view the notification is there any setting on a simulator to get the notification in notification bar.i am using the hybrid app.

Detect when App is Slide Over on top of running app on iPad

We have a WebRTC Swift 4.2 application using Google's native WebRTC code. We are having issues with Apple's App Slide Over Multitasking feature on iPads.
Issue:
What we are seeing is when our Application is running in a video call on an iPad as soon as another app is 'Slide Over' our app, our application stops using the video camera and microphone until the Slide Over app is closed. Once closed our application gets the microphone and camera back.
Expected Result:
Our application is still able to use the camera and microphone and the user is able to use both apps at the same time.
Questions:
Is there a setting we need to turn on to disallow Slide Over apps? If not is there a event we can subscribe to when the slide over happens so we can request camera and microphone access again?
What we have done:
We have set our application to require full screen in the project settings.
We have tried subscribing to the following events on the AppDelegate:
applicationDidEnterBackground, applicationWillResignActive, applicationDidBecomeActive. These events do fire once for the initial Slide over app open and close but not after consecutive Slide Overs with same app.
Turning on all Background mode capabilities. Has no effect.
On our ViewController.swift we have tried to subscribe to viewWillLayoutSubviews event. This event does not fire for apps opened with Slide Over.
Versions:
iOS 11.4.1
Swift 4.2
Xcode 10.1
I filed a bug report with Apple and they said,
"This sounds like expected behavior, given that only one foreground app is allowed at a time."

Push notifications don't appear when iOS is on lock screen

I am having a problem letting the OS show the default push notification banner while the app is running but behind the lockscreen.
Test Case:
Open the app.
Press on the power button.
Send a push notification from the server.
Current Behaviour:
The phone's screen just turns on.
No notification banner appearing on the screen.
Expected Behaviour:
OS Notification banner to appear on the screen.
Tested on:
iOS 9 & 10
NB. Push notifications are sent, delivered & displayed otherwise than the above test case..

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.

How to show notifications in iWatch?

I am working on an iWatch application. I am doing a sample app using swift and my requirement is to display LocalNotifications. When i run my app in my iPhone simulator i’m getting the notifications but i'm not getting notifications when i run the app in iWatch simulator. Can any one explain me about how local notifications display in iWatch.
Do we need to design any UI to show the notifications on iWatch i.e static or dynamic interfaces in iWatch Interface builder?
Thanks in advance.
Run your watch app Select notification target on simulator, dismiss the notification and stay on clock face.
Hit ⌘L to lock iOS simulator.
Enjoy notification arriving to watch app.

Resources