Xcode::Utils
Installation
$ gem install xcode-utils
UITestRunner
Make available single test page in app as standalone
Install UITestRunner in your xcode project
$ cd #{your project root}
$ xcutils uitest install --project-name="VVID" --target-config="Debug" --target-scheme="VVID Dev"
Xcode configuration has changed automacally
New Build Configuration and Build Settings
New Build Scheme
UITestRunner Template
Implement your authorization provider generated
struct UITestAuthorizationProviderImpl: UITestAuthorizationProvider {
// MARK: - Implementations of Protocol UITestAuthorizationProvider
var hasAccessToken: Bool {
return false
}
var hasRefreshToken: Bool {
return false
}
func refreshToken(completion: @escaping () -> Void) {
}
func signIn(_ parent: UIViewController, completion: @escaping () -> Void) {
}
func signOut() {
}
}
Implement your test suite generated
final class MainTestSuite: UITestSuite {
// MARK: - Implementations of abstraction
override func setUp() {
// Put setup code here. This method is called before the invocation of test suite.
}
override func runTests() {
// Put run tests code here. This method is called before the invocation of test suite.
testExample()
}
// MARK: - Tests
private func testExample() {
// This is an example of a functional test case.
}
}
Carthage Wrapper
Execution Flow
- install carthage if it does not exists
- execute carthage command with arguments
- set the xcode config for carthage frameworks ``` $ xcutils carthage #command #arguments...
ex) xcutils carthage update --platform ios
### Xcode configuration has changed automacally
New Build Phases
<img src="img/screenshot_04.png"/>
<br/>
Framework Search Paths
<img src="img/screenshot_05.png"/>
### Clean
$ xcutils carthage clean
## TODO
- [x] uitest install
- [ ] uitest clean
- [x] carthage command
- [x] carthage clean
- [ ] mvvm template install
## License
This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file.
> This project and all fastlane tools are in no way affiliated with Apple Inc or Google. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.