Interact with app launched from browser - ios

I have an iOS app that must be launched from the safari via URL scheme. And I want to test it with Appium.
I managed to launch the safari and then click on the link that launches the app. The problem is, I am having trouble interacting with said app afterwards. Is it possible with Appium and iOS to send commands to an app that was launched from the browser?

You should be able to interact with safari using something like this
driver.FindElementByXPath("//UIATextField[#value='Enter URL']")
.SendKeys("www.google.com");

Related

phonegap app extremely slow to load website on ios

I have a phonegap app that opens a website using window.open(). While it works fine in testing, when I compile the app and install it on an iPhone using TestFlight it can take anywhere from 1 minute to 15 minutes to open the website. When it does everything works fine. The app store review is rejecting it because of the delay. What can I check to identify the cause of this delay?
Use remote debugging with an iOS device (or a simulator). This will allow you to see error's log like debugging a web site.
See "Safari in iOS" in : https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/GettingStarted/GettingStarted.html
Open the Settings app.
Tap Safari.
Scroll down and select Advanced.
Switch Web Inspector to ON.
After Web Inspector is enabled, connect your device to your desktop machine with a USB cable. The name of your device appears in the Develop menu of Safari.
Also, depending of what you want to do, I suggest you, instead of using window.open, to use the cordova-plugin-inappbrowser plugin to open link in the browser (outside the webview of Cordova/Phonegap)

Is it possible to use WatchConnectivity in background

I have an watchOS app that used WatchConnectivity framework to open an URL in Safari. When my app is running on the iPhone and running on the Apple Watch at the same time, pressing the open URL button on the Apple Watch app does launch Safari on the iPhone as what I've implemented using WCSessionDelegate. But this won't work if the iPhone app is not running. Is there a way to launch the URL on iPhone when pressing the button on the Apple Watch even if the iPhone app is not active? Thanks.
Using the WatchConnectivity's sendMessage API the watch app is able to get the phone to launch your iOS app in the background, but a background running iOS app won't be able to open the URL resulting in Safari being launched.
No, Apple does not allow you to start an iPhone app from the watch (although a lot of developers seem to want this functionality.) You can always enter an enhancement bug request.

Get access to console in Sencha Touch app running on iPhone

I want to use console.time('a') and console.timeEnd('a') in my Sencha Touch iOS app. This functions prinnt measured time in microseconds on console.
How to get access to console while I'm running my app on iPhone?
I tried with Safari Remote Web Inspector (like Phonegap iOS Safari debug workflow), but it doesn't work. It give me access to index.html, and Web Inspector opens correctly, but all his tabs are empty including console tab.
(I tried used Safari Remote Web Inspector with PhoneGap and it works correctly)
EDIT:
I don't use Xcode, becouse I am building my app with Sencha Cmd. And I do not want to change that, because I am testing Sencha Touch performance without PhoneGap.
There is a cordova plugin which you can use to see the output of console in XCode.

Facebook app request shows up in desktop browser but not iOS app

I am trying to set up in app facebook game requests for an iOS app. I am able to successfully send a request from the iOS app and view them in a browser on my laptop.
However, when I try to find the game requests using the facebook app for iOS they don't appear, and neither does my facebook app.
I want to be able to access these requests so I can make sure that my iOS app will be able to handle opening the link directly. Here are my app settings as well as plist file.
I had to go to App Details and make sure that under App Center Listed Platforms that iOS - iPad / iOS - Phone were turned on.

iPad: launch external application when an application starts

Is there an API in OSX that I can use to launch my application when users open any app? Something like a global App Launched event?
No. There is no meaningful multitasking functionality in iOS API.

Resources