Update README
This commit is contained in:
parent
ebb55c1045
commit
9ddde6e92c
61
README.md
61
README.md
|
@ -1,22 +1,14 @@
|
||||||
# xcode-simulator-cert
|
# xcode-simulator-cert
|
||||||
|
|
||||||
[![Swift 5 compatible][swift-badge]][Swift] [![Xcode 10.2 compatible][xcode-badge]][Xcode]
|
[![Swift 5 compatible][swift-badge]][Swift] [![Xcode 10.2 compatible][xcode-badge]][Xcode] [![Xcode 10.2 compatible][xcode-beta-badge]][Xcode]
|
||||||
|
|
||||||
This is a tool to manage [root certificates][RootCertificate] in Xcode simulators.
|
This is a tool to manage [root certificates][RootCertificate] in Xcode simulators. Installing a certificate in all your simulators is as easy as:
|
||||||
|
|
||||||
If you have a certificate for your server in PEM format in a file `myhost.crt`, type:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ xcode-simulator-cert install myhost.crt
|
$ xcode-simulator-cert install myhost.crt
|
||||||
```
|
```
|
||||||
|
|
||||||
It will then install the certificate in all your simulators. You can also specify a specific simulator:
|
It will then install the certificate in all your simulators.
|
||||||
|
|
||||||
```bash
|
|
||||||
$ xcode-simulator-cert install myhost.crt --device-name="iPhone 8"
|
|
||||||
```
|
|
||||||
|
|
||||||
There are also some other subcommands and options available. `--help` is your friend.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -36,13 +28,57 @@ $ brew install skagedal/formulae/xcode-simulator-cert
|
||||||
$ mint install skagedal/xcode-simulator-cert
|
$ mint install skagedal/xcode-simulator-cert
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
`xcode-simulator-tool` basically does CRUD actions for certificates in simulators: install new ones, export existing ones, remove certificates, and list them.
|
||||||
|
|
||||||
|
Use `xcode-simulator-tool --help` to get a quick overview of how it works.
|
||||||
|
|
||||||
|
### Installing certificates
|
||||||
|
|
||||||
|
The `install` subcomand takes a parameter where you give the certificate in PEM format.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ xcode-simulator-cert install myhost.crt
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also specify a specific simulator:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ xcode-simulator-cert install myhost.crt --device-name="iPhone 8"
|
||||||
|
```
|
||||||
|
|
||||||
|
This will install the certificate in simulators whose name exactly matches "iPhone 8". There are some other ways of filtering into which simulators to affect, please see `xcode-simulator-cert install --help`.
|
||||||
|
|
||||||
|
It will skip installing in simulators where this exact certificate already exist.
|
||||||
|
|
||||||
|
### Exporting certificates
|
||||||
|
|
||||||
|
The `export` subcommand exports existing root certificate that it finds in the trust store of selected devices, creating a PEM file for each unique certificate.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ xcode-simulator-cert export
|
||||||
|
```
|
||||||
|
|
||||||
|
### Removing certificates
|
||||||
|
|
||||||
|
The `remove` subcommand removes all root certificates from selected devices.
|
||||||
|
|
||||||
|
### List certificates
|
||||||
|
|
||||||
|
The `list` subcommand lists all simulator devices and what certificates are available for each.
|
||||||
|
|
||||||
|
## Caveats
|
||||||
|
|
||||||
|
This tool edits a SQLite database managed by iOS in the simulator. It is not using officially blessed APIs. I have tested it on Xcode 10.2.1 and the Xcode 11 beta 1 (at the time of writing, the latest) and it works well, but I can of course not give any guarantees. In some situations you may still need to manually go in and trust the certificate manually. I recommend not running the Xcode simulator while you run the tool.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
If you'd like to hack on `xcode-simulator-cert`, you may run `generate-xcodeproj.sh` to generate an Xcode project.
|
If you'd like to hack on `xcode-simulator-cert`, you may run `generate-xcodeproj.sh` to generate an Xcode project.
|
||||||
|
|
||||||
## Acknowledgements
|
## Acknowledgements
|
||||||
|
|
||||||
This tool is largely based on the work of Daniel Cerutti and his [ADVTrustStore] tool. `xcode-simulator-cert` doesn't do much more than what his tool does at the moment. I mostly just wanted to rewrite it in Swift.
|
This tool is largely based on the work of Daniel Cerutti and his [ADVTrustStore] tool and documentation.
|
||||||
|
|
||||||
[ADVTrustStore]: https://github.com/ADVTOOLS/ADVTrustStore
|
[ADVTrustStore]: https://github.com/ADVTOOLS/ADVTrustStore
|
||||||
[Homebrew]: https://brew.sh
|
[Homebrew]: https://brew.sh
|
||||||
|
@ -53,3 +89,4 @@ This tool is largely based on the work of Daniel Cerutti and his [ADVTrustStore]
|
||||||
|
|
||||||
[swift-badge]: https://img.shields.io/badge/swift-5-orange.svg?style=flat
|
[swift-badge]: https://img.shields.io/badge/swift-5-orange.svg?style=flat
|
||||||
[xcode-badge]: https://img.shields.io/badge/xcode-10.2-blue.svg?style=flat
|
[xcode-badge]: https://img.shields.io/badge/xcode-10.2-blue.svg?style=flat
|
||||||
|
[xcode-beta-badge]: https://img.shields.io/badge/xcode-11_beta1-blue.svg?style=flat
|
||||||
|
|
Loading…
Reference in New Issue