Rename xcode-simulator-tool -> xcode-simulator-cert
This commit is contained in:
parent
309fe44b18
commit
88feaec305
4
Makefile
4
Makefile
|
@ -6,10 +6,10 @@ build:
|
||||||
swift build -c release --disable-sandbox
|
swift build -c release --disable-sandbox
|
||||||
|
|
||||||
install: build
|
install: build
|
||||||
install ".build/release/xcode-simulator-tool" "$(bindir)"
|
install ".build/release/xcode-simulator-cert" "$(bindir)"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf "$(bindir)/xcode-simulator-tool"
|
rm -rf "$(bindir)/xcode-simulator-cert"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf .build
|
rm -rf .build
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
import PackageDescription
|
import PackageDescription
|
||||||
|
|
||||||
let package = Package(
|
let package = Package(
|
||||||
name: "xcode-simulator-tool",
|
name: "xcode-simulator-cert",
|
||||||
products: [
|
products: [
|
||||||
.executable(
|
.executable(
|
||||||
name: "xcode-simulator-tool",
|
name: "xcode-simulator-cert",
|
||||||
targets: ["xcode-simulator-tool"]
|
targets: ["xcode-simulator-cert"]
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
|
@ -17,14 +17,14 @@ let package = Package(
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
.target(
|
.target(
|
||||||
name: "xcode-simulator-tool",
|
name: "xcode-simulator-cert",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"XcodeSimulatorKit"
|
"XcodeSimulatorKit"
|
||||||
]),
|
]),
|
||||||
.testTarget(
|
.testTarget(
|
||||||
name: "xcode-simulator-toolTests",
|
name: "xcode-simulator-certTests",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"xcode-simulator-tool"
|
"xcode-simulator-cert"
|
||||||
]),
|
]),
|
||||||
.target(
|
.target(
|
||||||
name: "XcodeSimulatorKit",
|
name: "XcodeSimulatorKit",
|
||||||
|
|
14
README.md
14
README.md
|
@ -1,4 +1,4 @@
|
||||||
# xcode-simulator-tool
|
# 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]
|
||||||
|
|
||||||
|
@ -7,13 +7,13 @@ This is a tool to manage Xcode simulators and their [root certificates][RootCert
|
||||||
If you have a certificate for your server in PEM format in a file `myhost.crt`, type:
|
If you have a certificate for your server in PEM format in a file `myhost.crt`, type:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ xcode-simulator-tool install-ca myhost.crt
|
$ xcode-simulator-cert install-ca 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. You can also specify a specific simulator:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ xcode-simulator-tool install-ca myhost.crt --device-name="iPhone 8"
|
$ xcode-simulator-cert install-ca myhost.crt --device-name="iPhone 8"
|
||||||
```
|
```
|
||||||
|
|
||||||
There are also some other subcommands and options available. `--help` is your friend.
|
There are also some other subcommands and options available. `--help` is your friend.
|
||||||
|
@ -25,7 +25,7 @@ There are also some other subcommands and options available. `--help` is your fr
|
||||||
[Homebrew] is the de-facto standard package manager for macOS open-source tools and other things.
|
[Homebrew] is the de-facto standard package manager for macOS open-source tools and other things.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ brew install skagedal/formulae/xcode-simulator-tool
|
$ brew install skagedal/formulae/xcode-simulator-cert
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using Mint
|
### Using Mint
|
||||||
|
@ -33,16 +33,16 @@ $ brew install skagedal/formulae/xcode-simulator-tool
|
||||||
[Mint] is a pretty nice package manager for Swift Package Manager-based projects, such as this one.
|
[Mint] is a pretty nice package manager for Swift Package Manager-based projects, such as this one.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mint install skagedal/xcode-simulator-tool
|
$ mint install skagedal/xcode-simulator-cert
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
If you'd like to hack on `xcode-simulator-tool`, 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-tool` 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. `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.
|
||||||
|
|
||||||
[ADVTrustStore]: https://github.com/ADVTOOLS/ADVTrustStore
|
[ADVTrustStore]: https://github.com/ADVTOOLS/ADVTrustStore
|
||||||
[Homebrew]: https://brew.sh
|
[Homebrew]: https://brew.sh
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class XcodeSimulatorTool {
|
||||||
case .noCommand:
|
case .noCommand:
|
||||||
options.printUsage(on: stdoutStream)
|
options.printUsage(on: stdoutStream)
|
||||||
case .version:
|
case .version:
|
||||||
print("xcode-simulator-tool version \(XcodeSimulatorTool.version)")
|
print("xcode-simulator-cert version \(XcodeSimulatorTool.version)")
|
||||||
case .command(let command):
|
case .command(let command):
|
||||||
try command.run(reporter: DefaultReporter(verbosity: options.verbosity))
|
try command.run(reporter: DefaultReporter(verbosity: options.verbosity))
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ final class xcode_simulator_toolTests: XCTestCase {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let fooBinary = productsDirectory.appendingPathComponent("xcode-simulator-tool")
|
let fooBinary = productsDirectory.appendingPathComponent("xcode-simulator-cert")
|
||||||
|
|
||||||
let process = Process()
|
let process = Process()
|
||||||
process.executableURL = fooBinary
|
process.executableURL = fooBinary
|
|
@ -39,8 +39,8 @@ fi
|
||||||
|
|
||||||
echo "${LOGO} Installing root certificate"
|
echo "${LOGO} Installing root certificate"
|
||||||
pushd .. >& /dev/null
|
pushd .. >& /dev/null
|
||||||
echo swift run xcode-simulator-tool --verbosity=loud install-ca ${CERT_PATH} --uuid=${UUID}
|
echo swift run xcode-simulator-cert --verbosity=loud install-ca ${CERT_PATH} --uuid=${UUID}
|
||||||
swift run xcode-simulator-tool --verbosity=loud install-ca ${CERT_PATH} --uuid=${UUID}
|
swift run xcode-simulator-cert --verbosity=loud install-ca ${CERT_PATH} --uuid=${UUID}
|
||||||
popd >& /dev/null
|
popd >& /dev/null
|
||||||
|
|
||||||
# Booting
|
# Booting
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
mint run xcodeproj-modify xcodeproj-modify ./xcode-simulator-tool.xcodeproj add-run-script-phase xcode-simulator-tool ./xcode-build-phase.sh
|
mint run xcodeproj-modify xcodeproj-modify ./xcode-simulator-cert.xcodeproj add-run-script-phase xcode-simulator-cert ./xcode-build-phase.sh
|
||||||
|
|
|
@ -8,7 +8,7 @@ swift package generate-xcodeproj
|
||||||
|
|
||||||
# Set header template.
|
# Set header template.
|
||||||
|
|
||||||
sed s/CURRENTYEAR/`date +%Y`/g > xcode-simulator-tool.xcodeproj/xcshareddata/IDETemplateMacros.plist <<EOF
|
sed s/CURRENTYEAR/`date +%Y`/g > xcode-simulator-cert.xcodeproj/xcshareddata/IDETemplateMacros.plist <<EOF
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
|
@ -21,7 +21,7 @@ sed s/CURRENTYEAR/`date +%Y`/g > xcode-simulator-tool.xcodeproj/xcshareddata/IDE
|
||||||
</plist>
|
</plist>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo Please open xcode-simulator-tool.xcodeproj in Xcode.
|
echo Please open xcode-simulator-cert.xcodeproj in Xcode.
|
||||||
echo Then close it.
|
echo Then close it.
|
||||||
echo Then run ./add-build-phase.sh
|
echo Then run ./add-build-phase.sh
|
||||||
echo Then open it again.
|
echo Then open it again.
|
||||||
|
|
Loading…
Reference in New Issue