Xcode 9.1 with fastlane not running headless - ios

I'm running fastlane scan for our UI Tests on a iPad Air 2 iOS 11 simulator and my understanding from this article https://dzone.com/articles/new-xcuitest-features-with-xcode-9-hands-on-explor is that it should run headless automatically.
But it's launching the simulator every time. Is there a xcargs that needs passed to make it run headless.
I don't see anything in the fastlane docs for scan that relates to headless.

Just close the simulator application before you run xcodebuild. Conversely, if you want to see the simulator during tests, start the simulator beforehand via Xcode -> Open Developer Tool -> Simulator.

Related

Xcode 14 unit testing clone simulator

In Xcode 14, running unit testing seems to be creating simulator 'clones' (named 'Clone 1/2.. of iPhone').
On older machines, this can take a long time. This is happening every time when switching from running the App and running tests.
For example, running the App will launch the Simulator. Running tests will launch new one or more Simulators (Clone of ...), and running the App again will reload the original Simulator.
Any way to control this? This makes running tests a real pain on older machines.
There is a setting for this in the Xcode build scheme. Click the scheme name in the toolbar of your project window, then go to Edit Scheme -> Test -> <your Test target> -> Options... and uncheck "Execute in parallel (if possible)".

How to get Flutter Application running on real ios device with Windows?

Is there a way to get a Flutter Application running on own ios device with Windows and without paying money?
No, it is not possible to run an iOS simulator on Windows.
The reason for this is the following (highlighting is mine):
Simulator allows you to rapidly prototype and test builds of your app during the development process. Installed as part of the Xcode tools [...]
This means that iOS simulator come only with Xcode. And Xcode is only available on MacOS.
This means that you will either need to run MacOS yourself or use a service that runs your app on MacOS for you.
See also: https://stackoverflow.com/a/28573/6509751
For Flutter this means that you will have to test your code on Android, Desktop, or Web locally. You can still run an iOS simulator in your CI or do something similar to what was described in the answer linked above.

How to start Meteor app on specific iOS simulator

After my Xcode upgraded to version 7.3 I'm not able to start my Meteor apps on simulators other then iPhone-6s-Plus. When I enter command
meteor run ios
having no any simulator running it automatically starts iPhone-6s-Plus. But if I start some other simulator using Xcode then that's what I get trying to run app (using --verbose)
No target specified for emulator. Deploying to iPhone-6s-Plus, 9.3
simulator
** RUN SUCCEEDED **
An error was encountered processing the command
(domain=com.apple.CoreSimulator.SimError, code=159): Invalid device
state
How I can run my apps on any other simulator then iPhone-6s-Plus?
OK, seems it is normal behaviour with Meteor v1.3 described in documentation: http://guide.meteor.com/mobile.html#running-your-app
Currently, this will always run your app on a simulated iPhone 6s
Plus. Use ios-device to open Xcode and select another simulator
instead.
So command
meteor run ios-device
will open generated iOS project in Xcode where you will be able to select any other simulator or connected device.

Unit Tests fail to run in XCode/Xctool

When I run my tests using Xcodebuild or Xctool, I see that the tool builds and installs the app into the simulator but fails to run the test. It is stuck forever in either Touching <app-name>.xctest when I use xcodebuild or Launching and Running tests when using xctool. I can see that the simulator is launched with its default homescreen but does not progress after that. This happens as part of a continuous integration environment I am trying to setup.
I do a clean test when using either tool. I also run xcrun simctl shutdown "iPhone 6" || true and killall "Simulator" || true before running the xcode commands to ensure the simulator is turned off. I also tried pre-launching the simulator and waiting before initiating the test command since I read somewhere that it could help. Please note that this issue does not happen always. It happens like around 3 out of 10 times but at times, it gets even more frequent. There is no logs/trails that I could work on to debug this issue. Any help/leads would be great!
Xcode Version: 7.0.1
Xctool Version: 0.2.7
Simulator: IPhone 6
OS: Yosemite (10.10.5)
Thanks

Calabash can't connect to simulator

I'm trying to run some Calabash UI tests in my app but am running into trouble connecting to my simulator. I'm trying to just connect view the calabash-ios console, but am running into the following error:
WARNING
Warning Trying to connect to simulator that was not launched by Calabash/instruments.
To fix this you must let Calabash or instruments launch the app.
Query will work, but gestures will not.
I've run the app view my -cal target and have successfully seen the message Started LPHTTP server on port 37265. Here's some more info on Calabash/my setup:
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
xcodebuild -version
Xcode 7.0
Build version 7A218
calabash-ios version
0.14.3
server_version
=> {"app_id"=>"com.solstice.discoverfinancialenterprise.mobile", "outcome"=>"SUCCESS", "server_port"=>37265, "version"=>"0.14.3", "app_name"=>"Discover", "system"=>"x86_64", "simulator_device"=>"iPhone", "simulator"=>"", "app_version"=>"1", "short_version_string"=>"6.6.1 UAT", "iphone_app_emulated_on_ipad"=>false, "app_base_sdk"=>"iphonesimulator9.0", "form_factor"=>"iphone 4in", "git"=>{"revision"=>"c2d009b", "remote_origin"=>"git#github.com:calabash/calabash-ios-server.git", "branch"=>"master"}, "screen_dimensions"=>{"sample"=>1, "height"=>1136, "width"=>640, "scale"=>2}, "4inch"=>true, "iOS_version"=>"8.4"}
Sorry the JSON isn't formatted, my console spat it out in an unformatted way.
I've used a few different simulators, iPhone 6, iOS 9 and iOS 8.3, and an iPhone 5s iOS 8.4. Does anyone know anything I need to do differently to get this to connect to my simulator?
+100 for including all the information about your environment.
Please update to Calabash 0.16.4 which is compatible with your Xcode version.
I'm trying to just connect view the calabash-ios console, but am running into the following error:
Can you show how you launched console and what command you tried to run?
Typically, you want something like this:
$ APP=/path/to/Your.app calabash-ios console
> start_test_server_in_background
You must let calabash launch the app or you will not be able to perform gestures.
APP and APP_BUNDLE_PATH are synonymous.
http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html#label-APP+and+APP_BUNDLE_PATH

Resources