How to get app version with bundle in simulator ios - terminal

I want to get the app version, code version in the simulator IOS in terminal.
I may get it in android simulator in command line by run this code:
adb shell dumpsys package com.active.dev | grep version

The question is quite old but I hope that it could help, you need to :
Get the app container using this command :
xcrun simctl get_app_container booted bundleID
Execute this command :
defaults read **The app container**/Info CFBundleVersion

Related

Mac - Appium - How to setup Xcode simulator with specific OS version and .app file through command line

While setting up Appium on Mac, I am stuck at a point where we have got .app file to automate on an iphone simulator.
I am able to launch app which comes with .xcodeproj on Xcode.
But now I have an MyApp.app file to use on a Simulator. if I try to open a simulator using UDID it always open latest iOS version on Latest iPhone Simulator using this command:
open -a "Simulator" --args -CurrentDeviceUDID 8A63E11E-BEE4-4A1A-B77B-205D19A3DEE3
I need to open this on a specific iOS version on specific device then install MyApp.app on it. (also I am not able to get bundle id of app; not sure at which step I can do this)
Moreover, it Would be great if you can also share settings for Appium Inspector and where to fetch values from ?

Nativescript doesn't recognize Xcode (High Sierra)

I'm on High Sierra with Xcode Version 9.0.1 (9A1004).
When running tns doctor I get the following warning:
WARNING: Xcode is not installed or is not configured properly.
You will not be able to build your projects for iOS or run them in the iOS Simulator.
To be able to build for iOS and run apps in the native emulator, verify that you have installed Xcode.
If I run the installation script, furthermore I get:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Xcode is not installed or not configured properly. Download, install, set it up and run this script again.
As you might have guessed, I have Xcode installed from the app store and I've also installed cocoapods and xcodeproj. This is the only warning that I get.
Any suggestions?
Run the following command:
sudo xcode-select --reset
I found this answer here:
http://overengineer.net/fixing-nativescript-s-xcode-is-not-installed-or-is-not-configured-properly-on-macos
I had this problem today, but running the recommended command didn't help. I found that running the command
$ tns doctor
walked me through a series of prompts and corrected the issue. I did have to restart my terminal after the program completed in order for it to take effect.
Open Xcode than go to Preferences -> Locations -> Command Line Tools after that it'll automatically take a path for the same. The system may ask for sudo password.

AppGyver launching iOS simulator gives error XCode is not installed

I am using AppGyver, Steroids Installation has been done and I have successfully created the demo project. I am trying to configure the iOS Simulator for Appgyver so that i can launch my app on simulator using steroids command line and debug the app but when i want to simulate it on ios simulator it gives XCode is not installed. But I have XCode installed and Command Line tools too.
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables​ - PRINT
pkgutil --pkgs='com.apple.pkg.Xcode.*'​ - NO OUTPUT
When I use xcode-select --install It gives "xcode-select: error: command line tools are already installed"
When I use open /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app - Simulator Launch
​
OS Version : Mac OS X Yosemite 10.10
​XCode : 6.1
iOS Simulator : Version 8.1 (550.3)
Node : v0.10.24
NPM : 1.3.21
​​
Please help me to resolve this issue. Any help will be much appreciated.

Unable to launch iOS7.1 simulator in Xcode 6.2 instruments

Code which was working fine in xcode 6.1.1 now fails to launch the iOS 7.1 simulator in xcode 6.2 (but works fine for the iOS 8.2 sim).
Here is the command I am using:
instruments -t Automation -w /Users/USER/Library/Developer/CoreSimulator/Devices/233D1DE0-8660-4D98-8E45-5E0794CF7366 /Users/USER/Library/Developer/CoreSimulator/Devices/233D1DE0-8660-4D98-8E45-5E0794CF7366/data/Applications/APPNAME/APPNAME.app -v -l 20
This is the error returned:
instruments[2274:66214] -[UIAInstrument(UIAInstrument_Simulator) _startAgentForApp:withPID:]: Warning: Automation instrument could not locate sim tool.
That command launches the simulator and briefly shows the app's splash screen, then dumps out.
Any ideas?
You may go to xCode -> Preference -> downloads and see in iOS Simulator 7.1 is downloaded or not, if it is not downloaded then download and install it, it might work for you

Mac terminal returns "xcrun: error: unable to exec Xcode native xcrun (Exec format error)."

Mac OS X V. 10.9.4 2.4 GHz 2 GB RAM
Im trying to use Git through my mac terminal and it keeps returning this error every time I submit a git command: "xcrun: error: unable to exec Xcode native xcrun (Exec format error).".
I already installed git and github in my mac. Im somehow new to programming I i don't really understand whats causing this error. Its getting very frustrating.
The following works for me:
sudo xcode-select --reset
The GUI equivalent of this is to log into the machine, open Xcode, go to preferences, locations, and set the active command line tools version of xcode
I was getting a similar xcrun: error: unable to exec Xcode native xcrun (Not a directory). on my mac which is managed by a central admin. I had to run my command with sudo.

Resources