Swiftpack.co - Package - tuist/simulator

📱 Simulator

A simctl wrapper in Swift.

code style: prettier CircleCI codecov Slack FOSSA Status

Install 🛠

Using CocoaPods

Add the following line to your Podfile and run pod install:

pod "Simulator", "~> 1.0.0"

Using Swift Package Manager

Add the following dependency to your Package.swift:

.package(url: "https://github.com/tuist/simulator.git", .upToNextMinor(from: "1.0.0")),

Using Carthage

Add the following line to your Cartfile and link the Simulator.framework from the project:

github "tuist/simulator" ~> 1.0.0

Note: Simulator is only compatible with macOS

Using Marathon

If you want to use Simulator in a Marathon script, either add it to your Marathonfile (see the Marathon repo for instructions on how to do that), or point Marathon to Simulator using the inline dependency syntax:

import Simulator // https://github.com/tuist/simulator.git

Usage 🚀

Devices

// List devices
let devices = try Device.list

// Launch simulator
try device.launch()

// Wait until the simulator is launched
try device.wait(until: { $0.isBooted })

// Install an app
let appPath = URL(fileURLWithPath: "/path/App.app")
try device.install(appPath)

// Uninstall an app
try device.uninstall("io.tuist.App")

// Erase the device content
try device.erase()

// Get device runtime
let runtime = try device.runtime()
let runtimeVersion = runtime.version

Runtimes

// List runtimes
let runtimes = try Runtime.list

// Get the latest runtime
let latestiOS = try Runtime.latest(platform: .iOS)

Setup for development 👩‍💻

  1. Git clone: git@github.com:tuist/simulator.git
  2. Generate Xcode project with swift package generate-xcodeproj.
  3. Open Simulator.xcodeproj.
  4. Have fun 🤖

Open source

Tuist is a proud supporter of the Software Freedom Conservacy

Become a Conservancy Supporter!

License

FOSSA Status

Github

link
Stars: 20
Help us keep the lights on

Releases

1.0.0 - Jan 4, 2019

Changed

  • Bump Shell version to 1.1.0 by @pepibumur.
  • Bump Shell version to 1.0.1 https://github.com/tuist/simulator/pull/13 by @pepibumur
  • Breaking Use Result instead of throws in the public interface https://github.com/tuist/simulator/pull/14 by @pepibumur.

0.5.1 - Dec 30, 2018

Fixed

  • Reference to Shell in the Cartfile.

0.5.0 - Dec 29, 2018

Changed

  • Pin the Shell dependency to a version up to the next minor.

0.4.0 - Dec 28, 2018

Changed

  • Replace SwiftShell with Shell https://github.com/tuist/simulator/pull/10 by @pepibumur

Added

  • Device.reload method https://github.com/tuist/simulator/pull/11 by @pepibumur.
  • Device.wait method https://github.com/tuist/simulator/pull/11 by @pepibumur.
  • Device.runtimePlatform method https://github.com/tuist/simulator/pull/12 by @pepibumur.

0.3.0 - Nov 14, 2018

Added

  • Add Device.launch method by @frowing
  • Add Device.launchApp method by @frowing