Custom dialog for enabling push notifications (iOS) - ios

Is it possible to present a custom dialog and not present the default dialog "(AppName) Would Like to Send You Notifications" (seen below)? So when the user presses the custom dialog button "Enable Notifications" it allows notifications w/o presenting the default dialog? I dont want to present the user two dialogs.

No this is not possible, the dialog is coming from iOS and not your app.
And there is a good reason for it, security. The dialog is present by the system not you app. This is done so you can hack it so the user always accepts.

Related

How to dismiss iOS camera Access popup?

My app requests access to the iPhone/iPad camera. This results in the native iOS popup to appear, asking for user confirmation.
Is there a way in which I can dismiss this iOS popup (so before the user has made the OK / Don't Allow choice)?
For recent versions of iOS this popup automatically appears when you request write or read access for iOS Photo Library or use some of the AVFoundation framework components.
You can not dismiss it programmatically but you sure can create your own alert before showing the system one so you can have more control over what the user does.
It is the case in many 3rd party apps because when the user declines the access, it's not easy to ask them to go to settings and re-enable it from there. One of the easiest examples to implement would be something like this.

Change system generated alerts into Custom Alert

Can we show the system generated alert, like permission request and in app purchase popups as shown here into customise view?
If yes Please explain How can we achieve it?

How to check if an SpringBoard alert / Safari browser popup is present?

Is there a way to check from the command-line terminal, if an alert view is shown?
I can ssh onto my iPad and wanted to check whether a basic-auth popup from either springboard or the safari browser is present. Does safari store the state of the alert in a specific plist/file on the device?
I can also run an app as a background service on the iPad, but will it capture the alerts shown in other apps? Can this be done via activator?
We ended up on using a Theos Tweak app and hooking in on show method of UIAlertView

Need info on handling system notification on iPhone in automation

We initiate pairing with iPhone,
On iPhone a notification “Do you want to pair with this device” with 2 buttons “Pair” and “cancel” is displayed.
I need to click on this “Pair” button.
I notice that this notification displayed is not part of the any mobile (iPhone) application instead its system notification.
With the current tool, I am unable to click on this “Pair” button, hence can you please suggest an automation tool for iPhone which can perform click on this “Pair” button displayed as part of system notification?
its true you can not click buttons on alert and notification with inbuild automation. automation have inbuild functionality which cancel notification and alert by click on cancel
If you are using Instrument tool provided by apple then also it is possible to tap on "Pair". Only thing you need to do is register a callback for alert before your alert come. So limitation with this is if your alert come at starting point only then it is not possible with this tool but if this alert comes in between then definitely you can tap on "Pair".
You can see in UIAutomation doc hon how to register a callback for alert.
If not able to then I can help you more.

iOS - how to put a custom pop-up before the APNS & enable location pop-ups

I want to put a pop-up screen on my app before the iOS "Allow push notifications" and "Allow location updates" pop-up screens that show up. Is this possible?
Yes, simply show your custom UI first then after that is complete call registerForRemoteNotificationTypes

Resources