How do get dimensions of elements in Xcode simulator - ios

I'm running my react native application in the xcode simulator. Now I would like to check for the dimensions of the elements and if possible I would like to change things temporarily to see, what I have to change in my code. Something like the developer tools in the chrome browser. Is this possible?

You can use react-devtools for this (see guide in official documentation).
When the developer tools are installed and running, you can use the regular Element inspector debug tool from the React Native developer menu (Cmd+D, Show Inspector).
Now, instead of limited the in-simulator inspector, you have access to a Chrome Devtools like experience, where you can inspect and edit element styles and props.

Use Xcode to build the app and run in simulator, and then you can use the debugging view hierarchy tool

Related

In iOS, how to find where in the code a particular button is located?

I'm running an app in the emulator and am somehow getting the generic error message "Error - Try Again" shown below.
In order to debug this, I would like to locate the UIView corresponding to the "Error" button. Previously, I've worked on the backend for a React Native app and there was the Inspector (cf. https://facebook.github.io/react-native/docs/debugging) with which you could locate React elements in the code.
As far as I can tell from the Help -> Simulator Help menu (see below), there is no such functionality for iOS, or am I missing something?
The feature you're looking for is not officially supported by apple, but there's an awesome tool named Sherlock that enables such functionality on iOS simulator.
It injects itself into the iOS Simulator so that it can monitor views and adjust them in real time and lets you jump into the file related to the view you want to from the simulator.
You can inspect any app in the simulator, including system apps and dynamically change their UI elements!

Android build doesn't start

I was trying to build an Android APK on Monaca IDE and after selecting the type (Debug/Release) a new window appears exactly with the same content (selection of build type).
After selecting (again) the build, nothing happens, only a blank screen and the build doesn’t start. The problem appears in release and debug builds.
This appear in full screen after selecting the build type on the IDE:
http://i.imgur.com/uEc7y77.png
Then, after selecting the build type again, only a blank screen:
http://i.imgur.com/bJQASjN.png
My best guess is that's a bug in the IDE and has got nothing to do with the project but for what it's worth I’m using Onsen UI V2, plain JS w/o a framework.
After a few tries and some frustation, I finally solved the problem:
exit Monaca
clear cookies (using a new Chrome user should also work)
login to Monaca

Form not showing up in my Emulator

I have a mac pro. I installed xamarin studio and everything I needed for android development on mac. The first time I created a project I ran it and everything works. I was able to click on a button which counted my number of clicks kind of like a default.
I decided to follow the Android quick start tutorial on Xamarin and when I got done creating the project and ran it nothing showed in my emulator. The controls I created did not show up. All I got on top of the screen was "Deployment Completed" . No error messages either. How do I trouble shoot this? I want to be able to see the screen I created in the Emulator and click on various buttons.
Now I just got an error message and it can be found below.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Warning: No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2047-01-01) or after any future revocation date. (Phoneword)
My guess is that your Android project did not actually get built either because you have selected the wrong configuration and platform pair or because the settings for the configuration and platform pair are not correct.
When building and running on Android, you want to make sure you change your Platform to AnyCPU and then either choose Debug or Release for your Configuration depending on what environment you are targeting. For building and running on iOS, you would just change the Platform to iPhone Simulator or iPhone.
See image below for how to access these settings (just click where the red boxes are circled):
In Xamarin Studio, with your project open:
Click Project -> Solution Options
Choose the Configurations tab
Choose the Configuration Mappings tab
Now change the Configuration dropdown to Debug and the Platform to AnyCPU
Make sure that the Build checkbox is checked next to your shared project (most likely the one at the top) and that the Build checkbox is checked next to your Android project
Now click OK, make sure you have the correct Configuration and Platform are selected
Rebuild the solution and try to run it again
*Edit: After talk in the comments, the emulator must be unlocked to actually view the running app. To unlock the emulator:
Click and hold down on the lock icon at the bottom of your emulator screen
Drag the mouse up to the top of the screen and release the click

Unable to inspect the ios app using appium inspector

I am using appium version 1.3.7 version.
After starting appium sever, the app get installed in ios simulator.
When I tried to inspect using appium inspector, the refresh button in the appium inspector keeps on loading, it doesn't load the home page of an app at all.
I think you need to update your appium, since new appium version support XCUITest you might be ended to some changes in locators and other setup. This is my suggestion because you need to automate your cases on iOS 10, so in that cases you forced to upgrade the appium.
Coming to your question, if you are not able to access the appium inspector there is workaround.
How to inspect ios elements ,
Option one : https://www.youtube.com/watch?v=254nbRjjQjc
Option two : https://www.youtube.com/watch?v=4BgkVp0v3BM
For more videos :
https://www.youtube.com/channel/UCaJA59vxBDS7smS81Gqf7KA
Are you using Windows or Mac machine? I would suggest to use ~/android-sdk/tools/uiautomatorviewer. This will open one window, you can take screenshot of current screen from connected device and from left pane elements can be inspected.

how to Run two BlackBerry simulators in windows eclipse?

How to Run two instance of BlackBerry simulator in windows eclipse?
The documentation regarding developing with BlackBerry Messenger indicates that you can run two simulators at once, at least with the simulators that come bundled with the BBM SDK.
You cannot. If you try, you will get an error message saying only one simulator can run at a time.
What you need to do is:
Install the blackberry eclipse plugins twice and make two
workspace of each eclipse.
Run the two simulators in each eclipse and error like "could not
open port 19780 and it is use by another program....." will pop
out in one of your simulator.
So made the changes in pin,
data-port values in .bat files, rimpublic.property files inside
MDS and fledge-settings.conf in one of your simulator... but this
changes will not be reflected on your eclipse.
So what you need to do is, when you click the debug configuration from your
eclipse, you will see the simulator option there. So, click the simulator and change the PIN value, whatever you have made the changes in .bat files.. and just after that in the simulator you will again find the option of network, there unselect the disable registration button...once all this changes is made click apply and restart your eclipse... this will surely solved your problem

Resources