Switching between app and broswer ios - ios

There is a scenario where tapping on link open's iOS native browser after which I need to close the browser and switch back to applicatio. Is there any possible way we can do the using Selenium commands.

Consider using sendkeys method to tap at home button twice. Then try to tap at some place in the middle of the screen to get back to previously opened app. That could work, but I have not tried it.

#vignesh You can't switch between different apps in iOS. Currently, appium supports app switching between android apps only.
But you can run you app in background and after specified time it will be foreground.

You can use the following code to move back from the browser.
driver.navigate().back();
Just try this out.

Related

How to hide multitasking snapshot in iOS?

I am developing a security application. I need to disable the multitasking snapshot from being taken by iOS. I have made a fix for this by adding a black screen over my application window, when application resigns active mode. This logic seems to work fine when I press home button. But when I lock the screen, the logic is not effective, since the snapshot is already taken before control comes to applicationWillResignActive method. I have verified this by downloading the container folder from devices tab. Is there any way to fix this?
Thanks in advance!

ios sdk show alert without launching the app

I have incorporated custom URL feature in my ios application. I would like to pop an alert on the browser itself when the application is relaunched from a screen other than home screen. I know if the app is relaunched from home screen or not. I am now popping an alert in the application it self. I want to throw the alert with out launching the application may be on the browser itself.
Thanks.
Since you can not do ANY UI stuff without having you app running, this will not be possible.
I think that is not possible, as when you are firing the URL, the control is in iOS Safari app. (Not in our custom app), and whatever you can do is - write code in your app only. So until your app gets launched, your code will not get to run, and alert won't be shown.
I am not sure if there is any other way around, this is just my own thinking.

Restrict iPad to only one application

I am developing an iPad application & I want to keep use only my application in iPad. User is not able to make any changes with Home button too.
I have tried same thing with "Guided Access". But, it will stop push notification also.
I have tried it with iPhone configuration Utility. But, I am not able to find any
restriction for Home button.
So, anyone have any idea how can I implement it?
You can't disable the Home button from the sandbox.You have to use the physical accessories to stop the Home button action, after opening your application.

Can I start iOS app by pressing home button for any times&

My question:
I have an iOS app, it is minimized, and I want it to start when user press home button three times (or, for example combination of buttons, like "HOME+Volume-" and so on). Can I make it for non-jailbroken devices, only with native iOS functions?
It's not possible to customise iOS like that.
Without jailbraking, apps can only be opened by using custom URL schemes from other apps or by normally tapping on the on the home screen. To have an app open like this you would have to modify the OS and there is no way you can do that without a jailbreak.
Standard OS functionality like pressing the home button multiple times cannot be overridden because Apple is really against modifying any part of way the user interacts with apps or the OS.
No.
Not possible without jailbreak and then it would have to be some sort of preference in the OS settings.

iOS restore state issue

I recently upgraded my old iPhone app and the new state restore iOS 3/4 feature has introduced a problem. I don't know the name of this restore state feature - what is it called?
Here is my problem scenario:
I navigate into a detail screen on my app. I click a button to navigate to an address and it launches google maps as expected. Then I launch my app again. It briefly shows the last screen I was on, but immediately launches the google map again.
What I want is to simply restore the detail screen that I was last on.
Any hints?
thanks
It is called multitasking, and it is built in automatically when you build under iOS 4.0+. Without you posting any code, it is tough so say, but why don't you put a breakpoint at the line that redirects to Google Maps and see what is calling it. Then you can backtrack to see why it is being called on the reopening of the app.

Resources