JSPM

  • Created
  • Published
  • Downloads 225391
  • Score
    100M100P100Q178908F
  • License Apache-2.0

Interact with Xcode

Package Exports

  • appium-xcode
  • appium-xcode/build/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (appium-xcode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

appium-xcode

NPM version Downloads

Release

ES7 module for interacting with Xcode and Xcode-related functions. Used by Appium

API

All functions are async, meaning they return promises which can be awaited via await.

Most functions are memoized, so after they are called once, they will simply return the same value. Remember that calling require() multiple times returns the same instantiation of a module if it has already been instantiated, so the memoization will be preserved across multiple files in the same project.

Some functions have an auto-retry built into them, they will retry silently a number of times. This is because the Xcode commands sometimes just flake and return bad values (or don't return).

To clear the memoized values, call clearInternalCache

getPath()

memoized

gets path to Xcode

getVersion([num_retries])

memoized, retry

returns the version of Xcode. Returns strings like '6.3.1'

getAutomationTraceTemplatePath([num_retries])

*memoized, retry

returns a path to the default AutomationTraceTemplate

getAutomationTraceTemplatePathWithoutRetry()

same as getAutomationTraceTemplatePath() but without retry or memoization.

getMaxIOSSDK([num_retries])

memoized, retry

returns largest IOS SDK version supported by Xcode. eg: '8.3'

getMaxIOSSDKWithoutRetry()

same as getMaxIOSDK() but without retry or memoization

getMaxTVOSSDK([num_retries])

memoized, retry

returns largest tvOS SDK version supported by Xcode. eg: '10.1'

getMaxTVOSSDKWithoutRetry()

same as getMaxTVOSSDK() but without retry or memoization

clearInternalCache()

clears the internal cache used for memoizing functions.

Develop

Test

npm test
npm e2e-test

Debug

After cloning appium-xcode, execute npm link in the appium-xcode directory. Next run npm link appium-xcode from the appium directory. This will symlink appium-xcode to node_modules/appium-xcode. If the clone becomes out of date remember to unlink or delete node_modules and reinstall.

For quick debugging you could cd into the node_modules/appium-xcode folder and run npm install followed by npm run build.