How to bring alert message if iPod have not moved for 60min? - objective-c-blocks

My task is to bring an alert message if the device has not been moved for 60 minutes.. Not even single tilt
Example:
i) To Bring Alert Message:
Let us consider iPod has been placed on table for 60 min.. it was not moved at all.. At end of 60min i have to bring alert message..
ii) Don't Bring Alert Message:
if iPod has been moved some where or single tilt happen in-between that 60min.. then i don't want to bring alert message.
If device is moving or tilt or shaking or rotating continuously then don't want to bring alert message.

Related

Xcode not showing microphone access alert for iphonex simulator

In Xcode, Before every time I got alert to access microphone.
Someone suggested below terminal command to avoid that
tccutil reset Microphone
After execution of this command, microphone usage alert not coming…so in iPhoneX simulator every time crashing in random place.
How to get above microphone usage alert every time like before? If this alert come then not crash…
In system settings now Xcode not visible under microphone
How to get microphone usage alert every time like before ? For iphone5 simulator this alert coming sometime..if alert come then no crash..if not come then crash in random place...now in same xcode, microphone alert not coming for iphonex simulator....how to get it everytime ?

iOS 11 new notification center removes all delivered notifications after user make any action with one of them

I have an issue on iOS 11. All delivered notification automatically removing from notification tray after I select any action for one of them. This happens before my code start handling action. In iOS 10 everything is ok, all delivered notifications stay in delivered and disappear only notification where I proceed some action.
My app schedule reminders with custom action, 2 buttons Activate and Stop. User can receive many of them in one day, but its very important to keep already delivered notifications, because most of them is uniq and make different actions.
If it is iOS 11 new notification center behavior or known issue, where I can read about this? Thanks a lot for help.
Minimum deployment target in my app is iOS10 and I use new UNNotificationRequest for scheduling local notifications.

Is it possible to show small alerts in the upper right corner on Apple TV? (like the "remote connected")

I want to show a small notification while my tvOS App is running. The normal UIAlertController alerts are fullscreen and would be disturbing the experience.
Is there a way to use the notifications, which tvOS shows when the remote is connected and so on? They look appear in the upper right corner for a few seconds as an overlay.
Thank You

Show on Lock Screen push notification settings?

To get push notifications settings for an app I use:
[UIApplication sharedApplication].currentUserNotificationSettings
and then I check for the types of UIUserNotificationSettings. There are only 4 types None, Badge, Sound, Alert. If I use an app with settings like this:
I get that Sound, Badge, Alert is disabled and None is enabled. Why is None enabled if I still have “Show on Lock Screen” switch to ON? I am confused, is the “Show on Lock Screen” treated somehow different? From my understanding the app should still be able to receive push messages. Is there any way to find out “Show on Lock Screen” switch value for push notifications?
The API gives you access to the alert style when unlocked.
Given the fact that you still have the option Allow Notifications turned on, your app will still receive push notifications. So, by putting a breakpoint in code you'll see it being executed when you receive a push notification.
The currentUserNotificationSettings will tell you which type of alert style will be used for displaying when the phone is unlocked: None is a viable option and, along with Badge App Icon disabled your app can receive Push Notifications without showing any type of Banner, Alert, or Badge.
Show on Lock Screen can be seen as a way for the user to customize which notifications are and aren't presented, and in which way, in its phone. I don't think there's an API that will tell you whether or not that option is enabled.
I've just tested Messages.app with the exact same configuration you presented and by sending messages to myself there was no Badge, no Banner, no Alert but if I quickly lock the screen the phone wakes up with a notification in the Lock Screen.

AlertView's Height Expand Automatically on iPhone 4

Currently,I am developing one app in which i set simple alert on one button click.
All operation performed very well on all device but when i run my app on iPhone 4 alert's height automatically increase and my subview's which add in alert its layout is not looking good.
What is issue is generating i cant find out please suggest me some solution.