https://github.com/appium/appium-xcode
Xcode related utilities. Get version number and path to executable.
https://github.com/appium/appium-xcode
Last synced: 5 months ago
JSON representation
Xcode related utilities. Get version number and path to executable.
- Host: GitHub
- URL: https://github.com/appium/appium-xcode
- Owner: appium
- License: apache-2.0
- Created: 2015-03-25T18:08:29.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2025-05-20T23:01:20.000Z (about 1 year ago)
- Last Synced: 2025-05-20T23:22:48.429Z (about 1 year ago)
- Language: JavaScript
- Size: 294 KB
- Stars: 17
- Watchers: 14
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
appium-xcode
===================
[](https://npmjs.org/package/appium-xcode)
[](https://npmjs.org/package/appium-xcode)
[](https://github.com/appium/appium-xcode/actions/workflows/publish.js.yml)
ES7 module for interacting with Xcode and Xcode-related functions.
Used by various [Appium](github.com/appium/appium) drivers.
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).
### getPath([timeout=15000])
*memoized*
gets path to Xcode Developer root.
### getVersion([parse=false], [retries], [timeout])
*memoized*, *retry*
returns the version of Xcode formatted as a string, for example `6.3.1`, or a version object if `parse` is `true`
### getMaxIOSSDK([num_retries])
*memoized*, *retry*
returns the highest IOS SDK version supported by Xcode.
eg: `'8.3'`
### getMaxTVOSSDK([num_retries])
*memoized*, *retry*
returns highest tvOS SDK version supported by Xcode.
eg: `'10.1'`
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`.