How to resume your app using calaba.sh - ios

I'm using Calaba.sh to to ui testing of my iOS app. I want to be able to test tapping on a link in the app which takes the user to a web address in their browser. I then want to be able to resume the app. Is there a way to do this?

This is not possible in Calabash iOS.

Related

Is it possible to work with the Podio iOS app from other apps? I.e. open Podio and show a specific entry in an app

We are in the process of creating an app that communicates with Podio.
During the work flow, we would like our app to open up the Podio iOS app and show a specific entry in one of the apps/tables of Podio.
Is it possible to work with the Podio iOS in such a way?
Can we trigger opening of Podio and navigation inside the app, from outside the app with APIs or similar?
Hope someone can help with any input.
Thanks in advance.
Podio iOS will open (or at least offer end-user option to open) links that starts with https://podio.com/*. This is exactly the way to go directly to Podio item from your email (for example), when you received mail notification. So, if you know your item URL, try opening it by system app, and iOS should let Podio app open it.
That won't work for any Podio url, but only for task, status, item urls.

Notifications For User Having Opened Another Application?

My iOS application (using Swift) needs to react to a user having opened another application. It does not necessarily need to know what app it is. It just needs to know that the app being opened is not the phone call/dialer app, because the dialer app would be the only app that receives an exception from my application. I do not want to stop the user from opening the other apps, but just have my app react to that action.
I know it is possible, because there is an app on the app store that uses this functionality currently. The app I am referring to is called Forest- Stay Focused. It seems like I should be able to use the AppDelegate functions somehow, but I cannot seem to figure out how.
How can I accomplish what I am looking to do?

How do I avoid the "Open this page in 'appName'" alert from appearing in Safari for iOS?

I am creating a flow that:
1) takes the user from my iOS app to my website through Safari
2) and then navigates back into the app via javascript
However when I try and redirect the user back to my app from my site using url schemes, i get the familiar "Open this page in 'appName'" alert.
Is there a way to avoid this alert from showing up? Is there some way to whitelist my website as a source for my app to allow me to direct the user back to my app w/out any alerts?
It seems like it might be possible with Universal Links, but I am wondering if there is a simpler way to do so.
EDIT: I should have mentioned that I have the unique requirement that I need to use Safari. I am processing donations in my app, and Apple requires you to go this through Safari and not a webview. Any ideas? –
You can achieve this using webView instead of Safari,so that
control will not go out of the App.
Now the problem is how to get the click from webView, for that you can
use this approach
How to invoke Objective C method from Javascript and send back data to Javascript in iOS?
I have integrated this approach in my App so this approach will work for sure. It feels like you are in APP & some times it will diificult to differentiate between WebPage & native page

Phonegap how to come back to app screen and exit from app iOS

I am creating a phonegap application that posts the login information to my website. When user signs off I want to come back to my app. Do I just send the url location along with the post data so that I can come back? or there is another elegant way?
Also when user clicks on the iphone home button, I want the application to exit. Currently it just saves the session and the page and goes back directly to the page if I start the application again.
I am using adobe phonegap site to build and test the application
From your description, I assume that you are navigating the Phonegap WebView (which is running your app) to the URL of your website?
If so, at this point you no longer have an app to navigate back to - the WebView has lost its handle on your app. In order to "navigate back" to your app, you should use the InAppBrowser plugin to navigate to your website. This will allow you to return to your app after the user logs out from your website. You'll need to somehow communicate the logout from your website in the InAppBrowser WebView to your app in its WebView. You may be able to achieve this with cross window messaging.
You can't "exit" an app in iOS - the OS does not allow you to do this. The best you can do is use the resume event to detect when your app has been restored from the background, then manually reset your app to its initial state.

Check Email during Xcode UI Testing?

UPDATE: Is this still possible with the new way of UI testing with Xcode?
Can I programmatically access my email from an iOS UI Automation script?
I want to access the signup code that my iPhone app emails to my email account.
If you have a way for your device/simulator to receive the code while still in the app then you can write a script an iOS UIA script to do this.
However with the current state of the built in iOS UIA tool, you cannot access anything that is outside of your app. So basically you cannot launch your app, then launch another app (like safari) go to mail.google.com blah blah.
The closest thing to leaving your app in iOS UIA is using a function call to send your app to background for X amount of seconds.
Use NSURLSession to make HTTP requests from within test methods. See: https://stackoverflow.com/a/35708282/242933

Resources