From where does target.logElementTree() retrieve information? - instruments

I am actually trying to list all the available controls in a particular screen in an app so I want to know from where exactly does target.logElementTree() retrieve the information ?? or how to retrieve the all the controls available on a particular screen from the view controller ??
I am using Xcode 6.3.2 , UIAutomation in Instruments.
Thank you for taking time to go through till the end .

At present, this is provided by some private code within Instruments.
To access all the available elements, see Apple's documentation on UIAutomation, specifically the section on determining the element hierarchy.

Related

Why is Firebase reporting wrong Screen data?

I have an application with 3 view controllers inside a pagingViewController.
I also have a logEvent tracking 4 different things such as author title, video duration, etc.
The Problem is that on firebase it is showing the wrong firebase_screen_class. It is not reporting the right screen I am on.
Also on the dashboard under user engagement it is showing me the WRONG screens as where the user is most engaged ( beta iOS app that has not luahced).
Please take a look at the picture!
Please help!
The automatic screen reporter may try to be smart to guess your view controller but since your view contains multiple view controllers, it may not guess correctly. You can turn this feature off and log the screen manually to be more accurate:
[FIRAnalytics setScreenName:screenName screenClass:screenClass];
To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO in the Info.plist
More information here

What is this popup object called in iOS?

What is the pop-up object used in the Apple's "Clock" app for iPad called?
The popup looks similar to a MapKit callout, but often comes out of the side of a clicked button. Apple uses the pop-up often to display pickerViews on iPad. I am wanting to use it also for iPad applications in Swift, but I cannot find the name anywhere in documentation or on StackOverflow--because I don't know what it is called and it is thus hard to find.
I already know that some may not like the simplicity of this question, but I have seriously tried and have looked through books and other documentation trying to identify what the name of it, but it is so hard to find it without knowing the name! (I've included an image of the object just to be clear, but, unfortunately, I don't have the 'reputation' for the image to show up automatically in StackOverflow)
Image: The Object/PopUp item used in the "Clock" App.
The object is a Popover, as identified by Dan.
Thank you those who contributed.
You must be talking about UIDatePicker.

iOS Airprint without displaying popover dialogue box

I am developing an app that needs to be able to print out name labels after a user finishes a registration process. It needs to do this without displaying a popover which is automatically created when using UIPrintInteractionController.
I know other apps have approaches where they print directly after the user touches a print button that is placed in the view controller. Fx the iPrint&Label app by Brother.
How can I create a similar button that allows the application to print automatically without displaying the popover dialogue box?
p.s The application doesn't have to be app store clean, the final application will only be installed on two specific iPads.
p.p.s this is my first entry on stackoverflow, I hope I'm not being to much of a newbie :-)
It is possible on iOS 8 and newer - use printToPrinter:
Docs here: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPrintInteractionController_Class/index.html#//apple_ref/doc/uid/TP40010141-CH1-SW34

Ios default icon for open view from list

In every ios app you can have a list that contains elements with subelements.
Tapping on the element will open a new page and you can usually press back to return.
This is indicated with a grey ">" symbol on the right.
Is this symbol downloadable somewhere? I know i can just type a > but it doesn't look exactly like the default icon used by ios.
I'm using Xamarin dialog and a standard RootElement embedded as a list item looks exactly like the default ios but i need to customize it with an icon placed left of the text(which is no problem except that i now lose the default > icon).
Googling for ios system icons, ios default icons and ios sdk did not yield the wanted result. I'm hoping that these icons are somewhere embedded on the device.
I hope you guys can help me out, thanks !
As far as I know there is no way to access a UIImage instance of the chevron during run time. Most likely there is private API for this, but I am not aware of it, and since it's private you are not allowed to use it anyway.
You could probably instantiate a cell that has the disclosure indicator as accessoryType and walk the view hierarchy to find it. But that will break easily, so don't do it.
The best way is to add an image and update it with every new iOS release.
There's the iOS Artwork Extractor which basically gets you every piece of artwork that is used in iOS.
The artwork you are looking for should be named UITableNext. (at least that's the name in iOS6, I don't have an extracted archive of iOS7 yet)
Strictly speaking you are violating Apples rules and their copyright if you use their artwork without Apples written consent.
As far as I know this has never been enforced, and lots of people do it, but it's good to keep it in mind.

How can I inspect elements on native iOS application

I am running an iOS native app on iOS Simulator and would like to inspect the elements on the app to get the ID.
Does anyone knows how this can be done?
Note: Please, this question is for iOS native App not Web based app!
Thanks
It sounds like you may be looking for something like Firebug or the Chrome Inspector for your native app? I'm not sure what you mean by "ID". Interface elements in iOS don't really have IDs the same way DOM elements have IDs.
You should check out the Spark Inspector (http://www.sparkinspector.com/), which allows you to see the views of your app and modify them at runtime - it may help you see what you're looking for. Full disclosure: I am the author of the app ;-)
There is a new app, called Reveal, that does an incredible job.
Not only you can check view's properties, you can also view all the app in a "exploded" 3D view, change the sizes and properties.
Specially for iOS 7, where the view controller starts from the beginning of the screen (and not below the navigation bar), it can be really useful.
You can download the trial at http://revealapp.com and decide which license you should get.
There are two Best ways for this -
Use Accessibility Inspector which is Apples's inbuilt tool so you don't need any other support .
As you will be using Xcode mostly for you code part, there is an option to play UI recording which capture all the actions and elements that you interact with on native app.
You need to inspect the App's Bundle.
Check this answer on stackoverflow, to get the appID: https://stackoverflow.com/a/8883166/933887
Appium has an inspector for ios applications.
This is the link for appium: http://appium.io/
and in this video you can see the inspector in action: https://www.youtube.com/watch?v=jQZTRz2W9xg

Resources