Why isn't Xcode recording these user interface tests? - objective-c

Xcode has the ability to live record UI tests, as demonstrated by this YouTube video - the user clicks buttons on the Simulator and the code appears in test.
However, when I do the same action on this freshly pushed to GitHub Xcode project nothing code appears. What is my missing ingredient?
This is the screen I see.
and this is a recording of what it looks like live. What am I missing?
EDIT - tried an entirely new user account, different project, button didn't appear at all. Twich video here, I must be missing something...

Related

XCTest UI Record and Play - Simulator not updating UI

Apple released a new UI Testing framework 2 days ago during WWDC2015. I'm trying to write a test case and when I try to record the UI testing, to generate the scaffolding code, it looks the code is being generated, however the UI on the simulator is not actually updating.
i.e When I tap on a button, the code is generated to actually find the button and tap, but the button is not actually tapped simultaneously on the simulator.
So basically I'm not able to go to the next screen on the simulator, to actually proceed in the test case.
The WWDC session video showed an example of an iPhone app (Lister app). But I'm trying it on a iPad 2 app. Thats about the only difference.
Any clues about why this might be happening?
Wanted to check if there has been other instances of these before actually filing a Radar with Apple.
I was able to fix the issue.
The problem was, in the "deployment target" section in the main Application target, there are different columns for all the targets listed.
For the Application's UI test target, the target was set to iOS8.
Changed it to iOS9 and it started working.

Apple's latest (2015) 'link to app store' directive causes unwanted Safari behaviour

I want to add a link from my app to another of my apps on the appstore.
Question How to link to apps on the app store showed that the itunes.apple.com link was,until recently, the normal way to go. I've tried this and everything is fine. The problem begins when I disgard this and use Apple's new recommendation of using appstore.com. I use the following line of code:
[UIApplication sharedApplication] openURL:[NSURL URLWithString:#http://appstore.com/myappname"]];
The first time I call this from my app it works well. You see it jump through Safari and move onto the appstore where it displays my app.
At this point if you look back into Safari you will notice a new blank tab labelled Favourites has been created.
If I go back to my app and perform the same action to link to the appstore again I'm prompted with one of the two popup boxes:
"Open this page in "App Store"? [Cancel] or [Open].
or
"Cannot Open Page. Safari cannot open the page because the address is invalid" [OK]
I've found that manually deleting the blank tab in Safari will allow the link to work properly but this behaviour isn't what I want my users to see- and I wouldn't be expecting them to delete the blank tabs from Safari.
Any advice on stopping this behaviour whilst following Apple's new rules greatly appreciated.
A simple and clean solution is to present an instance of SKStoreProductViewController inside your app (modally) to display information on the products you are interested in. The user can interact with it as a small view on the App Store and you can simply dismiss it when done.

iOS 'set up iad network' button missing

I am trying to set my app to use iAds but there are some problems. I followed this tutorial and got stuck on step three cause the button isn't available for me.
I'm not entirely sure why. I already filled up the paperwork, tax and contracts info. But the button is not there. Has it been moved?
A few months ago the button WAS there, however after I clicked it and enabled it, it tells me that I can only enable it when the app is in review. Ok now back to the present, I submit my app that has iAds in it. And it is waiting to be reviewed. The button to enable iAds is missing. It's been a week already. The app already got approved and is available, yet the button is not there. I'm not sure how else to enable iAds.
I have tried going to the iAd network site but all it tells me is that iAd network is temporarily unavailable. It's been already a week.
I finally got a response from apple regarding this issue.
They are no longer using the enable iAd button. As long as you have the paperwork and the iAd framework it should work.
I already have the paperwork done so they tell me that my implementation is wrong.
So I stopped using interface builder for my adds and instead just did it all programmatically.
I don't know if it will make a difference. We shall see... After my app gets approved I'll let ya know....
I simply updated the apps that were supposed to have ads from iAd, and now they are working. It seems that Apple is having quite a few issues with their servers at the moment, though.
I have also recently started implementing iAd in my apps. I have published three apps with iAd and did not see the button in iTunes Connect. The test ads work, however, I have not been able to test whether the ads work on a non provisioned device yet.I have also noticed the iAd module giving me the "iAd Network is temporarily unavailable" error message. I have seen it for at least five days now.
Update: My apps are finally being served iAds. What I did was simply release an update. I didn't even change my code for the ads. I am also not seeing the error from iAd that they can't find my account info; I'm just seeing revenue.

how to navigate to settings in android emulator using robotium?

I am a newbie for Robotium and till then I managed to learn a lot by directly writing test cases for public websites and sorted out several issues from answers in stackoverflow. now, I seemed to hit the wall at this (probably)trivial problem.
I would like to navigate to 'Settings' icon which is inside 'Apps' menu of the android emulator using some sort of 'robotium-solo' method.
This is my failed attempt:
solo.sendKey(KeyEvent.KEYCODE_HOME);
//solo.clickOnImageButton(2); // no success!
//solo.clickOnActionBarItem(2); // no success!
solo.clickOnText("Settings");
solo.clickOnText("Music");
I checked for any KEYCODE_var for home screen 'app' icon but couldn't find one.
There is no useful log message in DDMS to figure out the starting activity when clicked/tapped on that button.s
Please guide me whether my approach is any good and help me with an answer. Thanks.
you can check with getCurrentViews() and have the list of views displayed before clicking the menu button and after clicking the menu button.By comparing them you can get the view of the new views displayed (i.e. settings button).
After getting the view,you can go with solo.clickOnView(ViewNameObtained);
This will solve your problem for sure.
As far as I know, navigating to settings is not possible with robotium. Even if you would be able to go there you cannot perform any other action as Settings are not port of your application. Android Instrumentation allows performing actions only within one package and robotium is only wrapper for that, so it's not able to click outside your application as well.
You can use UI Automator for that.

How to use AssistiveTouch UI in iOS

I'm now developing an app on iOS. With some reason, I want to use AssistiveTouch UI in my app. For example, there will display a button in my app like AssistiveTouch, if anyone press this button, four buttons will appear like AssistiveTouch, if anyone press one of there four buttons again, some action i set before will excuse.
Does apple support api about this? Or Is there any source code available?
You would have to reimplement this from scratch. There is no public API for either accessing the existing Assistive Touch feature (it has to be turned on by the user in the settings) or for creating a similar UI.