iOS equivalent to XAML spy and web inspectors? - ios

When developing XAML apps I utilized XAML spy which allows me to inspect the rendered app elements when running the app in the simulator. It aids in finding where certain styling is emanating from. It's similar to developer consoles in web browsers and in particular Firebug in Firefox.
Is there an equivalent tool for iOS development that I can use while running my app in the iPhoneSimulator from Xamarin Studio?

I would give Reveal a go. It allows you to inspect and debug your UI and autolayout issues similar to XAML spy.
If you are using Xamarin there is a getting started guide

I haven't used it, but http://sparkinspector.com/ is the closest i've seen.

I have found something that can be used for some limited inspecting of elements - Accessibility Inspector.
Enabling the iOS Accessibility Inspector:
Start simulator > click Home button to return to home screen > start Settings app > nav to General, Accessibility and turn it on
It adds an overlay to the screen showing label, traits, frame and notification details.
It's not as extensive as I was after.

Related

Alternative to Appium inspector or app inspector to view mobile elements in iOS

I like to find out if there are alternative mobile viewers for elements for iOS as I am not getting Appium Inspector or app inspector working.
Please let me know if you know of other alternatives that can view iOS elements.
You can try the Xcode Accessibility Inspector.
To open it: Xcode/Open Developer Tool/Accessibility Inspector
Check if its a debug/developer signed build and you have the application ipa and other capabilities mentioned correctly to inspect through Appium. If this is not happening, the automation script won't be running as well. You can share the capabilities and the error you are facing, so look into the problem in a better way. Thanks.
I have found a workaround to prevent the Appium Inspector from crashing - basically I should call the Appium Inspector directly instead of through my script. Hence it no longer crash.

Testing on mobile sized screen in Visual Studio

I've built an mvc app that i've loaded up to azure and on a desktop it looks fine. But the layout is a bit all over the place on a mobile device. Rather than publishing my changes to azure every time I make a design change is there a way I can see how it would look in a browser eg. chrome on a mobile device? One way i'm doing it is just resizing my browser on the laptop to the size of a mobile device and that kind of works but just wondering if there was a better way.
Thanks,
Jerome
You can use F12 option which have toggle device toolbar option in chrome. That would help you see the responsive respective design of your app in all the popular mobile devices chrome gives as an options to test on. plus you can use custom sizing to adjust width and height of the screen to manually check the responsivity.

Xamarin Universal iOS app runs only on iphone

I have a Xamarin iOS Universal app with simple forms in a Tabbed Controller (with three Tabs). The IDE am using is Visual Studio 2015 with Xamarin in it.
In each tab, I have simple UITextFields and the problem now is they appear only in iPhone in the Main.Storyboard. When I select "iPAD" under "View As", all the UI components disappear. (added screenshots of the IDE below)
Same happens when I run the app on simulators too. The app UI appears on iPhone simulators but not on iPAD simulator.
I understand that I do not need to explicitly do anything to make this run on an iPAD. Please correct me if am wrong, and help me on what to do to make this work.
Thanks.
Have you set Devices in info.plist as Universal ?
Also in Storyboard, for each of the UI Controls that are removed while selecting iPad check if that UI control is installed for All Size Classes.
Scroll to the bottom of properties Tab after selecting the widget and check if it is wAnyhAny.
Tutorial for size classes can be found in Xamarin's documentation

Specify icon/ image in "Recently Viewed" tab in iOS Chrome

How can I specify the icon/ image thumbnail and text used in the iOS Chrome new tab? It doesn't appear to be http://example.com/favicon.ico.
Screenshot of iOS Chrome new tab
Quick and easy solution
Apparently you have only one icon, favicon.ico, which is mostly ignored by mobile browsers. You should at least define a Touch icon. You can use a service such as Real Favicon Generator to create everything and support all browsers.
Full disclosure: I'm the author of this site.
Precise (but probably too elaborate) solution
Run the compatibility test to understand which icon is actually displayed by Chrome in this particular place. For example, if you discover that Chrome takes the 152x152 Apple Touch icon, well, now you know what you need.
Problem: you probably want to support all scenarios (Android Chrome, iOS Safari, etc.), not only the "New tab" of iOS Chrome. So even if you find out, you will probably want to declare other icons.

iOS accessibility labels not shown in Instruments on device build

I have been putting accessibility labels into our source code so that we can automate using apples automation framework. When we first started this project, we were building using sdk 4.3 and I had troubles getting the simulator to show the labels in the application. Through advice on stack overflow I was able to fix it by altering the accessibility.plist in the simulator files.
Now that we have switched over to iOS sdk 5.0. I am having the opposite problem. I can no longer get the labels to show up on the device when I run our automation tests. They show up fine in the simulator. And I'm also able to confirm that they were properly compiled into the application by turning on VoiceOver on the device and doing a triple-double tab of and application window to show the elements.
I've looked over all the build settings and made sure everything was set to a debug build, and have tried going back to a build that I know worked when building for a 4.3 device and having the same exact settings(except for the sdk version of course) but the labels are still not being picked up.
So where do I go from here? Is there a library file that needs to be included into the application when building for iOS 5?
On the device, in "Settings > Accessibility > Triple-click Home", choose "Ask". This seems to turn on "enough" of the accessibility machinery to make things work, but not so much of it that it'll interfere with the normal functions of the device (ex. turning on VoiceOver works too, but changes the flow of the app in ways that break tests.)

Resources