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.
Related
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.
I am able to read and write data from my iOS app(Central). Just after Delegate connectPeripheral:periphal is called, OS gives an alert asking for authentication PIN with two buttons "Cancel" and "Pair".
I am not able to get any notification when user presses "Cancel" or "Pair" button. I am also not able to detect if the pairing is successful or not.
self.peripheral.state always returns 2 (connected)
I have done some research to handling Cancel event of pairing popup but unfortunately apple doesn't provide any delegate to handle it.
The iOS app I'm working on for a client currently only uses Apple Watch for notifications.
When a local notification fires while the user's phone is locked, it displays the notification on the phone. The user can dismiss the notification or click on one of the action buttons on it.
In either case, I want to dismiss the watch app and go back to whatever state it was in (back to the watch desktop, or springboard, or whatever it's called.) I don't want to present the UI for the watch app, since there isn't one, at least not yet. I don't know if my client is going to define a watch app UI or not.
As it is now, once the user clicks the dismiss button or an action button on the notification, the user is left with a stupid-looking placeholder watch app that simply has a button called "button" (which I added for testing.)
I'm afraid that you cannot change this. iOS decides which device the notification is shown on and you have no control over this.
If the iPhone is locked then iOS assumes that you are using your watch and will deliver the notification to it, however if your iPhone is unlocked it tends to deliver to notification to the iPhone.
When my app is notify by local notification then without click on notification i want to open an UIAlertView. Is this possible for IOS?
I am attaching screenshot for detail understanding.
With iOS8 you can display actions for the user to choose from in the form of buttons. These buttons can launch your app in the background to perform some task or they can launch your app into the foreground as you can do with the notifications available in older versions of iOS.
You can't, however, display a UITextField for the user to enter data.
Can IOS push notifications open another app via its URL scheme (ie. SOMEAPP://someUrlScheme)?
I've looked through the documentation but haven't seen any mention of this.
Directly from the notification bar I think it is not possible, but you can handle notification received event show a popup and launch another app on click event of that popup