Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update readme #345

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 38 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
[![NPM version](http://img.shields.io/npm/v/appium-ios-simulator.svg)](https://npmjs.org/package/appium-ios-simulator)
[![Downloads](http://img.shields.io/npm/dm/appium-ios-simulator.svg)](https://npmjs.org/package/appium-ios-simulator)

[![Build Status](https://api.travis-ci.org/appium/appium-ios-simulator.png?branch=master)](https://travis-ci.org/appium/appium-ios-simulator)

Appium API for dealing with iOS simulators. Allows the user to find locations of directories and applications, gives access to settings in order to read from and write to simulator plists, and allows control over starting and stopping simulators.
Appium API for dealing with iOS simulators. The API enables you to use the following features:

*Note*: Issue tracking for this repo has been disabled. Please use the [main Appium issue tracker](https://github.com/appium/appium/issues) instead.
- query locations of Simulator-specific directories and applications
- read/write access to Simulator settings
- full control over starting and stopping simulators
- deal with biometric auth, geolocation settings, application permissions, and others

### Usage

Expand All @@ -20,84 +22,41 @@ If you want to create a new simulator, you can use the `createDevice()` method o

```js
import { getSimulator } from 'appium-ios-simulator';
import assert from 'node:assert/strict';

let sim = await getSimulator('DAE95172-0788-4A85-8D0D-5C85509109E1');
const sim = await getSimulator('DAE95172-0788-4A85-8D0D-5C85509109E1');
await sim.run();
assert.equal('Booted', (await sim.stat()).state);
await sim.shutdown();
assert.equal('Shutdown', (await sim.stat()).state);
```

### Third-party tools

The following tools and utilities are not mandatory, but could be used by the appium-ios-simulator, if installed locally, to extend its functionality:

- [Lyft](https://github.com/lyft)
- [IDB](https://github.com/facebook/idb)
- [AppleSimulatorUtils](https://github.com/wix/AppleSimulatorUtils)

### Xcode and iOS versions

See [wikipedia](https://en.wikipedia.org/wiki/Xcode#Xcode_5.0_-_7.x_.28with_arm64_support.29) for details of builds for Xcode versions.

| iOS | Xcode 7.1 beta 3 | Xcode 7.0.1 | Xcode 6.4 | Xcode 6.3.2 | Xcode 6.2 | Xcode 6.1.1 | Xcode 6.0.1 |
|-----|------------------|----------------|-----------|-------------|-----------|-------------|-------------|
| 7.1 | 11D167 | n/a | 11D167 | 11D167 | 11D167 | 11D167 | 11D167 |
| 8.0 | n/a | n/a | n/a | n/a | n/a | n/a | 12A365 |
| 8.1 | 12B411 | 12B411 | 12B411 | 12B411 | 12B411 | 12B411 | 12B411 |
| 8.2 | 12D508 | 12D508 | 12D508 | 12D508 | 12D508 | n/a | n/a |
| 8.3 | 12F70 | 12F70 | 12F70 | 12F69 | 12F70 | n/a | n/a |
| 8.4 | 12H141 | 12H141 | 12H141 | 12H141 | 12H141 | n/a | n/a |
| 9.0 | 13A344 | 13A340 | n/a | n/a | n/a | n/a | n/a |
| 9.1 | 13B134 | n/a | n/a | n/a | n/a | n/a | n/a |


#### file locations

iOS 9.3
- base
- ~/Library/Developer/CoreSimulator/Devices/[identifier]/data/
- safari plists
- [base]/Containers/Containers/Data/Application/[identifier]/<.com.apple.mobile_container_manager.metadata.plist, com.apple.mobilesafari>
- locationd cache plists
- [base]/Library/Caches/locationd/cache.plist
- [base]/Library/Preferences/com.apple.locationd.plist
- locationd clients plists
- [base]/Library/Caches/locationd/clients.plist
- user settings plists
- [base]/Library/UserConfigurationProfiles/UserSettings.plist
- [base]/Library/UserConfigurationProfiles/EffectiveUserSettings.plist
- [base]/Library/UserConfigurationProfiles/PublicInfo/PublicEffectiveUserSettings.plist
- other plists
- [base]/Library/Preferences
- logs
- ~/Library/Logs/CoreSimulator/[identifier]/
- sym linked to [base]/Library/Logs

iOS 9.2, 9.1, 9.0, 8.4, 8.3
- base
- ~/Library/Developer/CoreSimulator/Devices/[identifier]/data/
- safari plists
- [base]/Containers/Data/Application/[identifier]/<.com.apple.mobile_container_manager.metadata.plist, com.apple.mobilesafari>
- locationd cache plists
- [base]/Library/Caches/locationd/cache.plist
- [base]/Library/Preferences/com.apple.locationd.plist
- locationd clients plists
- [base]/Library/Caches/locationd/clients.plist
- user settings plists
- [base]/Library/ConfigurationProfiles/UserSettings.plist
- [base]/Library/ConfigurationProfiles/EffectiveUserSettings.plist
- [base]/Library/ConfigurationProfiles/PublicInfo/PublicEffectiveUserSettings.plist
- other plists
- [base]/Library/Preferences
- logs
- ~/Library/Logs/CoreSimulator/[identifier]/
- sym linked to [base]/Library/Logs

iOS 7.1
- base
- ~/Library/Developer/CoreSimulator/Devices/[identifier]/data/
- safari
- [base]/Applications/[identifier]/Library/Preferences/com.apple.mobilesafari.plist
- locationCache
- [base]/Library/Caches/locationd/cache.plist
- [base]/Library/Preferences/com.apple.locationd.plist
- locationClients
- [base]/Library/Caches/locationd/clients.plist
- userSettings
- [base]/Library/ConfigurationProfiles/UserSettings.plist
- [base]/Library/ConfigurationProfiles/EffectiveUserSettings.plist
- [base]/Library/ConfigurationProfiles/PublicInfo/PublicEffectiveUserSettings.plist
- other plists
- [base]/Library/Preferences
- logs
- ~/Library/Logs/CoreSimulator/[identifier]/
- sym linked to [base]/Library/Logs
Check [Xcode wikipedia](https://en.wikipedia.org/wiki/Xcode) for more details about Xcode version to iOS version mapping.

### Development

Checkout the repository and run

```bash
npm install
npm run dev
```

Use the following commands to run tests:

```bash
# unit tests
npm run test
# integration tests
npm run e2e-test
```