New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

run-ios-sim

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

run-ios-sim

Easy way to run the ios simulator

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

run-ios-sim

build dependencies devDependencies

license npm version npm downloads Code Climate

Easy way to run the ios simulator.

Features

  • normalizeName(nameAndVersion, dontResolveLatest = false): Return a simulator name and version normalized
    • The nameAndVersion is name[@version] where @version is optional
      • If no @version is given @latest is assumed
      • @latest will be resolved via getLatestSdk
        • Use dontResolveLatest=true to disable this lookup
    • Example 1: normalizeName('ipadAIR') == { name: 'iPad Air', version: '9.2' }
    • Example 2: normalizeName('ipadAIR@latest') == normalizeName('ipadAIR')
    • Example 3: normalizeName('ipad@8') == { name: 'iPad', version: '8.0' }
  • getLatestSdk(): Returns the latest installed SDK version
  • getExistingSimulator(nameAndVersion): Check if there is a matching simulator
    • nameAndVersion will be resolved via normalizeName
  • run(appPath, nameAndVersion, opts = {}): Run your app on a simulator
    • Note: The returned promise will resolve once the simulator is stopped
    • appPath should be the full path to your .app folder
    • nameAndVersion will be resolved via normalizeName
    • Use opts to access more details:
      • onSimStart callback called with: udid
      • onSimStop callback called with: udid
      • onAppInstall callback called with: udid, appPath
      • onAppStart callback called with: udid, appPath, sku
      • onLogLine callback called with: line
  • getAppSku(appPath): Returns the sku/CFBundleIdentifier from a given appPath
  • ensureDevice(nameAndVersion): Ensures a matching simulator exists
  • getFirstSimulator(): Returns the first found simulator
    • Result is a object with name and version, similar to normalizeName

Run as binary

This package also contains a binary called run-ios-sim that calls the exposed run method. Here is a short example:

$ run-ios-sim ~/myAwsome.app iphone4s

Not that the second argument, nameAndVersion, will be resolved via normalizeName. So you can use iphone4s, iphone4s@latest, iphone6@8.1 or anything else.

Installation

npm install --save run-ios-sim

License

The MIT License (MIT)

Copyright (c) 2016 Michael Contento

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FAQs

Package last updated on 22 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts