Skip to content

azalan/SimCtrlCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimCtrlCLI

This is a sample project to test out the FBSimulatorControl library. It contains an iOS app with a single unit test (see: SingleViewApp) and a Mac app (see: DriveSimulators) which uses the FBSimulatorControl library to create an iOS simulator for the test run, execute the test and after the test execution has been finished, tear down the simulator.

The unit test is not a real test, it just keeps occupied the simulator for 5 seconds.

Installation

After cloning the repository run run.sh. This should compile everything, and after it should run all of the termination notification tests which I can think of.

These are the following:

  1. Listening to the FBSimulatorSessionApplicationProcessDidTerminateNotification notification.
  2. Periodically checking the session.state.runningApplications list to see whether the app is still there
  3. Getting the process ID with [session.state processForApplication:simulatorApplication].processIdentifier and setting up a termination listener with [FBDispatchSourceNotifier processTerminationNotifierForProcessIdentifier:]
  4. Periodically launching ps with the process ID to see whether the process is there (this works).

All of these can be checked by invoking the app:

build/Mac/DriveSimulator `pwd`/build/iOS a_number_from_the_list_above

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •