diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 3e840cb5b..f11e06d31 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: ./android + working-directory: ./ strategy: matrix: # TODO Add 9, 10, 11, 12, and 13 after Kotlin 1.3.60 diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 819e07a22..000000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -5.0 diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index ce867e871..000000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -jobs: - include: - - language: objective-c - os: osx - osx_image: xcode11.2 - env: - - LC_CTYPE=en_US.UTF-8 - - LANG=en_US.UTF-8 - - IOS_VER=13.2.2 - - IOS_SDK=iphonesimulator13.2 - - SIMULATOR_NAME="iPhone 8" - - cache: - directories: - - $HOME/Carthage - - script: - - set -o pipefail - - carthage version - - carthage update --platform iOS - - cd ios - - xcodebuild -version - - xcodebuild -showsdks - - instruments -s devices - - xcodebuild -scheme "RIBs" -destination "OS=$IOS_VER,name=$SIMULATOR_NAME" -sdk "$IOS_SDK" -configuration Release clean build | xcpretty -c; - - xcodebuild -scheme "RIBs" -destination "OS=$IOS_VER,platform=iOS Simulator,name=$SIMULATOR_NAME" -sdk "$IOS_SDK" -configuration Debug clean build test | xcpretty -c; - -branches: - except: - - gh-pages - - assets - -notifications: - email: false diff --git a/Cartfile b/Cartfile deleted file mode 100644 index b974c6217..000000000 --- a/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "ReactiveX/RxSwift" ~> 6.0.0 diff --git a/Package.swift b/Package.swift deleted file mode 100644 index c4a9143fb..000000000 --- a/Package.swift +++ /dev/null @@ -1,27 +0,0 @@ -// swift-tools-version:5.1 -import PackageDescription - -let package = Package( - name: "RIBs", - platforms: [ - .iOS(.v9), - ], - products: [ - .library(name: "RIBs", targets: ["RIBs"]), - ], - dependencies: [ - .package(url: "https://github.com/ReactiveX/RxSwift", from: "6.0.0"), - ], - targets: [ - .target( - name: "RIBs", - dependencies: ["RxSwift", "RxRelay"], - path: "ios/RIBs" - ), - .testTarget( - name: "RIBsTests", - dependencies: ["RIBs"], - path: "ios/RIBsTests" - ), - ] -) diff --git a/README.md b/README.md index 34820de74..0d77d46af 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ [![Android CI](https://github.com/uber/RIBs/actions/workflows/android.yml/badge.svg?branch=main)](https://github.com/uber/RIBs/actions/workflows/android.yml) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Maven Central](https://img.shields.io/maven-central/v/com.uber.rib/rib-android.svg)](https://search.maven.org/artifact/com.uber.rib/rib-android) -[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/RIBs.svg)](https://cocoapods.org/pods/ribs) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) + +> ⚠️ **Alert:** RIBs for IOS has been has been moved to a [separate repo](github.com/uber/ribs-ios) RIBs is the cross-platform architecture framework behind many mobile apps at Uber. The name RIBs is short for Router, Interactor and Builder, which are core components of this architecture. This framework is designed for mobile apps with a large number of engineers and nested states. @@ -56,27 +56,10 @@ dependencies { ``` There are a number of extension packages available as well including Kotlin extensions, Jetpack Compose support, Coroutines support - -## Installation for iOS -#### CocoaPods - -To integrate RIBs into your project add the following to your `Podfile`: - -```ruby -pod 'RIBs', '~> 0.9' -``` - -#### Carthage - -To integrate RIBs into your project using Carthage add the following to your `Cartfile`: - -```ruby -github "uber/RIBs" ~> 0.9 -``` - ## Related projects If you like RIBs, check out other related open source projects from our team: +- [RIBs-iOS](github.com/uber/ribs-ios): The iOS version of RIBs - [Needle](https://github.com/uber/needle): a compile-time safe Swift dependency injection framework. - [Motif](https://github.com/uber/motif): An abstract on top of Dagger offering simpler APIs for nested scopes. - [Swift Concurrency](https://github.com/uber/swift-concurrency): a set of concurrency utility classes used by Uber, inspired by the equivalent [java.util.concurrent](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/package-summary.html) package classes. diff --git a/RELEASING.md b/RELEASING.md index c6ab11f2b..57e9a177d 100755 --- a/RELEASING.md +++ b/RELEASING.md @@ -13,21 +13,3 @@ Android 7. Update the `gradle.properties` to the next SNAPSHOT version. 8. `git commit -am "Prepare next development version."` 9. `git push && git push --tags` - -iOS ---- - -Releasing -========= - -Note: This may vary based on your distribution mechanism. Assuming CocoaPods: - - 1. Change the version in `Name.podspec` to reflect a new version. - 2. Update the `CHANGELOG.md` for the impending release. - 3. Update the `README.md` with the new version. - 4. Verify formatting with swiftlint (swiftformat.sh) - 5. `git commit -am "Release X.Y.Z."` (where X.Y.Z is the new version) - 6. `git tag "X.Y.Z"` (where X.Y.Z is the new version) - 7. `git push --tags` - 8. `pod trunk push Name.podspec` - diff --git a/RIBs.podspec b/RIBs.podspec deleted file mode 100644 index b0c845c90..000000000 --- a/RIBs.podspec +++ /dev/null @@ -1,16 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'RIBs' - s.version = '0.9.3' - s.summary = 'Uber\'s cross-platform mobile architecture.' - s.description = <<-DESC -RIBs is the cross-platform architecture behind many mobile apps at Uber. This architecture framework is designed for mobile apps with a large number of engineers and nested states. - DESC - s.homepage = 'https://github.com/uber/RIBs' - s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE.txt' } - s.author = { 'uber' => 'mobile-open-source@uber.com' } - s.source = { :git => 'https://github.com/uber/RIBs.git', :tag => 'v' + s.version.to_s } - s.ios.deployment_target = '9.0' - s.source_files = 'ios/RIBs/Classes/**/*' - s.dependency 'RxSwift', '~> 6.5.0' - s.dependency 'RxRelay', '~> 6.5.0' -end diff --git a/android/build.gradle b/build.gradle similarity index 100% rename from android/build.gradle rename to build.gradle diff --git a/android/config/lint/lint.xml b/config/lint/lint.xml similarity index 100% rename from android/config/lint/lint.xml rename to config/lint/lint.xml diff --git a/android/config/spotless/copyright.java b/config/spotless/copyright.java similarity index 100% rename from android/config/spotless/copyright.java rename to config/spotless/copyright.java diff --git a/android/config/spotless/copyright.kt b/config/spotless/copyright.kt similarity index 100% rename from android/config/spotless/copyright.kt rename to config/spotless/copyright.kt diff --git a/android/conventions/build.gradle.kts b/conventions/build.gradle.kts similarity index 100% rename from android/conventions/build.gradle.kts rename to conventions/build.gradle.kts diff --git a/android/conventions/settings.gradle.kts b/conventions/settings.gradle.kts similarity index 100% rename from android/conventions/settings.gradle.kts rename to conventions/settings.gradle.kts diff --git a/android/conventions/src/main/kotlin/Extensions.kt b/conventions/src/main/kotlin/Extensions.kt similarity index 100% rename from android/conventions/src/main/kotlin/Extensions.kt rename to conventions/src/main/kotlin/Extensions.kt diff --git a/android/conventions/src/main/kotlin/ribs.kotlin-android-application-conventions.gradle.kts b/conventions/src/main/kotlin/ribs.kotlin-android-application-conventions.gradle.kts similarity index 100% rename from android/conventions/src/main/kotlin/ribs.kotlin-android-application-conventions.gradle.kts rename to conventions/src/main/kotlin/ribs.kotlin-android-application-conventions.gradle.kts diff --git a/android/conventions/src/main/kotlin/ribs.kotlin-android-application-errorprone-conventions.gradle.kts b/conventions/src/main/kotlin/ribs.kotlin-android-application-errorprone-conventions.gradle.kts similarity index 100% rename from android/conventions/src/main/kotlin/ribs.kotlin-android-application-errorprone-conventions.gradle.kts rename to conventions/src/main/kotlin/ribs.kotlin-android-application-errorprone-conventions.gradle.kts diff --git a/android/conventions/src/main/kotlin/ribs.kotlin-android-library-conventions.gradle.kts b/conventions/src/main/kotlin/ribs.kotlin-android-library-conventions.gradle.kts similarity index 100% rename from android/conventions/src/main/kotlin/ribs.kotlin-android-library-conventions.gradle.kts rename to conventions/src/main/kotlin/ribs.kotlin-android-library-conventions.gradle.kts diff --git a/android/conventions/src/main/kotlin/ribs.kotlin-library-conventions.gradle.kts b/conventions/src/main/kotlin/ribs.kotlin-library-conventions.gradle.kts similarity index 100% rename from android/conventions/src/main/kotlin/ribs.kotlin-library-conventions.gradle.kts rename to conventions/src/main/kotlin/ribs.kotlin-library-conventions.gradle.kts diff --git a/android/conventions/src/main/kotlin/ribs.spotless-convention.gradle.kts b/conventions/src/main/kotlin/ribs.spotless-convention.gradle.kts similarity index 100% rename from android/conventions/src/main/kotlin/ribs.spotless-convention.gradle.kts rename to conventions/src/main/kotlin/ribs.spotless-convention.gradle.kts diff --git a/android/demos/compose/README.md b/demos/compose/README.md similarity index 100% rename from android/demos/compose/README.md rename to demos/compose/README.md diff --git a/android/demos/compose/build.gradle b/demos/compose/build.gradle similarity index 100% rename from android/demos/compose/build.gradle rename to demos/compose/build.gradle diff --git a/android/demos/compose/src/main/AndroidManifest.xml b/demos/compose/src/main/AndroidManifest.xml similarity index 100% rename from android/demos/compose/src/main/AndroidManifest.xml rename to demos/compose/src/main/AndroidManifest.xml diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/ComposeApplication.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/ComposeApplication.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/ComposeApplication.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/ComposeApplication.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootActivity.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootActivity.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootActivity.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootActivity.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootInteractor.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootInteractor.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootInteractor.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootInteractor.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootRouter.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootRouter.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootRouter.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootRouter.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootScope.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootScope.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootScope.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootScope.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootView.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootView.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootView.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/RootView.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/AuthStream.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/AuthStream.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/AuthStream.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/AuthStream.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainInteractor.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainInteractor.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainInteractor.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainInteractor.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainRouter.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainRouter.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainRouter.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainRouter.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainScope.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainScope.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainScope.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainScope.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainView.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainView.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainView.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/MainView.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInEvent.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInEvent.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInEvent.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInEvent.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInInteractor.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInInteractor.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInInteractor.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInInteractor.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInRouter.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInRouter.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInRouter.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInRouter.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInScope.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInScope.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInScope.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInScope.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInView.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInView.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInView.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/LoggedInView.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/ScoreStream.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/ScoreStream.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/ScoreStream.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/ScoreStream.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameEvent.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameEvent.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameEvent.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameEvent.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameInteractor.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameInteractor.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameInteractor.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameInteractor.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameRouter.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameRouter.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameRouter.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameRouter.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameScope.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameScope.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameScope.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameScope.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameView.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameView.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameView.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameView.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameViewModel.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameViewModel.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameViewModel.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/offgame/OffGameViewModel.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/Board.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/Board.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/Board.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/Board.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/BoardCoordinate.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/BoardCoordinate.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/BoardCoordinate.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/BoardCoordinate.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeEvent.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeEvent.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeEvent.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeEvent.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeInteractor.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeInteractor.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeInteractor.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeInteractor.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeRouter.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeRouter.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeRouter.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeRouter.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeScope.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeScope.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeScope.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeScope.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeView.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeView.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeView.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeView.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeViewModel.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeViewModel.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeViewModel.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedin/tictactoe/TicTacToeViewModel.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutEvent.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutEvent.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutEvent.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutEvent.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutInteractor.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutInteractor.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutInteractor.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutInteractor.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutRouter.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutRouter.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutRouter.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutRouter.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutScope.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutScope.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutScope.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutScope.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutView.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutView.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutView.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutView.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutViewModel.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutViewModel.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutViewModel.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/root/main/loggedout/LoggedOutViewModel.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/AnalyticsClient.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/util/AnalyticsClient.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/AnalyticsClient.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/util/AnalyticsClient.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/CustomButton.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/util/CustomButton.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/CustomButton.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/util/CustomButton.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/CustomClientProvider.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/util/CustomClientProvider.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/CustomClientProvider.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/util/CustomClientProvider.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/EventStream.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/util/EventStream.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/EventStream.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/util/EventStream.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/ExperimentClient.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/util/ExperimentClient.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/ExperimentClient.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/util/ExperimentClient.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/LoggerClient.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/util/LoggerClient.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/LoggerClient.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/util/LoggerClient.kt diff --git a/android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/StateStream.kt b/demos/compose/src/main/kotlin/com/uber/rib/compose/util/StateStream.kt similarity index 100% rename from android/demos/compose/src/main/kotlin/com/uber/rib/compose/util/StateStream.kt rename to demos/compose/src/main/kotlin/com/uber/rib/compose/util/StateStream.kt diff --git a/android/demos/compose/src/main/res/drawable-v24/ic_launcher_foreground.xml b/demos/compose/src/main/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from android/demos/compose/src/main/res/drawable-v24/ic_launcher_foreground.xml rename to demos/compose/src/main/res/drawable-v24/ic_launcher_foreground.xml diff --git a/android/demos/compose/src/main/res/drawable/ic_launcher_background.xml b/demos/compose/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from android/demos/compose/src/main/res/drawable/ic_launcher_background.xml rename to demos/compose/src/main/res/drawable/ic_launcher_background.xml diff --git a/android/demos/compose/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/demos/compose/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from android/demos/compose/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to demos/compose/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/android/demos/compose/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/demos/compose/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from android/demos/compose/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to demos/compose/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/android/demos/compose/src/main/res/mipmap-hdpi/ic_launcher.png b/demos/compose/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-hdpi/ic_launcher.png rename to demos/compose/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/demos/compose/src/main/res/mipmap-hdpi/ic_launcher_round.png b/demos/compose/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to demos/compose/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/android/demos/compose/src/main/res/mipmap-mdpi/ic_launcher.png b/demos/compose/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-mdpi/ic_launcher.png rename to demos/compose/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/demos/compose/src/main/res/mipmap-mdpi/ic_launcher_round.png b/demos/compose/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to demos/compose/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/android/demos/compose/src/main/res/mipmap-xhdpi/ic_launcher.png b/demos/compose/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-xhdpi/ic_launcher.png rename to demos/compose/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/demos/compose/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/demos/compose/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to demos/compose/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/android/demos/compose/src/main/res/mipmap-xxhdpi/ic_launcher.png b/demos/compose/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to demos/compose/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/demos/compose/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/demos/compose/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to demos/compose/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/android/demos/compose/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/demos/compose/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to demos/compose/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/demos/compose/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/demos/compose/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from android/demos/compose/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to demos/compose/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/android/demos/compose/src/main/res/values/ids.xml b/demos/compose/src/main/res/values/ids.xml similarity index 100% rename from android/demos/compose/src/main/res/values/ids.xml rename to demos/compose/src/main/res/values/ids.xml diff --git a/android/demos/compose/src/main/res/values/strings.xml b/demos/compose/src/main/res/values/strings.xml similarity index 100% rename from android/demos/compose/src/main/res/values/strings.xml rename to demos/compose/src/main/res/values/strings.xml diff --git a/android/demos/compose/src/main/res/values/themes.xml b/demos/compose/src/main/res/values/themes.xml similarity index 100% rename from android/demos/compose/src/main/res/values/themes.xml rename to demos/compose/src/main/res/values/themes.xml diff --git a/android/demos/flipper/README.md b/demos/flipper/README.md similarity index 100% rename from android/demos/flipper/README.md rename to demos/flipper/README.md diff --git a/android/demos/flipper/build.gradle b/demos/flipper/build.gradle similarity index 100% rename from android/demos/flipper/build.gradle rename to demos/flipper/build.gradle diff --git a/android/demos/flipper/src/main/AndroidManifest.xml b/demos/flipper/src/main/AndroidManifest.xml similarity index 100% rename from android/demos/flipper/src/main/AndroidManifest.xml rename to demos/flipper/src/main/AndroidManifest.xml diff --git a/android/demos/flipper/src/main/java/com/uber/rib/RootActivity.java b/demos/flipper/src/main/java/com/uber/rib/RootActivity.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/RootActivity.java rename to demos/flipper/src/main/java/com/uber/rib/RootActivity.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/SampleApplication.java b/demos/flipper/src/main/java/com/uber/rib/SampleApplication.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/SampleApplication.java rename to demos/flipper/src/main/java/com/uber/rib/SampleApplication.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/RootBuilder.java b/demos/flipper/src/main/java/com/uber/rib/root/RootBuilder.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/RootBuilder.java rename to demos/flipper/src/main/java/com/uber/rib/root/RootBuilder.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/RootInteractor.java b/demos/flipper/src/main/java/com/uber/rib/root/RootInteractor.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/RootInteractor.java rename to demos/flipper/src/main/java/com/uber/rib/root/RootInteractor.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/RootRouter.java b/demos/flipper/src/main/java/com/uber/rib/root/RootRouter.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/RootRouter.java rename to demos/flipper/src/main/java/com/uber/rib/root/RootRouter.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/RootView.java b/demos/flipper/src/main/java/com/uber/rib/root/RootView.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/RootView.java rename to demos/flipper/src/main/java/com/uber/rib/root/RootView.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java diff --git a/android/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java b/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java similarity index 100% rename from android/demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java rename to demos/flipper/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java diff --git a/android/demos/flipper/src/main/res/drawable-hdpi/ub__ic_launcher.png b/demos/flipper/src/main/res/drawable-hdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/flipper/src/main/res/drawable-hdpi/ub__ic_launcher.png rename to demos/flipper/src/main/res/drawable-hdpi/ub__ic_launcher.png diff --git a/android/demos/flipper/src/main/res/drawable-mdpi/ub__ic_launcher.png b/demos/flipper/src/main/res/drawable-mdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/flipper/src/main/res/drawable-mdpi/ub__ic_launcher.png rename to demos/flipper/src/main/res/drawable-mdpi/ub__ic_launcher.png diff --git a/android/demos/flipper/src/main/res/drawable-xhdpi/ub__ic_launcher.png b/demos/flipper/src/main/res/drawable-xhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/flipper/src/main/res/drawable-xhdpi/ub__ic_launcher.png rename to demos/flipper/src/main/res/drawable-xhdpi/ub__ic_launcher.png diff --git a/android/demos/flipper/src/main/res/drawable-xxhdpi/ub__ic_launcher.png b/demos/flipper/src/main/res/drawable-xxhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/flipper/src/main/res/drawable-xxhdpi/ub__ic_launcher.png rename to demos/flipper/src/main/res/drawable-xxhdpi/ub__ic_launcher.png diff --git a/android/demos/flipper/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png b/demos/flipper/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/flipper/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png rename to demos/flipper/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png diff --git a/android/demos/flipper/src/main/res/layout/logged_out_rib.xml b/demos/flipper/src/main/res/layout/logged_out_rib.xml similarity index 100% rename from android/demos/flipper/src/main/res/layout/logged_out_rib.xml rename to demos/flipper/src/main/res/layout/logged_out_rib.xml diff --git a/android/demos/flipper/src/main/res/layout/off_game_rib.xml b/demos/flipper/src/main/res/layout/off_game_rib.xml similarity index 100% rename from android/demos/flipper/src/main/res/layout/off_game_rib.xml rename to demos/flipper/src/main/res/layout/off_game_rib.xml diff --git a/android/demos/flipper/src/main/res/layout/root_rib.xml b/demos/flipper/src/main/res/layout/root_rib.xml similarity index 100% rename from android/demos/flipper/src/main/res/layout/root_rib.xml rename to demos/flipper/src/main/res/layout/root_rib.xml diff --git a/android/demos/flipper/src/main/res/layout/tic_tac_toe_rib.xml b/demos/flipper/src/main/res/layout/tic_tac_toe_rib.xml similarity index 100% rename from android/demos/flipper/src/main/res/layout/tic_tac_toe_rib.xml rename to demos/flipper/src/main/res/layout/tic_tac_toe_rib.xml diff --git a/android/demos/flipper/src/main/res/values/ub__strings.xml b/demos/flipper/src/main/res/values/ub__strings.xml similarity index 100% rename from android/demos/flipper/src/main/res/values/ub__strings.xml rename to demos/flipper/src/main/res/values/ub__strings.xml diff --git a/android/demos/intellij/README.md b/demos/intellij/README.md similarity index 100% rename from android/demos/intellij/README.md rename to demos/intellij/README.md diff --git a/android/demos/intellij/build.gradle b/demos/intellij/build.gradle similarity index 100% rename from android/demos/intellij/build.gradle rename to demos/intellij/build.gradle diff --git a/android/demos/intellij/src/main/AndroidManifest.xml b/demos/intellij/src/main/AndroidManifest.xml similarity index 100% rename from android/demos/intellij/src/main/AndroidManifest.xml rename to demos/intellij/src/main/AndroidManifest.xml diff --git a/android/demos/intellij/src/main/java/com/uber/rib/RootActivity.java b/demos/intellij/src/main/java/com/uber/rib/RootActivity.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/RootActivity.java rename to demos/intellij/src/main/java/com/uber/rib/RootActivity.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/SampleApplication.java b/demos/intellij/src/main/java/com/uber/rib/SampleApplication.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/SampleApplication.java rename to demos/intellij/src/main/java/com/uber/rib/SampleApplication.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/RootBuilder.java b/demos/intellij/src/main/java/com/uber/rib/root/RootBuilder.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/RootBuilder.java rename to demos/intellij/src/main/java/com/uber/rib/root/RootBuilder.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/RootInteractor.java b/demos/intellij/src/main/java/com/uber/rib/root/RootInteractor.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/RootInteractor.java rename to demos/intellij/src/main/java/com/uber/rib/root/RootInteractor.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/RootRouter.java b/demos/intellij/src/main/java/com/uber/rib/root/RootRouter.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/RootRouter.java rename to demos/intellij/src/main/java/com/uber/rib/root/RootRouter.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/RootView.java b/demos/intellij/src/main/java/com/uber/rib/root/RootView.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/RootView.java rename to demos/intellij/src/main/java/com/uber/rib/root/RootView.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java diff --git a/android/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java b/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java similarity index 100% rename from android/demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java rename to demos/intellij/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java diff --git a/android/demos/intellij/src/main/res/drawable-hdpi/ub__ic_launcher.png b/demos/intellij/src/main/res/drawable-hdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/intellij/src/main/res/drawable-hdpi/ub__ic_launcher.png rename to demos/intellij/src/main/res/drawable-hdpi/ub__ic_launcher.png diff --git a/android/demos/intellij/src/main/res/drawable-mdpi/ub__ic_launcher.png b/demos/intellij/src/main/res/drawable-mdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/intellij/src/main/res/drawable-mdpi/ub__ic_launcher.png rename to demos/intellij/src/main/res/drawable-mdpi/ub__ic_launcher.png diff --git a/android/demos/intellij/src/main/res/drawable-xhdpi/ub__ic_launcher.png b/demos/intellij/src/main/res/drawable-xhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/intellij/src/main/res/drawable-xhdpi/ub__ic_launcher.png rename to demos/intellij/src/main/res/drawable-xhdpi/ub__ic_launcher.png diff --git a/android/demos/intellij/src/main/res/drawable-xxhdpi/ub__ic_launcher.png b/demos/intellij/src/main/res/drawable-xxhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/intellij/src/main/res/drawable-xxhdpi/ub__ic_launcher.png rename to demos/intellij/src/main/res/drawable-xxhdpi/ub__ic_launcher.png diff --git a/android/demos/intellij/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png b/demos/intellij/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/intellij/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png rename to demos/intellij/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png diff --git a/android/demos/intellij/src/main/res/layout/logged_out_rib.xml b/demos/intellij/src/main/res/layout/logged_out_rib.xml similarity index 100% rename from android/demos/intellij/src/main/res/layout/logged_out_rib.xml rename to demos/intellij/src/main/res/layout/logged_out_rib.xml diff --git a/android/demos/intellij/src/main/res/layout/off_game_rib.xml b/demos/intellij/src/main/res/layout/off_game_rib.xml similarity index 100% rename from android/demos/intellij/src/main/res/layout/off_game_rib.xml rename to demos/intellij/src/main/res/layout/off_game_rib.xml diff --git a/android/demos/intellij/src/main/res/layout/root_rib.xml b/demos/intellij/src/main/res/layout/root_rib.xml similarity index 100% rename from android/demos/intellij/src/main/res/layout/root_rib.xml rename to demos/intellij/src/main/res/layout/root_rib.xml diff --git a/android/demos/intellij/src/main/res/layout/tic_tac_toe_rib.xml b/demos/intellij/src/main/res/layout/tic_tac_toe_rib.xml similarity index 100% rename from android/demos/intellij/src/main/res/layout/tic_tac_toe_rib.xml rename to demos/intellij/src/main/res/layout/tic_tac_toe_rib.xml diff --git a/android/demos/intellij/src/main/res/values/ub__strings.xml b/demos/intellij/src/main/res/values/ub__strings.xml similarity index 100% rename from android/demos/intellij/src/main/res/values/ub__strings.xml rename to demos/intellij/src/main/res/values/ub__strings.xml diff --git a/android/demos/memory-leaks/README.md b/demos/memory-leaks/README.md similarity index 100% rename from android/demos/memory-leaks/README.md rename to demos/memory-leaks/README.md diff --git a/android/demos/memory-leaks/assets/leakcanary-warning.png b/demos/memory-leaks/assets/leakcanary-warning.png similarity index 100% rename from android/demos/memory-leaks/assets/leakcanary-warning.png rename to demos/memory-leaks/assets/leakcanary-warning.png diff --git a/android/demos/memory-leaks/build.gradle b/demos/memory-leaks/build.gradle similarity index 100% rename from android/demos/memory-leaks/build.gradle rename to demos/memory-leaks/build.gradle diff --git a/android/demos/memory-leaks/src/main/AndroidManifest.xml b/demos/memory-leaks/src/main/AndroidManifest.xml similarity index 100% rename from android/demos/memory-leaks/src/main/AndroidManifest.xml rename to demos/memory-leaks/src/main/AndroidManifest.xml diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/RootActivity.java b/demos/memory-leaks/src/main/java/com/uber/rib/RootActivity.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/RootActivity.java rename to demos/memory-leaks/src/main/java/com/uber/rib/RootActivity.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/SampleApplication.java b/demos/memory-leaks/src/main/java/com/uber/rib/SampleApplication.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/SampleApplication.java rename to demos/memory-leaks/src/main/java/com/uber/rib/SampleApplication.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/RootBuilder.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/RootBuilder.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/RootBuilder.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/RootBuilder.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/RootInteractor.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/RootInteractor.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/RootInteractor.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/RootInteractor.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/RootRouter.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/RootRouter.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/RootRouter.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/RootRouter.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/RootView.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/RootView.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/RootView.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/RootView.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java diff --git a/android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java b/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java similarity index 100% rename from android/demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java rename to demos/memory-leaks/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java diff --git a/android/demos/memory-leaks/src/main/res/drawable-hdpi/ub__ic_launcher.png b/demos/memory-leaks/src/main/res/drawable-hdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/memory-leaks/src/main/res/drawable-hdpi/ub__ic_launcher.png rename to demos/memory-leaks/src/main/res/drawable-hdpi/ub__ic_launcher.png diff --git a/android/demos/memory-leaks/src/main/res/drawable-mdpi/ub__ic_launcher.png b/demos/memory-leaks/src/main/res/drawable-mdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/memory-leaks/src/main/res/drawable-mdpi/ub__ic_launcher.png rename to demos/memory-leaks/src/main/res/drawable-mdpi/ub__ic_launcher.png diff --git a/android/demos/memory-leaks/src/main/res/drawable-xhdpi/ub__ic_launcher.png b/demos/memory-leaks/src/main/res/drawable-xhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/memory-leaks/src/main/res/drawable-xhdpi/ub__ic_launcher.png rename to demos/memory-leaks/src/main/res/drawable-xhdpi/ub__ic_launcher.png diff --git a/android/demos/memory-leaks/src/main/res/drawable-xxhdpi/ub__ic_launcher.png b/demos/memory-leaks/src/main/res/drawable-xxhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/memory-leaks/src/main/res/drawable-xxhdpi/ub__ic_launcher.png rename to demos/memory-leaks/src/main/res/drawable-xxhdpi/ub__ic_launcher.png diff --git a/android/demos/memory-leaks/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png b/demos/memory-leaks/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png similarity index 100% rename from android/demos/memory-leaks/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png rename to demos/memory-leaks/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png diff --git a/android/demos/memory-leaks/src/main/res/layout/logged_out_rib.xml b/demos/memory-leaks/src/main/res/layout/logged_out_rib.xml similarity index 100% rename from android/demos/memory-leaks/src/main/res/layout/logged_out_rib.xml rename to demos/memory-leaks/src/main/res/layout/logged_out_rib.xml diff --git a/android/demos/memory-leaks/src/main/res/layout/root_rib.xml b/demos/memory-leaks/src/main/res/layout/root_rib.xml similarity index 100% rename from android/demos/memory-leaks/src/main/res/layout/root_rib.xml rename to demos/memory-leaks/src/main/res/layout/root_rib.xml diff --git a/android/demos/memory-leaks/src/main/res/values/ub__strings.xml b/demos/memory-leaks/src/main/res/values/ub__strings.xml similarity index 100% rename from android/demos/memory-leaks/src/main/res/values/ub__strings.xml rename to demos/memory-leaks/src/main/res/values/ub__strings.xml diff --git a/android/demos/rib-workers/README.md b/demos/rib-workers/README.md similarity index 100% rename from android/demos/rib-workers/README.md rename to demos/rib-workers/README.md diff --git a/android/demos/rib-workers/build.gradle b/demos/rib-workers/build.gradle similarity index 100% rename from android/demos/rib-workers/build.gradle rename to demos/rib-workers/build.gradle diff --git a/android/demos/rib-workers/src/main/AndroidManifest.xml b/demos/rib-workers/src/main/AndroidManifest.xml similarity index 100% rename from android/demos/rib-workers/src/main/AndroidManifest.xml rename to demos/rib-workers/src/main/AndroidManifest.xml diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/ComposeApplication.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/ComposeApplication.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/ComposeApplication.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/ComposeApplication.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootActivity.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootActivity.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootActivity.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootActivity.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootInteractor.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootInteractor.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootInteractor.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootInteractor.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootRouter.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootRouter.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootRouter.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootRouter.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootScope.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootScope.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootScope.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootScope.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootView.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootView.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootView.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/RootView.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/logger/ApplicationLevelWorkerLogger.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/logger/ApplicationLevelWorkerLogger.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/logger/ApplicationLevelWorkerLogger.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/logger/ApplicationLevelWorkerLogger.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainInteractor.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainInteractor.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainInteractor.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainInteractor.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainRouter.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainRouter.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainRouter.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainRouter.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainScope.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainScope.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainScope.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainScope.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainView.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainView.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainView.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/MainView.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerBindTypeClickType.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerBindTypeClickType.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerBindTypeClickType.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerBindTypeClickType.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionInteractor.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionInteractor.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionInteractor.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionInteractor.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionRouter.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionRouter.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionRouter.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionRouter.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionScope.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionScope.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionScope.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionScope.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionView.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionView.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionView.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionView.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionViewModel.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionViewModel.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionViewModel.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/ribworkerselection/RibWorkerSelectionViewModel.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/BackgroundWorker.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/BackgroundWorker.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/BackgroundWorker.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/BackgroundWorker.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/DefaultRibCoroutineWorker.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/DefaultRibCoroutineWorker.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/DefaultRibCoroutineWorker.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/DefaultRibCoroutineWorker.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/DefaultWorker.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/DefaultWorker.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/DefaultWorker.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/DefaultWorker.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/IoWorker.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/IoWorker.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/IoWorker.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/IoWorker.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/UiWorker.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/UiWorker.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/UiWorker.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/root/main/workers/UiWorker.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/util/EventStream.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/util/EventStream.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/util/EventStream.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/util/EventStream.kt diff --git a/android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/util/StateStream.kt b/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/util/StateStream.kt similarity index 100% rename from android/demos/rib-workers/src/main/kotlin/com/uber/rib/workers/util/StateStream.kt rename to demos/rib-workers/src/main/kotlin/com/uber/rib/workers/util/StateStream.kt diff --git a/android/demos/rib-workers/src/main/res/drawable-v24/ic_launcher_foreground.xml b/demos/rib-workers/src/main/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from android/demos/rib-workers/src/main/res/drawable-v24/ic_launcher_foreground.xml rename to demos/rib-workers/src/main/res/drawable-v24/ic_launcher_foreground.xml diff --git a/android/demos/rib-workers/src/main/res/drawable/ic_launcher_background.xml b/demos/rib-workers/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from android/demos/rib-workers/src/main/res/drawable/ic_launcher_background.xml rename to demos/rib-workers/src/main/res/drawable/ic_launcher_background.xml diff --git a/android/demos/rib-workers/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/demos/rib-workers/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to demos/rib-workers/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/android/demos/rib-workers/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/demos/rib-workers/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to demos/rib-workers/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/android/demos/rib-workers/src/main/res/mipmap-hdpi/ic_launcher.png b/demos/rib-workers/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-hdpi/ic_launcher.png rename to demos/rib-workers/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-hdpi/ic_launcher_round.png b/demos/rib-workers/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to demos/rib-workers/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-mdpi/ic_launcher.png b/demos/rib-workers/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-mdpi/ic_launcher.png rename to demos/rib-workers/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-mdpi/ic_launcher_round.png b/demos/rib-workers/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to demos/rib-workers/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-xhdpi/ic_launcher.png b/demos/rib-workers/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-xhdpi/ic_launcher.png rename to demos/rib-workers/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/demos/rib-workers/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to demos/rib-workers/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-xxhdpi/ic_launcher.png b/demos/rib-workers/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to demos/rib-workers/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/demos/rib-workers/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to demos/rib-workers/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/demos/rib-workers/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to demos/rib-workers/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/demos/rib-workers/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/demos/rib-workers/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from android/demos/rib-workers/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to demos/rib-workers/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/android/demos/rib-workers/src/main/res/values/strings.xml b/demos/rib-workers/src/main/res/values/strings.xml similarity index 100% rename from android/demos/rib-workers/src/main/res/values/strings.xml rename to demos/rib-workers/src/main/res/values/strings.xml diff --git a/android/demos/rib-workers/src/main/res/values/themes.xml b/demos/rib-workers/src/main/res/values/themes.xml similarity index 100% rename from android/demos/rib-workers/src/main/res/values/themes.xml rename to demos/rib-workers/src/main/res/values/themes.xml diff --git a/android/gradle.properties b/gradle.properties similarity index 100% rename from android/gradle.properties rename to gradle.properties diff --git a/android/gradle/japicmp.gradle b/gradle/japicmp.gradle similarity index 100% rename from android/gradle/japicmp.gradle rename to gradle/japicmp.gradle diff --git a/android/gradle/libs.versions.toml b/gradle/libs.versions.toml similarity index 100% rename from android/gradle/libs.versions.toml rename to gradle/libs.versions.toml diff --git a/android/gradle/test-libs.versions.toml b/gradle/test-libs.versions.toml similarity index 100% rename from android/gradle/test-libs.versions.toml rename to gradle/test-libs.versions.toml diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.jar rename to gradle/wrapper/gradle-wrapper.jar diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to gradle/wrapper/gradle-wrapper.properties diff --git a/android/gradlew b/gradlew similarity index 100% rename from android/gradlew rename to gradlew diff --git a/android/gradlew.bat b/gradlew.bat similarity index 96% rename from android/gradlew.bat rename to gradlew.bat index aec99730b..8a0b282aa 100644 --- a/android/gradlew.bat +++ b/gradlew.bat @@ -1,90 +1,90 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ios/RIBs.xcodeproj/project.pbxproj b/ios/RIBs.xcodeproj/project.pbxproj deleted file mode 100644 index b5ae108cb..000000000 --- a/ios/RIBs.xcodeproj/project.pbxproj +++ /dev/null @@ -1,669 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 4131772C1F8EF5FF005F08F0 /* Builder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177291F8EEFF0005F08F0 /* Builder.swift */; }; - 4131772D1F8EF5FF005F08F0 /* Interactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177221F8EEFEF005F08F0 /* Interactor.swift */; }; - 4131772E1F8EF5FF005F08F0 /* LaunchRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177261F8EEFEF005F08F0 /* LaunchRouter.swift */; }; - 4131772F1F8EF5FF005F08F0 /* PresentableInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177231F8EEFEF005F08F0 /* PresentableInteractor.swift */; }; - 413177301F8EF5FF005F08F0 /* Presenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177251F8EEFEF005F08F0 /* Presenter.swift */; }; - 413177311F8EF5FF005F08F0 /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177271F8EEFEF005F08F0 /* Router.swift */; }; - 413177321F8EF5FF005F08F0 /* ViewableRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177241F8EEFEF005F08F0 /* ViewableRouter.swift */; }; - 413177331F8EF5FF005F08F0 /* ViewControllable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177281F8EEFEF005F08F0 /* ViewControllable.swift */; }; - 413177341F8EF602005F08F0 /* Worker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4131772B1F8EEFF0005F08F0 /* Worker.swift */; }; - 413177351F8EF605005F08F0 /* Workflow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177211F8EEFEF005F08F0 /* Workflow.swift */; }; - 413177391F8EF70F005F08F0 /* Executor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177371F8EF70A005F08F0 /* Executor.swift */; }; - 4131773A1F8EF711005F08F0 /* LeakDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 413177381F8EF70A005F08F0 /* LeakDetector.swift */; }; - 4131773D1F8EF98A005F08F0 /* Foundation+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4131773C1F8EF98A005F08F0 /* Foundation+Extensions.swift */; }; - 418C175C1F97F19F003C03F7 /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418C17571F97DB2E003C03F7 /* Component.swift */; }; - 418C175D1F97F1A1003C03F7 /* Dependency.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418C17561F97DB2E003C03F7 /* Dependency.swift */; }; - 8B9882EC1F86E1CF00ABE009 /* RIBs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9882E21F86E1CF00ABE009 /* RIBs.framework */; }; - 8B9882F31F86E1CF00ABE009 /* RIBs.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B9882E51F86E1CF00ABE009 /* RIBs.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AF90B40A1FBA14DB00920384 /* RouterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF90B4091FBA14DB00920384 /* RouterTests.swift */; }; - AF90B40C1FBA157700920384 /* Mocks.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF90B40B1FBA157700920384 /* Mocks.swift */; }; - AF90B4111FBA185E00920384 /* ComponentTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF90B4101FBA185E00920384 /* ComponentTests.swift */; }; - AF90B4141FBA18DB00920384 /* WorkerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF90B4131FBA18DB00920384 /* WorkerTests.swift */; }; - AF90B4191FBA1F8500920384 /* WorkflowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF90B4181FBA1F8400920384 /* WorkflowTests.swift */; }; - AF9966B21FC40D7E00CAEAA2 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF9966B11FC40D7E00CAEAA2 /* RxSwift.framework */; }; - AFB7D4031FC81C8F00045D2B /* Foundation+ExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF82F6731FC81B5F006DF7BC /* Foundation+ExtensionsTests.swift */; }; - AFB7D4051FC81D6100045D2B /* LaunchRouterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFB7D4041FC81D6100045D2B /* LaunchRouterTests.swift */; }; - BF5FC0F122808377004235F1 /* RxRelay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF5FC0F022808377004235F1 /* RxRelay.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 8B9882ED1F86E1CF00ABE009 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 8B9882D91F86E1CF00ABE009 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 8B9882E11F86E1CF00ABE009; - remoteInfo = RIBs; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 413177211F8EEFEF005F08F0 /* Workflow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Workflow.swift; sourceTree = ""; }; - 413177221F8EEFEF005F08F0 /* Interactor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Interactor.swift; sourceTree = ""; }; - 413177231F8EEFEF005F08F0 /* PresentableInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresentableInteractor.swift; sourceTree = ""; }; - 413177241F8EEFEF005F08F0 /* ViewableRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewableRouter.swift; sourceTree = ""; }; - 413177251F8EEFEF005F08F0 /* Presenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Presenter.swift; sourceTree = ""; }; - 413177261F8EEFEF005F08F0 /* LaunchRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchRouter.swift; sourceTree = ""; }; - 413177271F8EEFEF005F08F0 /* Router.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Router.swift; sourceTree = ""; }; - 413177281F8EEFEF005F08F0 /* ViewControllable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewControllable.swift; sourceTree = ""; }; - 413177291F8EEFF0005F08F0 /* Builder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Builder.swift; sourceTree = ""; }; - 4131772B1F8EEFF0005F08F0 /* Worker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Worker.swift; sourceTree = ""; }; - 413177371F8EF70A005F08F0 /* Executor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Executor.swift; sourceTree = ""; }; - 413177381F8EF70A005F08F0 /* LeakDetector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeakDetector.swift; sourceTree = ""; }; - 4131773C1F8EF98A005F08F0 /* Foundation+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Foundation+Extensions.swift"; sourceTree = ""; }; - 418C17561F97DB2E003C03F7 /* Dependency.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dependency.swift; sourceTree = ""; }; - 418C17571F97DB2E003C03F7 /* Component.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Component.swift; sourceTree = ""; }; - 8B9882E21F86E1CF00ABE009 /* RIBs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RIBs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8B9882E51F86E1CF00ABE009 /* RIBs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RIBs.h; sourceTree = ""; }; - 8B9882E61F86E1CF00ABE009 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8B9882EB1F86E1CF00ABE009 /* RIBsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RIBsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 8B9882F21F86E1CF00ABE009 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - AF82F6731FC81B5F006DF7BC /* Foundation+ExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Foundation+ExtensionsTests.swift"; sourceTree = ""; }; - AF90B4091FBA14DB00920384 /* RouterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RouterTests.swift; sourceTree = ""; }; - AF90B40B1FBA157700920384 /* Mocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Mocks.swift; sourceTree = ""; }; - AF90B4101FBA185E00920384 /* ComponentTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComponentTests.swift; sourceTree = ""; }; - AF90B4131FBA18DB00920384 /* WorkerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkerTests.swift; sourceTree = ""; }; - AF90B4181FBA1F8400920384 /* WorkflowTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkflowTests.swift; sourceTree = ""; }; - AF9966B11FC40D7E00CAEAA2 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxSwift.framework; path = ../Carthage/Build/iOS/RxSwift.framework; sourceTree = ""; }; - AFB7D4041FC81D6100045D2B /* LaunchRouterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchRouterTests.swift; sourceTree = ""; }; - BF5FC0F022808377004235F1 /* RxRelay.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RxRelay.framework; path = ../Carthage/Build/iOS/RxRelay.framework; sourceTree = ""; }; - E8E789432378AD000043E59E /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Package.swift; path = ../Package.swift; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8B9882DE1F86E1CF00ABE009 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BF5FC0F122808377004235F1 /* RxRelay.framework in Frameworks */, - AF9966B21FC40D7E00CAEAA2 /* RxSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8B9882E81F86E1CF00ABE009 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8B9882EC1F86E1CF00ABE009 /* RIBs.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4121671B1F8C5BDC00371904 /* Classes */ = { - isa = PBXGroup; - children = ( - 413177291F8EEFF0005F08F0 /* Builder.swift */, - 413177221F8EEFEF005F08F0 /* Interactor.swift */, - 413177261F8EEFEF005F08F0 /* LaunchRouter.swift */, - 413177231F8EEFEF005F08F0 /* PresentableInteractor.swift */, - 413177251F8EEFEF005F08F0 /* Presenter.swift */, - 413177271F8EEFEF005F08F0 /* Router.swift */, - 413177241F8EEFEF005F08F0 /* ViewableRouter.swift */, - 413177281F8EEFEF005F08F0 /* ViewControllable.swift */, - 418C17551F97DB0E003C03F7 /* DI */, - 4131773B1F8EF981005F08F0 /* Extensions */, - 413177361F8EF70A005F08F0 /* LeakDetector */, - 4131772A1F8EEFF0005F08F0 /* Worker */, - 413177201F8EEFEF005F08F0 /* Workflow */, - ); - path = Classes; - sourceTree = ""; - }; - 413177201F8EEFEF005F08F0 /* Workflow */ = { - isa = PBXGroup; - children = ( - 413177211F8EEFEF005F08F0 /* Workflow.swift */, - ); - path = Workflow; - sourceTree = ""; - }; - 4131772A1F8EEFF0005F08F0 /* Worker */ = { - isa = PBXGroup; - children = ( - 4131772B1F8EEFF0005F08F0 /* Worker.swift */, - ); - path = Worker; - sourceTree = ""; - }; - 413177361F8EF70A005F08F0 /* LeakDetector */ = { - isa = PBXGroup; - children = ( - 413177371F8EF70A005F08F0 /* Executor.swift */, - 413177381F8EF70A005F08F0 /* LeakDetector.swift */, - ); - path = LeakDetector; - sourceTree = ""; - }; - 4131773B1F8EF981005F08F0 /* Extensions */ = { - isa = PBXGroup; - children = ( - 4131773C1F8EF98A005F08F0 /* Foundation+Extensions.swift */, - ); - path = Extensions; - sourceTree = ""; - }; - 418C17551F97DB0E003C03F7 /* DI */ = { - isa = PBXGroup; - children = ( - 418C17571F97DB2E003C03F7 /* Component.swift */, - 418C17561F97DB2E003C03F7 /* Dependency.swift */, - ); - path = DI; - sourceTree = ""; - }; - 8B9882D81F86E1CF00ABE009 = { - isa = PBXGroup; - children = ( - 8B9882E41F86E1CF00ABE009 /* RIBs */, - 8B9882EF1F86E1CF00ABE009 /* RIBsTests */, - 8B9882E31F86E1CF00ABE009 /* Products */, - AF5101421FBBA64A009C0DB3 /* Frameworks */, - ); - sourceTree = ""; - }; - 8B9882E31F86E1CF00ABE009 /* Products */ = { - isa = PBXGroup; - children = ( - 8B9882E21F86E1CF00ABE009 /* RIBs.framework */, - 8B9882EB1F86E1CF00ABE009 /* RIBsTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 8B9882E41F86E1CF00ABE009 /* RIBs */ = { - isa = PBXGroup; - children = ( - 4121671B1F8C5BDC00371904 /* Classes */, - 8B9882E51F86E1CF00ABE009 /* RIBs.h */, - E8E789432378AD000043E59E /* Package.swift */, - 8B9882E61F86E1CF00ABE009 /* Info.plist */, - ); - path = RIBs; - sourceTree = ""; - }; - 8B9882EF1F86E1CF00ABE009 /* RIBsTests */ = { - isa = PBXGroup; - children = ( - 8B9882F21F86E1CF00ABE009 /* Info.plist */, - AFB7D4041FC81D6100045D2B /* LaunchRouterTests.swift */, - AF90B40B1FBA157700920384 /* Mocks.swift */, - AF90B4091FBA14DB00920384 /* RouterTests.swift */, - AF90B40D1FBA163000920384 /* DI */, - AF82F6721FC81B5F006DF7BC /* Extensions */, - AF90B4121FBA18CD00920384 /* Worker */, - AF90B4171FBA1F2400920384 /* Workflow */, - ); - path = RIBsTests; - sourceTree = ""; - }; - AF5101421FBBA64A009C0DB3 /* Frameworks */ = { - isa = PBXGroup; - children = ( - BF5FC0F022808377004235F1 /* RxRelay.framework */, - AF9966B11FC40D7E00CAEAA2 /* RxSwift.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - AF82F6721FC81B5F006DF7BC /* Extensions */ = { - isa = PBXGroup; - children = ( - AF82F6731FC81B5F006DF7BC /* Foundation+ExtensionsTests.swift */, - ); - path = Extensions; - sourceTree = ""; - }; - AF90B40D1FBA163000920384 /* DI */ = { - isa = PBXGroup; - children = ( - AF90B4101FBA185E00920384 /* ComponentTests.swift */, - ); - path = DI; - sourceTree = ""; - }; - AF90B4121FBA18CD00920384 /* Worker */ = { - isa = PBXGroup; - children = ( - AF90B4131FBA18DB00920384 /* WorkerTests.swift */, - ); - path = Worker; - sourceTree = ""; - }; - AF90B4171FBA1F2400920384 /* Workflow */ = { - isa = PBXGroup; - children = ( - AF90B4181FBA1F8400920384 /* WorkflowTests.swift */, - ); - path = Workflow; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 8B9882DF1F86E1CF00ABE009 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 8B9882F31F86E1CF00ABE009 /* RIBs.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 8B9882E11F86E1CF00ABE009 /* RIBs */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8B9882F61F86E1CF00ABE009 /* Build configuration list for PBXNativeTarget "RIBs" */; - buildPhases = ( - 8B9882DD1F86E1CF00ABE009 /* Sources */, - 8B9882DE1F86E1CF00ABE009 /* Frameworks */, - 8B9882DF1F86E1CF00ABE009 /* Headers */, - 8B9882E01F86E1CF00ABE009 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RIBs; - productName = RIBs; - productReference = 8B9882E21F86E1CF00ABE009 /* RIBs.framework */; - productType = "com.apple.product-type.framework"; - }; - 8B9882EA1F86E1CF00ABE009 /* RIBsTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8B9882F91F86E1CF00ABE009 /* Build configuration list for PBXNativeTarget "RIBsTests" */; - buildPhases = ( - 8B9882E71F86E1CF00ABE009 /* Sources */, - 8B9882E81F86E1CF00ABE009 /* Frameworks */, - 8B9882E91F86E1CF00ABE009 /* Resources */, - AF8C6C9B1FBC8D3D00C61033 /* Carthage */, - ); - buildRules = ( - ); - dependencies = ( - 8B9882EE1F86E1CF00ABE009 /* PBXTargetDependency */, - ); - name = RIBsTests; - productName = RIBsTests; - productReference = 8B9882EB1F86E1CF00ABE009 /* RIBsTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 8B9882D91F86E1CF00ABE009 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = "Uber Technologies"; - TargetAttributes = { - 8B9882E11F86E1CF00ABE009 = { - CreatedOnToolsVersion = 9.0; - LastSwiftMigration = 1000; - ProvisioningStyle = Automatic; - }; - 8B9882EA1F86E1CF00ABE009 = { - CreatedOnToolsVersion = 9.0; - LastSwiftMigration = 1000; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 8B9882DC1F86E1CF00ABE009 /* Build configuration list for PBXProject "RIBs" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 8B9882D81F86E1CF00ABE009; - productRefGroup = 8B9882E31F86E1CF00ABE009 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8B9882E11F86E1CF00ABE009 /* RIBs */, - 8B9882EA1F86E1CF00ABE009 /* RIBsTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8B9882E01F86E1CF00ABE009 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8B9882E91F86E1CF00ABE009 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - AF8C6C9B1FBC8D3D00C61033 /* Carthage */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/../Carthage/Build/iOS/RxSwift.framework", - "$(SRCROOT)/../Carthage/Build/iOS/RxRelay.framework", - ); - name = Carthage; - outputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxSwift.framework", - "$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxRelay.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/usr/local/bin/carthage copy-frameworks\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8B9882DD1F86E1CF00ABE009 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4131773A1F8EF711005F08F0 /* LeakDetector.swift in Sources */, - 418C175C1F97F19F003C03F7 /* Component.swift in Sources */, - 4131773D1F8EF98A005F08F0 /* Foundation+Extensions.swift in Sources */, - 4131772E1F8EF5FF005F08F0 /* LaunchRouter.swift in Sources */, - 413177391F8EF70F005F08F0 /* Executor.swift in Sources */, - 413177341F8EF602005F08F0 /* Worker.swift in Sources */, - 418C175D1F97F1A1003C03F7 /* Dependency.swift in Sources */, - 4131772D1F8EF5FF005F08F0 /* Interactor.swift in Sources */, - 413177321F8EF5FF005F08F0 /* ViewableRouter.swift in Sources */, - 413177351F8EF605005F08F0 /* Workflow.swift in Sources */, - 4131772F1F8EF5FF005F08F0 /* PresentableInteractor.swift in Sources */, - 4131772C1F8EF5FF005F08F0 /* Builder.swift in Sources */, - 413177331F8EF5FF005F08F0 /* ViewControllable.swift in Sources */, - 413177311F8EF5FF005F08F0 /* Router.swift in Sources */, - 413177301F8EF5FF005F08F0 /* Presenter.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8B9882E71F86E1CF00ABE009 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AFB7D4031FC81C8F00045D2B /* Foundation+ExtensionsTests.swift in Sources */, - AF90B4111FBA185E00920384 /* ComponentTests.swift in Sources */, - AFB7D4051FC81D6100045D2B /* LaunchRouterTests.swift in Sources */, - AF90B4141FBA18DB00920384 /* WorkerTests.swift in Sources */, - AF90B4191FBA1F8500920384 /* WorkflowTests.swift in Sources */, - AF90B40A1FBA14DB00920384 /* RouterTests.swift in Sources */, - AF90B40C1FBA157700920384 /* Mocks.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 8B9882EE1F86E1CF00ABE009 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 8B9882E11F86E1CF00ABE009 /* RIBs */; - targetProxy = 8B9882ED1F86E1CF00ABE009 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 8B9882F41F86E1CF00ABE009 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 8B9882F51F86E1CF00ABE009 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 8B9882F71F86E1CF00ABE009 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PRODUCTS_DIR)../Carthage/Build/iOS/", - ); - INFOPLIST_FILE = RIBs/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.uber.RIBs; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 8B9882F81F86E1CF00ABE009 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PRODUCTS_DIR)../Carthage/Build/iOS/", - ); - INFOPLIST_FILE = RIBs/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.uber.RIBs; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 8B9882FA1F86E1CF00ABE009 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; - CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PRODUCTS_DIR)../Carthage/Build/iOS/", - ); - INFOPLIST_FILE = RIBsTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.uber.RIBsTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 8B9882FB1F86E1CF00ABE009 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; - CODE_SIGN_STYLE = Automatic; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PRODUCTS_DIR)../Carthage/Build/iOS/", - ); - INFOPLIST_FILE = RIBsTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.uber.RIBsTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 8B9882DC1F86E1CF00ABE009 /* Build configuration list for PBXProject "RIBs" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8B9882F41F86E1CF00ABE009 /* Debug */, - 8B9882F51F86E1CF00ABE009 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8B9882F61F86E1CF00ABE009 /* Build configuration list for PBXNativeTarget "RIBs" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8B9882F71F86E1CF00ABE009 /* Debug */, - 8B9882F81F86E1CF00ABE009 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8B9882F91F86E1CF00ABE009 /* Build configuration list for PBXNativeTarget "RIBsTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8B9882FA1F86E1CF00ABE009 /* Debug */, - 8B9882FB1F86E1CF00ABE009 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 8B9882D91F86E1CF00ABE009 /* Project object */; -} diff --git a/ios/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme b/ios/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme deleted file mode 100644 index 97e346f32..000000000 --- a/ios/RIBs.xcodeproj/xcshareddata/xcschemes/RIBs.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/RIBs/Classes/Builder.swift b/ios/RIBs/Classes/Builder.swift deleted file mode 100644 index 9f16e9d22..000000000 --- a/ios/RIBs/Classes/Builder.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -/// The base builder protocol that all builders should conform to. -public protocol Buildable: AnyObject {} - -/// Utility that instantiates a RIB and sets up its internal wirings. -open class Builder: Buildable { - - /// The dependency used for this builder to build the RIB. - public let dependency: DependencyType - - /// Initializer. - /// - /// - parameter dependency: The dependency used for this builder to build the RIB. - public init(dependency: DependencyType) { - self.dependency = dependency - } -} diff --git a/ios/RIBs/Classes/ComponentizedBuilder.swift b/ios/RIBs/Classes/ComponentizedBuilder.swift deleted file mode 100644 index 7bf4790f1..000000000 --- a/ios/RIBs/Classes/ComponentizedBuilder.swift +++ /dev/null @@ -1,145 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -/// Utility that instantiates a RIB and sets up its internal wirings. -/// This class ensures the strict one to one relationship between a -/// new instance of the RIB and a single new instance of the component. -/// Every time a new RIB is built a new instance of the corresponding -/// component is also instantiated. -/// -/// This is the most generic version of the builder class that supports -/// both dynamic dependencies injected when building the RIB as well -/// as dynamic dependencies for instantiating the component. For more -/// convenient base class, please refer to `SimpleComponentizedBuilder`. -/// -/// - note: Subclasses should override the `build(with)` method to -/// implement the actual RIB building logic, with the given component -/// and dynamic dependency. -/// - SeeAlso: SimpleComponentizedBuilder -open class ComponentizedBuilder: Buildable { - - // Builder should not directly retain an instance of the component. - // That would make the component's lifecycle longer than the built - // RIB. Instead, whenever a new instance of the RIB is built, a new - // instance of the DI component should also be instantiated. - - /// Initializer. - /// - /// - parameter componentBuilder: The closure to instantiate a new - /// instance of the DI component that should be paired with this RIB. - public init(componentBuilder: @escaping (DynamicComponentDependency) -> Component) { - self.componentBuilder = componentBuilder - } - - /// Build a new instance of the RIB with the given dynamic dependencies. - /// - /// - parameter dynamicBuildDependency: The dynamic dependency to use - /// to build the RIB. - /// - parameter dynamicComponentDependency: The dynamic dependency to - /// use to instantiate the component. - /// - returns: The router of the RIB. - public final func build(withDynamicBuildDependency dynamicBuildDependency: DynamicBuildDependency, dynamicComponentDependency: DynamicComponentDependency) -> Router { - return build(withDynamicBuildDependency: dynamicBuildDependency, dynamicComponentDependency: dynamicComponentDependency).1 - } - - /// Build a new instance of the RIB with the given dynamic dependencies. - /// - /// - parameter dynamicBuildDependency: The dynamic dependency to use - /// to build the RIB. - /// - parameter dynamicComponentDependency: The dynamic dependency to - /// use to instantiate the component. - /// - returns: The tuple of component and router of the RIB. - public final func build(withDynamicBuildDependency dynamicBuildDependency: DynamicBuildDependency, dynamicComponentDependency: DynamicComponentDependency) -> (Component, Router) { - let component = componentBuilder(dynamicComponentDependency) - - // Ensure each componentBuilder invocation produces a new component - // instance. - let newComponent = component as AnyObject - if lastComponent === newComponent { - assertionFailure("\(self) componentBuilder should produce new instances of component when build is invoked.") - } - lastComponent = newComponent - - return (component, build(with: component, dynamicBuildDependency)) - } - - /// Abstract method that must be overriden to implement the RIB building - /// logic using the given component and dynamic dependency. - /// - /// - note: This method should never be invoked directly. Instead - /// consumers of this builder should invoke `build(with dynamicDependency:)`. - /// - parameter component: The corresponding DI component to use. - /// - parameter dynamicBuildDependency: The given dynamic dependency. - /// - returns: The router of the RIB. - open func build(with component: Component, _ dynamicBuildDependency: DynamicBuildDependency) -> Router { - fatalError("This method should be overridden by the subclass.") - } - - // MARK: - Private - - private let componentBuilder: (DynamicComponentDependency) -> Component - private weak var lastComponent: AnyObject? -} - -/// A convenient base builder class that does not require any build or -/// component dynamic dependencies. -/// -/// - note: If the build method requires dynamic dependency, please -/// refer to `DynamicBuildComponentizedBuilder`. If component instantiation -/// requires dynamic dependency, please refer to `DynamicComponentizedBuilder`. -/// If both require dynamic dependencies, please use `ComponentizedBuilder`. -/// - SeeAlso: ComponentizedBuilder -open class SimpleComponentizedBuilder: ComponentizedBuilder { - - /// Initializer. - /// - /// - parameter componentBuilder: The closure to instantiate a new - /// instance of the DI component that should be paired with this RIB. - #if compiler(>=5.0) - public init(componentBuilder: @escaping () -> Component) { - super.init(componentBuilder: componentBuilder) - } - #else - public override init(componentBuilder: @escaping () -> Component) { - super.init(componentBuilder: componentBuilder) - } - #endif - - /// This method should not be directly invoked. - public final override func build(with component: Component, _ dynamicDependency: ()) -> Router { - return build(with: component) - } - - /// Abstract method that must be overriden to implement the RIB building - /// logic using the given component. - /// - /// - note: This method should never be invoked directly. Instead - /// consumers of this builder should invoke `build(with dynamicDependency:)`. - /// - parameter component: The corresponding DI component to use. - /// - returns: The router of the RIB. - open func build(with component: Component) -> Router { - fatalError("This method should be overriden by the subclass.") - } - - /// Build a new instance of the RIB. - /// - /// - returns: The router of the RIB. - public final func build() -> Router { - return build(withDynamicBuildDependency: (), dynamicComponentDependency: ()) - } -} diff --git a/ios/RIBs/Classes/DI/Component.swift b/ios/RIBs/Classes/DI/Component.swift deleted file mode 100644 index 4a178ff58..000000000 --- a/ios/RIBs/Classes/DI/Component.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -/// The base class for all components. -/// -/// A component defines private properties a RIB provides to its internal `Router`, `Interactor`, `Presenter` and -/// view units, as well as public properties to its child RIBs. -/// -/// A component subclass implementation should conform to child 'Dependency' protocols, defined by all of its immediate -/// children. -open class Component: Dependency { - - /// The dependency of this `Component`. - public let dependency: DependencyType - - /// Initializer. - /// - /// - parameter dependency: The dependency of this `Component`, usually provided by the parent `Component`. - public init(dependency: DependencyType) { - self.dependency = dependency - } - - /// Used to create a shared dependency in your `Component` sub-class. Shared dependencies are retained and reused - /// by the component. Each dependent asking for this dependency will receive the same instance while the component - /// is alive. - /// - /// - note: Any shared dependency's constructor may not switch threads as this might cause a deadlock. - /// - /// - parameter factory: The closure to construct the dependency. - /// - returns: The instance. - public final func shared(__function: String = #function, _ factory: () -> T) -> T { - lock.lock() - defer { - lock.unlock() - } - - // Additional nil coalescing is needed to mitigate a Swift bug appearing in Xcode 10. - // see https://bugs.swift.org/browse/SR-8704. - // Without this measure, calling `shared` from a function that returns an optional type - // will always pass the check below and return nil if the instance is not initialized. - if let instance = (sharedInstances[__function] as? T?) ?? nil { - return instance - } - - let instance = factory() - sharedInstances[__function] = instance - - return instance - } - - // MARK: - Private - - private var sharedInstances = [String: Any]() - private let lock = NSRecursiveLock() -} - -/// The special empty component. -open class EmptyComponent: EmptyDependency { - - /// Initializer. - public init() {} -} diff --git a/ios/RIBs/Classes/DI/Dependency.swift b/ios/RIBs/Classes/DI/Dependency.swift deleted file mode 100644 index a45cc1712..000000000 --- a/ios/RIBs/Classes/DI/Dependency.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -/// The base dependency protocol. -/// -/// Subclasses should define a set of properties that are required by the module from the DI graph. A dependency is -/// typically provided and satisfied by its immediate parent module. -public protocol Dependency: AnyObject {} - -/// The special empty dependency. -public protocol EmptyDependency: Dependency {} diff --git a/ios/RIBs/Classes/Extensions/Foundation+Extensions.swift b/ios/RIBs/Classes/Extensions/Foundation+Extensions.swift deleted file mode 100644 index 7976c632c..000000000 --- a/ios/RIBs/Classes/Extensions/Foundation+Extensions.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -/// Array extensions. -public extension Array { - - /// Remove the given element from this array, by comparing pointer references. - /// - /// - parameter element: The element to remove. - mutating func removeElementByReference(_ element: Element) { - guard let objIndex = firstIndex(where: { $0 as AnyObject === element as AnyObject }) else { - return - } - remove(at: objIndex) - } -} diff --git a/ios/RIBs/Classes/Interactor.swift b/ios/RIBs/Classes/Interactor.swift deleted file mode 100644 index d80ded2c9..000000000 --- a/ios/RIBs/Classes/Interactor.swift +++ /dev/null @@ -1,207 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation -import RxSwift -import UIKit - -/// Protocol defining the activeness of an interactor's scope. -public protocol InteractorScope: AnyObject { - - // The following properties must be declared in the base protocol, since `Router` internally invokes these methods. - // In order to unit test router with a mock interactor, the mocked interactor first needs to conform to the custom - // subclass interactor protocol, and also this base protocol to allow the `Router` implementation to execute base - // class logic without error. - - /// Indicates if the interactor is active. - var isActive: Bool { get } - - /// The lifecycle of this interactor. - /// - /// - note: Subscription to this stream always immediately returns the last event. This stream terminates after - /// the interactor is deallocated. - var isActiveStream: Observable { get } -} - -/// The base protocol for all interactors. -public protocol Interactable: InteractorScope { - - // The following methods must be declared in the base protocol, since `Router` internally invokes these methods. - // In order to unit test router with a mock interactor, the mocked interactor first needs to conform to the custom - // subclass interactor protocol, and also this base protocol to allow the `Router` implementation to execute base - // class logic without error. - - /// Activate this interactor. - /// - /// - note: This method is internally invoked by the corresponding router. Application code should never explicitly - /// invoke this method. - func activate() - - /// Deactivate this interactor. - /// - /// - note: This method is internally invoked by the corresponding router. Application code should never explicitly - /// invoke this method. - func deactivate() -} - -/// An `Interactor` defines a unit of business logic that corresponds to a router unit. -/// -/// An `Interactor` has a lifecycle driven by its owner router. When the corresponding router is attached to its -/// parent, its interactor becomes active. And when the router is detached from its parent, its `Interactor` resigns -/// active. -/// -/// An `Interactor` should only perform its business logic when it's currently active. -open class Interactor: Interactable { - - /// Indicates if the interactor is active. - public final var isActive: Bool { - do { - return try isActiveSubject.value() - } catch { - return false - } - } - - /// A stream notifying on the lifecycle of this interactor. - public final var isActiveStream: Observable { - return isActiveSubject.asObservable().distinctUntilChanged() - } - - /// Initializer. - public init() { - // No-op - } - - /// Activate the `Interactor`. - /// - /// - note: This method is internally invoked by the corresponding router. Application code should never explicitly - /// invoke this method. - public final func activate() { - guard !isActive else { - return - } - - activenessDisposable = CompositeDisposable() - - isActiveSubject.onNext(true) - - didBecomeActive() - } - - /// The interactor did become active. - /// - /// - note: This method is driven by the attachment of this interactor's owner router. Subclasses should override - /// this method to setup subscriptions and initial states. - open func didBecomeActive() { - // No-op - } - - /// Deactivate this `Interactor`. - /// - /// - note: This method is internally invoked by the corresponding router. Application code should never explicitly - /// invoke this method. - public final func deactivate() { - guard isActive else { - return - } - - willResignActive() - - activenessDisposable?.dispose() - activenessDisposable = nil - - isActiveSubject.onNext(false) - } - - /// Called when the `Interactor` will resign the active state. - /// - /// This method is driven by the detachment of this interactor's owner router. Subclasses should override this - /// method to cleanup any resources and states of the `Interactor`. The default implementation does nothing. - open func willResignActive() { - // No-op - } - - // MARK: - Private - - private let isActiveSubject = BehaviorSubject(value: false) - fileprivate var activenessDisposable: CompositeDisposable? - - deinit { - if isActive { - deactivate() - } - isActiveSubject.onCompleted() - } -} - -/// Interactor related `Observable` extensions. -public extension ObservableType { - - /// Confines the observable's subscription to the given interactor scope. The subscription is only triggered - /// after the interactor scope is active and before the interactor scope resigns active. This composition - /// delays the subscription but does not dispose the subscription, when the interactor scope becomes inactive. - /// - /// - note: This method should only be used for subscriptions outside of an `Interactor`, for cases where a - /// piece of logic is only executed when the bound interactor scope is active. - /// - /// - note: Only the latest value from this observable is emitted. Values emitted when the interactor is not - /// active, are ignored. - /// - /// - parameter interactorScope: The interactor scope whose activeness this observable is confined to. - /// - returns: The `Observable` confined to this interactor's activeness lifecycle. - - func confineTo(_ interactorScope: InteractorScope) -> Observable { - return Observable - .combineLatest(interactorScope.isActiveStream, self) { isActive, value in - (isActive, value) - } - .filter { isActive, value in - isActive - } - .map { isActive, value in - value - } - } -} - -/// Interactor related `Disposable` extensions. -public extension Disposable { - - /// Disposes the subscription based on the lifecycle of the given `Interactor`. The subscription is disposed - /// when the interactor is deactivated. - /// - /// - note: This is the preferred method when trying to confine a subscription to the lifecycle of an - /// `Interactor`. - /// - /// When using this composition, the subscription closure may freely retain the interactor itself, since the - /// subscription closure is disposed once the interactor is deactivated, thus releasing the retain cycle before - /// the interactor needs to be deallocated. - /// - /// If the given interactor is inactive at the time this method is invoked, the subscription is immediately - /// terminated. - /// - /// - parameter interactor: The interactor to dispose the subscription based on. - @discardableResult - func disposeOnDeactivate(interactor: Interactor) -> Disposable { - if let activenessDisposable = interactor.activenessDisposable { - _ = activenessDisposable.insert(self) - } else { - dispose() - print("Subscription immediately terminated, since \(interactor) is inactive.") - } - return self - } -} diff --git a/ios/RIBs/Classes/LaunchRouter.swift b/ios/RIBs/Classes/LaunchRouter.swift deleted file mode 100644 index d50dc201a..000000000 --- a/ios/RIBs/Classes/LaunchRouter.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import UIKit - -/// The root `Router` of an application. -public protocol LaunchRouting: ViewableRouting { - - /// Launches the router tree. - /// - /// - parameter window: The application window to launch from. - func launch(from window: UIWindow) -} - -/// The application root router base class, that acts as the root of the router tree. -open class LaunchRouter: ViewableRouter, LaunchRouting { - - /// Initializer. - /// - /// - parameter interactor: The corresponding `Interactor` of this `Router`. - /// - parameter viewController: The corresponding `ViewController` of this `Router`. - public override init(interactor: InteractorType, viewController: ViewControllerType) { - super.init(interactor: interactor, viewController: viewController) - } - - /// Launches the router tree. - /// - /// - parameter window: The window to launch the router tree in. - public final func launch(from window: UIWindow) { - window.rootViewController = viewControllable.uiviewController - window.makeKeyAndVisible() - - interactable.activate() - load() - } -} diff --git a/ios/RIBs/Classes/LeakDetector/Executor.swift b/ios/RIBs/Classes/LeakDetector/Executor.swift deleted file mode 100644 index 017c4b416..000000000 --- a/ios/RIBs/Classes/LeakDetector/Executor.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Dispatch -import Foundation -import RxSwift - -public class Executor { - - /// Execute the given logic after the given delay assuming the given maximum frame duration. - /// - /// This allows excluding the time elapsed due to breakpoint pauses. - /// - /// - note: The logic closure is not guaranteed to be performed exactly after the given delay. It may be performed - /// later if the actual frame duration exceeds the given maximum frame duration. - /// - /// - parameter delay: The delay to perform the logic, excluding any potential elapsed time due to breakpoint - /// pauses. - /// - parameter maxFrameDuration: The maximum duration a single frame should take. Defaults to 33ms. - /// - parameter logic: The closure logic to perform. - public static func execute(withDelay delay: TimeInterval, maxFrameDuration: Int = 33, logic: @escaping () -> ()) { - let period = DispatchTimeInterval.milliseconds(maxFrameDuration / 3) - var lastRunLoopTime = Date().timeIntervalSinceReferenceDate - var properFrameTime = 0.0 - var didExecute = false - _ = Observable - .timer(DispatchTimeInterval.milliseconds(0), period: period, scheduler: MainScheduler.instance) - .take(while: { _ in - !didExecute - }) - .subscribe(onNext: { _ in - let currentTime = Date().timeIntervalSinceReferenceDate - let trueElapsedTime = currentTime - lastRunLoopTime - lastRunLoopTime = currentTime - - // If we did drop frame, we under-count the frame duration, which is fine. It - // just means the logic is performed slightly later. - let boundedElapsedTime = min(trueElapsedTime, Double(maxFrameDuration) / 1000) - properFrameTime += boundedElapsedTime - if properFrameTime > delay { - didExecute = true - - logic() - } - }) - } -} diff --git a/ios/RIBs/Classes/LeakDetector/LeakDetector.swift b/ios/RIBs/Classes/LeakDetector/LeakDetector.swift deleted file mode 100644 index 8e896b058..000000000 --- a/ios/RIBs/Classes/LeakDetector/LeakDetector.swift +++ /dev/null @@ -1,194 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift -import RxRelay -import UIKit - -/// Leak detection status. -public enum LeakDetectionStatus { - - /// Leak detection is in progress. - case InProgress - - /// Leak detection has completed. - case DidComplete -} - -/// The default time values used for leak detection expectations. -public struct LeakDefaultExpectationTime { - - /// The object deallocation time. - public static let deallocation = 1.0 - - /// The view disappear time. - public static let viewDisappear = 5.0 -} - -/// The handle for a scheduled leak detection. -public protocol LeakDetectionHandle { - - /// Cancel the scheduled detection. - func cancel() -} - -/// An expectation based leak detector, that allows an object's owner to set an expectation that an owned object to be -/// deallocated within a time frame. -/// -/// A `Router` that owns an `Interactor` might for example expect its `Interactor` be deallocated when the `Router` -/// itself is deallocated. If the interactor does not deallocate in time, a runtime assert is triggered, along with -/// critical logging. -public class LeakDetector { - - /// The singleton instance. - public static let instance = LeakDetector() - - /// The status of leak detection. - /// - /// The status changes between InProgress and DidComplete as units register for new detections, cancel existing - /// detections, and existing detections complete. - public var status: Observable { - return expectationCount - .asObservable() - .map { expectationCount in - expectationCount > 0 ? LeakDetectionStatus.InProgress : LeakDetectionStatus.DidComplete - } - .distinctUntilChanged() - } - - /// Sets up an expectation for the given object to be deallocated within the given time. - /// - /// - parameter object: The object to track for deallocation. - /// - parameter inTime: The time the given object is expected to be deallocated within. - /// - returns: The handle that can be used to cancel the expectation. - @discardableResult - public func expectDeallocate(object: AnyObject, inTime time: TimeInterval = LeakDefaultExpectationTime.deallocation) -> LeakDetectionHandle { - expectationCount.accept(expectationCount.value + 1) - - let objectDescription = String(describing: object) - let objectId = String(ObjectIdentifier(object).hashValue) as NSString - trackingObjects.setObject(object, forKey: objectId) - - let handle = LeakDetectionHandleImpl { - self.expectationCount.accept(self.expectationCount.value - 1) - } - - Executor.execute(withDelay: time) { - // Retain the handle so we can check for the cancelled status. Also cannot use the cancellable - // concurrency API since the returned handle must be retained to ensure closure is executed. - if !handle.cancelled { - let didDeallocate = (self.trackingObjects.object(forKey: objectId) == nil) - let message = "<\(objectDescription): \(objectId)> has leaked. Objects are expected to be deallocated at this time: \(self.trackingObjects)" - - if self.disableLeakDetector { - if !didDeallocate { - print("Leak detection is disabled. This should only be used for debugging purposes.") - print(message) - } - } else { - assert(didDeallocate, message) - } - } - - self.expectationCount.accept(self.expectationCount.value - 1) - } - - return handle - } - - /// Sets up an expectation for the given view controller to disappear within the given time. - /// - /// - parameter viewController: The `UIViewController` expected to disappear. - /// - parameter inTime: The time the given view controller is expected to disappear. - /// - returns: The handle that can be used to cancel the expectation. - @discardableResult - public func expectViewControllerDisappear(viewController: UIViewController, inTime time: TimeInterval = LeakDefaultExpectationTime.viewDisappear) -> LeakDetectionHandle { - expectationCount.accept(expectationCount.value + 1) - - let handle = LeakDetectionHandleImpl { - self.expectationCount.accept(self.expectationCount.value - 1) - } - - Executor.execute(withDelay: time) { [weak viewController] in - // Retain the handle so we can check for the cancelled status. Also cannot use the cancellable - // concurrency API since the returned handle must be retained to ensure closure is executed. - if let viewController = viewController, !handle.cancelled { - let viewDidDisappear = (!viewController.isViewLoaded || viewController.view.window == nil) - let message = "\(viewController) appearance has leaked. Either its parent router who does not own a view controller was detached, but failed to dismiss the leaked view controller; or the view controller is reused and re-added to window, yet the router is not re-attached but re-created. Objects are expected to be deallocated at this time: \(self.trackingObjects)" - - if self.disableLeakDetector { - if !viewDidDisappear { - print("Leak detection is disabled. This should only be used for debugging purposes.") - print(message) - } - } else { - assert(viewDidDisappear, message) - } - } - - self.expectationCount.accept(self.expectationCount.value - 1) - } - - return handle - } - - // MARK: - Internal Interface - - // Test override for leak detectors. - static var disableLeakDetectorOverride: Bool = false - - #if DEBUG - /// Reset the state of Leak Detector, internal for UI test only. - func reset() { - trackingObjects.removeAllObjects() - expectationCount.accept(0) - } - #endif - - // MARK: - Private Interface - - private let trackingObjects = NSMapTable.strongToWeakObjects() - private let expectationCount = BehaviorRelay(value: 0) - - lazy var disableLeakDetector: Bool = { - if let environmentValue = ProcessInfo().environment["DISABLE_LEAK_DETECTION"] { - let lowercase = environmentValue.lowercased() - return lowercase == "yes" || lowercase == "true" - } - return LeakDetector.disableLeakDetectorOverride - }() - - private init() {} -} - -fileprivate class LeakDetectionHandleImpl: LeakDetectionHandle { - - var cancelled: Bool { - return cancelledRelay.value - } - - let cancelledRelay = BehaviorRelay(value: false) - let cancelClosure: (() -> ())? - - init(cancelClosure: (() -> ())? = nil) { - self.cancelClosure = cancelClosure - } - - func cancel() { - cancelledRelay.accept(true) - cancelClosure?() - } -} diff --git a/ios/RIBs/Classes/MultiStageComponentizedBuilder.swift b/ios/RIBs/Classes/MultiStageComponentizedBuilder.swift deleted file mode 100644 index b8a95c73a..000000000 --- a/ios/RIBs/Classes/MultiStageComponentizedBuilder.swift +++ /dev/null @@ -1,145 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -/// The base class of a builder that involves multiple stages of building -/// a RIB. Witin the same pass, accesses to the component property shares -/// the same instance. Once `finalStageBuild` is invoked, a new instance -/// is returned from the component property, representing a new pass of -/// the multi-stage building process. -/// -/// - SeeAlso: SimpleMultiStageComponentizedBuilder -open class MultiStageComponentizedBuilder: Buildable { - - // Builder should not directly retain an instance of the component. - // That would make the component's lifecycle longer than the built - // RIB. Instead, whenever a new instance of the RIB is built, a new - // instance of the DI component should also be instantiated. - - /// The DI component used for the current iteration of the multi- - /// stage build process. Once `finalStageBuild` method is invoked, - /// this property returns a separate new instance representing a - /// new pass of the multi-stage building process. - public var componentForCurrentBuildPass: Component { - if let currentPassComponent = currentPassComponent { - return currentPassComponent - } else { - let currentPassComponent = componentBuilder() - - // Ensure each invocation of componentBuilder produces a new - // component instance. - let newComponent = currentPassComponent as AnyObject - if lastComponent === newComponent { - assertionFailure("\(self) componentBuilder should produce new instances of component when build is invoked.") - } - lastComponent = newComponent - - self.currentPassComponent = currentPassComponent - return currentPassComponent - } - } - - /// Initializer. - /// - /// - parameter componentBuilder: The closure to instantiate a new - /// instance of the DI component that should be paired with this RIB. - public init(componentBuilder: @escaping () -> Component) { - self.componentBuilder = componentBuilder - } - - /// Build a new instance of the RIB with the given dynamic dependency - /// as the last stage of this mult-stage building process. - /// - /// - note: Subsequent access to the `component` property after this - /// method is returned will result in a separate new instance of the - /// component, representing a new pass of the multi-stage building - /// process. - /// - parameter dynamicDependency: The dynamic dependency to use. - /// - returns: The router of the RIB. - public final func finalStageBuild(withDynamicDependency dynamicDependency: DynamicBuildDependency) -> Router { - let router = finalStageBuild(with: componentForCurrentBuildPass, dynamicDependency) - defer { - currentPassComponent = nil - } - return router - } - - /// Abstract method that must be overriden to implement the RIB building - /// logic using the given component and dynamic dependency, as the last - /// building stage. - /// - /// - note: This method should never be invoked directly. Instead - /// consumers of this builder should invoke `finalStageBuild(with dynamicDependency:)`. - /// - parameter component: The corresponding DI component to use. - /// - parameter dynamicDependency: The given dynamic dependency. - /// - returns: The router of the RIB. - open func finalStageBuild(with component: Component, _ dynamicDependency: DynamicBuildDependency) -> Router { - fatalError("This method should be overridden by the subclass.") - } - - // MARK: - Private - - private let componentBuilder: () -> Component - private var currentPassComponent: Component? - private weak var lastComponent: AnyObject? -} - -/// A convenient base multi-stage builder class that does not require any -/// build dynamic dependencies. -/// -/// - note: If the build method requires dynamic dependency, please -/// refer to `MultiStageComponentizedBuilder`. -/// -/// - SeeAlso: MultiStageComponentizedBuilder -open class SimpleMultiStageComponentizedBuilder: MultiStageComponentizedBuilder { - - /// Initializer. - /// - /// - parameter componentBuilder: The closure to instantiate a new - /// instance of the DI component that should be paired with this RIB. - public override init(componentBuilder: @escaping () -> Component) { - super.init(componentBuilder: componentBuilder) - } - - /// This method should not be directly invoked. - public final override func finalStageBuild(with component: Component, _ dynamicDependency: ()) -> Router { - return finalStageBuild(with: component) - } - - /// Abstract method that must be overriden to implement the RIB building - /// logic using the given component. - /// - /// - note: This method should never be invoked directly. Instead - /// consumers of this builder should invoke `finalStageBuild()`. - /// - parameter component: The corresponding DI component to use. - /// - returns: The router of the RIB. - open func finalStageBuild(with component: Component) -> Router { - fatalError("This method should be overridden by the subclass.") - } - - /// Build a new instance of the RIB as the last stage of this mult- - /// stage building process. - /// - /// - note: Subsequent access to the `component` property after this - /// method is returned will result in a separate new instance of the - /// component, representing a new pass of the multi-stage building - /// process. - /// - returns: The router of the RIB. - public final func finalStageBuild() -> Router { - return finalStageBuild(withDynamicDependency: ()) - } -} diff --git a/ios/RIBs/Classes/PresentableInteractor.swift b/ios/RIBs/Classes/PresentableInteractor.swift deleted file mode 100644 index bafdccda7..000000000 --- a/ios/RIBs/Classes/PresentableInteractor.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -/// Base class of an `Interactor` that actually has an associated `Presenter` and `View`. -open class PresentableInteractor: Interactor { - - /// The `Presenter` associated with this `Interactor`. - public let presenter: PresenterType - - /// Initializer. - /// - /// - note: This holds a strong reference to the given `Presenter`. - /// - /// - parameter presenter: The presenter associated with this `Interactor`. - public init(presenter: PresenterType) { - self.presenter = presenter - } - - // MARK: - Private - - deinit { - LeakDetector.instance.expectDeallocate(object: presenter as AnyObject) - } -} diff --git a/ios/RIBs/Classes/Presenter.swift b/ios/RIBs/Classes/Presenter.swift deleted file mode 100644 index edc1d4f77..000000000 --- a/ios/RIBs/Classes/Presenter.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -/// The base protocol for all `Presenter`s. -public protocol Presentable: AnyObject {} - -/// The base class of all `Presenter`s. A `Presenter` translates business models into values the corresponding -/// `ViewController` can consume and display. It also maps UI events to business logic method, invoked to -/// its listener. -open class Presenter: Presentable { - - /// The view controller of this presenter. - public let viewController: ViewControllerType - - /// Initializer. - /// - /// - parameter viewController: The `ViewController` of this `Pesenters`. - public init(viewController: ViewControllerType) { - self.viewController = viewController - } -} diff --git a/ios/RIBs/Classes/Router.swift b/ios/RIBs/Classes/Router.swift deleted file mode 100644 index de593d05e..000000000 --- a/ios/RIBs/Classes/Router.swift +++ /dev/null @@ -1,227 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift - -/// The lifecycle stages of a router scope. -public enum RouterLifecycle { - - /// Router did load. - case didLoad -} - -/// The scope of a `Router`, defining various lifecycles of a `Router`. -public protocol RouterScope: AnyObject { - - /// An observable that emits values when the router scope reaches its corresponding life-cycle stages. This - /// observable completes when the router scope is deallocated. - var lifecycle: Observable { get } -} - -/// The base protocol for all routers. -public protocol Routing: RouterScope { - - // The following methods must be declared in the base protocol, since `Router` internally invokes these methods. - // In order to unit test router with a mock child router, the mocked child router first needs to conform to the - // custom subclass routing protocol, and also this base protocol to allow the `Router` implementation to execute - // base class logic without error. - - /// The base interactable associated with this `Router`. - var interactable: Interactable { get } - - /// The list of children routers of this `Router`. - var children: [Routing] { get } - - /// Loads the `Router`. - /// - /// - note: This method is internally used by the framework. Application code should never - /// invoke this method explicitly. - func load() - - // We cannot declare the attach/detach child methods to take in concrete `Router` instances, - // since during unit testing, we need to use mocked child routers. - - /// Attaches the given router as a child. - /// - /// - parameter child: The child router to attach. - func attachChild(_ child: Routing) - - /// Detaches the given router from the tree. - /// - /// - parameter child: The child router to detach. - func detachChild(_ child: Routing) -} - -/// The base class of all routers that does not own view controllers, representing application states. -/// -/// A router acts on inputs from its corresponding interactor, to manipulate application state, forming a tree of -/// routers. A router may obtain a view controller through constructor injection to manipulate view controller tree. -/// The DI structure guarantees that the injected view controller must be from one of this router's ancestors. -/// Router drives the lifecycle of its owned `Interactor`. -/// -/// Routers should always use helper builders to instantiate children routers. -open class Router: Routing { - - /// The corresponding `Interactor` owned by this `Router`. - public let interactor: InteractorType - - /// The base `Interactable` associated with this `Router`. - public let interactable: Interactable - - /// The list of children `Router`s of this `Router`. - public final var children: [Routing] = [] - - /// The observable that emits values when the router scope reaches its corresponding life-cycle stages. - /// - /// This observable completes when the router scope is deallocated. - public final var lifecycle: Observable { - return lifecycleSubject.asObservable() - } - - /// Initializer. - /// - /// - parameter interactor: The corresponding `Interactor` of this `Router`. - public init(interactor: InteractorType) { - self.interactor = interactor - guard let interactable = interactor as? Interactable else { - fatalError("\(interactor) should conform to \(Interactable.self)") - } - self.interactable = interactable - } - - /// Loads the `Router`. - /// - /// - note: This method is internally used by the framework. Application code should never invoke this method - /// explicitly. - public final func load() { - guard !didLoadFlag else { - return - } - - didLoadFlag = true - internalDidLoad() - didLoad() - } - - /// Called when the router has finished loading. - /// - /// This method is invoked only once. Subclasses should override this method to perform one time setup logic, - /// such as attaching immutable children. The default implementation does nothing. - open func didLoad() { - // No-op - } - - // We cannot declare the attach/detach child methods to take in concrete `Router` instances, - // since during unit testing, we need to use mocked child routers. - - /// Attaches the given router as a child. - /// - /// - parameter child: The child `Router` to attach. - public final func attachChild(_ child: Routing) { - assert(!(children.contains { $0 === child }), "Attempt to attach child: \(child), which is already attached to \(self).") - - children.append(child) - - // Activate child first before loading. Router usually attaches immutable children in didLoad. - // We need to make sure the RIB is activated before letting it attach immutable children. - child.interactable.activate() - child.load() - } - - /// Detaches the given `Router` from the tree. - /// - /// - parameter child: The child `Router` to detach. - public final func detachChild(_ child: Routing) { - child.interactable.deactivate() - - children.removeElementByReference(child) - } - - // MARK: - Internal - - let deinitDisposable = CompositeDisposable() - - func internalDidLoad() { - bindSubtreeActiveState() - lifecycleSubject.onNext(.didLoad) - } - - // MARK: - Private - - private let lifecycleSubject = PublishSubject() - private var didLoadFlag: Bool = false - - private func bindSubtreeActiveState() { - - let disposable = interactable.isActiveStream - // Do not retain self here to guarantee execution. Retaining self will cause the dispose bag - // to never be disposed, thus self is never deallocated. Also cannot just store the disposable - // and call dispose(), since we want to keep the subscription alive until deallocation, in - // case the router is re-attached. Using weak does require the router to be retained until its - // interactor is deactivated. - .subscribe(onNext: { [weak self] (isActive: Bool) in - // When interactor becomes active, we are attached to parent, otherwise we are detached. - self?.setSubtreeActive(isActive) - }) - _ = deinitDisposable.insert(disposable) - } - - private func setSubtreeActive(_ active: Bool) { - - if active { - iterateSubtree(self) { router in - if !router.interactable.isActive { - router.interactable.activate() - } - } - } else { - iterateSubtree(self) { router in - if router.interactable.isActive { - router.interactable.deactivate() - } - } - } - } - - private func iterateSubtree(_ root: Routing, closure: (_ node: Routing) -> ()) { - closure(root) - - for child in root.children { - iterateSubtree(child, closure: closure) - } - } - - private func detachAllChildren() { - - for child in children { - detachChild(child) - } - } - - deinit { - interactable.deactivate() - - if !children.isEmpty { - detachAllChildren() - } - - lifecycleSubject.onCompleted() - - deinitDisposable.dispose() - - LeakDetector.instance.expectDeallocate(object: interactable) - } -} diff --git a/ios/RIBs/Classes/ViewControllable.swift b/ios/RIBs/Classes/ViewControllable.swift deleted file mode 100644 index 0e27040b5..000000000 --- a/ios/RIBs/Classes/ViewControllable.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import UIKit - -/// Basic interface between a `Router` and the UIKit `UIViewController`. -public protocol ViewControllable: AnyObject { - - var uiviewController: UIViewController { get } -} - -/// Default implementation on `UIViewController` to conform to `ViewControllable` protocol -public extension ViewControllable where Self: UIViewController { - - var uiviewController: UIViewController { - return self - } -} diff --git a/ios/RIBs/Classes/ViewableRouter.swift b/ios/RIBs/Classes/ViewableRouter.swift deleted file mode 100644 index 82488b48d..000000000 --- a/ios/RIBs/Classes/ViewableRouter.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift - -/// The base protocol for all routers that own their own view controllers. -public protocol ViewableRouting: Routing { - - // The following methods must be declared in the base protocol, since `Router` internally invokes these methods. - // In order to unit test router with a mock child router, the mocked child router first needs to conform to the - // custom subclass routing protocol, and also this base protocol to allow the `Router` implementation to execute - // base class logic without error. - - /// The base view controllable associated with this `Router`. - var viewControllable: ViewControllable { get } -} - -/// The base class of all routers that owns view controllers, representing application states. -/// -/// A `Router` acts on inputs from its corresponding interactor, to manipulate application state and view state, -/// forming a tree of routers that drives the tree of view controllers. Router drives the lifecycle of its owned -/// interactor. `Router`s should always use helper builders to instantiate children `Router`s. -open class ViewableRouter: Router, ViewableRouting { - - /// The corresponding `ViewController` owned by this `Router`. - public let viewController: ViewControllerType - - /// The base `ViewControllable` associated with this `Router`. - public let viewControllable: ViewControllable - - /// Initializer. - /// - /// - parameter interactor: The corresponding `Interactor` of this `Router`. - /// - parameter viewController: The corresponding `ViewController` of this `Router`. - public init(interactor: InteractorType, viewController: ViewControllerType) { - self.viewController = viewController - guard let viewControllable = viewController as? ViewControllable else { - fatalError("\(viewController) should conform to \(ViewControllable.self)") - } - self.viewControllable = viewControllable - - super.init(interactor: interactor) - } - - // MARK: - Internal - - override func internalDidLoad() { - setupViewControllerLeakDetection() - - super.internalDidLoad() - } - - // MARK: - Private - - private var viewControllerDisappearExpectation: LeakDetectionHandle? - - private func setupViewControllerLeakDetection() { - let disposable = interactable.isActiveStream - // Do not retain self here to guarantee execution. Retaining self will cause the dispose bag to never be - // disposed, thus self is never deallocated. Also cannot just store the disposable and call dispose(), - // since we want to keep the subscription alive until deallocation, in case the router is re-attached. - // Using weak does require the router to be retained until its interactor is deactivated. - .subscribe(onNext: { [weak self] (isActive: Bool) in - guard let strongSelf = self else { - return - } - - strongSelf.viewControllerDisappearExpectation?.cancel() - strongSelf.viewControllerDisappearExpectation = nil - - if !isActive { - let viewController = strongSelf.viewControllable.uiviewController - strongSelf.viewControllerDisappearExpectation = LeakDetector.instance.expectViewControllerDisappear(viewController: viewController) - } - }) - _ = deinitDisposable.insert(disposable) - } - - deinit { - LeakDetector.instance.expectDeallocate(object: viewControllable.uiviewController, inTime: LeakDefaultExpectationTime.viewDisappear) - } -} diff --git a/ios/RIBs/Classes/Worker/Worker.swift b/ios/RIBs/Classes/Worker/Worker.swift deleted file mode 100644 index e8f4669dd..000000000 --- a/ios/RIBs/Classes/Worker/Worker.swift +++ /dev/null @@ -1,217 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift - -/// The base protocol of all workers that perform a self-contained piece of logic. -/// -/// `Worker`s are always bound to an `Interactor`. A `Worker` can only start if its bound `Interactor` is active. -/// It is stopped when its bound interactor is deactivated. -public protocol Working: AnyObject { - - /// Starts the `Worker`. - /// - /// If the bound `InteractorScope` is active, this method starts the `Worker` immediately. Otherwise the `Worker` - /// will start when its bound `Interactor` scope becomes active. - /// - /// - parameter interactorScope: The interactor scope this worker is bound to. - func start(_ interactorScope: InteractorScope) - - /// Stops the worker. - /// - /// Unlike `start`, this method always stops the worker immediately. - func stop() - - /// Indicates if the worker is currently started. - var isStarted: Bool { get } - - /// The lifecycle of this worker. - /// - /// Subscription to this stream always immediately returns the last event. This stream terminates after the - /// `Worker` is deallocated. - var isStartedStream: Observable { get } -} - -/// The base `Worker` implementation. -open class Worker: Working { - - /// Indicates if the `Worker` is started. - public final var isStarted: Bool { - do { - return try isStartedSubject.value() - } catch { - return false - } - } - - /// The lifecycle stream of this `Worker`. - public final var isStartedStream: Observable { - return isStartedSubject - .asObservable() - .distinctUntilChanged() - } - - /// Initializer. - public init() { - // No-op - } - - /// Starts the `Worker`. - /// - /// If the bound `InteractorScope` is active, this method starts the `Worker` immediately. Otherwise the `Worker` - /// will start when its bound `Interactor` scope becomes active. - /// - /// - parameter interactorScope: The interactor scope this worker is bound to. - public final func start(_ interactorScope: InteractorScope) { - guard !isStarted else { - return - } - - stop() - - isStartedSubject.onNext(true) - - // Create a separate scope struct to avoid passing the given scope instance, since usually - // the given instance is the interactor itself. If the interactor holds onto the worker without - // de-referencing it when it becomes inactive, there will be a retain cycle. - let weakInteractorScope = WeakInteractorScope(sourceScope: interactorScope) - bind(to: weakInteractorScope) - } - - /// Called when the the worker has started. - /// - /// Subclasses should override this method and implment any logic that they would want to execute when the `Worker` - /// starts. The default implementation does nothing. - /// - /// - parameter interactorScope: The interactor scope this `Worker` is bound to. - open func didStart(_ interactorScope: InteractorScope) { - - } - - /// Stops the worker. - /// - /// Unlike `start`, this method always stops the worker immediately. - public final func stop() { - guard isStarted else { - return - } - - isStartedSubject.onNext(false) - - executeStop() - } - - /// Called when the worker has stopped. - /// - /// Subclasses should override this method abnd implement any cleanup logic that they might want to execute when - /// the `Worker` stops. The default implementation does noting. - /// - /// - note: All subscriptions added to the disposable provided in the `didStart` method are automatically disposed - /// when the worker stops. - open func didStop() { - // No-op - } - - // MARK: - Private - - private let isStartedSubject = BehaviorSubject(value: false) - fileprivate var disposable: CompositeDisposable? - private var interactorBindingDisposable: Disposable? - - private func bind(to interactorScope: InteractorScope) { - unbindInteractor() - - interactorBindingDisposable = interactorScope.isActiveStream - .subscribe(onNext: { [weak self] (isInteractorActive: Bool) in - if isInteractorActive { - if self?.isStarted == true { - self?.executeStart(interactorScope) - } - } else { - self?.executeStop() - } - }) - } - - private func executeStart(_ interactorScope: InteractorScope) { - disposable = CompositeDisposable() - didStart(interactorScope) - } - - private func executeStop() { - guard let disposable = disposable else { - return - } - - disposable.dispose() - self.disposable = nil - - didStop() - } - - private func unbindInteractor() { - interactorBindingDisposable?.dispose() - interactorBindingDisposable = nil - } - - deinit { - stop() - unbindInteractor() - isStartedSubject.onCompleted() - } -} - -/// Worker related `Disposable` extensions. -public extension Disposable { - - /// Disposes the subscription based on the lifecycle of the given `Worker`. The subscription is disposed when the - /// `Worker` is stopped. - /// - /// If the given worker is stopped at the time this method is invoked, the subscription is immediately terminated. - /// - /// - note: When using this composition, the subscription closure may freely retain the `Worker` itself, since the - /// subscription closure is disposed once the `Worker` is stopped, thus releasing the retain cycle before the - /// `worker` needs to be deallocated. - /// - /// - parameter worker: The `Worker` to dispose the subscription based on. - @discardableResult - func disposeOnStop(_ worker: Worker) -> Disposable { - if let compositeDisposable = worker.disposable { - _ = compositeDisposable.insert(self) - } else { - dispose() - print("Subscription immediately terminated, since \(worker) is stopped.") - } - return self - } -} - -fileprivate class WeakInteractorScope: InteractorScope { - - weak var sourceScope: InteractorScope? - - var isActive: Bool { - return sourceScope?.isActive ?? false - } - - var isActiveStream: Observable { - return sourceScope?.isActiveStream ?? Observable.just(false) - } - - fileprivate init(sourceScope: InteractorScope) { - self.sourceScope = sourceScope - } -} diff --git a/ios/RIBs/Classes/Workflow/Workflow.swift b/ios/RIBs/Classes/Workflow/Workflow.swift deleted file mode 100644 index 472ffa37a..000000000 --- a/ios/RIBs/Classes/Workflow/Workflow.swift +++ /dev/null @@ -1,226 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift - -/// Defines the base class for a sequence of steps that execute a flow through the application RIB tree. -/// -/// At each step of a `Workflow` is a pair of value and actionable item. The value can be used to make logic decisions. -/// The actionable item is invoked to perform logic for the step. Typically the actionable item is the `Interactor` of a -/// RIB. -/// -/// A workflow should always start at the root of the tree. -open class Workflow { - - /// Called when the last step observable is completed. - /// - /// Subclasses should override this method if they want to execute logic at this point in the `Workflow` lifecycle. - /// The default implementation does nothing. - open func didComplete() { - // No-op - } - - /// Called when the `Workflow` is forked. - /// - /// Subclasses should override this method if they want to execute logic at this point in the `Workflow` lifecycle. - /// The default implementation does nothing. - open func didFork() { - // No-op - } - - /// Called when the last step observable is has error. - /// - /// Subclasses should override this method if they want to execute logic at this point in the `Workflow` lifecycle. - /// The default implementation does nothing. - open func didReceiveError(_ error: Error) { - // No-op - } - - /// Initializer. - public init() {} - - /// Execute the given closure as the root step. - /// - /// - parameter onStep: The closure to execute for the root step. - /// - returns: The next step. - public final func onStep(_ onStep: @escaping (ActionableItemType) -> Observable<(NextActionableItemType, NextValueType)>) -> Step { - return Step(workflow: self, observable: subject.asObservable().take(1)) - .onStep { (actionableItem: ActionableItemType, _) in - onStep(actionableItem) - } - } - - /// Subscribe and start the `Workflow` sequence. - /// - /// - parameter actionableItem: The initial actionable item for the first step. - /// - returns: The disposable of this workflow. - public final func subscribe(_ actionableItem: ActionableItemType) -> Disposable { - guard compositeDisposable.count > 0 else { - assertionFailure("Attempt to subscribe to \(self) before it is comitted.") - return Disposables.create() - } - - subject.onNext((actionableItem, ())) - return compositeDisposable - } - - // MARK: - Private - - private let subject = PublishSubject<(ActionableItemType, ())>() - private var didInvokeComplete = false - - /// The composite disposable that contains all subscriptions including the original workflow - /// as well as all the forked ones. - fileprivate let compositeDisposable = CompositeDisposable() - - fileprivate func didCompleteIfNotYet() { - // Since a workflow may be forked to produce multiple subscribed Rx chains, we should - // ensure the didComplete method is only invoked once per Workflow instance. See `Step.commit` - // on why the side-effects must be added at the end of the Rx chains. - guard !didInvokeComplete else { - return - } - didInvokeComplete = true - didComplete() - } -} - -/// Defines a single step in a `Workflow`. -/// -/// A step may produce a next step with a new value and actionable item, eventually forming a sequence of `Workflow` -/// steps. -/// -/// Steps are asynchronous by nature. -open class Step { - - private let workflow: Workflow - private var observable: Observable<(ActionableItemType, ValueType)> - - fileprivate init(workflow: Workflow, observable: Observable<(ActionableItemType, ValueType)>) { - self.workflow = workflow - self.observable = observable - } - - /// Executes the given closure for this step. - /// - /// - parameter onStep: The closure to execute for the `Step`. - /// - returns: The next step. - public final func onStep(_ onStep: @escaping (ActionableItemType, ValueType) -> Observable<(NextActionableItemType, NextValueType)>) -> Step { - let confinedNextStep = observable - .flatMapLatest { (actionableItem, value) -> Observable<(Bool, ActionableItemType, ValueType)> in - // We cannot use generic constraint here since Swift requires constraints be - // satisfied by concrete types, preventing using protocol as actionable type. - if let interactor = actionableItem as? Interactable { - return interactor - .isActiveStream - .map({ (isActive: Bool) -> (Bool, ActionableItemType, ValueType) in - (isActive, actionableItem, value) - }) - } else { - return Observable.just((true, actionableItem, value)) - } - } - .filter { (isActive: Bool, _, _) -> Bool in - isActive - } - .take(1) - .flatMapLatest { (_, actionableItem: ActionableItemType, value: ValueType) -> Observable<(NextActionableItemType, NextValueType)> in - onStep(actionableItem, value) - } - .take(1) - .share() - - return Step(workflow: workflow, observable: confinedNextStep) - } - - /// Executes the given closure when the `Step` produces an error. - /// - /// - parameter onError: The closure to execute when an error occurs. - /// - returns: This step. - public final func onError(_ onError: @escaping ((Error) -> ())) -> Step { - observable = observable.do(onError: onError) - return self - } - - /// Commit the steps of the `Workflow` sequence. - /// - /// - returns: The committed `Workflow`. - @discardableResult - public final func commit() -> Workflow { - // Side-effects must be chained at the last observable sequence, since errors and complete - // events can be emitted by any observables on any steps of the workflow. - let disposable = observable - .do(onError: workflow.didReceiveError, onCompleted: workflow.didCompleteIfNotYet) - .subscribe() - _ = workflow.compositeDisposable.insert(disposable) - return workflow - } - - /// Convert the `Workflow` into an obseravble. - /// - /// - returns: The observable representation of this `Workflow`. - public final func asObservable() -> Observable<(ActionableItemType, ValueType)> { - return observable - } -} - -/// `Workflow` related obervable extensions. -public extension ObservableType { - - /// Fork the step from this obervable. - /// - /// - parameter workflow: The workflow this step belongs to. - /// - returns: The newly forked step in the workflow. `nil` if this observable does not conform to the required - /// generic type of (ActionableItemType, ValueType). - func fork(_ workflow: Workflow) -> Step? { - if let stepObservable = self as? Observable<(ActionableItemType, ValueType)> { - workflow.didFork() - return Step(workflow: workflow, observable: stepObservable) - } - return nil - } -} - -/// `Workflow` related `Disposable` extensions. -public extension Disposable { - - /// Dispose the subscription when the given `Workflow` is disposed. - /// - /// When using this composition, the subscription closure may freely retain the workflow itself, since the - /// subscription closure is disposed once the workflow is disposed, thus releasing the retain cycle before the - /// `Workflow` needs to be deallocated. - /// - /// - note: This is the preferred method when trying to confine a subscription to the lifecycle of a `Workflow`. - /// - /// - parameter workflow: The workflow to dispose the subscription with. - func disposeWith(workflow: Workflow) { - _ = workflow.compositeDisposable.insert(self) - } - - /// Dispose the subscription when the given `Workflow` is disposed. - /// - /// When using this composition, the subscription closure may freely retain the workflow itself, since the - /// subscription closure is disposed once the workflow is disposed, thus releasing the retain cycle before the - /// `Workflow` needs to be deallocated. - /// - /// - note: This is the preferred method when trying to confine a subscription to the lifecycle of a `Workflow`. - /// - /// - parameter workflow: The workflow to dispose the subscription with. - @available(*, deprecated, renamed: "disposeWith(workflow:)") - func disposeWith(worflow: Workflow) { - disposeWith(workflow: worflow) - } -} diff --git a/ios/RIBs/Info.plist b/ios/RIBs/Info.plist deleted file mode 100644 index 992c476d6..000000000 --- a/ios/RIBs/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.9.3 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/ios/RIBs/RIBs.h b/ios/RIBs/RIBs.h deleted file mode 100644 index 154da84db..000000000 --- a/ios/RIBs/RIBs.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#import - -//! Project version number for RIBs. -FOUNDATION_EXPORT double RIBsVersionNumber; - -//! Project version string for RIBs. -FOUNDATION_EXPORT const unsigned char RIBsVersionString[]; diff --git a/ios/RIBsTests/ComponentizedBuilderTests.swift b/ios/RIBsTests/ComponentizedBuilderTests.swift deleted file mode 100644 index f70c1be24..000000000 --- a/ios/RIBsTests/ComponentizedBuilderTests.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@testable import RIBs -import XCTest - -class ComponentizedBuilderTests: XCTestCase { - - func test_componentForCurrentPass_builderReturnsSameInstance_verifyAssertion() { - let component = MockComponent() - let sameInstanceBuilder = MockComponentizedBuilder { - return component - } - sameInstanceBuilder.buildHandler = { component, _ in - return MockSimpleRouter() - } - - let _: MockSimpleRouter = sameInstanceBuilder.build(withDynamicBuildDependency: (), dynamicComponentDependency: ()) - - expectAssertionFailure { - let _: MockSimpleRouter = sameInstanceBuilder.build(withDynamicBuildDependency: (), dynamicComponentDependency: ()) - } - } - - func test_componentForCurrentPass_builderReturnsNewInstance_verifyNoAssertion() { - let sameInstanceBuilder = MockComponentizedBuilder { - return MockComponent() - } - sameInstanceBuilder.buildHandler = { component, _ in - return MockSimpleRouter() - } - - let _: MockSimpleRouter = sameInstanceBuilder.build(withDynamicBuildDependency: (), dynamicComponentDependency: ()) - - let _: MockSimpleRouter = sameInstanceBuilder.build(withDynamicBuildDependency: (), dynamicComponentDependency: ()) - } -} - -private class MockComponent {} - -private class MockSimpleRouter {} - -private class MockComponentizedBuilder: ComponentizedBuilder { - - fileprivate var buildHandler: ((MockComponent, ()) -> MockSimpleRouter)? - - override func build(with component: MockComponent, _ dynamicBuildDependency: ()) -> MockSimpleRouter { - return buildHandler!(component, dynamicBuildDependency) - } -} diff --git a/ios/RIBsTests/DI/ComponentTests.swift b/ios/RIBsTests/DI/ComponentTests.swift deleted file mode 100644 index 3e1087889..000000000 --- a/ios/RIBsTests/DI/ComponentTests.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import XCTest -@testable import RIBs - -final class ComponentTests: XCTestCase { - - // MARK: - Tests - - func test_shared() { - let component = TestComponent(dependency: EmptyComponent()) - XCTAssert(component.share === component.share, "Should have returned same shared object") - - XCTAssertTrue(component.share2 === component.share2) - XCTAssertFalse(component.share === component.share2) - - XCTAssertEqual(component.callCount, 3) - } - - func test_shared_optional() { - let component = TestComponent(dependency: EmptyComponent()) - XCTAssert(component.optionalShare === component.expectedOptionalShare, "Should have returned same shared object") - } -} - -private final class TestComponent: Component { - - private(set) var callCount: Int = 0 - private(set) var expectedOptionalShare: ClassProtocol? = { - return ClassProtocolImpl() - }() - - var share: NSObject { - callCount += 1 - return shared { NSObject() } - } - - var share2: NSObject { - return shared { NSObject() } - } - - fileprivate var optionalShare: ClassProtocol? { - return shared { self.expectedOptionalShare } - } -} - -private protocol ClassProtocol: AnyObject { - -} - -private final class ClassProtocolImpl: ClassProtocol { - -} diff --git a/ios/RIBsTests/Extensions/Foundation+ExtensionsTests.swift b/ios/RIBsTests/Extensions/Foundation+ExtensionsTests.swift deleted file mode 100644 index 9a0fb3c8b..000000000 --- a/ios/RIBsTests/Extensions/Foundation+ExtensionsTests.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@testable import RIBs -import XCTest - -final class FoundationExtensionsTests: XCTestCase { - - // MARK: - Tests - - func test_removeElementByReference() { - let object1 = NSObject() - let object2 = NSObject() - let object3 = NSObject() - - var array = [object1, object2] - XCTAssert(array.count == 2) - - array.removeElementByReference(object1) - XCTAssert(array.count == 1) - - array.removeElementByReference(object3) - XCTAssert(array.count == 1) - - array.removeElementByReference(object2) - XCTAssert(array.isEmpty) - } -} diff --git a/ios/RIBsTests/Info.plist b/ios/RIBsTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/ios/RIBsTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/ios/RIBsTests/LaunchRouterTests.swift b/ios/RIBsTests/LaunchRouterTests.swift deleted file mode 100644 index dba33aef8..000000000 --- a/ios/RIBsTests/LaunchRouterTests.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@testable import RIBs -import XCTest - -final class LaunchRouterTests: XCTestCase { - - private var launchRouter: LaunchRouting! - - private var interactor: InteractableMock! - private var viewController: ViewControllableMock! - - // MARK: - Setup - - override func setUp() { - super.setUp() - - interactor = InteractableMock() - viewController = ViewControllableMock() - launchRouter = LaunchRouter(interactor: interactor, viewController: viewController) - } - - // MARK: - Tests - - func test_launchFromWindow() { - let window = WindowMock(frame: .zero) - launchRouter.launch(from: window) - - XCTAssert(window.rootViewController === viewController.uiviewController) - XCTAssert(window.isKeyWindow) - } -} diff --git a/ios/RIBsTests/Mocks.swift b/ios/RIBsTests/Mocks.swift deleted file mode 100644 index ad8a8a029..000000000 --- a/ios/RIBsTests/Mocks.swift +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxRelay -import RxSwift -import UIKit - -class WindowMock: UIWindow { - - override var isKeyWindow: Bool { - return internalIsKeyWindow - } - - override var rootViewController: UIViewController? { - get { return internalRootViewController } - set { internalRootViewController = newValue } - } - - override func makeKeyAndVisible() { - internalIsKeyWindow = true - } - - // MARK: - Private - - private var internalIsKeyWindow: Bool = false - private var internalRootViewController: UIViewController? -} - -class ViewControllableMock: ViewControllable { - let uiviewController = UIViewController(nibName: nil, bundle: nil) -} - -class InteractorMock: Interactable { - var isActive: Bool { - return active.value - } - - var isActiveStream: Observable { - return active.asObservable() - } - - private let active = BehaviorRelay(value: false) - - init() {} - - // MARK: - Lifecycle - - func activate() { - active.accept(true) - } - - func deactivate() { - active.accept(false) - } -} - -class InteractableMock: Interactable { - // Variables - var isActive: Bool = false { didSet { isActiveSetCallCount += 1 } } - var isActiveSetCallCount = 0 - var isActiveStreamSubject: PublishSubject = PublishSubject() { didSet { isActiveStreamSubjectSetCallCount += 1 } } - var isActiveStreamSubjectSetCallCount = 0 - var isActiveStream: Observable { return isActiveStreamSubject } - - // Function Handlers - var activateHandler: (() -> ())? - var activateCallCount: Int = 0 - var deactivateHandler: (() -> ())? - var deactivateCallCount: Int = 0 - - init() {} - - func activate() { - activateCallCount += 1 - if let activateHandler = activateHandler { - return activateHandler() - } - } - - func deactivate() { - deactivateCallCount += 1 - if let deactivateHandler = deactivateHandler { - return deactivateHandler() - } - } -} diff --git a/ios/RIBsTests/MultiStageComponentizedBuilderTests.swift b/ios/RIBsTests/MultiStageComponentizedBuilderTests.swift deleted file mode 100644 index e912d75f1..000000000 --- a/ios/RIBsTests/MultiStageComponentizedBuilderTests.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@testable import RIBs -import XCTest - -class MultiStageComponentizedBuilderTests: XCTestCase { - - private var builder: MockMultiStageComponentizedBuilder! - - override func setUp() { - super.setUp() - - builder = MockMultiStageComponentizedBuilder { - return MockComponent() - } - } - - func test_componentForCurrentPass_samePass_verifySameInstance() { - var instance = builder.componentForCurrentBuildPass - for _ in 0 ..< 100 { - XCTAssertTrue(instance === builder.componentForCurrentBuildPass) - instance = builder.componentForCurrentBuildPass - } - } - - func test_componentForCurrentPass_multiplePasses_verifyDifferentInstances() { - builder.finalStageBuildHandler = { component, dynamicDep in - XCTAssertEqual(dynamicDep, 92393) - return MockSimpleRouter() - } - - let firstPassInstance = builder.componentForCurrentBuildPass - - _ = builder.finalStageBuild(withDynamicDependency: 92393) - - let secondPassInstance = builder.componentForCurrentBuildPass - - XCTAssertFalse(firstPassInstance === secondPassInstance) - } - - func test_componentForCurrentPass_builderReturnsSameInstance_verifyAssertion() { - let component = MockComponent() - let sameInstanceBuilder = MockMultiStageComponentizedBuilder { - return component - } - sameInstanceBuilder.finalStageBuildHandler = { component, dynamicDep in - XCTAssertEqual(dynamicDep, 92393) - return MockSimpleRouter() - } - - _ = sameInstanceBuilder.finalStageBuild(withDynamicDependency: 92393) - - expectAssertionFailure { - _ = sameInstanceBuilder.finalStageBuild(withDynamicDependency: 92393) - } - - expectAssertionFailure { - _ = sameInstanceBuilder.componentForCurrentBuildPass - } - } -} - -private class MockComponent {} - -private class MockSimpleRouter {} - -private class MockMultiStageComponentizedBuilder: MultiStageComponentizedBuilder { - - fileprivate var finalStageBuildHandler: ((MockComponent, Int) -> MockSimpleRouter)? - - override func finalStageBuild(with component: MockComponent, _ dynamicDependency: Int) -> MockSimpleRouter { - return finalStageBuildHandler!(component, dynamicDependency) - } -} diff --git a/ios/RIBsTests/RouterTests.swift b/ios/RIBsTests/RouterTests.swift deleted file mode 100644 index d31d0c56c..000000000 --- a/ios/RIBsTests/RouterTests.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift -import XCTest -@testable import RIBs - -final class RouterTests: XCTestCase { - - private var router: Router! - private var lifecycleDisposable: Disposable! - - // MARK: - Setup - - override func setUp() { - super.setUp() - - router = Router(interactor: InteractableMock()) - } - - override func tearDown() { - super.tearDown() - - lifecycleDisposable.dispose() - } - - // MARK: - Tests - - func test_load_verifyLifecycleObservable() { - var currentLifecycle: RouterLifecycle? - var didComplete = false - lifecycleDisposable = router - .lifecycle - .subscribe(onNext: { lifecycle in - currentLifecycle = lifecycle - }, onCompleted: { - currentLifecycle = nil - didComplete = true - }) - - XCTAssertNil(currentLifecycle) - XCTAssertFalse(didComplete) - - router.load() - - XCTAssertEqual(currentLifecycle, RouterLifecycle.didLoad) - XCTAssertFalse(didComplete) - - router = nil - - XCTAssertNil(currentLifecycle) - XCTAssertTrue(didComplete) - } -} diff --git a/ios/RIBsTests/Worker/WorkerTests.swift b/ios/RIBsTests/Worker/WorkerTests.swift deleted file mode 100644 index ed86e10ad..000000000 --- a/ios/RIBsTests/Worker/WorkerTests.swift +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import XCTest -import RxSwift -@testable import RIBs - -final class WorkerTests: XCTestCase { - - private var worker: TestWorker! - private var interactor: InteractorMock! - private var disposable: DisposeBag! - - // MARK: - Setup - - override func setUp() { - super.setUp() - - disposable = DisposeBag() - - worker = TestWorker() - interactor = InteractorMock() - } - - // MARK: - Tests - - func test_didStart_onceOnly_boundToInteractor() { - XCTAssertEqual(worker.didStartCallCount, 0) - XCTAssertEqual(worker.didStopCallCount, 0) - - worker.start(interactor) - - XCTAssertTrue(worker.isStarted) - XCTAssertEqual(worker.didStartCallCount, 0) - XCTAssertEqual(worker.didStopCallCount, 0) - - interactor.activate() - - XCTAssertTrue(worker.isStarted) - XCTAssertEqual(worker.didStartCallCount, 1) - XCTAssertEqual(worker.didStopCallCount, 0) - - interactor.deactivate() - - XCTAssertTrue(worker.isStarted) - XCTAssertEqual(worker.didStartCallCount, 1) - XCTAssertEqual(worker.didStopCallCount, 1) - - worker.start(interactor) - - XCTAssertTrue(worker.isStarted) - XCTAssertEqual(worker.didStartCallCount, 1) - XCTAssertEqual(worker.didStopCallCount, 1) - - interactor.activate() - - XCTAssertTrue(worker.isStarted) - XCTAssertEqual(worker.didStartCallCount, 2) - XCTAssertEqual(worker.didStopCallCount, 1) - - worker.stop() - - XCTAssertFalse(worker.isStarted) - XCTAssertEqual(worker.didStartCallCount, 2) - XCTAssertEqual(worker.didStopCallCount, 2) - - worker.stop() - - XCTAssertFalse(worker.isStarted) - XCTAssertEqual(worker.didStartCallCount, 2) - XCTAssertEqual(worker.didStopCallCount, 2) - } - - func test_start_stop_lifecycle() { - worker.isStartedStream - .take(1) - .subscribe(onNext: { XCTAssertFalse($0) }) - .disposed(by: disposable) - - interactor.activate() - worker.start(interactor) - - worker.isStartedStream - .take(1) - .subscribe(onNext: { XCTAssertTrue($0) }) - .disposed(by: disposable) - - worker.stop() - - worker.isStartedStream - .take(1) - .subscribe(onNext: { XCTAssertFalse($0) }) - .disposed(by: disposable) - } -} - -private final class TestWorker: Worker { - - private(set) var didStartCallCount: Int = 0 - private(set) var didStopCallCount: Int = 0 - - // MARK: - Overrides - - override func didStart(_ interactorScope: InteractorScope) { - super.didStart(interactorScope) - - didStartCallCount += 1 - } - - override func didStop() { - super.didStop() - - didStopCallCount += 1 - } -} diff --git a/ios/RIBsTests/Workflow/WorkflowTests.swift b/ios/RIBsTests/Workflow/WorkflowTests.swift deleted file mode 100644 index ccfb812a7..000000000 --- a/ios/RIBsTests/Workflow/WorkflowTests.swift +++ /dev/null @@ -1,211 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import XCTest -import RxSwift -@testable import RIBs - -final class WorkerflowTests: XCTestCase { - - func test_nestedStepsDoNotRepeat() { - var outerStep1RunCount = 0 - var outerStep2RunCount = 0 - var outerStep3RunCount = 0 - - var innerStep1RunCount = 0 - var innerStep2RunCount = 0 - var innerStep3RunCount = 0 - - let emptyObservable = Observable.just(((), ())) - - let workflow = Workflow() - _ = workflow - .onStep { (mock) -> Observable<((), ())> in - outerStep1RunCount += 1 - - return emptyObservable - } - .onStep { (_, _) -> Observable<((), ())> in - outerStep2RunCount += 1 - - return emptyObservable - } - .onStep { (_, _) -> Observable<((), ())> in - outerStep3RunCount += 1 - - let innerStep: Step? = emptyObservable.fork(workflow) - - innerStep? - .onStep({ (_, _) -> Observable<((), ())> in - innerStep1RunCount += 1 - return emptyObservable - }) - .onStep({ (_, _) -> Observable<((), ())> in - innerStep2RunCount += 1 - return emptyObservable - }) - .onStep({ (_, _) -> Observable<((), ())> in - innerStep3RunCount += 1 - return emptyObservable - }) - .commit() - - return emptyObservable - } - .commit() - .subscribe("Test Actionable Item") - - XCTAssertEqual(outerStep1RunCount, 1, "Outer step 1 should not have been run more than once") - XCTAssertEqual(outerStep2RunCount, 1, "Outer step 2 should not have been run more than once") - XCTAssertEqual(outerStep3RunCount, 1, "Outer step 3 should not have been run more than once") - - XCTAssertEqual(innerStep1RunCount, 1, "Inner step 1 should not have been run more than once") - XCTAssertEqual(innerStep2RunCount, 1, "Inner step 2 should not have been run more than once") - XCTAssertEqual(innerStep3RunCount, 1, "Inner step 3 should not have been run more than once") - } - - func test_workflowReceivesError() { - let workflow = TestWorkflow() - - let emptyObservable = Observable.just(((), ())) - _ = workflow - .onStep { _ -> Observable<((), ())> in - return emptyObservable - } - .onStep { _, _ -> Observable<((), ())> in - return emptyObservable - } - .onStep { _, _ -> Observable<((), ())> in - return Observable.error(WorkflowTestError.error) - } - .onStep { _, _ -> Observable<((), ())> in - return emptyObservable - } - .commit() - .subscribe(()) - - XCTAssertEqual(0, workflow.completeCallCount) - XCTAssertEqual(0, workflow.forkCallCount) - XCTAssertEqual(1, workflow.errorCallCount) - } - - func test_workflowDidComplete() { - let workflow = TestWorkflow() - - let emptyObservable = Observable.just(((), ())) - _ = workflow - .onStep { _ -> Observable<((), ())> in - return emptyObservable - } - .onStep { _, _ -> Observable<((), ())> in - return emptyObservable - } - .onStep { _, _ -> Observable<((), ())> in - return emptyObservable - } - .commit() - .subscribe(()) - - XCTAssertEqual(1, workflow.completeCallCount) - XCTAssertEqual(0, workflow.forkCallCount) - XCTAssertEqual(0, workflow.errorCallCount) - } - - func test_workflowDidFork() { - let workflow = TestWorkflow() - - let emptyObservable = Observable.just(((), ())) - _ = workflow - .onStep { _ -> Observable<((), ())> in - return emptyObservable - } - .onStep { _, _ -> Observable<((), ())> in - return emptyObservable - } - .onStep { _, _ -> Observable<((), ())> in - return emptyObservable - } - .onStep { _, _ -> Observable<((), ())> in - let forkedStep: Step<(), (), ()>? = emptyObservable.fork(workflow) - forkedStep? - .onStep { _, _ -> Observable<((), ())> in - return emptyObservable - } - .commit() - return emptyObservable - } - .commit() - .subscribe(()) - - XCTAssertEqual(1, workflow.completeCallCount) - XCTAssertEqual(1, workflow.forkCallCount) - XCTAssertEqual(0, workflow.errorCallCount) - } - - func test_fork_verifySingleInvocationAtRoot() { - let workflow = TestWorkflow() - - var rootCallCount = 0 - let emptyObservable = Observable.just(((), ())) - let rootStep = workflow - .onStep { _ -> Observable<((), ())> in - rootCallCount += 1 - return emptyObservable - } - - let firstFork: Step<(), (), ()>? = rootStep.asObservable().fork(workflow) - _ = firstFork? - .onStep { (_, _) -> Observable<((), ())> in - return Observable.just(((), ())) - } - .commit() - - let secondFork: Step<(), (), ()>? = rootStep.asObservable().fork(workflow) - _ = secondFork? - .onStep { (_, _) -> Observable<((), ())> in - return Observable.just(((), ())) - } - .commit() - - XCTAssertEqual(0, rootCallCount) - - _ = workflow.subscribe(()) - - XCTAssertEqual(1, rootCallCount) - } -} - -private enum WorkflowTestError: Error { - case error -} - -private class TestWorkflow: Workflow<()> { - var completeCallCount = 0 - var errorCallCount = 0 - var forkCallCount = 0 - - override func didComplete() { - completeCallCount += 1 - } - - override func didFork() { - forkCallCount += 1 - } - - override func didReceiveError(_ error: Error) { - errorCallCount += 1 - } -} diff --git a/ios/swiftformat.sh b/ios/swiftformat.sh deleted file mode 100755 index a68c57a74..000000000 --- a/ios/swiftformat.sh +++ /dev/null @@ -1,54 +0,0 @@ -#! /usr/bin/env bash - -if ! which swiftformat &> /dev/null; then - printf "\e[1;31mYou don't have SwiftFormat installed. Please install swift format by visiting https://github.com/nicklockwood/SwiftFormat.\e[0m\n" - exit 1 -fi - -HEADER=" -// -// Copyright (c) {year}. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the \"License\"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an \"AS IS\" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License.\n -" - -OUTPUT=$(swiftformat \ - --cache ignore \ - --indent 4 \ - --allman false \ - --wraparguments afterfirst \ - --removelines disabled \ - --wrapelements beforefirst \ - --exponentcase uppercase \ - --insertlines disabled \ - --binarygrouping none \ - --empty tuples \ - --ranges nospace \ - --trimwhitespace always \ - --hexliteralcase lowercase \ - --linebreaks lf \ - --decimalgrouping none \ - --commas inline \ - --comments ignore \ - --octalgrouping none \ - --hexgrouping none \ - --semicolons inline \ - --header "$HEADER" \ - --disable redundantSelf,unusedArguments,hoistPatternLet,redundantBackticks,redundantReturn,linebreakAtEndOfFile \ - --exclude tooling,Pods,tutorials/tutorial1/Pods,tutorials/tutorial2/Pods,tutorials/tutorial3/Pods,tutorials/tutorial3-rib-di-and-communication-finished/Pods,tutorials/tutorial4/Pods \ - .) - -if [ "$OUTPUT" ]; then - echo "$OUTPUT" >&2 - exit 1 -fi diff --git a/ios/test.md b/ios/test.md deleted file mode 100755 index 46ba25404..000000000 --- a/ios/test.md +++ /dev/null @@ -1,34 +0,0 @@ -Releasing -========= - -Android -------- - - 1. Change the version in `gradle.properties` to a non-SNAPSHOT version. - 2. Update the `CHANGELOG.md` for the impending release. - 3. Update the `README.md` with the new version. - 4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version) - 5. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version) - 6. `./gradlew clean uploadArchives` - 7. Update the `gradle.properties` to the next SNAPSHOT version. - 8. `git commit -am "Prepare next development version."` - 9. `git push && git push --tags` - 10. Visit [Sonatype Nexus](https://oss.sonatype.org/) and promote the artifact. - -iOS ---- - -Releasing -========= - -Note: This may vary based on your distribution mechanism. Assuming CocoaPods: - - 1. Change the version in `Name.podspec` to reflect a new version. - 2. Update the `CHANGELOG.md` for the impending release. - 3. Update the `README.md` with the new version. - 4. Verify formatting with swiftlint (swiftformat.sh) - 5. `git commit -am "Release X.Y.Z."` (where X.Y.Z is the new version) - 6. `git tag "X.Y.Z"` (where X.Y.Z is the new version) - 7. `git push --tags` - 8. `pod trunk push Name.podspec` - \ No newline at end of file diff --git a/ios/tooling/Component Extension.xctemplate/TemplateIcon.png b/ios/tooling/Component Extension.xctemplate/TemplateIcon.png deleted file mode 100644 index a3dc57941..000000000 Binary files a/ios/tooling/Component Extension.xctemplate/TemplateIcon.png and /dev/null differ diff --git a/ios/tooling/Component Extension.xctemplate/TemplateIcon@2x.png b/ios/tooling/Component Extension.xctemplate/TemplateIcon@2x.png deleted file mode 100644 index 9a4b68f5f..000000000 Binary files a/ios/tooling/Component Extension.xctemplate/TemplateIcon@2x.png and /dev/null differ diff --git a/ios/tooling/Component Extension.xctemplate/TemplateInfo.plist b/ios/tooling/Component Extension.xctemplate/TemplateInfo.plist deleted file mode 100644 index bfa666e5e..000000000 --- a/ios/tooling/Component Extension.xctemplate/TemplateInfo.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Kind - Xcode.IDEFoundation.TextSubstitutionFileTemplateKind - Summary - Component Extension - Description - Extend a component to provide dependencies for a child scope. - SortOrder - 7 - AllowedTypes - - Item 0 - public.swift-source - - DefaultCompletionName - ComponentExtension - MainTemplateFiles - ___FILEBASENAME___Component+___VARIABLE_childName___.swift - Platforms - - com.apple.platform.iphoneos - - Options - - - Identifier - productName - Required - true - Name - Scope name: - Description - The name of the scope that needs to be extended. - Type - text - NotPersisted - true - - - Identifier - childName - Required - true - Name - Child scope name: - Description - The name of the child scope that needs to be provided. - Type - text - NotPersisted - true - - - - diff --git a/ios/tooling/Component Extension.xctemplate/___FILEBASENAME___Component+___VARIABLE_childName___.swift b/ios/tooling/Component Extension.xctemplate/___FILEBASENAME___Component+___VARIABLE_childName___.swift deleted file mode 100644 index 70a02b7b1..000000000 --- a/ios/tooling/Component Extension.xctemplate/___FILEBASENAME___Component+___VARIABLE_childName___.swift +++ /dev/null @@ -1,15 +0,0 @@ -//___FILEHEADER___ - -import RIBs - -/// The dependencies needed from the parent scope of ___VARIABLE_productName___ to provide for the ___VARIABLE_childName___ scope. -// TODO: Update ___VARIABLE_productName___Dependency protocol to inherit this protocol. -protocol ___VARIABLE_productName___Dependency___VARIABLE_childName___: Dependency { - // TODO: Declare dependencies needed from the parent scope of ___VARIABLE_productName___ to provide dependencies - // for the ___VARIABLE_childName___ scope. -} - -extension ___VARIABLE_productName___Component: ___VARIABLE_childName___Dependency { - - // TODO: Implement properties to provide for ___VARIABLE_childName___ scope. -} diff --git a/ios/tooling/README.md b/ios/tooling/README.md deleted file mode 100644 index 3ff4c6326..000000000 --- a/ios/tooling/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# RIBs Xcode Templates - -We have created Xcode templates to generate RIBs scaffolding and test scaffolding, making RIBs usage and adoption easier. The scaffolded classes have RIBs wired up, ready to add business logic to them. - -For details on installation and usage, please see the [iOS tooling wiki page](https://github.com/uber/RIBs/wiki/iOS-Tooling). diff --git a/ios/tooling/RIB Unit Tests.xctemplate/TemplateIcon.png b/ios/tooling/RIB Unit Tests.xctemplate/TemplateIcon.png deleted file mode 100644 index a3dc57941..000000000 Binary files a/ios/tooling/RIB Unit Tests.xctemplate/TemplateIcon.png and /dev/null differ diff --git a/ios/tooling/RIB Unit Tests.xctemplate/TemplateIcon@2x.png b/ios/tooling/RIB Unit Tests.xctemplate/TemplateIcon@2x.png deleted file mode 100644 index 9a4b68f5f..000000000 Binary files a/ios/tooling/RIB Unit Tests.xctemplate/TemplateIcon@2x.png and /dev/null differ diff --git a/ios/tooling/RIB Unit Tests.xctemplate/TemplateInfo.plist b/ios/tooling/RIB Unit Tests.xctemplate/TemplateInfo.plist deleted file mode 100644 index 926565eda..000000000 --- a/ios/tooling/RIB Unit Tests.xctemplate/TemplateInfo.plist +++ /dev/null @@ -1,44 +0,0 @@ - - - - - Kind - Xcode.IDEFoundation.TextSubstitutionFileTemplateKind - Summary - RIB Unit Tests - Description - RIB unit test files. - SortOrder - 2 - AllowedTypes - - Item 0 - public.swift-source - - DefaultCompletionName - RIB Unit Tests - MainTemplateFiles - ___FILEBASENAME___.swift - Platforms - - com.apple.platform.iphoneos - - Options - - - Identifier - productName - Required - true - Name - Name of the RIB to test: - Description - The name of the RIB to unit test for. Creates an interactor and a router test. - Type - text - NotPersisted - true - - - - diff --git a/ios/tooling/RIB Unit Tests.xctemplate/___FILEBASENAME___InteractorTests.swift b/ios/tooling/RIB Unit Tests.xctemplate/___FILEBASENAME___InteractorTests.swift deleted file mode 100644 index 4d2868546..000000000 --- a/ios/tooling/RIB Unit Tests.xctemplate/___FILEBASENAME___InteractorTests.swift +++ /dev/null @@ -1,24 +0,0 @@ -//___FILEHEADER___ - -@testable import ___PROJECTNAME___ -import XCTest - -final class ___VARIABLE_productName___InteractorTests: XCTestCase { - - private var interactor: ___VARIABLE_productName___Interactor! - - // TODO: declare other objects and mocks you need as private vars - - override func setUp() { - super.setUp() - - // TODO: instantiate objects and mocks - } - - // MARK: - Tests - - func test_exampleObservable_callsRouterOrListener_exampleProtocol() { - // This is an example of an interactor test case. - // Test your interactor binds observables and sends messages to router or listener. - } -} diff --git a/ios/tooling/RIB Unit Tests.xctemplate/___FILEBASENAME___RouterTests.swift b/ios/tooling/RIB Unit Tests.xctemplate/___FILEBASENAME___RouterTests.swift deleted file mode 100644 index b8082bc9f..000000000 --- a/ios/tooling/RIB Unit Tests.xctemplate/___FILEBASENAME___RouterTests.swift +++ /dev/null @@ -1,24 +0,0 @@ -//___FILEHEADER___ - -@testable import ___PROJECTNAME___ -import XCTest - -final class ___VARIABLE_productName___RouterTests: XCTestCase { - - private var router: ___VARIABLE_productName___Router! - - // TODO: declare other objects and mocks you need as private vars - - override func setUp() { - super.setUp() - - // TODO: instantiate objects and mocks - } - - // MARK: - Tests - - func test_routeToExample_invokesToExampleResult() { - // This is an example of a router test case. - // Test your router functions invokes the corresponding builder, attachesChild, presents VC, etc. - } -} diff --git a/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Builder.swift b/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Builder.swift deleted file mode 100644 index 5aa79e394..000000000 --- a/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Builder.swift +++ /dev/null @@ -1,40 +0,0 @@ -//___FILEHEADER___ - -import RIBs - -protocol ___VARIABLE_productName___Dependency: Dependency { - // TODO: Make sure to convert the variable into lower-camelcase. - var ___VARIABLE_productName___ViewController: ___VARIABLE_productName___ViewControllable { get } - // TODO: Declare the set of dependencies required by this RIB, but won't be - // created by this RIB. -} - -final class ___VARIABLE_productName___Component: Component<___VARIABLE_productName___Dependency> { - - // TODO: Make sure to convert the variable into lower-camelcase. - fileprivate var ___VARIABLE_productName___ViewController: ___VARIABLE_productName___ViewControllable { - return dependency.___VARIABLE_productName___ViewController - } - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol ___VARIABLE_productName___Buildable: Buildable { - func build(withListener listener: ___VARIABLE_productName___Listener) -> ___VARIABLE_productName___Routing -} - -final class ___VARIABLE_productName___Builder: Builder<___VARIABLE_productName___Dependency>, ___VARIABLE_productName___Buildable { - - override init(dependency: ___VARIABLE_productName___Dependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: ___VARIABLE_productName___Listener) -> ___VARIABLE_productName___Routing { - let component = ___VARIABLE_productName___Component(dependency: dependency) - let interactor = ___VARIABLE_productName___Interactor() - interactor.listener = listener - return ___VARIABLE_productName___Router(interactor: interactor, viewController: component.___VARIABLE_productName___ViewController) - } -} diff --git a/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Interactor.swift b/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Interactor.swift deleted file mode 100644 index 48b76da67..000000000 --- a/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Interactor.swift +++ /dev/null @@ -1,35 +0,0 @@ -//___FILEHEADER___ - -import RIBs -import RxSwift - -protocol ___VARIABLE_productName___Routing: Routing { - func cleanupViews() - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol ___VARIABLE_productName___Listener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class ___VARIABLE_productName___Interactor: Interactor, ___VARIABLE_productName___Interactable { - - weak var router: ___VARIABLE_productName___Routing? - weak var listener: ___VARIABLE_productName___Listener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init() {} - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - - router?.cleanupViews() - // TODO: Pause any business logic. - } -} diff --git a/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Router.swift b/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Router.swift deleted file mode 100644 index 4cb5220e8..000000000 --- a/ios/tooling/RIB.xctemplate/Default/___FILEBASENAME___Router.swift +++ /dev/null @@ -1,33 +0,0 @@ -//___FILEHEADER___ - -import RIBs - -protocol ___VARIABLE_productName___Interactable: Interactable { - var router: ___VARIABLE_productName___Routing? { get set } - var listener: ___VARIABLE_productName___Listener? { get set } -} - -protocol ___VARIABLE_productName___ViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. Since - // this RIB does not own its own view, this protocol is conformed to by one of this - // RIB's ancestor RIBs' view. -} - -final class ___VARIABLE_productName___Router: Router<___VARIABLE_productName___Interactable>, ___VARIABLE_productName___Routing { - - // TODO: Constructor inject child builder protocols to allow building children. - init(interactor: ___VARIABLE_productName___Interactable, viewController: ___VARIABLE_productName___ViewControllable) { - self.viewController = viewController - super.init(interactor: interactor) - interactor.router = self - } - - func cleanupViews() { - // TODO: Since this router does not own its view, it needs to cleanup the views - // it may have added to the view hierarchy, when its interactor is deactivated. - } - - // MARK: - Private - - private let viewController: ___VARIABLE_productName___ViewControllable -} diff --git a/ios/tooling/RIB.xctemplate/TemplateIcon.png b/ios/tooling/RIB.xctemplate/TemplateIcon.png deleted file mode 100644 index a3dc57941..000000000 Binary files a/ios/tooling/RIB.xctemplate/TemplateIcon.png and /dev/null differ diff --git a/ios/tooling/RIB.xctemplate/TemplateIcon@2x.png b/ios/tooling/RIB.xctemplate/TemplateIcon@2x.png deleted file mode 100644 index 9a4b68f5f..000000000 Binary files a/ios/tooling/RIB.xctemplate/TemplateIcon@2x.png and /dev/null differ diff --git a/ios/tooling/RIB.xctemplate/TemplateInfo.plist b/ios/tooling/RIB.xctemplate/TemplateInfo.plist deleted file mode 100644 index 9ce34d5f2..000000000 --- a/ios/tooling/RIB.xctemplate/TemplateInfo.plist +++ /dev/null @@ -1,106 +0,0 @@ - - - - - Kind - Xcode.IDEFoundation.TextSubstitutionFileTemplateKind - Summary - RIB1 - Description - RIB classes. - SortOrder - 1 - AllowedTypes - - Item 0 - public.swift-source - - DefaultCompletionName - RIB - MainTemplateFiles - ___FILEBASENAME___.swift - Platforms - - com.apple.platform.iphoneos - - Options - - - Identifier - productName - Required - true - Name - RIB name: - Description - The name of the RIB to create - Type - text - NotPersisted - true - - - Identifier - ownsView - Required - true - Name - Owns corresponding view - Description - Whether this RIB owns a corresponding view - Type - checkbox - Default - true - NotPersisted - true - - - Identifier - withXIB - Required - true - Name - Adds XIB file - Description - Whether this RIB contains a corresponding view with XIB - Type - checkbox - Default - false - NotPersisted - true - RequiredOptions - - ownsView - true - withStoryboard - false - - - - Identifier - withStoryboard - Required - true - Name - Adds Storyboard file - Description - Whether this RIB contains a corresponding view with Storyboard - Type - checkbox - Default - false - NotPersisted - true - RequiredOptions - - ownsView - true - withXIB - false - - - - - diff --git a/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Builder.swift b/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Builder.swift deleted file mode 100644 index 2948aa5b0..000000000 --- a/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Builder.swift +++ /dev/null @@ -1,34 +0,0 @@ -//___FILEHEADER___ - -import RIBs - -protocol ___VARIABLE_productName___Dependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class ___VARIABLE_productName___Component: Component<___VARIABLE_productName___Dependency> { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol ___VARIABLE_productName___Buildable: Buildable { - func build(withListener listener: ___VARIABLE_productName___Listener) -> ___VARIABLE_productName___Routing -} - -final class ___VARIABLE_productName___Builder: Builder<___VARIABLE_productName___Dependency>, ___VARIABLE_productName___Buildable { - - override init(dependency: ___VARIABLE_productName___Dependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: ___VARIABLE_productName___Listener) -> ___VARIABLE_productName___Routing { - let component = ___VARIABLE_productName___Component(dependency: dependency) - let viewController = ___VARIABLE_productName___ViewController() - let interactor = ___VARIABLE_productName___Interactor(presenter: viewController) - interactor.listener = listener - return ___VARIABLE_productName___Router(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Interactor.swift b/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Interactor.swift deleted file mode 100644 index 884b004a1..000000000 --- a/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Interactor.swift +++ /dev/null @@ -1,40 +0,0 @@ -//___FILEHEADER___ - -import RIBs -import RxSwift - -protocol ___VARIABLE_productName___Routing: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol ___VARIABLE_productName___Presentable: Presentable { - var listener: ___VARIABLE_productName___PresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol ___VARIABLE_productName___Listener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class ___VARIABLE_productName___Interactor: PresentableInteractor<___VARIABLE_productName___Presentable>, ___VARIABLE_productName___Interactable, ___VARIABLE_productName___PresentableListener { - - weak var router: ___VARIABLE_productName___Routing? - weak var listener: ___VARIABLE_productName___Listener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: ___VARIABLE_productName___Presentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } -} diff --git a/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Router.swift b/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Router.swift deleted file mode 100644 index 3dde2e9f5..000000000 --- a/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___Router.swift +++ /dev/null @@ -1,21 +0,0 @@ -//___FILEHEADER___ - -import RIBs - -protocol ___VARIABLE_productName___Interactable: Interactable { - var router: ___VARIABLE_productName___Routing? { get set } - var listener: ___VARIABLE_productName___Listener? { get set } -} - -protocol ___VARIABLE_productName___ViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class ___VARIABLE_productName___Router: ViewableRouter<___VARIABLE_productName___Interactable, ___VARIABLE_productName___ViewControllable>, ___VARIABLE_productName___Routing { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: ___VARIABLE_productName___Interactable, viewController: ___VARIABLE_productName___ViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___ViewController.swift b/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___ViewController.swift deleted file mode 100644 index 1341eba0a..000000000 --- a/ios/tooling/RIB.xctemplate/ownsView/___FILEBASENAME___ViewController.swift +++ /dev/null @@ -1,16 +0,0 @@ -//___FILEHEADER___ - -import RIBs -import RxSwift -import UIKit - -protocol ___VARIABLE_productName___PresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class ___VARIABLE_productName___ViewController: UIViewController, ___VARIABLE_productName___Presentable, ___VARIABLE_productName___ViewControllable { - - weak var listener: ___VARIABLE_productName___PresentableListener? -} diff --git a/ios/tooling/RIB.xctemplate/ownsViewwithStoryboard/___FILEBASENAME___ViewController.storyboard b/ios/tooling/RIB.xctemplate/ownsViewwithStoryboard/___FILEBASENAME___ViewController.storyboard deleted file mode 100644 index 94d31d262..000000000 --- a/ios/tooling/RIB.xctemplate/ownsViewwithStoryboard/___FILEBASENAME___ViewController.storyboard +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/tooling/RIB.xctemplate/ownsViewwithXIB/___FILEBASENAME___ViewController.xib b/ios/tooling/RIB.xctemplate/ownsViewwithXIB/___FILEBASENAME___ViewController.xib deleted file mode 100644 index e216e9b89..000000000 --- a/ios/tooling/RIB.xctemplate/ownsViewwithXIB/___FILEBASENAME___ViewController.xib +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/tooling/install-xcode-template.sh b/ios/tooling/install-xcode-template.sh deleted file mode 100755 index 136eb3271..000000000 --- a/ios/tooling/install-xcode-template.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env sh - -# Configuration -XCODE_TEMPLATE_DIR=$HOME'/Library/Developer/Xcode/Templates/File Templates/RIBs' -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Copy RIBs file templates into the local RIBs template directory -xcodeTemplate () { - echo "==> Copying up RIBs Xcode file templates..." - - if [ -d "$XCODE_TEMPLATE_DIR" ]; then - rm -R "$XCODE_TEMPLATE_DIR" - fi - mkdir -p "$XCODE_TEMPLATE_DIR" - - cp -R $SCRIPT_DIR/*.xctemplate "$XCODE_TEMPLATE_DIR" - cp -R $SCRIPT_DIR/RIB.xctemplate/ownsView/* "$XCODE_TEMPLATE_DIR/RIB.xctemplate/ownsViewwithXIB/" - cp -R $SCRIPT_DIR/RIB.xctemplate/ownsView/* "$XCODE_TEMPLATE_DIR/RIB.xctemplate/ownsViewwithStoryboard/" -} - -xcodeTemplate - -echo "==> ... success!" -echo "==> RIBs have been set up. In Xcode, select 'New File...' to use RIBs templates." diff --git a/ios/tutorials/tutorial1/Podfile b/ios/tutorials/tutorial1/Podfile deleted file mode 100644 index 970b31519..000000000 --- a/ios/tutorials/tutorial1/Podfile +++ /dev/null @@ -1,14 +0,0 @@ -# Uncomment the next line to define a global platform for your project -# platform :ios, '9.0' - -target 'TicTacToe' do - # Comment the next line if you don't want to use dynamic frameworks - use_frameworks! - inhibit_all_warnings! - - # Pods for TicTacToe - pod 'RIBs', :path => '../../../' - pod 'SnapKit', '~> 4.0.0' - pod 'RxCocoa', '~> 6.5' - -end \ No newline at end of file diff --git a/ios/tutorials/tutorial1/README.md b/ios/tutorials/tutorial1/README.md deleted file mode 100644 index d10ee2ee5..000000000 --- a/ios/tutorials/tutorial1/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# RIBs Tutorial 1: Creating a RIB - -This project is the starting point for [tutorial 1](https://github.com/uber/RIBs/wiki/iOS-Tutorial-1) that will get you aquatinted with the RIBs architecture. - -### Getting started - -Install tooling, unless you've done so already: - -``` -/ios/tooling/install-xcode-template.sh -``` - -Then, install pods for the tutorial: - -``` -gem install cocoapods # In case you don't have it -cd /ios/tutorials/tutorial1 -pod install -``` - -Then, open the TicTacToe.xcworkspace that was generated by `pod install` and follow the steps described in [tutorial 1](https://github.com/uber/RIBs/wiki/iOS-Tutorial-1) on the RIBs wiki. diff --git a/ios/tutorials/tutorial1/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial1/TicTacToe.xcodeproj/project.pbxproj deleted file mode 100644 index 0c8b1ff37..000000000 --- a/ios/tutorials/tutorial1/TicTacToe.xcodeproj/project.pbxproj +++ /dev/null @@ -1,433 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */; }; - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */; }; - E9C3E1EA1FA1BD0400781364 /* DELETE_ME.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C3E1E91FA1BD0400781364 /* DELETE_ME.swift */; }; - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D351F972FD500D84847 /* AppDelegate.swift */; }; - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D341F972FD500D84847 /* AppComponent.swift */; }; - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D371F972FE400D84847 /* RootBuilder.swift */; }; - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */; }; - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */; }; - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3B1F972FE400D84847 /* RootRouter.swift */; }; - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3C1F972FE400D84847 /* RootViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.debug.xcconfig"; sourceTree = ""; }; - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.release.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.release.xcconfig"; sourceTree = ""; }; - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TicTacToe.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B4A1F972CC500688FCB /* TicTacToe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TicTacToe.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B591F972CC500688FCB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E9C3E1E91FA1BD0400781364 /* DELETE_ME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DELETE_ME.swift; sourceTree = ""; }; - E9CB1D341F972FD500D84847 /* AppComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppComponent.swift; sourceTree = ""; }; - E9CB1D351F972FD500D84847 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E9CB1D371F972FE400D84847 /* RootBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootBuilder.swift; sourceTree = ""; }; - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedOut.swift"; sourceTree = ""; }; - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootInteractor.swift; sourceTree = ""; }; - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootRouter.swift; sourceTree = ""; }; - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E9894B471F972CC500688FCB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 59F943336420DE07CA779F6F /* Pods */ = { - isa = PBXGroup; - children = ( - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */, - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 7EDD59511FA135E9005EC8B2 /* Resources */ = { - isa = PBXGroup; - children = ( - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, - ); - path = Resources; - sourceTree = ""; - }; - E9894B411F972CC500688FCB = { - isa = PBXGroup; - children = ( - E9894B4C1F972CC500688FCB /* TicTacToe */, - E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, - F5205CCF508911BE388D8406 /* Frameworks */, - ); - sourceTree = ""; - }; - E9894B4B1F972CC500688FCB /* Products */ = { - isa = PBXGroup; - children = ( - E9894B4A1F972CC500688FCB /* TicTacToe.app */, - ); - name = Products; - sourceTree = ""; - }; - E9894B4C1F972CC500688FCB /* TicTacToe */ = { - isa = PBXGroup; - children = ( - 7EDD59511FA135E9005EC8B2 /* Resources */, - E9CB1D331F972FD500D84847 /* AppStart */, - E9CB1D421F972FE400D84847 /* LoggedOut */, - E9CB1D361F972FE400D84847 /* Root */, - E9894B591F972CC500688FCB /* Info.plist */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9CB1D331F972FD500D84847 /* AppStart */ = { - isa = PBXGroup; - children = ( - E9CB1D341F972FD500D84847 /* AppComponent.swift */, - E9CB1D351F972FD500D84847 /* AppDelegate.swift */, - ); - path = AppStart; - sourceTree = ""; - }; - E9CB1D361F972FE400D84847 /* Root */ = { - isa = PBXGroup; - children = ( - E9CB1D371F972FE400D84847 /* RootBuilder.swift */, - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */, - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */, - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */, - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */, - ); - path = Root; - sourceTree = ""; - }; - E9CB1D421F972FE400D84847 /* LoggedOut */ = { - isa = PBXGroup; - children = ( - E9C3E1E91FA1BD0400781364 /* DELETE_ME.swift */, - ); - path = LoggedOut; - sourceTree = ""; - }; - F5205CCF508911BE388D8406 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E9894B491F972CC500688FCB /* TicTacToe */ = { - isa = PBXNativeTarget; - buildConfigurationList = E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */; - buildPhases = ( - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */, - E9894B461F972CC500688FCB /* Sources */, - E9894B471F972CC500688FCB /* Frameworks */, - E9894B481F972CC500688FCB /* Resources */, - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TicTacToe; - productName = TicTacToe; - productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E9894B421F972CC500688FCB /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = Uber; - TargetAttributes = { - E9894B491F972CC500688FCB = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = E9894B411F972CC500688FCB; - productRefGroup = E9894B4B1F972CC500688FCB /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E9894B491F972CC500688FCB /* TicTacToe */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E9894B481F972CC500688FCB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RIBs/RIBs.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RIBs.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TicTacToe-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E9894B461F972CC500688FCB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */, - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */, - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */, - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */, - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */, - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */, - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */, - E9C3E1EA1FA1BD0400781364 /* DELETE_ME.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - E9894B651F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - E9894B661F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E9894B681F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Debug; - }; - E9894B691F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B651F972CC600688FCB /* Debug */, - E9894B661F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B681F972CC600688FCB /* Debug */, - E9894B691F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E9894B421F972CC500688FCB /* Project object */; -} diff --git a/ios/tutorials/tutorial1/TicTacToe/AppStart/AppComponent.swift b/ios/tutorials/tutorial1/TicTacToe/AppStart/AppComponent.swift deleted file mode 100644 index cc73b41e4..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/AppStart/AppComponent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class AppComponent: Component, RootDependency { - - init() { - super.init(dependency: EmptyComponent()) - } -} diff --git a/ios/tutorials/tutorial1/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial1/TicTacToe/AppStart/AppDelegate.swift deleted file mode 100644 index 4d46cd5cd..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/AppStart/AppDelegate.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import UIKit - -/// Game app delegate. -@UIApplicationMain -public class AppDelegate: UIResponder, UIApplicationDelegate { - - /// The window. - public var window: UIWindow? - - /// Tells the delegate that the launch process is almost done and the app is almost ready to run. - /// - /// - parameter application: Your singleton app object. - /// - parameter launchOptions: A dictionary indicating the reason the app was launched (if any). The contents of - /// this dictionary may be empty in situations where the user launched the app directly. For information about - /// the possible keys in this dictionary and how to handle them, see Launch Options Keys. - /// - returns: false if the app cannot handle the URL resource or continue a user activity, otherwise return true. - public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let window = UIWindow(frame: UIScreen.main.bounds) - self.window = window - - let launchRouter = RootBuilder(dependency: AppComponent()).build() - self.launchRouter = launchRouter - launchRouter.launch(from: window) - - return true - } - - // MARK: - Private - - private var launchRouter: LaunchRouting? -} diff --git a/ios/tutorials/tutorial1/TicTacToe/Info.plist b/ios/tutorials/tutorial1/TicTacToe/Info.plist deleted file mode 100644 index cf61db68d..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/ios/tutorials/tutorial1/TicTacToe/LoggedOut/DELETE_ME.swift b/ios/tutorials/tutorial1/TicTacToe/LoggedOut/DELETE_ME.swift deleted file mode 100644 index 0aa439dc1..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/LoggedOut/DELETE_ME.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutDependency {} - -protocol LoggedOutListener {} - -protocol LoggedOutBuildable { - func build(withListener: LoggedOutListener) -> ViewableRouting -} - -class LoggedOutInteractor: Interactor {} - -class LoggedOutViewController: UIViewController, ViewControllable { -} - -class LoggedOutBuilder: LoggedOutBuildable { - init(dependency: Any) {} - func build(withListener: LoggedOutListener) -> ViewableRouting { - return ViewableRouter(interactor: LoggedOutInteractor(), viewController: LoggedOutViewController()) - } -} diff --git a/ios/tutorials/tutorial1/TicTacToe/Resources/Default-568h@2x.png b/ios/tutorials/tutorial1/TicTacToe/Resources/Default-568h@2x.png deleted file mode 100644 index 0891b7aab..000000000 Binary files a/ios/tutorials/tutorial1/TicTacToe/Resources/Default-568h@2x.png and /dev/null differ diff --git a/ios/tutorials/tutorial1/TicTacToe/Root/RootBuilder.swift b/ios/tutorials/tutorial1/TicTacToe/Root/RootBuilder.swift deleted file mode 100644 index 7f2676b24..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/Root/RootBuilder.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class RootComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol RootBuildable: Buildable { - func build() -> LaunchRouting -} - -final class RootBuilder: Builder, RootBuildable { - - override init(dependency: RootDependency) { - super.init(dependency: dependency) - } - - func build() -> LaunchRouting { - let component = RootComponent(dependency: dependency) - let viewController = RootViewController() - let interactor = RootInteractor(presenter: viewController) - - let loggedOutBuilder = LoggedOutBuilder(dependency: component) - return RootRouter(interactor: interactor, - viewController: viewController, - loggedOutBuilder: loggedOutBuilder) - } -} diff --git a/ios/tutorials/tutorial1/TicTacToe/Root/RootComponent+LoggedOut.swift b/ios/tutorials/tutorial1/TicTacToe/Root/RootComponent+LoggedOut.swift deleted file mode 100644 index a2f32f599..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/Root/RootComponent+LoggedOut.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedOut scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedOut: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedOut scope. -} - -extension RootComponent: LoggedOutDependency { - - // TODO: Implement properties to provide for LoggedOut scope. -} diff --git a/ios/tutorials/tutorial1/TicTacToe/Root/RootInteractor.swift b/ios/tutorials/tutorial1/TicTacToe/Root/RootInteractor.swift deleted file mode 100644 index a1ec1902a..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/Root/RootInteractor.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol RootRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol RootPresentable: Presentable { - var listener: RootPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol RootListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class RootInteractor: PresentableInteractor, RootInteractable, RootPresentableListener { - - weak var router: RootRouting? - - weak var listener: RootListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: RootPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } -} diff --git a/ios/tutorials/tutorial1/TicTacToe/Root/RootRouter.swift b/ios/tutorials/tutorial1/TicTacToe/Root/RootRouter.swift deleted file mode 100644 index 9e6415832..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/Root/RootRouter.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootInteractable: Interactable, LoggedOutListener { - var router: RootRouting? { get set } - var listener: RootListener? { get set } -} - -protocol RootViewControllable: ViewControllable { - func present(viewController: ViewControllable) -} - -final class RootRouter: LaunchRouter, RootRouting { - - init(interactor: RootInteractable, - viewController: RootViewControllable, - loggedOutBuilder: LoggedOutBuildable) { - self.loggedOutBuilder = loggedOutBuilder - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - - let loggedOut = loggedOutBuilder.build(withListener: interactor) - self.loggedOut = loggedOut - attachChild(loggedOut) - viewController.present(viewController: loggedOut.viewControllable) - } - - // MARK: - Private - - private let loggedOutBuilder: LoggedOutBuildable - - private var loggedOut: ViewableRouting? -} diff --git a/ios/tutorials/tutorial1/TicTacToe/Root/RootViewController.swift b/ios/tutorials/tutorial1/TicTacToe/Root/RootViewController.swift deleted file mode 100644 index 06cdc492c..000000000 --- a/ios/tutorials/tutorial1/TicTacToe/Root/RootViewController.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol RootPresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class RootViewController: UIViewController, RootPresentable, RootViewControllable { - - weak var listener: RootPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - } - - // MARK: - RootViewControllable - - func present(viewController: ViewControllable) { - present(viewController.uiviewController, animated: true, completion: nil) - } -} diff --git a/ios/tutorials/tutorial2/Podfile b/ios/tutorials/tutorial2/Podfile deleted file mode 100644 index d8c8d777e..000000000 --- a/ios/tutorials/tutorial2/Podfile +++ /dev/null @@ -1,14 +0,0 @@ -platform :ios, '9.0' - -use_frameworks! -inhibit_all_warnings! - -target 'TicTacToe' do - pod 'RIBs', :path => '../../../' - pod 'SnapKit', '~> 4.0.0' - pod 'RxCocoa', '~> 5.1' -end - -target 'TicTacToeTests' do - pod 'RIBs', :path => '../../../' -end diff --git a/ios/tutorials/tutorial2/README.md b/ios/tutorials/tutorial2/README.md deleted file mode 100644 index 721460220..000000000 --- a/ios/tutorials/tutorial2/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# RIBs Tutorial 2: Composing RIBs - -This project is the starting point for [tutorial 2](https://github.com/uber/RIBs/wiki/iOS-Tutorial-2). - -### Getting started -Install tooling, unless you've done so already: - -``` -/ios/tooling/install-xcode-template.sh -``` - -Then, install pods for the tutorial: - -``` -gem install cocoapods # In case you don't have it -cd /ios/tutorials/tutorial2 -pod install -``` - -Then, open the TicTacToe.xcworkspace that was generated by `pod install` and follow the steps described in [tutorial 2](https://github.com/uber/RIBs/wiki/iOS-Tutorial-2) on the RIBs wiki. diff --git a/ios/tutorials/tutorial2/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial2/TicTacToe.xcodeproj/project.pbxproj deleted file mode 100644 index 0f044421f..000000000 --- a/ios/tutorials/tutorial2/TicTacToe.xcodeproj/project.pbxproj +++ /dev/null @@ -1,661 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */; }; - 902781EB24A674D0368A3917 /* Pods_TicTacToeTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D008FD5813F6BDE9C4955F5C /* Pods_TicTacToeTests.framework */; }; - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */; }; - E9C3E1EE1FA1C07F00781364 /* DELETE_ME.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C3E1EB1FA1BF9700781364 /* DELETE_ME.swift */; }; - E9C86D8A1FA3586500B61DF6 /* TicTacToeMocks.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D891FA3586500B61DF6 /* TicTacToeMocks.swift */; }; - E9C86D921FA35F8F00B61DF6 /* LoggedOutInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */; }; - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D351F972FD500D84847 /* AppDelegate.swift */; }; - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D341F972FD500D84847 /* AppComponent.swift */; }; - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */; }; - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */; }; - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */; }; - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D371F972FE400D84847 /* RootBuilder.swift */; }; - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */; }; - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */; }; - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */; }; - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3B1F972FE400D84847 /* RootRouter.swift */; }; - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3C1F972FE400D84847 /* RootViewController.swift */; }; - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */; }; - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */; }; - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */; }; - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - E9C86D8C1FA3586500B61DF6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = E9894B421F972CC500688FCB /* Project object */; - proxyType = 1; - remoteGlobalIDString = E9894B491F972CC500688FCB; - remoteInfo = TicTacToe; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 125BC081886F3825A4B7C3E3 /* Pods-TicTacToeTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToeTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToeTests/Pods-TicTacToeTests.debug.xcconfig"; sourceTree = ""; }; - 1CC7657EC6690F406564B055 /* Pods-TicTacToeTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToeTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToeTests/Pods-TicTacToeTests.release.xcconfig"; sourceTree = ""; }; - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.debug.xcconfig"; sourceTree = ""; }; - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.release.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.release.xcconfig"; sourceTree = ""; }; - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TicTacToe.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D008FD5813F6BDE9C4955F5C /* Pods_TicTacToeTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TicTacToeTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B4A1F972CC500688FCB /* TicTacToe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TicTacToe.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B591F972CC500688FCB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E9C3E1EB1FA1BF9700781364 /* DELETE_ME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DELETE_ME.swift; sourceTree = ""; }; - E9C3E1EC1FA1BF9700781364 /* LoggedInComponent+TicTacToe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+TicTacToe.swift"; sourceTree = ""; }; - E9C3E1ED1FA1BF9700781364 /* LoggedInComponent+OffGame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+OffGame.swift"; sourceTree = ""; }; - E9C86D871FA3586500B61DF6 /* TicTacToeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TicTacToeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - E9C86D891FA3586500B61DF6 /* TicTacToeMocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeMocks.swift; sourceTree = ""; }; - E9C86D8B1FA3586500B61DF6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E9CB1D341F972FD500D84847 /* AppComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppComponent.swift; sourceTree = ""; }; - E9CB1D351F972FD500D84847 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E9CB1D371F972FE400D84847 /* RootBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootBuilder.swift; sourceTree = ""; }; - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedIn.swift"; sourceTree = ""; }; - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedOut.swift"; sourceTree = ""; }; - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootInteractor.swift; sourceTree = ""; }; - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootRouter.swift; sourceTree = ""; }; - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeBuilder.swift; sourceTree = ""; }; - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeInteractor.swift; sourceTree = ""; }; - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeRouter.swift; sourceTree = ""; }; - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeViewController.swift; sourceTree = ""; }; - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutBuilder.swift; sourceTree = ""; }; - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutInteractor.swift; sourceTree = ""; }; - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutRouter.swift; sourceTree = ""; }; - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E9894B471F972CC500688FCB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E9C86D841FA3586500B61DF6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 902781EB24A674D0368A3917 /* Pods_TicTacToeTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 59F943336420DE07CA779F6F /* Pods */ = { - isa = PBXGroup; - children = ( - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */, - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */, - 125BC081886F3825A4B7C3E3 /* Pods-TicTacToeTests.debug.xcconfig */, - 1CC7657EC6690F406564B055 /* Pods-TicTacToeTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 7EDD59511FA135E9005EC8B2 /* Resources */ = { - isa = PBXGroup; - children = ( - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, - ); - path = Resources; - sourceTree = ""; - }; - E9894B411F972CC500688FCB = { - isa = PBXGroup; - children = ( - E9894B4C1F972CC500688FCB /* TicTacToe */, - E9C86D881FA3586500B61DF6 /* TicTacToeTests */, - E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, - F5205CCF508911BE388D8406 /* Frameworks */, - ); - sourceTree = ""; - }; - E9894B4B1F972CC500688FCB /* Products */ = { - isa = PBXGroup; - children = ( - E9894B4A1F972CC500688FCB /* TicTacToe.app */, - E9C86D871FA3586500B61DF6 /* TicTacToeTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - E9894B4C1F972CC500688FCB /* TicTacToe */ = { - isa = PBXGroup; - children = ( - 7EDD59511FA135E9005EC8B2 /* Resources */, - E9CB1D331F972FD500D84847 /* AppStart */, - E9CB1D471F972FE500D84847 /* LoggedIn */, - E9CB1D421F972FE400D84847 /* LoggedOut */, - E9CB1D361F972FE400D84847 /* Root */, - E9CB1D3D1F972FE400D84847 /* TicTacToe */, - E9894B591F972CC500688FCB /* Info.plist */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9C86D881FA3586500B61DF6 /* TicTacToeTests */ = { - isa = PBXGroup; - children = ( - E9C86D891FA3586500B61DF6 /* TicTacToeMocks.swift */, - E9C86D8B1FA3586500B61DF6 /* Info.plist */, - ); - path = TicTacToeTests; - sourceTree = ""; - }; - E9CB1D331F972FD500D84847 /* AppStart */ = { - isa = PBXGroup; - children = ( - E9CB1D341F972FD500D84847 /* AppComponent.swift */, - E9CB1D351F972FD500D84847 /* AppDelegate.swift */, - ); - path = AppStart; - sourceTree = ""; - }; - E9CB1D361F972FE400D84847 /* Root */ = { - isa = PBXGroup; - children = ( - E9CB1D371F972FE400D84847 /* RootBuilder.swift */, - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */, - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */, - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */, - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */, - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */, - ); - path = Root; - sourceTree = ""; - }; - E9CB1D3D1F972FE400D84847 /* TicTacToe */ = { - isa = PBXGroup; - children = ( - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */, - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */, - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */, - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9CB1D421F972FE400D84847 /* LoggedOut */ = { - isa = PBXGroup; - children = ( - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */, - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */, - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */, - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */, - ); - path = LoggedOut; - sourceTree = ""; - }; - E9CB1D471F972FE500D84847 /* LoggedIn */ = { - isa = PBXGroup; - children = ( - E9C3E1EB1FA1BF9700781364 /* DELETE_ME.swift */, - E9C3E1ED1FA1BF9700781364 /* LoggedInComponent+OffGame.swift */, - E9C3E1EC1FA1BF9700781364 /* LoggedInComponent+TicTacToe.swift */, - ); - path = LoggedIn; - sourceTree = ""; - }; - F5205CCF508911BE388D8406 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, - D008FD5813F6BDE9C4955F5C /* Pods_TicTacToeTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E9894B491F972CC500688FCB /* TicTacToe */ = { - isa = PBXNativeTarget; - buildConfigurationList = E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */; - buildPhases = ( - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */, - E9894B461F972CC500688FCB /* Sources */, - E9894B471F972CC500688FCB /* Frameworks */, - E9894B481F972CC500688FCB /* Resources */, - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TicTacToe; - productName = TicTacToe; - productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; - productType = "com.apple.product-type.application"; - }; - E9C86D861FA3586500B61DF6 /* TicTacToeTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = E9C86D901FA3586600B61DF6 /* Build configuration list for PBXNativeTarget "TicTacToeTests" */; - buildPhases = ( - EFEB812EF3BA56E9928EF4E3 /* [CP] Check Pods Manifest.lock */, - E9C86D831FA3586500B61DF6 /* Sources */, - E9C86D841FA3586500B61DF6 /* Frameworks */, - E9C86D851FA3586500B61DF6 /* Resources */, - 5FD5ECF53320E2E0DAFD17C5 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - E9C86D8D1FA3586500B61DF6 /* PBXTargetDependency */, - ); - name = TicTacToeTests; - productName = TicTacToeTests; - productReference = E9C86D871FA3586500B61DF6 /* TicTacToeTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E9894B421F972CC500688FCB /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = Uber; - TargetAttributes = { - E9894B491F972CC500688FCB = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - }; - E9C86D861FA3586500B61DF6 = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - TestTargetID = E9894B491F972CC500688FCB; - }; - }; - }; - buildConfigurationList = E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = E9894B411F972CC500688FCB; - productRefGroup = E9894B4B1F972CC500688FCB /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E9894B491F972CC500688FCB /* TicTacToe */, - E9C86D861FA3586500B61DF6 /* TicTacToeTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E9894B481F972CC500688FCB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E9C86D851FA3586500B61DF6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RIBs/RIBs.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RIBs.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 5FD5ECF53320E2E0DAFD17C5 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TicTacToeTests/Pods-TicTacToeTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RIBs/RIBs.framework", - "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RIBs.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TicTacToeTests/Pods-TicTacToeTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TicTacToe-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - EFEB812EF3BA56E9928EF4E3 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TicTacToeTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E9894B461F972CC500688FCB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */, - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */, - E9C86D921FA35F8F00B61DF6 /* LoggedOutInteractor.swift in Sources */, - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */, - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */, - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */, - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */, - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */, - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */, - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */, - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */, - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */, - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */, - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */, - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */, - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */, - E9C3E1EE1FA1C07F00781364 /* DELETE_ME.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E9C86D831FA3586500B61DF6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E9C86D8A1FA3586500B61DF6 /* TicTacToeMocks.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - E9C86D8D1FA3586500B61DF6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = E9894B491F972CC500688FCB /* TicTacToe */; - targetProxy = E9C86D8C1FA3586500B61DF6 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - E9894B651F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - E9894B661F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E9894B681F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Debug; - }; - E9894B691F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Release; - }; - E9C86D8E1FA3586600B61DF6 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 125BC081886F3825A4B7C3E3 /* Pods-TicTacToeTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TicTacToe.app/TicTacToe"; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToeTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToeTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TicTacToe.app/TicTacToe"; - }; - name = Debug; - }; - E9C86D8F1FA3586600B61DF6 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1CC7657EC6690F406564B055 /* Pods-TicTacToeTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TicTacToe.app/TicTacToe"; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToeTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToeTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TicTacToe.app/TicTacToe"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B651F972CC600688FCB /* Debug */, - E9894B661F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B681F972CC600688FCB /* Debug */, - E9894B691F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E9C86D901FA3586600B61DF6 /* Build configuration list for PBXNativeTarget "TicTacToeTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9C86D8E1FA3586600B61DF6 /* Debug */, - E9C86D8F1FA3586600B61DF6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E9894B421F972CC500688FCB /* Project object */; -} diff --git a/ios/tutorials/tutorial2/TicTacToe/AppStart/AppComponent.swift b/ios/tutorials/tutorial2/TicTacToe/AppStart/AppComponent.swift deleted file mode 100644 index cc73b41e4..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/AppStart/AppComponent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class AppComponent: Component, RootDependency { - - init() { - super.init(dependency: EmptyComponent()) - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial2/TicTacToe/AppStart/AppDelegate.swift deleted file mode 100644 index d0b07d283..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/AppStart/AppDelegate.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift -import UIKit - -/// Game app delegate. -@UIApplicationMain -public class AppDelegate: UIResponder, UIApplicationDelegate { - - /// The window. - public var window: UIWindow? - - /// Tells the delegate that the launch process is almost done and the app is almost ready to run. - /// - /// - parameter application: Your singleton app object. - /// - parameter launchOptions: A dictionary indicating the reason the app was launched (if any). The contents of - /// this dictionary may be empty in situations where the user launched the app directly. For information about - /// the possible keys in this dictionary and how to handle them, see Launch Options Keys. - /// - returns: false if the app cannot handle the URL resource or continue a user activity, otherwise return true. - public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let window = UIWindow(frame: UIScreen.main.bounds) - self.window = window - - let launchRouter = RootBuilder(dependency: AppComponent()).build() - self.launchRouter = launchRouter - launchRouter.launch(from: window) - - return true - } - - // MARK: - Private - - private var launchRouter: LaunchRouting? -} diff --git a/ios/tutorials/tutorial2/TicTacToe/Info.plist b/ios/tutorials/tutorial2/TicTacToe/Info.plist deleted file mode 100644 index cf61db68d..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/ios/tutorials/tutorial2/TicTacToe/LoggedIn/DELETE_ME.swift b/ios/tutorials/tutorial2/TicTacToe/LoggedIn/DELETE_ME.swift deleted file mode 100644 index 2706d70f3..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/LoggedIn/DELETE_ME.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation - -class LoggedInComponent {} - -protocol LoggedInDependency {} - -protocol OffGameDependency {} - -protocol LoggedInViewControllable {} - -protocol LoggedInBuildable {} - -protocol LoggedInListener {} - -protocol LoggedInRouting {} - -protocol LoggedInInteractable {} - -extension RootViewController: LoggedInViewControllable {} diff --git a/ios/tutorials/tutorial2/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift b/ios/tutorials/tutorial2/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift deleted file mode 100644 index b8fbc434b..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the OffGame scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyOffGame: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the OffGame scope. -} - -extension LoggedInComponent: OffGameDependency { - - // TODO: Implement properties to provide for OffGame scope. -} diff --git a/ios/tutorials/tutorial2/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift b/ios/tutorials/tutorial2/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift deleted file mode 100644 index daa3c2a9e..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the TicTacToe scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyTicTacToe: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the TicTacToe scope. -} - -extension LoggedInComponent: TicTacToeDependency { - - // TODO: Implement properties to provide for TicTacToe scope. -} diff --git a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutBuilder.swift b/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutBuilder.swift deleted file mode 100644 index f023e78d7..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutBuilder.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class LoggedOutComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol LoggedOutBuildable: Buildable { - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting -} - -final class LoggedOutBuilder: Builder, LoggedOutBuildable { - - override init(dependency: LoggedOutDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting { - _ = LoggedOutComponent(dependency: dependency) - let viewController = LoggedOutViewController() - let interactor = LoggedOutInteractor(presenter: viewController) - interactor.listener = listener - return LoggedOutRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutInteractor.swift b/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutInteractor.swift deleted file mode 100644 index 6a58d9828..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutInteractor.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol LoggedOutRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol LoggedOutPresentable: Presentable { - var listener: LoggedOutPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol LoggedOutListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class LoggedOutInteractor: PresentableInteractor, LoggedOutInteractable, LoggedOutPresentableListener { - - weak var router: LoggedOutRouting? - - weak var listener: LoggedOutListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: LoggedOutPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutPresentableListener - - func login(withPlayer1Name player1Name: String?, player2Name: String?) { - let player1NameWithDefault = playerName(player1Name, withDefaultName: "Player 1") - let player2NameWithDefault = playerName(player2Name, withDefaultName: "Player 2") - print("\(player1NameWithDefault) vs \(player2NameWithDefault)") - } - - private func playerName(_ name: String?, withDefaultName defaultName: String) -> String { - if let name = name { - return name.isEmpty ? defaultName : name - } else { - return defaultName - } - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutRouter.swift b/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutRouter.swift deleted file mode 100644 index c9cadb437..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutInteractable: Interactable { - var router: LoggedOutRouting? { get set } - var listener: LoggedOutListener? { get set } -} - -protocol LoggedOutViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class LoggedOutRouter: ViewableRouter, LoggedOutRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: LoggedOutInteractable, viewController: LoggedOutViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutViewController.swift deleted file mode 100644 index 42670412c..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol LoggedOutPresentableListener: AnyObject { - func login(withPlayer1Name: String?, player2Name: String?) -} - -final class LoggedOutViewController: UIViewController, LoggedOutPresentable, LoggedOutViewControllable { - - weak var listener: LoggedOutPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - let playerFields = buildPlayerFields() - buildLoginButton(withPlayer1Field: playerFields.player1Field, player2Field: playerFields.player2Field) - } - - // MARK: - Private - - private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { - let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line - view.addSubview(player1Field) - player1Field.placeholder = "Player 1 name" - player1Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(self.view).offset(100) - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(40) - } - - let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line - view.addSubview(player2Field) - player2Field.placeholder = "Player 2 name" - player2Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player1Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - - return (player1Field, player2Field) - } - - private func buildLoginButton(withPlayer1Field player1Field: UITextField, player2Field: UITextField) { - let loginButton = UIButton() - view.addSubview(loginButton) - loginButton.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player2Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - loginButton.setTitle("Login", for: .normal) - loginButton.setTitleColor(UIColor.white, for: .normal) - loginButton.backgroundColor = UIColor.black - loginButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.login(withPlayer1Name: player1Field.text, player2Name: player2Field.text) - }) - .disposed(by: disposeBag) - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial2/TicTacToe/Resources/Default-568h@2x.png b/ios/tutorials/tutorial2/TicTacToe/Resources/Default-568h@2x.png deleted file mode 100644 index 0891b7aab..000000000 Binary files a/ios/tutorials/tutorial2/TicTacToe/Resources/Default-568h@2x.png and /dev/null differ diff --git a/ios/tutorials/tutorial2/TicTacToe/Root/RootBuilder.swift b/ios/tutorials/tutorial2/TicTacToe/Root/RootBuilder.swift deleted file mode 100644 index f96527376..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/Root/RootBuilder.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class RootComponent: Component { - - let rootViewController: RootViewController - - init(dependency: RootDependency, - rootViewController: RootViewController) { - self.rootViewController = rootViewController - super.init(dependency: dependency) - } -} - -// MARK: - Builder - -protocol RootBuildable: Buildable { - func build() -> LaunchRouting -} - -final class RootBuilder: Builder, RootBuildable { - - override init(dependency: RootDependency) { - super.init(dependency: dependency) - } - - func build() -> LaunchRouting { - let viewController = RootViewController() - let component = RootComponent(dependency: dependency, - rootViewController: viewController) - let interactor = RootInteractor(presenter: viewController) - - let loggedOutBuilder = LoggedOutBuilder(dependency: component) - return RootRouter(interactor: interactor, - viewController: viewController, - loggedOutBuilder: loggedOutBuilder) - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/Root/RootComponent+LoggedIn.swift b/ios/tutorials/tutorial2/TicTacToe/Root/RootComponent+LoggedIn.swift deleted file mode 100644 index 2351441c1..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/Root/RootComponent+LoggedIn.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedIn scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedIn: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedIn scope. -} - -extension RootComponent: LoggedInDependency { - - var loggedInViewController: LoggedInViewControllable { - return rootViewController - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/Root/RootComponent+LoggedOut.swift b/ios/tutorials/tutorial2/TicTacToe/Root/RootComponent+LoggedOut.swift deleted file mode 100644 index a2f32f599..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/Root/RootComponent+LoggedOut.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedOut scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedOut: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedOut scope. -} - -extension RootComponent: LoggedOutDependency { - - // TODO: Implement properties to provide for LoggedOut scope. -} diff --git a/ios/tutorials/tutorial2/TicTacToe/Root/RootInteractor.swift b/ios/tutorials/tutorial2/TicTacToe/Root/RootInteractor.swift deleted file mode 100644 index a39d24f3f..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/Root/RootInteractor.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol RootRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol RootPresentable: Presentable { - var listener: RootPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol RootListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class RootInteractor: PresentableInteractor, RootInteractable, RootPresentableListener { - - weak var router: RootRouting? - - weak var listener: RootListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: RootPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutListener -} diff --git a/ios/tutorials/tutorial2/TicTacToe/Root/RootRouter.swift b/ios/tutorials/tutorial2/TicTacToe/Root/RootRouter.swift deleted file mode 100644 index d1192bb63..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/Root/RootRouter.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootInteractable: Interactable, LoggedOutListener { - var router: RootRouting? { get set } - var listener: RootListener? { get set } -} - -protocol RootViewControllable: ViewControllable { - func present(viewController: ViewControllable) -} - -final class RootRouter: LaunchRouter, RootRouting { - - init(interactor: RootInteractable, - viewController: RootViewControllable, - loggedOutBuilder: LoggedOutBuildable) { - self.loggedOutBuilder = loggedOutBuilder - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - - routeToLoggedOut() - } - - // MARK: - Private - - private let loggedOutBuilder: LoggedOutBuildable - - private var loggedOut: ViewableRouting? - - private func routeToLoggedOut() { - let loggedOut = loggedOutBuilder.build(withListener: interactor) - self.loggedOut = loggedOut - attachChild(loggedOut) - viewController.present(viewController: loggedOut.viewControllable) - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/Root/RootViewController.swift b/ios/tutorials/tutorial2/TicTacToe/Root/RootViewController.swift deleted file mode 100644 index 06cdc492c..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/Root/RootViewController.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol RootPresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class RootViewController: UIViewController, RootPresentable, RootViewControllable { - - weak var listener: RootPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - } - - // MARK: - RootViewControllable - - func present(viewController: ViewControllable) { - present(viewController.uiviewController, animated: true, completion: nil) - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeBuilder.swift b/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeBuilder.swift deleted file mode 100644 index 411a07c00..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeBuilder.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol TicTacToeDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class TicTacToeComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol TicTacToeBuildable: Buildable { - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting -} - -final class TicTacToeBuilder: Builder, TicTacToeBuildable { - - override init(dependency: TicTacToeDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting { - _ = TicTacToeComponent(dependency: dependency) - let viewController = TicTacToeViewController() - let interactor = TicTacToeInteractor(presenter: viewController) - interactor.listener = listener - return TicTacToeRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeInteractor.swift b/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeInteractor.swift deleted file mode 100644 index 913aa19cf..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeInteractor.swift +++ /dev/null @@ -1,158 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol TicTacToeRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol TicTacToePresentable: Presentable { - var listener: TicTacToePresentableListener? { get set } - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) - func announce(winner: PlayerType) -} - -protocol TicTacToeListener: AnyObject { - func gameDidEnd() -} - -final class TicTacToeInteractor: PresentableInteractor, TicTacToeInteractable, TicTacToePresentableListener { - - weak var router: TicTacToeRouting? - - weak var listener: TicTacToeListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: TicTacToePresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - - initBoard() - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - TicTacToePresentableListener - - func placeCurrentPlayerMark(atRow row: Int, col: Int) { - guard board[row][col] == nil else { - return - } - - let currentPlayer = getAndFlipCurrentPlayer() - board[row][col] = currentPlayer - presenter.setCell(atRow: row, col: col, withPlayerType: currentPlayer) - - if let winner = checkWinner() { - presenter.announce(winner: winner) - } - } - - func closeGame() { - listener?.gameDidEnd() - } - - // MARK: - Private - - private var currentPlayer = PlayerType.red - private var board = [[PlayerType?]]() - - private func initBoard() { - for _ in 0.. PlayerType { - let currentPlayer = self.currentPlayer - self.currentPlayer = currentPlayer == .red ? .blue : .red - return currentPlayer - } - - private func checkWinner() -> PlayerType? { - // Rows. - for row in 0.., TicTacToeRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: TicTacToeInteractable, viewController: TicTacToeViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeViewController.swift deleted file mode 100644 index 4ff820e9c..000000000 --- a/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol TicTacToePresentableListener: AnyObject { - func placeCurrentPlayerMark(atRow row: Int, col: Int) - func closeGame() -} - -final class TicTacToeViewController: UIViewController, TicTacToePresentable, TicTacToeViewControllable { - - weak var listener: TicTacToePresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildCollectionView() - } - - // MARK: - TicTacToePresentable - - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) { - let indexPathRow = row * GameConstants.colCount + col - let color: UIColor = { - switch playerType { - case .red: - return UIColor.red - case .blue: - return UIColor.blue - } - }() - let cell = collectionView.cellForItem(at: IndexPath(row: indexPathRow, section: Constants.sectionCount - 1)) - cell?.backgroundColor = color - } - - func announce(winner: PlayerType) { - let winnerString: String = { - switch winner { - case .red: - return "Red" - case .blue: - return "Blue" - } - }() - let alert = UIAlertController(title: "\(winnerString) Won!", message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { [weak self] _ in - self?.listener?.closeGame() - } - alert.addAction(closeAction) - present(alert, animated: true, completion: nil) - } - - // MARK: - Private - - private lazy var collectionView: UICollectionView = { - let layout = UICollectionViewFlowLayout() - layout.minimumLineSpacing = 0 - layout.minimumInteritemSpacing = 0 - layout.itemSize = CGSize(width: Constants.cellSize, height: Constants.cellSize) - return UICollectionView(frame: CGRect.zero, collectionViewLayout: layout) - }() - - private func buildCollectionView() { - collectionView.dataSource = self - collectionView.delegate = self - collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: Constants.cellIdentifier) - view.addSubview(collectionView) - collectionView.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.size.equalTo(CGSize(width: CGFloat(GameConstants.colCount) * Constants.cellSize, height: CGFloat(GameConstants.rowCount) * Constants.cellSize)) - } - } -} - -fileprivate struct Constants { - static let sectionCount = 1 - static let cellSize: CGFloat = UIScreen.main.bounds.width / CGFloat(GameConstants.colCount) - static let cellIdentifier = "TicTacToeCell" - static let defaultColor = UIColor.white -} - -extension TicTacToeViewController: UICollectionViewDataSource { - - func numberOfSections(in collectionView: UICollectionView) -> Int { - return Constants.sectionCount - } - - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return GameConstants.rowCount * GameConstants.colCount - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let reusedCell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.cellIdentifier, for: indexPath) - reset(cell: reusedCell) - return reusedCell - } - - private func reset(cell: UICollectionViewCell) { - cell.backgroundColor = Constants.defaultColor - cell.contentView.layer.borderWidth = 2 - cell.contentView.layer.borderColor = UIColor.lightGray.cgColor - } -} - -// MARK: - UICollectionViewDelegate - -extension TicTacToeViewController: UICollectionViewDelegate { - - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - let row = indexPath.row / GameConstants.colCount - let col = indexPath.row - row * GameConstants.rowCount - listener?.placeCurrentPlayerMark(atRow: row, col: col) - } -} diff --git a/ios/tutorials/tutorial2/TicTacToeTests/Info.plist b/ios/tutorials/tutorial2/TicTacToeTests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/ios/tutorials/tutorial2/TicTacToeTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/ios/tutorials/tutorial2/TicTacToeTests/TicTacToeMocks.swift b/ios/tutorials/tutorial2/TicTacToeTests/TicTacToeMocks.swift deleted file mode 100644 index c14bfcd5c..000000000 --- a/ios/tutorials/tutorial2/TicTacToeTests/TicTacToeMocks.swift +++ /dev/null @@ -1,273 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@testable import TicTacToe -import RIBs -import RxSwift -import UIKit - -// MARK: - LoggedInBuildableMock class - -/// A LoggedInBuildableMock class used for testing. -class LoggedInBuildableMock: LoggedInBuildable { - - // Function Handlers - var buildHandler: ((_ listener: LoggedInListener) -> LoggedInRouting)? - var buildCallCount: Int = 0 - - init() { - } - - func build(withListener listener: LoggedInListener) -> LoggedInRouting { - buildCallCount += 1 - if let buildHandler = buildHandler { - return buildHandler(listener) - } - fatalError("Function build returns a value that can't be handled with a default value and its handler must be set") - } -} - -// MARK: - LoggedInInteractableMock class - -/// A LoggedInInteractableMock class used for testing. -class LoggedInInteractableMock: LoggedInInteractable { - // Variables - var router: LoggedInRouting? { didSet { routerSetCallCount += 1 } } - var routerSetCallCount = 0 - var listener: LoggedInListener? { didSet { listenerSetCallCount += 1 } } - var listenerSetCallCount = 0 - var isActive: Bool = false { didSet { isActiveSetCallCount += 1 } } - var isActiveSetCallCount = 0 - var isActiveStreamSubject: PublishSubject = PublishSubject() { didSet { isActiveStreamSubjectSetCallCount += 1 } } - var isActiveStreamSubjectSetCallCount = 0 - var isActiveStream: Observable { return isActiveStreamSubject } - - // Function Handlers - var activateHandler: (() -> ())? - var activateCallCount: Int = 0 - var deactivateHandler: (() -> ())? - var deactivateCallCount: Int = 0 - var startTicTacToeHandler: (() -> ())? - var startTicTacToeCallCount: Int = 0 - var gameDidEndHandler: (() -> ())? - var gameDidEndCallCount: Int = 0 - - init() { - } - - func activate() { - activateCallCount += 1 - if let activateHandler = activateHandler { - return activateHandler() - } - } - - func deactivate() { - deactivateCallCount += 1 - if let deactivateHandler = deactivateHandler { - return deactivateHandler() - } - } - - func startTicTacToe() { - startTicTacToeCallCount += 1 - if let startTicTacToeHandler = startTicTacToeHandler { - return startTicTacToeHandler() - } - } - - func gameDidEnd() { - gameDidEndCallCount += 1 - if let gameDidEndHandler = gameDidEndHandler { - return gameDidEndHandler() - } - } -} - -// MARK: - LoggedInRoutingMock class - -/// A LoggedInRoutingMock class used for testing. -class LoggedInRoutingMock: LoggedInRouting { - // Variables - var interactable: Interactable { didSet { interactableSetCallCount += 1 } } - var interactableSetCallCount = 0 - var children: [Routing] = [Routing]() { didSet { childrenSetCallCount += 1 } } - var childrenSetCallCount = 0 - var lifecycleSubject: PublishSubject = PublishSubject() { didSet { lifecycleSubjectSetCallCount += 1 } } - var lifecycleSubjectSetCallCount = 0 - var lifecycle: Observable { return lifecycleSubject } - - // Function Handlers - var cleanupViewsHandler: (() -> ())? - var cleanupViewsCallCount: Int = 0 - var routeToTicTacToeHandler: (() -> ())? - var routeToTicTacToeCallCount: Int = 0 - var routeToOffGameHandler: (() -> ())? - var routeToOffGameCallCount: Int = 0 - var loadHandler: (() -> ())? - var loadCallCount: Int = 0 - var attachChildHandler: ((_ child: Routing) -> ())? - var attachChildCallCount: Int = 0 - var detachChildHandler: ((_ child: Routing) -> ())? - var detachChildCallCount: Int = 0 - - init(interactable: Interactable) { - self.interactable = interactable - } - - func cleanupViews() { - cleanupViewsCallCount += 1 - if let cleanupViewsHandler = cleanupViewsHandler { - return cleanupViewsHandler() - } - } - - func routeToTicTacToe() { - routeToTicTacToeCallCount += 1 - if let routeToTicTacToeHandler = routeToTicTacToeHandler { - return routeToTicTacToeHandler() - } - } - - func routeToOffGame() { - routeToOffGameCallCount += 1 - if let routeToOffGameHandler = routeToOffGameHandler { - return routeToOffGameHandler() - } - } - - func load() { - loadCallCount += 1 - if let loadHandler = loadHandler { - return loadHandler() - } - } - - func attachChild(_ child: Routing) { - attachChildCallCount += 1 - if let attachChildHandler = attachChildHandler { - return attachChildHandler(child) - } - } - - func detachChild(_ child: Routing) { - detachChildCallCount += 1 - if let detachChildHandler = detachChildHandler { - return detachChildHandler(child) - } - } -} - -// MARK: - LoggedOutBuildableMock class - -/// A LoggedOutBuildableMock class used for testing. -class LoggedOutBuildableMock: LoggedOutBuildable { - - // Function Handlers - var buildHandler: ((_ listener: LoggedOutListener) -> LoggedOutRouting)? - var buildCallCount: Int = 0 - - init() { - } - - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting { - buildCallCount += 1 - if let buildHandler = buildHandler { - return buildHandler(listener) - } - fatalError("Function build returns a value that can't be handled with a default value and its handler must be set") - } -} - -// MARK: - RootInteractableMock class - -/// A RootInteractableMock class used for testing. -class RootInteractableMock: RootInteractable { - // Variables - var router: RootRouting? { didSet { routerSetCallCount += 1 } } - var routerSetCallCount = 0 - var listener: RootListener? { didSet { listenerSetCallCount += 1 } } - var listenerSetCallCount = 0 - var isActive: Bool = false { didSet { isActiveSetCallCount += 1 } } - var isActiveSetCallCount = 0 - var isActiveStreamSubject: PublishSubject = PublishSubject() { didSet { isActiveStreamSubjectSetCallCount += 1 } } - var isActiveStreamSubjectSetCallCount = 0 - var isActiveStream: Observable { return isActiveStreamSubject } - - // Function Handlers - var activateHandler: (() -> ())? - var activateCallCount: Int = 0 - var deactivateHandler: (() -> ())? - var deactivateCallCount: Int = 0 - var didLoginHandler: ((_ player1Name: String, _ player2Name: String) -> ())? - var didLoginCallCount: Int = 0 - - init() { - } - - func activate() { - activateCallCount += 1 - if let activateHandler = activateHandler { - return activateHandler() - } - } - - func deactivate() { - deactivateCallCount += 1 - if let deactivateHandler = deactivateHandler { - return deactivateHandler() - } - } - - func didLogin(withPlayer1Name player1Name: String, player2Name: String) { - didLoginCallCount += 1 - if let didLoginHandler = didLoginHandler { - return didLoginHandler(player1Name, player2Name) - } - } -} - -// MARK: - RootViewControllableMock class - -/// A RootViewControllableMock class used for testing. -class RootViewControllableMock: RootViewControllable { - // Variables - var uiviewController: UIViewController = UIViewController() { didSet { uiviewControllerSetCallCount += 1 } } - var uiviewControllerSetCallCount = 0 - - // Function Handlers - var presentHandler: ((_ viewController: ViewControllable) -> ())? - var presentCallCount: Int = 0 - var dismissHandler: ((_ viewController: ViewControllable) -> ())? - var dismissCallCount: Int = 0 - - init() { - } - - func present(viewController: ViewControllable) { - presentCallCount += 1 - if let presentHandler = presentHandler { - return presentHandler(viewController) - } - } - - func dismiss(viewController: ViewControllable) { - dismissCallCount += 1 - if let dismissHandler = dismissHandler { - return dismissHandler(viewController) - } - } -} diff --git a/ios/tutorials/tutorial3-completed/Podfile b/ios/tutorials/tutorial3-completed/Podfile deleted file mode 100644 index 980817e94..000000000 --- a/ios/tutorials/tutorial3-completed/Podfile +++ /dev/null @@ -1,10 +0,0 @@ -platform :ios, '9.0' - -use_frameworks! -inhibit_all_warnings! - -target 'TicTacToe' do - pod 'RIBs', :path => '../../../' - pod 'SnapKit', '~> 4.0.0' - pod 'RxCocoa', '~> 5.1' -end diff --git a/ios/tutorials/tutorial3-completed/README.md b/ios/tutorials/tutorial3-completed/README.md deleted file mode 100644 index 75bf6542f..000000000 --- a/ios/tutorials/tutorial3-completed/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# RIBs Tutorial 3: RIB Depenmdency Injection and Communication - - -This is the finished code for [tutorial 3](https://github.com/uber/RIBs/wiki/iOS-Tutorial-3). diff --git a/ios/tutorials/tutorial3-completed/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial3-completed/TicTacToe.xcodeproj/project.pbxproj deleted file mode 100644 index b432bd0a6..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe.xcodeproj/project.pbxproj +++ /dev/null @@ -1,537 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */; }; - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */; }; - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D351F972FD500D84847 /* AppDelegate.swift */; }; - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D341F972FD500D84847 /* AppComponent.swift */; }; - E9CB1D541F9730E400D84847 /* LoggedInBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */; }; - E9CB1D551F9730E400D84847 /* LoggedInComponent+OffGame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */; }; - E9CB1D561F9730E400D84847 /* LoggedInComponent+TicTacToe.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */; }; - E9CB1D571F9730E400D84847 /* LoggedInInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */; }; - E9CB1D581F9730E400D84847 /* LoggedInRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */; }; - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */; }; - E9CB1D5A1F9730E700D84847 /* LoggedOutInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */; }; - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */; }; - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */; }; - E9CB1D5D1F9730EB00D84847 /* OffGameBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */; }; - E9CB1D5E1F9730EB00D84847 /* OffGameInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */; }; - E9CB1D5F1F9730EB00D84847 /* OffGameRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D501F972FE500D84847 /* OffGameRouter.swift */; }; - E9CB1D601F9730EB00D84847 /* OffGameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D511F972FE500D84847 /* OffGameViewController.swift */; }; - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D371F972FE400D84847 /* RootBuilder.swift */; }; - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */; }; - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */; }; - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */; }; - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3B1F972FE400D84847 /* RootRouter.swift */; }; - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3C1F972FE400D84847 /* RootViewController.swift */; }; - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */; }; - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */; }; - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */; }; - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */; }; - E9EF99F51FA7B7790058AB4E /* ScoreStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9EF99F41FA7B7790058AB4E /* ScoreStream.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.debug.xcconfig"; sourceTree = ""; }; - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.release.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.release.xcconfig"; sourceTree = ""; }; - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TicTacToe.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B4A1F972CC500688FCB /* TicTacToe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TicTacToe.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B591F972CC500688FCB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E9CB1D341F972FD500D84847 /* AppComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppComponent.swift; sourceTree = ""; }; - E9CB1D351F972FD500D84847 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E9CB1D371F972FE400D84847 /* RootBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootBuilder.swift; sourceTree = ""; }; - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedIn.swift"; sourceTree = ""; }; - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedOut.swift"; sourceTree = ""; }; - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootInteractor.swift; sourceTree = ""; }; - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootRouter.swift; sourceTree = ""; }; - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeBuilder.swift; sourceTree = ""; }; - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeInteractor.swift; sourceTree = ""; }; - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeRouter.swift; sourceTree = ""; }; - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeViewController.swift; sourceTree = ""; }; - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutBuilder.swift; sourceTree = ""; }; - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutInteractor.swift; sourceTree = ""; }; - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutRouter.swift; sourceTree = ""; }; - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutViewController.swift; sourceTree = ""; }; - E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInBuilder.swift; sourceTree = ""; }; - E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+OffGame.swift"; sourceTree = ""; }; - E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+TicTacToe.swift"; sourceTree = ""; }; - E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInInteractor.swift; sourceTree = ""; }; - E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInRouter.swift; sourceTree = ""; }; - E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameBuilder.swift; sourceTree = ""; }; - E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameInteractor.swift; sourceTree = ""; }; - E9CB1D501F972FE500D84847 /* OffGameRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameRouter.swift; sourceTree = ""; }; - E9CB1D511F972FE500D84847 /* OffGameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameViewController.swift; sourceTree = ""; }; - E9EF99F41FA7B7790058AB4E /* ScoreStream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScoreStream.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E9894B471F972CC500688FCB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 59F943336420DE07CA779F6F /* Pods */ = { - isa = PBXGroup; - children = ( - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */, - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 7EDD59511FA135E9005EC8B2 /* Resources */ = { - isa = PBXGroup; - children = ( - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, - ); - path = Resources; - sourceTree = ""; - }; - E9894B411F972CC500688FCB = { - isa = PBXGroup; - children = ( - E9894B4C1F972CC500688FCB /* TicTacToe */, - E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, - F5205CCF508911BE388D8406 /* Frameworks */, - ); - sourceTree = ""; - }; - E9894B4B1F972CC500688FCB /* Products */ = { - isa = PBXGroup; - children = ( - E9894B4A1F972CC500688FCB /* TicTacToe.app */, - ); - name = Products; - sourceTree = ""; - }; - E9894B4C1F972CC500688FCB /* TicTacToe */ = { - isa = PBXGroup; - children = ( - 7EDD59511FA135E9005EC8B2 /* Resources */, - E9CB1D331F972FD500D84847 /* AppStart */, - E9CB1D471F972FE500D84847 /* LoggedIn */, - E9CB1D421F972FE400D84847 /* LoggedOut */, - E9EF99F31FA7B7700058AB4E /* Models */, - E9CB1D4D1F972FE500D84847 /* OffGame */, - E9CB1D361F972FE400D84847 /* Root */, - E9CB1D3D1F972FE400D84847 /* TicTacToe */, - E9894B591F972CC500688FCB /* Info.plist */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9CB1D331F972FD500D84847 /* AppStart */ = { - isa = PBXGroup; - children = ( - E9CB1D341F972FD500D84847 /* AppComponent.swift */, - E9CB1D351F972FD500D84847 /* AppDelegate.swift */, - ); - path = AppStart; - sourceTree = ""; - }; - E9CB1D361F972FE400D84847 /* Root */ = { - isa = PBXGroup; - children = ( - E9CB1D371F972FE400D84847 /* RootBuilder.swift */, - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */, - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */, - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */, - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */, - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */, - ); - path = Root; - sourceTree = ""; - }; - E9CB1D3D1F972FE400D84847 /* TicTacToe */ = { - isa = PBXGroup; - children = ( - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */, - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */, - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */, - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9CB1D421F972FE400D84847 /* LoggedOut */ = { - isa = PBXGroup; - children = ( - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */, - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */, - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */, - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */, - ); - path = LoggedOut; - sourceTree = ""; - }; - E9CB1D471F972FE500D84847 /* LoggedIn */ = { - isa = PBXGroup; - children = ( - E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */, - E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */, - E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */, - E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */, - E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */, - ); - path = LoggedIn; - sourceTree = ""; - }; - E9CB1D4D1F972FE500D84847 /* OffGame */ = { - isa = PBXGroup; - children = ( - E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */, - E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */, - E9CB1D501F972FE500D84847 /* OffGameRouter.swift */, - E9CB1D511F972FE500D84847 /* OffGameViewController.swift */, - ); - path = OffGame; - sourceTree = ""; - }; - E9EF99F31FA7B7700058AB4E /* Models */ = { - isa = PBXGroup; - children = ( - E9EF99F41FA7B7790058AB4E /* ScoreStream.swift */, - ); - path = Models; - sourceTree = ""; - }; - F5205CCF508911BE388D8406 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E9894B491F972CC500688FCB /* TicTacToe */ = { - isa = PBXNativeTarget; - buildConfigurationList = E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */; - buildPhases = ( - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */, - E9894B461F972CC500688FCB /* Sources */, - E9894B471F972CC500688FCB /* Frameworks */, - E9894B481F972CC500688FCB /* Resources */, - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TicTacToe; - productName = TicTacToe; - productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E9894B421F972CC500688FCB /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = Uber; - TargetAttributes = { - E9894B491F972CC500688FCB = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = E9894B411F972CC500688FCB; - productRefGroup = E9894B4B1F972CC500688FCB /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E9894B491F972CC500688FCB /* TicTacToe */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E9894B481F972CC500688FCB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RIBs/RIBs.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RIBs.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TicTacToe-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E9894B461F972CC500688FCB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */, - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */, - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */, - E9CB1D571F9730E400D84847 /* LoggedInInteractor.swift in Sources */, - E9CB1D5D1F9730EB00D84847 /* OffGameBuilder.swift in Sources */, - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */, - E9EF99F51FA7B7790058AB4E /* ScoreStream.swift in Sources */, - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */, - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */, - E9CB1D581F9730E400D84847 /* LoggedInRouter.swift in Sources */, - E9CB1D5F1F9730EB00D84847 /* OffGameRouter.swift in Sources */, - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */, - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */, - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */, - E9CB1D541F9730E400D84847 /* LoggedInBuilder.swift in Sources */, - E9CB1D551F9730E400D84847 /* LoggedInComponent+OffGame.swift in Sources */, - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */, - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */, - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */, - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */, - E9CB1D561F9730E400D84847 /* LoggedInComponent+TicTacToe.swift in Sources */, - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */, - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */, - E9CB1D5E1F9730EB00D84847 /* OffGameInteractor.swift in Sources */, - E9CB1D5A1F9730E700D84847 /* LoggedOutInteractor.swift in Sources */, - E9CB1D601F9730EB00D84847 /* OffGameViewController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - E9894B651F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - E9894B661F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E9894B681F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Debug; - }; - E9894B691F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B651F972CC600688FCB /* Debug */, - E9894B661F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B681F972CC600688FCB /* Debug */, - E9894B691F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E9894B421F972CC500688FCB /* Project object */; -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppComponent.swift b/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppComponent.swift deleted file mode 100644 index cc73b41e4..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppComponent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class AppComponent: Component, RootDependency { - - init() { - super.init(dependency: EmptyComponent()) - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppDelegate.swift deleted file mode 100644 index d0b07d283..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppDelegate.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift -import UIKit - -/// Game app delegate. -@UIApplicationMain -public class AppDelegate: UIResponder, UIApplicationDelegate { - - /// The window. - public var window: UIWindow? - - /// Tells the delegate that the launch process is almost done and the app is almost ready to run. - /// - /// - parameter application: Your singleton app object. - /// - parameter launchOptions: A dictionary indicating the reason the app was launched (if any). The contents of - /// this dictionary may be empty in situations where the user launched the app directly. For information about - /// the possible keys in this dictionary and how to handle them, see Launch Options Keys. - /// - returns: false if the app cannot handle the URL resource or continue a user activity, otherwise return true. - public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let window = UIWindow(frame: UIScreen.main.bounds) - self.window = window - - let launchRouter = RootBuilder(dependency: AppComponent()).build() - self.launchRouter = launchRouter - launchRouter.launch(from: window) - - return true - } - - // MARK: - Private - - private var launchRouter: LaunchRouting? -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Info.plist b/ios/tutorials/tutorial3-completed/TicTacToe/Info.plist deleted file mode 100644 index cf61db68d..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInBuilder.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInBuilder.swift deleted file mode 100644 index 68a3d5a8a..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInBuilder.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedInDependency: Dependency { - var loggedInViewController: LoggedInViewControllable { get } -} - -final class LoggedInComponent: Component { - - fileprivate var loggedInViewController: LoggedInViewControllable { - return dependency.loggedInViewController - } - - var mutableScoreStream: MutableScoreStream { - return shared { ScoreStreamImpl() } - } - - let player1Name: String - let player2Name: String - - init(dependency: LoggedInDependency, player1Name: String, player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(dependency: dependency) - } - -} - -// MARK: - Builder - -protocol LoggedInBuildable: Buildable { - func build(withListener listener: LoggedInListener, player1Name: String, player2Name: String) -> LoggedInRouting -} - -final class LoggedInBuilder: Builder, LoggedInBuildable { - - override init(dependency: LoggedInDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedInListener, player1Name: String, player2Name: String) -> LoggedInRouting { - let component = LoggedInComponent(dependency: dependency, - player1Name: player1Name, - player2Name: player2Name) - let interactor = LoggedInInteractor(mutableScoreStream: component.mutableScoreStream) - interactor.listener = listener - - let offGameBuilder = OffGameBuilder(dependency: component) - let ticTacToeBuilder = TicTacToeBuilder(dependency: component) - return LoggedInRouter(interactor: interactor, - viewController: component.loggedInViewController, - offGameBuilder: offGameBuilder, - ticTacToeBuilder: ticTacToeBuilder) - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift deleted file mode 100644 index 6a8aebb92..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the OffGame scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyOffGame: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the OffGame scope. -} - -extension LoggedInComponent: OffGameDependency { - var scoreStream: ScoreStream { - return mutableScoreStream - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift deleted file mode 100644 index daa3c2a9e..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the TicTacToe scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyTicTacToe: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the TicTacToe scope. -} - -extension LoggedInComponent: TicTacToeDependency { - - // TODO: Implement properties to provide for TicTacToe scope. -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInInteractor.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInInteractor.swift deleted file mode 100644 index e97d802cc..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInInteractor.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -enum PlayerType: Int { - case player1 = 1 - case player2 -} - -protocol LoggedInRouting: Routing { - func cleanupViews() - func routeToTicTacToe() - func routeToOffGame() -} - -protocol LoggedInListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class LoggedInInteractor: Interactor, LoggedInInteractable { - - weak var router: LoggedInRouting? - weak var listener: LoggedInListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - init(mutableScoreStream: MutableScoreStream) { - self.mutableScoreStream = mutableScoreStream - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - - router?.cleanupViews() - // TODO: Pause any business logic. - } - - // MARK: - OffGameListener - - func startTicTacToe() { - router?.routeToTicTacToe() - } - - // MARK: - TicTacToeListener - - func gameDidEnd(withWinner winner: PlayerType?) { - if let winner = winner { - mutableScoreStream.updateScore(withWinner: winner) - } - router?.routeToOffGame() - } - - private let mutableScoreStream: MutableScoreStream - -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInRouter.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInRouter.swift deleted file mode 100644 index 5dac47535..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInRouter.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedInInteractable: Interactable, OffGameListener, TicTacToeListener { - var router: LoggedInRouting? { get set } - var listener: LoggedInListener? { get set } -} - -protocol LoggedInViewControllable: ViewControllable { - func present(viewController: ViewControllable) - func dismiss(viewController: ViewControllable) -} - -final class LoggedInRouter: Router, LoggedInRouting { - - init(interactor: LoggedInInteractable, - viewController: LoggedInViewControllable, - offGameBuilder: OffGameBuildable, - ticTacToeBuilder: TicTacToeBuildable) { - self.viewController = viewController - self.offGameBuilder = offGameBuilder - self.ticTacToeBuilder = ticTacToeBuilder - super.init(interactor: interactor) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - attachOffGame() - } - - // MARK: - LoggedInRouting - - func cleanupViews() { - if let currentChild = currentChild { - viewController.dismiss(viewController: currentChild.viewControllable) - } - } - - func routeToTicTacToe() { - detachCurrentChild() - - let ticTacToe = ticTacToeBuilder.build(withListener: interactor) - currentChild = ticTacToe - attachChild(ticTacToe) - viewController.present(viewController: ticTacToe.viewControllable) - } - - func routeToOffGame() { - detachCurrentChild() - attachOffGame() - } - - // MARK: - Private - - private let viewController: LoggedInViewControllable - private let offGameBuilder: OffGameBuildable - private let ticTacToeBuilder: TicTacToeBuildable - - private var currentChild: ViewableRouting? - - private func attachOffGame() { - let offGame = offGameBuilder.build(withListener: interactor) - self.currentChild = offGame - attachChild(offGame) - viewController.present(viewController: offGame.viewControllable) - } - - private func detachCurrentChild() { - if let currentChild = currentChild { - detachChild(currentChild) - viewController.dismiss(viewController: currentChild.viewControllable) - } - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutBuilder.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutBuilder.swift deleted file mode 100644 index f023e78d7..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutBuilder.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class LoggedOutComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol LoggedOutBuildable: Buildable { - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting -} - -final class LoggedOutBuilder: Builder, LoggedOutBuildable { - - override init(dependency: LoggedOutDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting { - _ = LoggedOutComponent(dependency: dependency) - let viewController = LoggedOutViewController() - let interactor = LoggedOutInteractor(presenter: viewController) - interactor.listener = listener - return LoggedOutRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutInteractor.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutInteractor.swift deleted file mode 100644 index 6dea7cba9..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutInteractor.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol LoggedOutRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol LoggedOutPresentable: Presentable { - var listener: LoggedOutPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol LoggedOutListener: AnyObject { - func didLogin(withPlayer1Name player1Name: String, player2Name: String) -} - -final class LoggedOutInteractor: PresentableInteractor, LoggedOutInteractable, LoggedOutPresentableListener { - - weak var router: LoggedOutRouting? - - weak var listener: LoggedOutListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: LoggedOutPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutPresentableListener - - func login(withPlayer1Name player1Name: String?, player2Name: String?) { - let player1NameWithDefault = playerName(player1Name, withDefaultName: "Player 1") - let player2NameWithDefault = playerName(player2Name, withDefaultName: "Player 2") - - listener?.didLogin(withPlayer1Name: player1NameWithDefault, player2Name: player2NameWithDefault) - } - - private func playerName(_ name: String?, withDefaultName defaultName: String) -> String { - if let name = name { - return name.isEmpty ? defaultName : name - } else { - return defaultName - } - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutRouter.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutRouter.swift deleted file mode 100644 index c9cadb437..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutInteractable: Interactable { - var router: LoggedOutRouting? { get set } - var listener: LoggedOutListener? { get set } -} - -protocol LoggedOutViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class LoggedOutRouter: ViewableRouter, LoggedOutRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: LoggedOutInteractable, viewController: LoggedOutViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift deleted file mode 100644 index 42670412c..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol LoggedOutPresentableListener: AnyObject { - func login(withPlayer1Name: String?, player2Name: String?) -} - -final class LoggedOutViewController: UIViewController, LoggedOutPresentable, LoggedOutViewControllable { - - weak var listener: LoggedOutPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - let playerFields = buildPlayerFields() - buildLoginButton(withPlayer1Field: playerFields.player1Field, player2Field: playerFields.player2Field) - } - - // MARK: - Private - - private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { - let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line - view.addSubview(player1Field) - player1Field.placeholder = "Player 1 name" - player1Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(self.view).offset(100) - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(40) - } - - let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line - view.addSubview(player2Field) - player2Field.placeholder = "Player 2 name" - player2Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player1Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - - return (player1Field, player2Field) - } - - private func buildLoginButton(withPlayer1Field player1Field: UITextField, player2Field: UITextField) { - let loginButton = UIButton() - view.addSubview(loginButton) - loginButton.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player2Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - loginButton.setTitle("Login", for: .normal) - loginButton.setTitleColor(UIColor.white, for: .normal) - loginButton.backgroundColor = UIColor.black - loginButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.login(withPlayer1Name: player1Field.text, player2Name: player2Field.text) - }) - .disposed(by: disposeBag) - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Models/ScoreStream.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Models/ScoreStream.swift deleted file mode 100644 index a3bda3c97..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Models/ScoreStream.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift -import RxCocoa - -struct Score { - let player1Score: Int - let player2Score: Int - - static func equals(lhs: Score, rhs: Score) -> Bool { - return lhs.player1Score == rhs.player1Score && lhs.player2Score == rhs.player2Score - } -} - -protocol ScoreStream: AnyObject { - var score: Observable { get } -} - -protocol MutableScoreStream: ScoreStream { - func updateScore(withWinner winner: PlayerType) -} - -class ScoreStreamImpl: MutableScoreStream { - - var score: Observable { - return variable - .asObservable() - .distinctUntilChanged { (lhs: Score, rhs: Score) -> Bool in - Score.equals(lhs: lhs, rhs: rhs) - } - } - - func updateScore(withWinner winner: PlayerType) { - let newScore: Score = { - let currentScore = variable.value - switch winner { - case .player1: - return Score(player1Score: currentScore.player1Score + 1, player2Score: currentScore.player2Score) - case .player2: - return Score(player1Score: currentScore.player1Score, player2Score: currentScore.player2Score + 1) - } - }() - variable.accept(newScore) - } - - // MARK: - Private - - private let variable = BehaviorRelay(value: Score(player1Score: 0, player2Score: 0)) -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameBuilder.swift b/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameBuilder.swift deleted file mode 100644 index ab8c921e0..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameBuilder.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol OffGameDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var scoreStream: ScoreStream { get } -} - -final class OffGameComponent: Component { - fileprivate var player1Name: String { - return dependency.player1Name - } - - fileprivate var player2Name: String { - return dependency.player2Name - } - - fileprivate var scoreStream: ScoreStream { - return dependency.scoreStream - } -} - -// MARK: - Builder - -protocol OffGameBuildable: Buildable { - func build(withListener listener: OffGameListener) -> OffGameRouting -} - -final class OffGameBuilder: Builder, OffGameBuildable { - override init(dependency: OffGameDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: OffGameListener) -> OffGameRouting { - let component = OffGameComponent(dependency: dependency) - let viewController = OffGameViewController(player1Name: component.player1Name, - player2Name: component.player2Name) - let interactor = OffGameInteractor(presenter: viewController, - scoreStream: component.scoreStream) - interactor.listener = listener - return OffGameRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameInteractor.swift b/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameInteractor.swift deleted file mode 100644 index 2e70789f3..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameInteractor.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol OffGameRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol OffGamePresentable: Presentable { - var listener: OffGamePresentableListener? { get set } - func set(score: Score) -} - -protocol OffGameListener: AnyObject { - func startTicTacToe() -} - -final class OffGameInteractor: PresentableInteractor, OffGameInteractable, OffGamePresentableListener { - - weak var router: OffGameRouting? - - weak var listener: OffGameListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - init(presenter: OffGamePresentable, - scoreStream: ScoreStream) { - self.scoreStream = scoreStream - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - - updateScore() - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - private func updateScore() { - scoreStream.score - .subscribe(onNext: { (score: Score) in - self.presenter.set(score: score) - }) - .disposeOnDeactivate(interactor: self) - } - // MARK: - OffGamePresentableListener - - func startGame() { - listener?.startTicTacToe() - } - - private let scoreStream: ScoreStream -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameRouter.swift b/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameRouter.swift deleted file mode 100644 index c62e2b586..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol OffGameInteractable: Interactable { - var router: OffGameRouting? { get set } - var listener: OffGameListener? { get set } -} - -protocol OffGameViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class OffGameRouter: ViewableRouter, OffGameRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: OffGameInteractable, viewController: OffGameViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameViewController.swift b/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameViewController.swift deleted file mode 100644 index a05e85a6d..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/OffGame/OffGameViewController.swift +++ /dev/null @@ -1,146 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol OffGamePresentableListener: AnyObject { - func startGame() -} - -final class OffGameViewController: UIViewController, OffGamePresentable, OffGameViewControllable { - - weak var listener: OffGamePresentableListener? - - init(player1Name: String, player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildStartButton() - buildPlayerLabels() - } - - // MARK: - OffGamePresentable - - func set(score: Score) { - self.score = score - } - - // MARK: - Private - - private let player1Name: String - private let player2Name: String - - private var player1Label: UILabel? - private var player2Label: UILabel? - private var score: Score? - - private func buildStartButton() { - let startButton = UIButton() - view.addSubview(startButton) - startButton.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(100) - } - startButton.setTitle("Start Game", for: .normal) - startButton.setTitleColor(UIColor.white, for: .normal) - startButton.backgroundColor = UIColor.black - startButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.startGame() - }) - .disposed(by: disposeBag) - } - - private func buildPlayerLabels() { - let labelBuilder: (UIColor) -> UILabel = { (color: UIColor) in - let label = UILabel() - label.font = UIFont.boldSystemFont(ofSize: 35) - label.backgroundColor = UIColor.clear - label.textColor = color - label.textAlignment = .center - return label - } - - let player1Label = labelBuilder(PlayerType.player1.color) - self.player1Label = player1Label - view.addSubview(player1Label) - player1Label.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(self.view).offset(70) - maker.leading.trailing.equalTo(self.view).inset(20) - maker.height.equalTo(40) - } - - let vsLabel = UILabel() - vsLabel.font = UIFont.systemFont(ofSize: 25) - vsLabel.backgroundColor = UIColor.clear - vsLabel.textColor = UIColor.darkGray - vsLabel.textAlignment = .center - vsLabel.text = "vs" - view.addSubview(vsLabel) - vsLabel.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player1Label.snp.bottom).offset(10) - maker.leading.trailing.equalTo(player1Label) - maker.height.equalTo(20) - } - - let player2Label = labelBuilder(PlayerType.player2.color) - self.player2Label = player2Label - view.addSubview(player2Label) - player2Label.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(vsLabel.snp.bottom).offset(10) - maker.height.leading.trailing.equalTo(player1Label) - } - - updatePlayerLabels() - } - - private func updatePlayerLabels() { - let player1Score = score?.player1Score ?? 0 - player1Label?.text = "\(player1Name) (\(player1Score))" - - let player2Score = score?.player2Score ?? 0 - player2Label?.text = "\(player2Name) (\(player2Score))" - } - - private let disposeBag = DisposeBag() -} - -extension PlayerType { - - var color: UIColor { - switch self { - case .player1: - return UIColor.red - case .player2: - return UIColor.blue - } - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Resources/Default-568h@2x.png b/ios/tutorials/tutorial3-completed/TicTacToe/Resources/Default-568h@2x.png deleted file mode 100644 index 0891b7aab..000000000 Binary files a/ios/tutorials/tutorial3-completed/TicTacToe/Resources/Default-568h@2x.png and /dev/null differ diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootBuilder.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootBuilder.swift deleted file mode 100644 index d61d8a5bc..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootBuilder.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class RootComponent: Component { - - let rootViewController: RootViewController - - init(dependency: RootDependency, - rootViewController: RootViewController) { - self.rootViewController = rootViewController - super.init(dependency: dependency) - } -} - -// MARK: - Builder - -protocol RootBuildable: Buildable { - func build() -> LaunchRouting -} - -final class RootBuilder: Builder, RootBuildable { - - override init(dependency: RootDependency) { - super.init(dependency: dependency) - } - - func build() -> LaunchRouting { - let viewController = RootViewController() - let component = RootComponent(dependency: dependency, - rootViewController: viewController) - let interactor = RootInteractor(presenter: viewController) - - let loggedOutBuilder = LoggedOutBuilder(dependency: component) - let loggedInBuilder = LoggedInBuilder(dependency: component) - return RootRouter(interactor: interactor, - viewController: viewController, - loggedOutBuilder: loggedOutBuilder, - loggedInBuilder: loggedInBuilder) - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootComponent+LoggedIn.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootComponent+LoggedIn.swift deleted file mode 100644 index 2351441c1..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootComponent+LoggedIn.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedIn scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedIn: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedIn scope. -} - -extension RootComponent: LoggedInDependency { - - var loggedInViewController: LoggedInViewControllable { - return rootViewController - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootComponent+LoggedOut.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootComponent+LoggedOut.swift deleted file mode 100644 index a2f32f599..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootComponent+LoggedOut.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedOut scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedOut: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedOut scope. -} - -extension RootComponent: LoggedOutDependency { - - // TODO: Implement properties to provide for LoggedOut scope. -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootInteractor.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootInteractor.swift deleted file mode 100644 index a3fb513e0..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootInteractor.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol RootRouting: ViewableRouting { - func routeToLoggedIn(withPlayer1Name player1Name: String, player2Name: String) -} - -protocol RootPresentable: Presentable { - var listener: RootPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol RootListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class RootInteractor: PresentableInteractor, RootInteractable, RootPresentableListener { - - weak var router: RootRouting? - - weak var listener: RootListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: RootPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutListener - - func didLogin(withPlayer1Name player1Name: String, player2Name: String) { - router?.routeToLoggedIn(withPlayer1Name: player1Name, player2Name: player2Name) - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootRouter.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootRouter.swift deleted file mode 100644 index 1cbed145f..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootRouter.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootInteractable: Interactable, LoggedOutListener, LoggedInListener { - var router: RootRouting? { get set } - var listener: RootListener? { get set } -} - -protocol RootViewControllable: ViewControllable { - func present(viewController: ViewControllable) - func dismiss(viewController: ViewControllable) -} - -final class RootRouter: LaunchRouter, RootRouting { - - init(interactor: RootInteractable, - viewController: RootViewControllable, - loggedOutBuilder: LoggedOutBuildable, - loggedInBuilder: LoggedInBuildable) { - self.loggedOutBuilder = loggedOutBuilder - self.loggedInBuilder = loggedInBuilder - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - - routeToLoggedOut() - } - - func routeToLoggedIn(withPlayer1Name player1Name: String, player2Name: String) { - // Detach logged out. - if let loggedOut = self.loggedOut { - detachChild(loggedOut) - viewController.dismiss(viewController: loggedOut.viewControllable) - self.loggedOut = nil - } - - let loggedIn = loggedInBuilder.build(withListener: interactor, player1Name: player1Name, player2Name: player2Name) - attachChild(loggedIn) - } - - // MARK: - Private - - private let loggedOutBuilder: LoggedOutBuildable - private let loggedInBuilder: LoggedInBuildable - - private var loggedOut: ViewableRouting? - - private func routeToLoggedOut() { - let loggedOut = loggedOutBuilder.build(withListener: interactor) - self.loggedOut = loggedOut - attachChild(loggedOut) - viewController.present(viewController: loggedOut.viewControllable) - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootViewController.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootViewController.swift deleted file mode 100644 index 7a2d84fb8..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootViewController.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol RootPresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class RootViewController: UIViewController, RootPresentable, RootViewControllable { - - weak var listener: RootPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - } - - // MARK: - RootViewControllable - - func present(viewController: ViewControllable) { - present(viewController.uiviewController, animated: true, completion: nil) - } - - func dismiss(viewController: ViewControllable) { - if presentedViewController === viewController.uiviewController { - dismiss(animated: true, completion: nil) - } - } -} - -// MARK: LoggedInViewControllable - -extension RootViewController: LoggedInViewControllable { - -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeBuilder.swift b/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeBuilder.swift deleted file mode 100644 index a39e2bc08..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeBuilder.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol TicTacToeDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } -} - -final class TicTacToeComponent: Component { - - fileprivate var player1Name: String { - return dependency.player1Name - } - - fileprivate var player2Name: String { - return dependency.player2Name - } - -} - -// MARK: - Builder - -protocol TicTacToeBuildable: Buildable { - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting -} - -final class TicTacToeBuilder: Builder, TicTacToeBuildable { - - override init(dependency: TicTacToeDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting { - let component = TicTacToeComponent(dependency: dependency) - let viewController = TicTacToeViewController(player1Name: component.player1Name, - player2Name: component.player2Name) - let interactor = TicTacToeInteractor(presenter: viewController) - interactor.listener = listener - return TicTacToeRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeInteractor.swift b/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeInteractor.swift deleted file mode 100644 index 633886063..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeInteractor.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol TicTacToeRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol TicTacToePresentable: Presentable { - var listener: TicTacToePresentableListener? { get set } - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) - func announce(winner: PlayerType?, withCompletionHandler handler: @escaping () -> ()) -} - -protocol TicTacToeListener: AnyObject { - func gameDidEnd(withWinner winner: PlayerType?) -} - -final class TicTacToeInteractor: PresentableInteractor, TicTacToeInteractable, TicTacToePresentableListener { - - weak var router: TicTacToeRouting? - - weak var listener: TicTacToeListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: TicTacToePresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - - initBoard() - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - TicTacToePresentableListener - - func placeCurrentPlayerMark(atRow row: Int, col: Int) { - guard board[row][col] == nil else { - return - } - - let currentPlayer = getAndFlipCurrentPlayer() - board[row][col] = currentPlayer - presenter.setCell(atRow: row, col: col, withPlayerType: currentPlayer) - - if let winner = checkWinner() { - presenter.announce(winner: winner) { - self.listener?.gameDidEnd(withWinner: winner) - } - } - } - - // MARK: - Private - - private var currentPlayer = PlayerType.player1 - private var board = [[PlayerType?]]() - - private func initBoard() { - for _ in 0.. PlayerType { - let currentPlayer = self.currentPlayer - self.currentPlayer = currentPlayer == .player1 ? .player2 : .player1 - return currentPlayer - } - - private func checkWinner() -> PlayerType? { - // Rows. - for row in 0.., TicTacToeRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: TicTacToeInteractable, viewController: TicTacToeViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift deleted file mode 100644 index bb94ad1b4..000000000 --- a/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ /dev/null @@ -1,140 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol TicTacToePresentableListener: AnyObject { - func placeCurrentPlayerMark(atRow row: Int, col: Int) -} - -final class TicTacToeViewController: UIViewController, TicTacToePresentable, TicTacToeViewControllable { - - weak var listener: TicTacToePresentableListener? - - init(player1Name: String, - player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildCollectionView() - } - - // MARK: - TicTacToePresentable - - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) { - let indexPathRow = row * GameConstants.colCount + col - let cell = collectionView.cellForItem(at: IndexPath(row: indexPathRow, section: Constants.sectionCount - 1)) - cell?.backgroundColor = playerType.color - } - - func announce(winner: PlayerType?, withCompletionHandler handler: @escaping () -> ()) { - let winnerString: String = { - if let winner = winner { - switch winner { - case .player1: - return "\(player1Name) Won!" - case .player2: - return "\(player2Name) Won!" - } - } else { - return "It's a Tie" - } - }() - let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { _ in - handler() - } - alert.addAction(closeAction) - present(alert, animated: true, completion: nil) - } - - // MARK: - Private - - private let player2Name: String - private let player1Name: String - - private lazy var collectionView: UICollectionView = { - let layout = UICollectionViewFlowLayout() - layout.minimumLineSpacing = 0 - layout.minimumInteritemSpacing = 0 - layout.itemSize = CGSize(width: Constants.cellSize, height: Constants.cellSize) - return UICollectionView(frame: CGRect.zero, collectionViewLayout: layout) - }() - - private func buildCollectionView() { - collectionView.dataSource = self - collectionView.delegate = self - collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: Constants.cellIdentifier) - view.addSubview(collectionView) - collectionView.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.size.equalTo(CGSize(width: CGFloat(GameConstants.colCount) * Constants.cellSize, height: CGFloat(GameConstants.rowCount) * Constants.cellSize)) - } - } -} - -fileprivate struct Constants { - static let sectionCount = 1 - static let cellSize: CGFloat = UIScreen.main.bounds.width / CGFloat(GameConstants.colCount) - static let cellIdentifier = "TicTacToeCell" - static let defaultColor = UIColor.white -} - -extension TicTacToeViewController: UICollectionViewDataSource { - - func numberOfSections(in collectionView: UICollectionView) -> Int { - return Constants.sectionCount - } - - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return GameConstants.rowCount * GameConstants.colCount - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let reusedCell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.cellIdentifier, for: indexPath) - reset(cell: reusedCell) - return reusedCell - } - - private func reset(cell: UICollectionViewCell) { - cell.backgroundColor = Constants.defaultColor - cell.contentView.layer.borderWidth = 2 - cell.contentView.layer.borderColor = UIColor.lightGray.cgColor - } -} - -// MARK: - UICollectionViewDelegate - -extension TicTacToeViewController: UICollectionViewDelegate { - - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - let row = indexPath.row / GameConstants.colCount - let col = indexPath.row - row * GameConstants.rowCount - listener?.placeCurrentPlayerMark(atRow: row, col: col) - } -} diff --git a/ios/tutorials/tutorial3/Podfile b/ios/tutorials/tutorial3/Podfile deleted file mode 100644 index 980817e94..000000000 --- a/ios/tutorials/tutorial3/Podfile +++ /dev/null @@ -1,10 +0,0 @@ -platform :ios, '9.0' - -use_frameworks! -inhibit_all_warnings! - -target 'TicTacToe' do - pod 'RIBs', :path => '../../../' - pod 'SnapKit', '~> 4.0.0' - pod 'RxCocoa', '~> 5.1' -end diff --git a/ios/tutorials/tutorial3/README.md b/ios/tutorials/tutorial3/README.md deleted file mode 100644 index 48a0c8d34..000000000 --- a/ios/tutorials/tutorial3/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# RIBs Tutorial 3: RIB Dependency Injection and Communication - - -This project is the starting point for [tutorial 3](https://github.com/uber/RIBs/wiki/iOS-Tutorial-3). - -### Getting started -Install tooling, unless you've done so already: - -``` -/ios/tooling/install-xcode-template.sh -``` - -Then, install pods for the tutorial: - -``` -gem install cocoapods # In case you don't have it -cd /ios/tutorials/tutorial3 -pod install -``` - -Then, open the TicTacToe.xcworkspace that was generated by `pod install` and follow the steps described in [tutorial 3](https://github.com/uber/RIBs/wiki/iOS-Tutorial-3) on the RIBs wiki. diff --git a/ios/tutorials/tutorial3/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial3/TicTacToe.xcodeproj/project.pbxproj deleted file mode 100644 index 6e9d0e1f5..000000000 --- a/ios/tutorials/tutorial3/TicTacToe.xcodeproj/project.pbxproj +++ /dev/null @@ -1,525 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */; }; - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */; }; - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D351F972FD500D84847 /* AppDelegate.swift */; }; - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D341F972FD500D84847 /* AppComponent.swift */; }; - E9CB1D541F9730E400D84847 /* LoggedInBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */; }; - E9CB1D551F9730E400D84847 /* LoggedInComponent+OffGame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */; }; - E9CB1D561F9730E400D84847 /* LoggedInComponent+TicTacToe.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */; }; - E9CB1D571F9730E400D84847 /* LoggedInInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */; }; - E9CB1D581F9730E400D84847 /* LoggedInRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */; }; - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */; }; - E9CB1D5A1F9730E700D84847 /* LoggedOutInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */; }; - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */; }; - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */; }; - E9CB1D5D1F9730EB00D84847 /* OffGameBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */; }; - E9CB1D5E1F9730EB00D84847 /* OffGameInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */; }; - E9CB1D5F1F9730EB00D84847 /* OffGameRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D501F972FE500D84847 /* OffGameRouter.swift */; }; - E9CB1D601F9730EB00D84847 /* OffGameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D511F972FE500D84847 /* OffGameViewController.swift */; }; - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D371F972FE400D84847 /* RootBuilder.swift */; }; - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */; }; - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */; }; - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */; }; - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3B1F972FE400D84847 /* RootRouter.swift */; }; - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3C1F972FE400D84847 /* RootViewController.swift */; }; - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */; }; - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */; }; - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */; }; - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.debug.xcconfig"; sourceTree = ""; }; - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.release.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.release.xcconfig"; sourceTree = ""; }; - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TicTacToe.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B4A1F972CC500688FCB /* TicTacToe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TicTacToe.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B591F972CC500688FCB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E9CB1D341F972FD500D84847 /* AppComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppComponent.swift; sourceTree = ""; }; - E9CB1D351F972FD500D84847 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E9CB1D371F972FE400D84847 /* RootBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootBuilder.swift; sourceTree = ""; }; - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedIn.swift"; sourceTree = ""; }; - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedOut.swift"; sourceTree = ""; }; - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootInteractor.swift; sourceTree = ""; }; - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootRouter.swift; sourceTree = ""; }; - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeBuilder.swift; sourceTree = ""; }; - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeInteractor.swift; sourceTree = ""; }; - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeRouter.swift; sourceTree = ""; }; - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeViewController.swift; sourceTree = ""; }; - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutBuilder.swift; sourceTree = ""; }; - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutInteractor.swift; sourceTree = ""; }; - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutRouter.swift; sourceTree = ""; }; - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutViewController.swift; sourceTree = ""; }; - E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInBuilder.swift; sourceTree = ""; }; - E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+OffGame.swift"; sourceTree = ""; }; - E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+TicTacToe.swift"; sourceTree = ""; }; - E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInInteractor.swift; sourceTree = ""; }; - E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInRouter.swift; sourceTree = ""; }; - E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameBuilder.swift; sourceTree = ""; }; - E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameInteractor.swift; sourceTree = ""; }; - E9CB1D501F972FE500D84847 /* OffGameRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameRouter.swift; sourceTree = ""; }; - E9CB1D511F972FE500D84847 /* OffGameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E9894B471F972CC500688FCB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 59F943336420DE07CA779F6F /* Pods */ = { - isa = PBXGroup; - children = ( - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */, - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 7EDD59511FA135E9005EC8B2 /* Resources */ = { - isa = PBXGroup; - children = ( - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, - ); - path = Resources; - sourceTree = ""; - }; - E9894B411F972CC500688FCB = { - isa = PBXGroup; - children = ( - E9894B4C1F972CC500688FCB /* TicTacToe */, - E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, - F5205CCF508911BE388D8406 /* Frameworks */, - ); - sourceTree = ""; - }; - E9894B4B1F972CC500688FCB /* Products */ = { - isa = PBXGroup; - children = ( - E9894B4A1F972CC500688FCB /* TicTacToe.app */, - ); - name = Products; - sourceTree = ""; - }; - E9894B4C1F972CC500688FCB /* TicTacToe */ = { - isa = PBXGroup; - children = ( - 7EDD59511FA135E9005EC8B2 /* Resources */, - E9CB1D331F972FD500D84847 /* AppStart */, - E9CB1D471F972FE500D84847 /* LoggedIn */, - E9CB1D421F972FE400D84847 /* LoggedOut */, - E9CB1D4D1F972FE500D84847 /* OffGame */, - E9CB1D361F972FE400D84847 /* Root */, - E9CB1D3D1F972FE400D84847 /* TicTacToe */, - E9894B591F972CC500688FCB /* Info.plist */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9CB1D331F972FD500D84847 /* AppStart */ = { - isa = PBXGroup; - children = ( - E9CB1D341F972FD500D84847 /* AppComponent.swift */, - E9CB1D351F972FD500D84847 /* AppDelegate.swift */, - ); - path = AppStart; - sourceTree = ""; - }; - E9CB1D361F972FE400D84847 /* Root */ = { - isa = PBXGroup; - children = ( - E9CB1D371F972FE400D84847 /* RootBuilder.swift */, - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */, - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */, - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */, - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */, - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */, - ); - path = Root; - sourceTree = ""; - }; - E9CB1D3D1F972FE400D84847 /* TicTacToe */ = { - isa = PBXGroup; - children = ( - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */, - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */, - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */, - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9CB1D421F972FE400D84847 /* LoggedOut */ = { - isa = PBXGroup; - children = ( - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */, - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */, - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */, - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */, - ); - path = LoggedOut; - sourceTree = ""; - }; - E9CB1D471F972FE500D84847 /* LoggedIn */ = { - isa = PBXGroup; - children = ( - E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */, - E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */, - E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */, - E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */, - E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */, - ); - path = LoggedIn; - sourceTree = ""; - }; - E9CB1D4D1F972FE500D84847 /* OffGame */ = { - isa = PBXGroup; - children = ( - E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */, - E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */, - E9CB1D501F972FE500D84847 /* OffGameRouter.swift */, - E9CB1D511F972FE500D84847 /* OffGameViewController.swift */, - ); - path = OffGame; - sourceTree = ""; - }; - F5205CCF508911BE388D8406 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E9894B491F972CC500688FCB /* TicTacToe */ = { - isa = PBXNativeTarget; - buildConfigurationList = E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */; - buildPhases = ( - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */, - E9894B461F972CC500688FCB /* Sources */, - E9894B471F972CC500688FCB /* Frameworks */, - E9894B481F972CC500688FCB /* Resources */, - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TicTacToe; - productName = TicTacToe; - productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E9894B421F972CC500688FCB /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = Uber; - TargetAttributes = { - E9894B491F972CC500688FCB = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = E9894B411F972CC500688FCB; - productRefGroup = E9894B4B1F972CC500688FCB /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E9894B491F972CC500688FCB /* TicTacToe */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E9894B481F972CC500688FCB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RIBs/RIBs.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RIBs.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TicTacToe-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E9894B461F972CC500688FCB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */, - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */, - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */, - E9CB1D571F9730E400D84847 /* LoggedInInteractor.swift in Sources */, - E9CB1D5D1F9730EB00D84847 /* OffGameBuilder.swift in Sources */, - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */, - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */, - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */, - E9CB1D581F9730E400D84847 /* LoggedInRouter.swift in Sources */, - E9CB1D5F1F9730EB00D84847 /* OffGameRouter.swift in Sources */, - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */, - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */, - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */, - E9CB1D541F9730E400D84847 /* LoggedInBuilder.swift in Sources */, - E9CB1D551F9730E400D84847 /* LoggedInComponent+OffGame.swift in Sources */, - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */, - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */, - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */, - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */, - E9CB1D561F9730E400D84847 /* LoggedInComponent+TicTacToe.swift in Sources */, - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */, - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */, - E9CB1D5E1F9730EB00D84847 /* OffGameInteractor.swift in Sources */, - E9CB1D5A1F9730E700D84847 /* LoggedOutInteractor.swift in Sources */, - E9CB1D601F9730EB00D84847 /* OffGameViewController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - E9894B651F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - E9894B661F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E9894B681F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Debug; - }; - E9894B691F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B651F972CC600688FCB /* Debug */, - E9894B661F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B681F972CC600688FCB /* Debug */, - E9894B691F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E9894B421F972CC500688FCB /* Project object */; -} diff --git a/ios/tutorials/tutorial3/TicTacToe/AppStart/AppComponent.swift b/ios/tutorials/tutorial3/TicTacToe/AppStart/AppComponent.swift deleted file mode 100644 index cc73b41e4..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/AppStart/AppComponent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class AppComponent: Component, RootDependency { - - init() { - super.init(dependency: EmptyComponent()) - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial3/TicTacToe/AppStart/AppDelegate.swift deleted file mode 100644 index d0b07d283..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/AppStart/AppDelegate.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift -import UIKit - -/// Game app delegate. -@UIApplicationMain -public class AppDelegate: UIResponder, UIApplicationDelegate { - - /// The window. - public var window: UIWindow? - - /// Tells the delegate that the launch process is almost done and the app is almost ready to run. - /// - /// - parameter application: Your singleton app object. - /// - parameter launchOptions: A dictionary indicating the reason the app was launched (if any). The contents of - /// this dictionary may be empty in situations where the user launched the app directly. For information about - /// the possible keys in this dictionary and how to handle them, see Launch Options Keys. - /// - returns: false if the app cannot handle the URL resource or continue a user activity, otherwise return true. - public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let window = UIWindow(frame: UIScreen.main.bounds) - self.window = window - - let launchRouter = RootBuilder(dependency: AppComponent()).build() - self.launchRouter = launchRouter - launchRouter.launch(from: window) - - return true - } - - // MARK: - Private - - private var launchRouter: LaunchRouting? -} diff --git a/ios/tutorials/tutorial3/TicTacToe/Info.plist b/ios/tutorials/tutorial3/TicTacToe/Info.plist deleted file mode 100644 index cf61db68d..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInBuilder.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInBuilder.swift deleted file mode 100644 index a640b3a78..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInBuilder.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedInDependency: Dependency { - var loggedInViewController: LoggedInViewControllable { get } -} - -final class LoggedInComponent: Component { - - fileprivate var loggedInViewController: LoggedInViewControllable { - return dependency.loggedInViewController - } -} - -// MARK: - Builder - -protocol LoggedInBuildable: Buildable { - func build(withListener listener: LoggedInListener) -> LoggedInRouting -} - -final class LoggedInBuilder: Builder, LoggedInBuildable { - - override init(dependency: LoggedInDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedInListener) -> LoggedInRouting { - let component = LoggedInComponent(dependency: dependency) - let interactor = LoggedInInteractor() - interactor.listener = listener - - let offGameBuilder = OffGameBuilder(dependency: component) - let ticTacToeBuilder = TicTacToeBuilder(dependency: component) - return LoggedInRouter(interactor: interactor, - viewController: component.loggedInViewController, - offGameBuilder: offGameBuilder, - ticTacToeBuilder: ticTacToeBuilder) - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift deleted file mode 100644 index b8fbc434b..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the OffGame scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyOffGame: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the OffGame scope. -} - -extension LoggedInComponent: OffGameDependency { - - // TODO: Implement properties to provide for OffGame scope. -} diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift deleted file mode 100644 index daa3c2a9e..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the TicTacToe scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyTicTacToe: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the TicTacToe scope. -} - -extension LoggedInComponent: TicTacToeDependency { - - // TODO: Implement properties to provide for TicTacToe scope. -} diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInInteractor.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInInteractor.swift deleted file mode 100644 index f7885cd2d..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInInteractor.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -enum PlayerType: Int { - case player1 = 1 - case player2 -} - -protocol LoggedInRouting: Routing { - func cleanupViews() - func routeToTicTacToe() - func routeToOffGame() -} - -protocol LoggedInListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class LoggedInInteractor: Interactor, LoggedInInteractable { - - weak var router: LoggedInRouting? - weak var listener: LoggedInListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init() {} - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - - router?.cleanupViews() - // TODO: Pause any business logic. - } - - // MARK: - OffGameListener - - func startTicTacToe() { - router?.routeToTicTacToe() - } - - // MARK: - TicTacToeListener - - func gameDidEnd() { - router?.routeToOffGame() - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInRouter.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInRouter.swift deleted file mode 100644 index 5dac47535..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInRouter.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedInInteractable: Interactable, OffGameListener, TicTacToeListener { - var router: LoggedInRouting? { get set } - var listener: LoggedInListener? { get set } -} - -protocol LoggedInViewControllable: ViewControllable { - func present(viewController: ViewControllable) - func dismiss(viewController: ViewControllable) -} - -final class LoggedInRouter: Router, LoggedInRouting { - - init(interactor: LoggedInInteractable, - viewController: LoggedInViewControllable, - offGameBuilder: OffGameBuildable, - ticTacToeBuilder: TicTacToeBuildable) { - self.viewController = viewController - self.offGameBuilder = offGameBuilder - self.ticTacToeBuilder = ticTacToeBuilder - super.init(interactor: interactor) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - attachOffGame() - } - - // MARK: - LoggedInRouting - - func cleanupViews() { - if let currentChild = currentChild { - viewController.dismiss(viewController: currentChild.viewControllable) - } - } - - func routeToTicTacToe() { - detachCurrentChild() - - let ticTacToe = ticTacToeBuilder.build(withListener: interactor) - currentChild = ticTacToe - attachChild(ticTacToe) - viewController.present(viewController: ticTacToe.viewControllable) - } - - func routeToOffGame() { - detachCurrentChild() - attachOffGame() - } - - // MARK: - Private - - private let viewController: LoggedInViewControllable - private let offGameBuilder: OffGameBuildable - private let ticTacToeBuilder: TicTacToeBuildable - - private var currentChild: ViewableRouting? - - private func attachOffGame() { - let offGame = offGameBuilder.build(withListener: interactor) - self.currentChild = offGame - attachChild(offGame) - viewController.present(viewController: offGame.viewControllable) - } - - private func detachCurrentChild() { - if let currentChild = currentChild { - detachChild(currentChild) - viewController.dismiss(viewController: currentChild.viewControllable) - } - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutBuilder.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutBuilder.swift deleted file mode 100644 index f023e78d7..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutBuilder.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class LoggedOutComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol LoggedOutBuildable: Buildable { - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting -} - -final class LoggedOutBuilder: Builder, LoggedOutBuildable { - - override init(dependency: LoggedOutDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting { - _ = LoggedOutComponent(dependency: dependency) - let viewController = LoggedOutViewController() - let interactor = LoggedOutInteractor(presenter: viewController) - interactor.listener = listener - return LoggedOutRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutInteractor.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutInteractor.swift deleted file mode 100644 index 6dea7cba9..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutInteractor.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol LoggedOutRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol LoggedOutPresentable: Presentable { - var listener: LoggedOutPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol LoggedOutListener: AnyObject { - func didLogin(withPlayer1Name player1Name: String, player2Name: String) -} - -final class LoggedOutInteractor: PresentableInteractor, LoggedOutInteractable, LoggedOutPresentableListener { - - weak var router: LoggedOutRouting? - - weak var listener: LoggedOutListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: LoggedOutPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutPresentableListener - - func login(withPlayer1Name player1Name: String?, player2Name: String?) { - let player1NameWithDefault = playerName(player1Name, withDefaultName: "Player 1") - let player2NameWithDefault = playerName(player2Name, withDefaultName: "Player 2") - - listener?.didLogin(withPlayer1Name: player1NameWithDefault, player2Name: player2NameWithDefault) - } - - private func playerName(_ name: String?, withDefaultName defaultName: String) -> String { - if let name = name { - return name.isEmpty ? defaultName : name - } else { - return defaultName - } - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutRouter.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutRouter.swift deleted file mode 100644 index c9cadb437..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutInteractable: Interactable { - var router: LoggedOutRouting? { get set } - var listener: LoggedOutListener? { get set } -} - -protocol LoggedOutViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class LoggedOutRouter: ViewableRouter, LoggedOutRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: LoggedOutInteractable, viewController: LoggedOutViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutViewController.swift deleted file mode 100644 index 42670412c..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol LoggedOutPresentableListener: AnyObject { - func login(withPlayer1Name: String?, player2Name: String?) -} - -final class LoggedOutViewController: UIViewController, LoggedOutPresentable, LoggedOutViewControllable { - - weak var listener: LoggedOutPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - let playerFields = buildPlayerFields() - buildLoginButton(withPlayer1Field: playerFields.player1Field, player2Field: playerFields.player2Field) - } - - // MARK: - Private - - private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { - let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line - view.addSubview(player1Field) - player1Field.placeholder = "Player 1 name" - player1Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(self.view).offset(100) - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(40) - } - - let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line - view.addSubview(player2Field) - player2Field.placeholder = "Player 2 name" - player2Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player1Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - - return (player1Field, player2Field) - } - - private func buildLoginButton(withPlayer1Field player1Field: UITextField, player2Field: UITextField) { - let loginButton = UIButton() - view.addSubview(loginButton) - loginButton.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player2Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - loginButton.setTitle("Login", for: .normal) - loginButton.setTitleColor(UIColor.white, for: .normal) - loginButton.backgroundColor = UIColor.black - loginButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.login(withPlayer1Name: player1Field.text, player2Name: player2Field.text) - }) - .disposed(by: disposeBag) - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameBuilder.swift b/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameBuilder.swift deleted file mode 100644 index 454584724..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameBuilder.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol OffGameDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class OffGameComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol OffGameBuildable: Buildable { - func build(withListener listener: OffGameListener) -> OffGameRouting -} - -final class OffGameBuilder: Builder, OffGameBuildable { - - override init(dependency: OffGameDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: OffGameListener) -> OffGameRouting { - _ = OffGameComponent(dependency: dependency) - let viewController = OffGameViewController() - let interactor = OffGameInteractor(presenter: viewController) - interactor.listener = listener - return OffGameRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameInteractor.swift b/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameInteractor.swift deleted file mode 100644 index 7cc315693..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameInteractor.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol OffGameRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol OffGamePresentable: Presentable { - var listener: OffGamePresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol OffGameListener: AnyObject { - func startTicTacToe() -} - -final class OffGameInteractor: PresentableInteractor, OffGameInteractable, OffGamePresentableListener { - - weak var router: OffGameRouting? - - weak var listener: OffGameListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: OffGamePresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - OffGamePresentableListener - - func startGame() { - listener?.startTicTacToe() - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameRouter.swift b/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameRouter.swift deleted file mode 100644 index c62e2b586..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol OffGameInteractable: Interactable { - var router: OffGameRouting? { get set } - var listener: OffGameListener? { get set } -} - -protocol OffGameViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class OffGameRouter: ViewableRouter, OffGameRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: OffGameInteractable, viewController: OffGameViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameViewController.swift b/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameViewController.swift deleted file mode 100644 index 99fb77d27..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/OffGame/OffGameViewController.swift +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol OffGamePresentableListener: AnyObject { - func startGame() -} - -final class OffGameViewController: UIViewController, OffGamePresentable, OffGameViewControllable { - - weak var listener: OffGamePresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildStartButton() - } - - // MARK: - Private - - private func buildStartButton() { - let startButton = UIButton() - view.addSubview(startButton) - startButton.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(100) - } - startButton.setTitle("Start Game", for: .normal) - startButton.setTitleColor(UIColor.white, for: .normal) - startButton.backgroundColor = UIColor.black - startButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.startGame() - }) - .disposed(by: disposeBag) - } - - private let disposeBag = DisposeBag() -} - -extension PlayerType { - - var color: UIColor { - switch self { - case .player1: - return UIColor.red - case .player2: - return UIColor.blue - } - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/Resources/Default-568h@2x.png b/ios/tutorials/tutorial3/TicTacToe/Resources/Default-568h@2x.png deleted file mode 100644 index 0891b7aab..000000000 Binary files a/ios/tutorials/tutorial3/TicTacToe/Resources/Default-568h@2x.png and /dev/null differ diff --git a/ios/tutorials/tutorial3/TicTacToe/Root/RootBuilder.swift b/ios/tutorials/tutorial3/TicTacToe/Root/RootBuilder.swift deleted file mode 100644 index d61d8a5bc..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/Root/RootBuilder.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class RootComponent: Component { - - let rootViewController: RootViewController - - init(dependency: RootDependency, - rootViewController: RootViewController) { - self.rootViewController = rootViewController - super.init(dependency: dependency) - } -} - -// MARK: - Builder - -protocol RootBuildable: Buildable { - func build() -> LaunchRouting -} - -final class RootBuilder: Builder, RootBuildable { - - override init(dependency: RootDependency) { - super.init(dependency: dependency) - } - - func build() -> LaunchRouting { - let viewController = RootViewController() - let component = RootComponent(dependency: dependency, - rootViewController: viewController) - let interactor = RootInteractor(presenter: viewController) - - let loggedOutBuilder = LoggedOutBuilder(dependency: component) - let loggedInBuilder = LoggedInBuilder(dependency: component) - return RootRouter(interactor: interactor, - viewController: viewController, - loggedOutBuilder: loggedOutBuilder, - loggedInBuilder: loggedInBuilder) - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/Root/RootComponent+LoggedIn.swift b/ios/tutorials/tutorial3/TicTacToe/Root/RootComponent+LoggedIn.swift deleted file mode 100644 index 2351441c1..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/Root/RootComponent+LoggedIn.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedIn scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedIn: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedIn scope. -} - -extension RootComponent: LoggedInDependency { - - var loggedInViewController: LoggedInViewControllable { - return rootViewController - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/Root/RootComponent+LoggedOut.swift b/ios/tutorials/tutorial3/TicTacToe/Root/RootComponent+LoggedOut.swift deleted file mode 100644 index a2f32f599..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/Root/RootComponent+LoggedOut.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedOut scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedOut: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedOut scope. -} - -extension RootComponent: LoggedOutDependency { - - // TODO: Implement properties to provide for LoggedOut scope. -} diff --git a/ios/tutorials/tutorial3/TicTacToe/Root/RootInteractor.swift b/ios/tutorials/tutorial3/TicTacToe/Root/RootInteractor.swift deleted file mode 100644 index a3fb513e0..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/Root/RootInteractor.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol RootRouting: ViewableRouting { - func routeToLoggedIn(withPlayer1Name player1Name: String, player2Name: String) -} - -protocol RootPresentable: Presentable { - var listener: RootPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol RootListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class RootInteractor: PresentableInteractor, RootInteractable, RootPresentableListener { - - weak var router: RootRouting? - - weak var listener: RootListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: RootPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutListener - - func didLogin(withPlayer1Name player1Name: String, player2Name: String) { - router?.routeToLoggedIn(withPlayer1Name: player1Name, player2Name: player2Name) - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/Root/RootRouter.swift b/ios/tutorials/tutorial3/TicTacToe/Root/RootRouter.swift deleted file mode 100644 index bc64cbf04..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/Root/RootRouter.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootInteractable: Interactable, LoggedOutListener, LoggedInListener { - var router: RootRouting? { get set } - var listener: RootListener? { get set } -} - -protocol RootViewControllable: ViewControllable { - func present(viewController: ViewControllable) - func dismiss(viewController: ViewControllable) -} - -final class RootRouter: LaunchRouter, RootRouting { - - init(interactor: RootInteractable, - viewController: RootViewControllable, - loggedOutBuilder: LoggedOutBuildable, - loggedInBuilder: LoggedInBuildable) { - self.loggedOutBuilder = loggedOutBuilder - self.loggedInBuilder = loggedInBuilder - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - - routeToLoggedOut() - } - - func routeToLoggedIn(withPlayer1Name player1Name: String, player2Name: String) { - // Detach logged out. - if let loggedOut = self.loggedOut { - detachChild(loggedOut) - viewController.dismiss(viewController: loggedOut.viewControllable) - self.loggedOut = nil - } - - let loggedIn = loggedInBuilder.build(withListener: interactor) - attachChild(loggedIn) - } - - // MARK: - Private - - private let loggedOutBuilder: LoggedOutBuildable - private let loggedInBuilder: LoggedInBuildable - - private var loggedOut: ViewableRouting? - - private func routeToLoggedOut() { - let loggedOut = loggedOutBuilder.build(withListener: interactor) - self.loggedOut = loggedOut - attachChild(loggedOut) - viewController.present(viewController: loggedOut.viewControllable) - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/Root/RootViewController.swift b/ios/tutorials/tutorial3/TicTacToe/Root/RootViewController.swift deleted file mode 100644 index 7a2d84fb8..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/Root/RootViewController.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol RootPresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class RootViewController: UIViewController, RootPresentable, RootViewControllable { - - weak var listener: RootPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - } - - // MARK: - RootViewControllable - - func present(viewController: ViewControllable) { - present(viewController.uiviewController, animated: true, completion: nil) - } - - func dismiss(viewController: ViewControllable) { - if presentedViewController === viewController.uiviewController { - dismiss(animated: true, completion: nil) - } - } -} - -// MARK: LoggedInViewControllable - -extension RootViewController: LoggedInViewControllable { - -} diff --git a/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeBuilder.swift b/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeBuilder.swift deleted file mode 100644 index 411a07c00..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeBuilder.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol TicTacToeDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class TicTacToeComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol TicTacToeBuildable: Buildable { - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting -} - -final class TicTacToeBuilder: Builder, TicTacToeBuildable { - - override init(dependency: TicTacToeDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting { - _ = TicTacToeComponent(dependency: dependency) - let viewController = TicTacToeViewController() - let interactor = TicTacToeInteractor(presenter: viewController) - interactor.listener = listener - return TicTacToeRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeInteractor.swift b/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeInteractor.swift deleted file mode 100644 index 20bb6c138..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeInteractor.swift +++ /dev/null @@ -1,153 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol TicTacToeRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol TicTacToePresentable: Presentable { - var listener: TicTacToePresentableListener? { get set } - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) - func announce(winner: PlayerType) -} - -protocol TicTacToeListener: AnyObject { - func gameDidEnd() -} - -final class TicTacToeInteractor: PresentableInteractor, TicTacToeInteractable, TicTacToePresentableListener { - - weak var router: TicTacToeRouting? - - weak var listener: TicTacToeListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: TicTacToePresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - - initBoard() - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - TicTacToePresentableListener - - func placeCurrentPlayerMark(atRow row: Int, col: Int) { - guard board[row][col] == nil else { - return - } - - let currentPlayer = getAndFlipCurrentPlayer() - board[row][col] = currentPlayer - presenter.setCell(atRow: row, col: col, withPlayerType: currentPlayer) - - if let winner = checkWinner() { - presenter.announce(winner: winner) - } - } - - func closeGame() { - listener?.gameDidEnd() - } - - // MARK: - Private - - private var currentPlayer = PlayerType.player1 - private var board = [[PlayerType?]]() - - private func initBoard() { - for _ in 0.. PlayerType { - let currentPlayer = self.currentPlayer - self.currentPlayer = currentPlayer == .player1 ? .player2 : .player1 - return currentPlayer - } - - private func checkWinner() -> PlayerType? { - // Rows. - for row in 0.., TicTacToeRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: TicTacToeInteractable, viewController: TicTacToeViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeViewController.swift deleted file mode 100644 index e5e17f2a8..000000000 --- a/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol TicTacToePresentableListener: AnyObject { - func placeCurrentPlayerMark(atRow row: Int, col: Int) - func closeGame() -} - -final class TicTacToeViewController: UIViewController, TicTacToePresentable, TicTacToeViewControllable { - - weak var listener: TicTacToePresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildCollectionView() - } - - // MARK: - TicTacToePresentable - - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) { - let indexPathRow = row * GameConstants.colCount + col - let cell = collectionView.cellForItem(at: IndexPath(row: indexPathRow, section: Constants.sectionCount - 1)) - cell?.backgroundColor = playerType.color - } - - func announce(winner: PlayerType) { - let winnerString: String = { - switch winner { - case .player1: - return "Red" - case .player2: - return "Blue" - } - }() - let alert = UIAlertController(title: "\(winnerString) Won!", message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { [weak self] _ in - self?.listener?.closeGame() - } - alert.addAction(closeAction) - present(alert, animated: true, completion: nil) - } - - // MARK: - Private - - private lazy var collectionView: UICollectionView = { - let layout = UICollectionViewFlowLayout() - layout.minimumLineSpacing = 0 - layout.minimumInteritemSpacing = 0 - layout.itemSize = CGSize(width: Constants.cellSize, height: Constants.cellSize) - return UICollectionView(frame: CGRect.zero, collectionViewLayout: layout) - }() - - private func buildCollectionView() { - collectionView.dataSource = self - collectionView.delegate = self - collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: Constants.cellIdentifier) - view.addSubview(collectionView) - collectionView.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.size.equalTo(CGSize(width: CGFloat(GameConstants.colCount) * Constants.cellSize, height: CGFloat(GameConstants.rowCount) * Constants.cellSize)) - } - } -} - -fileprivate struct Constants { - static let sectionCount = 1 - static let cellSize: CGFloat = UIScreen.main.bounds.width / CGFloat(GameConstants.colCount) - static let cellIdentifier = "TicTacToeCell" - static let defaultColor = UIColor.white -} - -extension TicTacToeViewController: UICollectionViewDataSource { - - func numberOfSections(in collectionView: UICollectionView) -> Int { - return Constants.sectionCount - } - - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return GameConstants.rowCount * GameConstants.colCount - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let reusedCell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.cellIdentifier, for: indexPath) - reset(cell: reusedCell) - return reusedCell - } - - private func reset(cell: UICollectionViewCell) { - cell.backgroundColor = Constants.defaultColor - cell.contentView.layer.borderWidth = 2 - cell.contentView.layer.borderColor = UIColor.lightGray.cgColor - } -} - -// MARK: - UICollectionViewDelegate - -extension TicTacToeViewController: UICollectionViewDelegate { - - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - let row = indexPath.row / GameConstants.colCount - let col = indexPath.row - row * GameConstants.rowCount - listener?.placeCurrentPlayerMark(atRow: row, col: col) - } -} diff --git a/ios/tutorials/tutorial4-completed/Podfile b/ios/tutorials/tutorial4-completed/Podfile deleted file mode 100644 index 980817e94..000000000 --- a/ios/tutorials/tutorial4-completed/Podfile +++ /dev/null @@ -1,10 +0,0 @@ -platform :ios, '9.0' - -use_frameworks! -inhibit_all_warnings! - -target 'TicTacToe' do - pod 'RIBs', :path => '../../../' - pod 'SnapKit', '~> 4.0.0' - pod 'RxCocoa', '~> 5.1' -end diff --git a/ios/tutorials/tutorial4-completed/README.md b/ios/tutorials/tutorial4-completed/README.md deleted file mode 100644 index 15094f4fe..000000000 --- a/ios/tutorials/tutorial4-completed/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# RIBs Tutorial 4: Deep Linking - -This is the finished code for [tutorial 4](https://github.com/uber/RIBs/wiki/iOS-Tutorial-4). diff --git a/ios/tutorials/tutorial4-completed/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial4-completed/TicTacToe.xcodeproj/project.pbxproj deleted file mode 100644 index 9c9f2d5d8..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe.xcodeproj/project.pbxproj +++ /dev/null @@ -1,633 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */; }; - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */; }; - E90A68681FB7069A00D303EE /* LoggedInActionableItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E90A68671FB7069A00D303EE /* LoggedInActionableItem.swift */; }; - E90A686A1FB7074400D303EE /* LaunchGameWorkflow.swift in Sources */ = {isa = PBXBuildFile; fileRef = E90A68691FB7074400D303EE /* LaunchGameWorkflow.swift */; }; - E9C86DA01FA38A0A00B61DF6 /* RandomWinBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9A1FA389EC00B61DF6 /* RandomWinBuilder.swift */; }; - E9C86DA11FA38A0A00B61DF6 /* RandomWinInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9B1FA389EC00B61DF6 /* RandomWinInteractor.swift */; }; - E9C86DA21FA38A0A00B61DF6 /* RandomWinRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9C1FA389EC00B61DF6 /* RandomWinRouter.swift */; }; - E9C86DA31FA38A0A00B61DF6 /* RandomWinViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9D1FA389EC00B61DF6 /* RandomWinViewController.swift */; }; - E9C86DA81FA38AD600B61DF6 /* ScoreStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DA71FA38AD000B61DF6 /* ScoreStream.swift */; }; - E9C86DA91FA38AEC00B61DF6 /* PlayerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DA61FA38AD000B61DF6 /* PlayerType.swift */; }; - E9C86DB01FA38B7D00B61DF6 /* BasicScoreBoardBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D951FA389E000B61DF6 /* BasicScoreBoardBuilder.swift */; }; - E9C86DB11FA38B7D00B61DF6 /* BasicScoreBoardInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D961FA389E000B61DF6 /* BasicScoreBoardInteractor.swift */; }; - E9C86DB21FA38B7D00B61DF6 /* BasicScoreBoardRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D971FA389E000B61DF6 /* BasicScoreBoardRouter.swift */; }; - E9C86DB31FA38B7D00B61DF6 /* BasicScoreBoardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D981FA389E000B61DF6 /* BasicScoreBoardViewController.swift */; }; - E9C86DB91FA38D5400B61DF6 /* RootActionableItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DB81FA38D4700B61DF6 /* RootActionableItem.swift */; }; - E9C86DBD1FA3AD6400B61DF6 /* Game.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DBC1FA3AD6400B61DF6 /* Game.swift */; }; - E9C86DBF1FA3AE3700B61DF6 /* RandomWinAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DBE1FA3AE3700B61DF6 /* RandomWinAdapter.swift */; }; - E9C86DC11FA3AE6E00B61DF6 /* TicTacToeAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DC01FA3AE6E00B61DF6 /* TicTacToeAdapter.swift */; }; - E9C86DC31FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DC21FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift */; }; - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D351F972FD500D84847 /* AppDelegate.swift */; }; - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D341F972FD500D84847 /* AppComponent.swift */; }; - E9CB1D541F9730E400D84847 /* LoggedInBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */; }; - E9CB1D551F9730E400D84847 /* LoggedInComponent+OffGame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */; }; - E9CB1D561F9730E400D84847 /* LoggedInComponent+TicTacToe.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */; }; - E9CB1D571F9730E400D84847 /* LoggedInInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */; }; - E9CB1D581F9730E400D84847 /* LoggedInRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */; }; - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */; }; - E9CB1D5A1F9730E700D84847 /* LoggedOutInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */; }; - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */; }; - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */; }; - E9CB1D5D1F9730EB00D84847 /* OffGameBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */; }; - E9CB1D5E1F9730EB00D84847 /* OffGameInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */; }; - E9CB1D5F1F9730EB00D84847 /* OffGameRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D501F972FE500D84847 /* OffGameRouter.swift */; }; - E9CB1D601F9730EB00D84847 /* OffGameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D511F972FE500D84847 /* OffGameViewController.swift */; }; - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D371F972FE400D84847 /* RootBuilder.swift */; }; - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */; }; - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */; }; - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */; }; - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3B1F972FE400D84847 /* RootRouter.swift */; }; - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3C1F972FE400D84847 /* RootViewController.swift */; }; - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */; }; - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */; }; - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */; }; - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.debug.xcconfig"; sourceTree = ""; }; - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.release.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.release.xcconfig"; sourceTree = ""; }; - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TicTacToe.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E90A68671FB7069A00D303EE /* LoggedInActionableItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInActionableItem.swift; sourceTree = ""; }; - E90A68691FB7074400D303EE /* LaunchGameWorkflow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchGameWorkflow.swift; sourceTree = ""; }; - E9894B4A1F972CC500688FCB /* TicTacToe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TicTacToe.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B591F972CC500688FCB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E9C86D951FA389E000B61DF6 /* BasicScoreBoardBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicScoreBoardBuilder.swift; sourceTree = ""; }; - E9C86D961FA389E000B61DF6 /* BasicScoreBoardInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicScoreBoardInteractor.swift; sourceTree = ""; }; - E9C86D971FA389E000B61DF6 /* BasicScoreBoardRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicScoreBoardRouter.swift; sourceTree = ""; }; - E9C86D981FA389E000B61DF6 /* BasicScoreBoardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicScoreBoardViewController.swift; sourceTree = ""; }; - E9C86D9A1FA389EC00B61DF6 /* RandomWinBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinBuilder.swift; sourceTree = ""; }; - E9C86D9B1FA389EC00B61DF6 /* RandomWinInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinInteractor.swift; sourceTree = ""; }; - E9C86D9C1FA389EC00B61DF6 /* RandomWinRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinRouter.swift; sourceTree = ""; }; - E9C86D9D1FA389EC00B61DF6 /* RandomWinViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinViewController.swift; sourceTree = ""; }; - E9C86DA61FA38AD000B61DF6 /* PlayerType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerType.swift; sourceTree = ""; }; - E9C86DA71FA38AD000B61DF6 /* ScoreStream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScoreStream.swift; sourceTree = ""; }; - E9C86DB81FA38D4700B61DF6 /* RootActionableItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootActionableItem.swift; sourceTree = ""; }; - E9C86DBC1FA3AD6400B61DF6 /* Game.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Game.swift; sourceTree = ""; }; - E9C86DBE1FA3AE3700B61DF6 /* RandomWinAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinAdapter.swift; sourceTree = ""; }; - E9C86DC01FA3AE6E00B61DF6 /* TicTacToeAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeAdapter.swift; sourceTree = ""; }; - E9C86DC21FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+RandomWin.swift"; sourceTree = ""; }; - E9CB1D341F972FD500D84847 /* AppComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppComponent.swift; sourceTree = ""; }; - E9CB1D351F972FD500D84847 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E9CB1D371F972FE400D84847 /* RootBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootBuilder.swift; sourceTree = ""; }; - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedIn.swift"; sourceTree = ""; }; - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedOut.swift"; sourceTree = ""; }; - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootInteractor.swift; sourceTree = ""; }; - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootRouter.swift; sourceTree = ""; }; - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeBuilder.swift; sourceTree = ""; }; - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeInteractor.swift; sourceTree = ""; }; - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeRouter.swift; sourceTree = ""; }; - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeViewController.swift; sourceTree = ""; }; - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutBuilder.swift; sourceTree = ""; }; - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutInteractor.swift; sourceTree = ""; }; - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutRouter.swift; sourceTree = ""; }; - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutViewController.swift; sourceTree = ""; }; - E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInBuilder.swift; sourceTree = ""; }; - E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+OffGame.swift"; sourceTree = ""; }; - E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+TicTacToe.swift"; sourceTree = ""; }; - E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInInteractor.swift; sourceTree = ""; }; - E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInRouter.swift; sourceTree = ""; }; - E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameBuilder.swift; sourceTree = ""; }; - E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameInteractor.swift; sourceTree = ""; }; - E9CB1D501F972FE500D84847 /* OffGameRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameRouter.swift; sourceTree = ""; }; - E9CB1D511F972FE500D84847 /* OffGameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E9894B471F972CC500688FCB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 59F943336420DE07CA779F6F /* Pods */ = { - isa = PBXGroup; - children = ( - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */, - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 7EDD59511FA135E9005EC8B2 /* Resources */ = { - isa = PBXGroup; - children = ( - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, - ); - path = Resources; - sourceTree = ""; - }; - E9894B411F972CC500688FCB = { - isa = PBXGroup; - children = ( - E9894B4C1F972CC500688FCB /* TicTacToe */, - E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, - F5205CCF508911BE388D8406 /* Frameworks */, - ); - sourceTree = ""; - }; - E9894B4B1F972CC500688FCB /* Products */ = { - isa = PBXGroup; - children = ( - E9894B4A1F972CC500688FCB /* TicTacToe.app */, - ); - name = Products; - sourceTree = ""; - }; - E9894B4C1F972CC500688FCB /* TicTacToe */ = { - isa = PBXGroup; - children = ( - 7EDD59511FA135E9005EC8B2 /* Resources */, - E9C86DB71FA38D4700B61DF6 /* ActionableItems */, - E9CB1D331F972FD500D84847 /* AppStart */, - E9CB1D471F972FE500D84847 /* LoggedIn */, - E9CB1D421F972FE400D84847 /* LoggedOut */, - E9C86DA41FA38AD000B61DF6 /* Models */, - E9CB1D4D1F972FE500D84847 /* OffGame */, - E9C86D9E1FA389F400B61DF6 /* Promo */, - E9C86D991FA389EC00B61DF6 /* RandomWin */, - E9CB1D361F972FE400D84847 /* Root */, - E9C86D931FA389E000B61DF6 /* ScoreBoard */, - E9CB1D3D1F972FE400D84847 /* TicTacToe */, - E9894B591F972CC500688FCB /* Info.plist */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9C86D931FA389E000B61DF6 /* ScoreBoard */ = { - isa = PBXGroup; - children = ( - E9C86D951FA389E000B61DF6 /* BasicScoreBoardBuilder.swift */, - E9C86D961FA389E000B61DF6 /* BasicScoreBoardInteractor.swift */, - E9C86D971FA389E000B61DF6 /* BasicScoreBoardRouter.swift */, - E9C86D981FA389E000B61DF6 /* BasicScoreBoardViewController.swift */, - ); - path = ScoreBoard; - sourceTree = ""; - }; - E9C86D991FA389EC00B61DF6 /* RandomWin */ = { - isa = PBXGroup; - children = ( - E9C86D9A1FA389EC00B61DF6 /* RandomWinBuilder.swift */, - E9C86D9B1FA389EC00B61DF6 /* RandomWinInteractor.swift */, - E9C86D9C1FA389EC00B61DF6 /* RandomWinRouter.swift */, - E9C86D9D1FA389EC00B61DF6 /* RandomWinViewController.swift */, - ); - path = RandomWin; - sourceTree = ""; - }; - E9C86D9E1FA389F400B61DF6 /* Promo */ = { - isa = PBXGroup; - children = ( - E90A68691FB7074400D303EE /* LaunchGameWorkflow.swift */, - ); - path = Promo; - sourceTree = ""; - }; - E9C86DA41FA38AD000B61DF6 /* Models */ = { - isa = PBXGroup; - children = ( - E9C86DA61FA38AD000B61DF6 /* PlayerType.swift */, - E9C86DA71FA38AD000B61DF6 /* ScoreStream.swift */, - ); - path = Models; - sourceTree = ""; - }; - E9C86DB71FA38D4700B61DF6 /* ActionableItems */ = { - isa = PBXGroup; - children = ( - E9C86DB81FA38D4700B61DF6 /* RootActionableItem.swift */, - E90A68671FB7069A00D303EE /* LoggedInActionableItem.swift */, - ); - path = ActionableItems; - sourceTree = ""; - }; - E9CB1D331F972FD500D84847 /* AppStart */ = { - isa = PBXGroup; - children = ( - E9CB1D341F972FD500D84847 /* AppComponent.swift */, - E9CB1D351F972FD500D84847 /* AppDelegate.swift */, - ); - path = AppStart; - sourceTree = ""; - }; - E9CB1D361F972FE400D84847 /* Root */ = { - isa = PBXGroup; - children = ( - E9CB1D371F972FE400D84847 /* RootBuilder.swift */, - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */, - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */, - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */, - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */, - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */, - ); - path = Root; - sourceTree = ""; - }; - E9CB1D3D1F972FE400D84847 /* TicTacToe */ = { - isa = PBXGroup; - children = ( - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */, - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */, - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */, - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9CB1D421F972FE400D84847 /* LoggedOut */ = { - isa = PBXGroup; - children = ( - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */, - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */, - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */, - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */, - ); - path = LoggedOut; - sourceTree = ""; - }; - E9CB1D471F972FE500D84847 /* LoggedIn */ = { - isa = PBXGroup; - children = ( - E9C86DBC1FA3AD6400B61DF6 /* Game.swift */, - E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */, - E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */, - E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */, - E9C86DC21FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift */, - E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */, - E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */, - E9C86DBE1FA3AE3700B61DF6 /* RandomWinAdapter.swift */, - E9C86DC01FA3AE6E00B61DF6 /* TicTacToeAdapter.swift */, - ); - path = LoggedIn; - sourceTree = ""; - }; - E9CB1D4D1F972FE500D84847 /* OffGame */ = { - isa = PBXGroup; - children = ( - E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */, - E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */, - E9CB1D501F972FE500D84847 /* OffGameRouter.swift */, - E9CB1D511F972FE500D84847 /* OffGameViewController.swift */, - ); - path = OffGame; - sourceTree = ""; - }; - F5205CCF508911BE388D8406 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E9894B491F972CC500688FCB /* TicTacToe */ = { - isa = PBXNativeTarget; - buildConfigurationList = E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */; - buildPhases = ( - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */, - E9894B461F972CC500688FCB /* Sources */, - E9894B471F972CC500688FCB /* Frameworks */, - E9894B481F972CC500688FCB /* Resources */, - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TicTacToe; - productName = TicTacToe; - productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E9894B421F972CC500688FCB /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = Uber; - TargetAttributes = { - E9894B491F972CC500688FCB = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = E9894B411F972CC500688FCB; - productRefGroup = E9894B4B1F972CC500688FCB /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E9894B491F972CC500688FCB /* TicTacToe */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E9894B481F972CC500688FCB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RIBs/RIBs.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RIBs.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TicTacToe-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E9894B461F972CC500688FCB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E9C86DA31FA38A0A00B61DF6 /* RandomWinViewController.swift in Sources */, - E9C86DA21FA38A0A00B61DF6 /* RandomWinRouter.swift in Sources */, - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */, - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */, - E9C86DB01FA38B7D00B61DF6 /* BasicScoreBoardBuilder.swift in Sources */, - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */, - E9C86DC31FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift in Sources */, - E9CB1D571F9730E400D84847 /* LoggedInInteractor.swift in Sources */, - E9CB1D5D1F9730EB00D84847 /* OffGameBuilder.swift in Sources */, - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */, - E9C86DA91FA38AEC00B61DF6 /* PlayerType.swift in Sources */, - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */, - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */, - E9CB1D581F9730E400D84847 /* LoggedInRouter.swift in Sources */, - E9CB1D5F1F9730EB00D84847 /* OffGameRouter.swift in Sources */, - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */, - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */, - E9C86DB31FA38B7D00B61DF6 /* BasicScoreBoardViewController.swift in Sources */, - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */, - E9C86DC11FA3AE6E00B61DF6 /* TicTacToeAdapter.swift in Sources */, - E9C86DBF1FA3AE3700B61DF6 /* RandomWinAdapter.swift in Sources */, - E9CB1D541F9730E400D84847 /* LoggedInBuilder.swift in Sources */, - E9CB1D551F9730E400D84847 /* LoggedInComponent+OffGame.swift in Sources */, - E9C86DB91FA38D5400B61DF6 /* RootActionableItem.swift in Sources */, - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */, - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */, - E90A68681FB7069A00D303EE /* LoggedInActionableItem.swift in Sources */, - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */, - E9C86DA81FA38AD600B61DF6 /* ScoreStream.swift in Sources */, - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */, - E9C86DA01FA38A0A00B61DF6 /* RandomWinBuilder.swift in Sources */, - E9CB1D561F9730E400D84847 /* LoggedInComponent+TicTacToe.swift in Sources */, - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */, - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */, - E9C86DB11FA38B7D00B61DF6 /* BasicScoreBoardInteractor.swift in Sources */, - E9C86DB21FA38B7D00B61DF6 /* BasicScoreBoardRouter.swift in Sources */, - E9C86DBD1FA3AD6400B61DF6 /* Game.swift in Sources */, - E90A686A1FB7074400D303EE /* LaunchGameWorkflow.swift in Sources */, - E9C86DA11FA38A0A00B61DF6 /* RandomWinInteractor.swift in Sources */, - E9CB1D5E1F9730EB00D84847 /* OffGameInteractor.swift in Sources */, - E9CB1D5A1F9730E700D84847 /* LoggedOutInteractor.swift in Sources */, - E9CB1D601F9730EB00D84847 /* OffGameViewController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - E9894B651F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - E9894B661F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E9894B681F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Debug; - }; - E9894B691F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B651F972CC600688FCB /* Debug */, - E9894B661F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B681F972CC600688FCB /* Debug */, - E9894B691F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E9894B421F972CC500688FCB /* Project object */; -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/ActionableItems/LoggedInActionableItem.swift b/ios/tutorials/tutorial4-completed/TicTacToe/ActionableItems/LoggedInActionableItem.swift deleted file mode 100644 index 258ef047c..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/ActionableItems/LoggedInActionableItem.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift - -public protocol LoggedInActionableItem: AnyObject { - func launchGame(with id: String?) -> Observable<(LoggedInActionableItem, ())> -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/ActionableItems/RootActionableItem.swift b/ios/tutorials/tutorial4-completed/TicTacToe/ActionableItems/RootActionableItem.swift deleted file mode 100644 index 4b345cdfc..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/ActionableItems/RootActionableItem.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift - -public protocol RootActionableItem: AnyObject { - func waitForLogin() -> Observable<(LoggedInActionableItem, ())> -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppComponent.swift b/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppComponent.swift deleted file mode 100644 index cc73b41e4..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppComponent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class AppComponent: Component, RootDependency { - - init() { - super.init(dependency: EmptyComponent()) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppDelegate.swift deleted file mode 100644 index da7a36a51..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppDelegate.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift -import UIKit - -/// Game app delegate. -@UIApplicationMain -public class AppDelegate: UIResponder, UIApplicationDelegate { - - /// The window. - public var window: UIWindow? - - /// Tells the delegate that the launch process is almost done and the app is almost ready to run. - /// - /// - parameter application: Your singleton app object. - /// - parameter launchOptions: A dictionary indicating the reason the app was launched (if any). The contents of - /// this dictionary may be empty in situations where the user launched the app directly. For information about - /// the possible keys in this dictionary and how to handle them, see Launch Options Keys. - /// - returns: false if the app cannot handle the URL resource or continue a user activity, otherwise return true. - public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let window = UIWindow(frame: UIScreen.main.bounds) - self.window = window - - let result = RootBuilder(dependency: AppComponent()).build() - let launchRouter = result.launchRouter - self.launchRouter = launchRouter - urlHandler = result.urlHandler - launchRouter.launch(from: window) - - return true - } - - public func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { - urlHandler?.handle(url) - return true - } - - // MARK: - Private - - private var launchRouter: LaunchRouting? - private var urlHandler: UrlHandler? -} - -protocol UrlHandler: AnyObject { - func handle(_ url: URL) -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Info.plist b/ios/tutorials/tutorial4-completed/TicTacToe/Info.plist deleted file mode 100644 index b09efebf8..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Info.plist +++ /dev/null @@ -1,56 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - CFBundleURLTypes - - - CFBundleURLName - com.ubercab.Game - CFBundleURLSchemes - - ribs-training - - - - - diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/Game.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/Game.swift deleted file mode 100644 index e039a4b2d..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/Game.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public protocol GameListener: AnyObject { - func gameDidEnd(with winner: PlayerType?) -} - -public protocol GameBuildable: Buildable { - func build(withListener listener: GameListener) -> ViewableRouting -} - -public protocol Game { - var id: String { get } - var name: String { get } - var builder: GameBuildable { get } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInBuilder.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInBuilder.swift deleted file mode 100644 index 1e9ac5052..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInBuilder.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedInDependency: Dependency { - var loggedInViewController: LoggedInViewControllable { get } -} - -final class LoggedInComponent: Component { - - fileprivate var loggedInViewController: LoggedInViewControllable { - return dependency.loggedInViewController - } - - fileprivate var games: [Game] { - return shared { - return [RandomWinAdapter(dependency: self), TicTacToeAdapter(dependency: self)] - } - } - - var mutableScoreStream: MutableScoreStream { - return shared { ScoreStreamImpl() } - } - - var scoreStream: ScoreStream { - return mutableScoreStream - } - - let player1Name: String - let player2Name: String - - init(dependency: LoggedInDependency, player1Name: String, player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(dependency: dependency) - } -} - -// MARK: - Builder - -protocol LoggedInBuildable: Buildable { - func build(withListener listener: LoggedInListener, player1Name: String, player2Name: String) -> (router: LoggedInRouting, actionableItem: LoggedInActionableItem) -} - -final class LoggedInBuilder: Builder, LoggedInBuildable { - - override init(dependency: LoggedInDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedInListener, player1Name: String, player2Name: String) -> (router: LoggedInRouting, actionableItem: LoggedInActionableItem) { - let component = LoggedInComponent(dependency: dependency, - player1Name: player1Name, - player2Name: player2Name) - let interactor = LoggedInInteractor(games: component.games) - interactor.listener = listener - - let offGameBuilder = OffGameBuilder(dependency: component) - let router = LoggedInRouter(interactor: interactor, - viewController: component.loggedInViewController, - offGameBuilder: offGameBuilder) - return (router, interactor) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift deleted file mode 100644 index b8fbc434b..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the OffGame scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyOffGame: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the OffGame scope. -} - -extension LoggedInComponent: OffGameDependency { - - // TODO: Implement properties to provide for OffGame scope. -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+RandomWin.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+RandomWin.swift deleted file mode 100644 index 6892dbe75..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+RandomWin.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -extension LoggedInComponent: RandomWinDependency { -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift deleted file mode 100644 index daa3c2a9e..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the TicTacToe scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyTicTacToe: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the TicTacToe scope. -} - -extension LoggedInComponent: TicTacToeDependency { - - // TODO: Implement properties to provide for TicTacToe scope. -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInInteractor.swift deleted file mode 100644 index d3cc93e31..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInInteractor.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol LoggedInRouting: Routing { - func cleanupViews() - func routeToOffGame(with games: [Game]) - func routeToGame(with gameBuilder: GameBuildable) -} - -protocol LoggedInListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class LoggedInInteractor: Interactor, LoggedInInteractable, LoggedInActionableItem { - - weak var router: LoggedInRouting? - weak var listener: LoggedInListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - init(games: [Game]) { - self.games = games - super.init() - } - - override func didBecomeActive() { - super.didBecomeActive() - - router?.routeToOffGame(with: games) - } - - override func willResignActive() { - super.willResignActive() - - router?.cleanupViews() - // TODO: Pause any business logic. - } - - // MARK: - OffGameListener - - func startGame(with gameBuilder: GameBuildable) { - router?.routeToGame(with: gameBuilder) - } - - // MARK: - TicTacToeListener - - func gameDidEnd(with winner: PlayerType?) { - router?.routeToOffGame(with: games) - } - - // MARK: - LoggedInActionableItem - - func launchGame(with id: String?) -> Observable<(LoggedInActionableItem, ())> { - let game: Game? = games.first { game in - return game.id.lowercased() == id?.lowercased() - } - - if let game = game { - router?.routeToGame(with: game.builder) - } - - return Observable.just((self, ())) - } - - // MARK: - Private - - private var games = [Game]() - -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInRouter.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInRouter.swift deleted file mode 100644 index 33d359afb..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/LoggedInRouter.swift +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedInInteractable: Interactable, OffGameListener, GameListener { - var router: LoggedInRouting? { get set } - var listener: LoggedInListener? { get set } -} - -protocol LoggedInViewControllable: ViewControllable { - func replaceModal(viewController: ViewControllable?) -} - -final class LoggedInRouter: Router, LoggedInRouting { - - init(interactor: LoggedInInteractable, - viewController: LoggedInViewControllable, - offGameBuilder: OffGameBuildable) { - self.viewController = viewController - self.offGameBuilder = offGameBuilder - super.init(interactor: interactor) - interactor.router = self - } - - // MARK: - LoggedInRouting - - func cleanupViews() { - if currentChild != nil { - viewController.replaceModal(viewController: nil) - } - } - - func routeToOffGame(with games: [Game]) { - detachCurrentChild() - attachOffGame(with: games) - } - - func routeToGame(with gameBuilder: GameBuildable) { - detachCurrentChild() - - let game = gameBuilder.build(withListener: interactor) - self.currentChild = game - attachChild(game) - viewController.replaceModal(viewController: game.viewControllable) - } - - // MARK: - Private - - private let viewController: LoggedInViewControllable - private let offGameBuilder: OffGameBuildable - - private var currentChild: ViewableRouting? - - private func attachOffGame(with games: [Game]) { - let offGame = offGameBuilder.build(withListener: interactor, games: games) - self.currentChild = offGame - attachChild(offGame) - viewController.replaceModal(viewController: offGame.viewControllable) - } - - private func detachCurrentChild() { - if let currentChild = currentChild { - detachChild(currentChild) - viewController.replaceModal(viewController: nil) - } - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/RandomWinAdapter.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/RandomWinAdapter.swift deleted file mode 100644 index d069e299c..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/RandomWinAdapter.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class RandomWinAdapter: Game, GameBuildable, RandomWinListener { - - let id = "randomwin" - let name = "Random Win" - var builder: GameBuildable { - return self - } - - private let randomWinBuilder: RandomWinBuilder - - private weak var listener: GameListener? - - init(dependency: RandomWinDependency) { - randomWinBuilder = RandomWinBuilder(dependency: dependency) - } - - func build(withListener listener: GameListener) -> ViewableRouting { - self.listener = listener - return randomWinBuilder.build(withListener: self) - } - - func didRandomlyWin(with player: PlayerType) { - listener?.gameDidEnd(with: player) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/TicTacToeAdapter.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/TicTacToeAdapter.swift deleted file mode 100644 index 3a1daf23a..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedIn/TicTacToeAdapter.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class TicTacToeAdapter: Game, GameBuildable, TicTacToeListener { - let id = "tictactoe" - let name = "Tic Tac Toe" - let ticTacToeBuilder: TicTacToeBuilder - var builder: GameBuildable { - return self - } - - weak var gameListener: GameListener? - - init(dependency: TicTacToeDependency) { - ticTacToeBuilder = TicTacToeBuilder(dependency: dependency) - } - - func build(withListener listener: GameListener) -> ViewableRouting { - gameListener = listener - return ticTacToeBuilder.build(withListener: self) - } - - func ticTacToeDidEnd(with winner: PlayerType?) { - gameListener?.gameDidEnd(with: winner) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutBuilder.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutBuilder.swift deleted file mode 100644 index f023e78d7..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutBuilder.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class LoggedOutComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol LoggedOutBuildable: Buildable { - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting -} - -final class LoggedOutBuilder: Builder, LoggedOutBuildable { - - override init(dependency: LoggedOutDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting { - _ = LoggedOutComponent(dependency: dependency) - let viewController = LoggedOutViewController() - let interactor = LoggedOutInteractor(presenter: viewController) - interactor.listener = listener - return LoggedOutRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutInteractor.swift deleted file mode 100644 index 6dea7cba9..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutInteractor.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol LoggedOutRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol LoggedOutPresentable: Presentable { - var listener: LoggedOutPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol LoggedOutListener: AnyObject { - func didLogin(withPlayer1Name player1Name: String, player2Name: String) -} - -final class LoggedOutInteractor: PresentableInteractor, LoggedOutInteractable, LoggedOutPresentableListener { - - weak var router: LoggedOutRouting? - - weak var listener: LoggedOutListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: LoggedOutPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutPresentableListener - - func login(withPlayer1Name player1Name: String?, player2Name: String?) { - let player1NameWithDefault = playerName(player1Name, withDefaultName: "Player 1") - let player2NameWithDefault = playerName(player2Name, withDefaultName: "Player 2") - - listener?.didLogin(withPlayer1Name: player1NameWithDefault, player2Name: player2NameWithDefault) - } - - private func playerName(_ name: String?, withDefaultName defaultName: String) -> String { - if let name = name { - return name.isEmpty ? defaultName : name - } else { - return defaultName - } - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutRouter.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutRouter.swift deleted file mode 100644 index c9cadb437..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutInteractable: Interactable { - var router: LoggedOutRouting? { get set } - var listener: LoggedOutListener? { get set } -} - -protocol LoggedOutViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class LoggedOutRouter: ViewableRouter, LoggedOutRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: LoggedOutInteractable, viewController: LoggedOutViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift deleted file mode 100644 index 42670412c..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol LoggedOutPresentableListener: AnyObject { - func login(withPlayer1Name: String?, player2Name: String?) -} - -final class LoggedOutViewController: UIViewController, LoggedOutPresentable, LoggedOutViewControllable { - - weak var listener: LoggedOutPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - let playerFields = buildPlayerFields() - buildLoginButton(withPlayer1Field: playerFields.player1Field, player2Field: playerFields.player2Field) - } - - // MARK: - Private - - private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { - let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line - view.addSubview(player1Field) - player1Field.placeholder = "Player 1 name" - player1Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(self.view).offset(100) - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(40) - } - - let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line - view.addSubview(player2Field) - player2Field.placeholder = "Player 2 name" - player2Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player1Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - - return (player1Field, player2Field) - } - - private func buildLoginButton(withPlayer1Field player1Field: UITextField, player2Field: UITextField) { - let loginButton = UIButton() - view.addSubview(loginButton) - loginButton.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player2Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - loginButton.setTitle("Login", for: .normal) - loginButton.setTitleColor(UIColor.white, for: .normal) - loginButton.backgroundColor = UIColor.black - loginButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.login(withPlayer1Name: player1Field.text, player2Name: player2Field.text) - }) - .disposed(by: disposeBag) - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Models/PlayerType.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Models/PlayerType.swift deleted file mode 100644 index 783eba65b..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Models/PlayerType.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import UIKit - -public enum PlayerType: Int { - case player1 = 1 - case player2 - - var color: UIColor { - switch self { - case .player1: - return UIColor.red - case .player2: - return UIColor.blue - } - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Models/ScoreStream.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Models/ScoreStream.swift deleted file mode 100644 index f2367ebab..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Models/ScoreStream.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift -import RxCocoa - -public struct Score { - public let player1Score: Int - public let player2Score: Int - - public static func equals(lhs: Score, rhs: Score) -> Bool { - return lhs.player1Score == rhs.player1Score && lhs.player2Score == rhs.player2Score - } -} - -public protocol ScoreStream: AnyObject { - var score: Observable { get } -} - -public protocol MutableScoreStream: ScoreStream { - func updateScore(with winner: PlayerType) -} - -public class ScoreStreamImpl: MutableScoreStream { - - public init() {} - - public var score: Observable { - return variable - .asObservable() - .distinctUntilChanged { (lhs: Score, rhs: Score) -> Bool in - Score.equals(lhs: lhs, rhs: rhs) - } - } - - public func updateScore(with winner: PlayerType) { - let newScore: Score = { - let currentScore = variable.value - switch winner { - case .player1: - return Score(player1Score: currentScore.player1Score + 1, player2Score: currentScore.player2Score) - case .player2: - return Score(player1Score: currentScore.player1Score, player2Score: currentScore.player2Score + 1) - } - }() - variable.accept(newScore) - } - - // MARK: - Private - - private let variable = BehaviorRelay(value: Score(player1Score: 0, player2Score: 0)) -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameBuilder.swift b/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameBuilder.swift deleted file mode 100644 index a38aa6dfd..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameBuilder.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public protocol OffGameDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var scoreStream: ScoreStream { get } -} - -final class OffGameComponent: Component, BasicScoreBoardDependency { - - var player1Name: String { - return dependency.player1Name - } - - var player2Name: String { - return dependency.player2Name - } - - var scoreStream: ScoreStream { - return dependency.scoreStream - } -} - -// MARK: - Builder - -protocol OffGameBuildable: Buildable { - func build(withListener listener: OffGameListener, games: [Game]) -> OffGameRouting -} - -final class OffGameBuilder: Builder, OffGameBuildable { - - override init(dependency: OffGameDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: OffGameListener, games: [Game]) -> OffGameRouting { - let component = OffGameComponent(dependency: dependency) - let viewController = OffGameViewController(games: games) - let interactor = OffGameInteractor(presenter: viewController) - interactor.listener = listener - - let scoreBoardBuilder = BasicScoreBoardBuilder(dependency: component) - let router = OffGameRouter(interactor: interactor, - viewController: viewController, - scoreBoardBuilder: scoreBoardBuilder) - return router - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameInteractor.swift deleted file mode 100644 index aa90095c2..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameInteractor.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol OffGameRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol OffGamePresentable: Presentable { - var listener: OffGamePresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol OffGameListener: AnyObject { - func startGame(with gameBuilder: GameBuildable) -} - -final class OffGameInteractor: PresentableInteractor, OffGameInteractable, OffGamePresentableListener { - - weak var router: OffGameRouting? - - weak var listener: OffGameListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: OffGamePresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - OffGamePresentableListener - - func start(_ game: Game) { - listener?.startGame(with: game.builder) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameRouter.swift b/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameRouter.swift deleted file mode 100644 index f8b3e72b4..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameRouter.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol OffGameInteractable: Interactable, BasicScoreBoardListener { - var router: OffGameRouting? { get set } - var listener: OffGameListener? { get set } -} - -protocol OffGameViewControllable: ViewControllable { - func show(scoreBoardView: ViewControllable) -} - -final class OffGameRouter: ViewableRouter, OffGameRouting { - - init(interactor: OffGameInteractable, - viewController: OffGameViewControllable, - scoreBoardBuilder: BasicScoreBoardBuildable) { - self.scoreBoardBuilder = scoreBoardBuilder - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - - attachScoreBoard() - } - - // MARK: - Private - - private var scoreBoardBuilder: BasicScoreBoardBuildable - - private func attachScoreBoard() { - let scoreBoard = scoreBoardBuilder.build(withListener: interactor) - attachChild(scoreBoard) - viewController.show(scoreBoardView: scoreBoard.viewControllable) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameViewController.swift deleted file mode 100644 index 59207c0b6..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameViewController.swift +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol OffGamePresentableListener: AnyObject { - func start(_ game: Game) -} - -final class OffGameViewController: UIViewController, OffGamePresentable, OffGameViewControllable { - - weak var listener: OffGamePresentableListener? - - init(games: [Game]) { - self.games = games - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildStartButtons() - } - - func show(scoreBoardView: ViewControllable) { - addChildViewController(scoreBoardView.uiviewController) - view.addSubview(scoreBoardView.uiviewController.view) - scoreBoardView.uiviewController.view.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(self.view).offset(70) - maker.leading.trailing.equalTo(self.view).inset(20) - maker.height.equalTo(120) - } - } - - // MARK: - Private - - private let games: [Game] - - private func buildStartButtons() { - var previousButton: UIView? - for game in games { - previousButton = buildStartButton(with: game, previousButton: previousButton) - } - } - - private func buildStartButton(with game: Game, previousButton: UIView?) -> UIButton { - let startButton = UIButton() - view.addSubview(startButton) - startButton.accessibilityIdentifier = game.name - startButton.snp.makeConstraints { (maker: ConstraintMaker) in - if let previousButton = previousButton { - maker.bottom.equalTo(previousButton.snp.top).offset(-20) - } else { - maker.bottom.equalTo(self.view.snp.bottom).inset(30) - } - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(50) - } - startButton.setTitle(game.name, for: .normal) - startButton.setTitleColor(UIColor.white, for: .normal) - startButton.backgroundColor = UIColor.black - startButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.start(game) - }) - .disposed(by: disposeBag) - - return startButton - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Promo/LaunchGameWorkflow.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Promo/LaunchGameWorkflow.swift deleted file mode 100644 index 986e2f8e0..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Promo/LaunchGameWorkflow.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -public class LaunchGameWorkflow: Workflow { - public init(url: URL) { - super.init() - - let gameId = parseGameId(from: url) - - self - .onStep { (rootItem: RootActionableItem) -> Observable<(LoggedInActionableItem, ())> in - rootItem.waitForLogin() - } - .onStep { (loggedInItem: LoggedInActionableItem, _) -> Observable<(LoggedInActionableItem, ())> in - loggedInItem.launchGame(with: gameId) - } - .commit() - } - - private func parseGameId(from url: URL) -> String? { - let components = URLComponents(string: url.absoluteString) - let items = components?.queryItems ?? [] - for item in items { - if item.name == "gameId" { - return item.value - } - } - - return nil - } -} - diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinBuilder.swift b/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinBuilder.swift deleted file mode 100644 index 3e9a205fb..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinBuilder.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public protocol RandomWinDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var mutableScoreStream: MutableScoreStream { get } -} - -final class RandomWinComponent: Component { - - fileprivate var player1Name: String { - return dependency.player1Name - } - - fileprivate var player2Name: String { - return dependency.player2Name - } - - fileprivate var mutableScoreStream: MutableScoreStream { - return dependency.mutableScoreStream - } -} - -// MARK: - Builder - -protocol RandomWinBuildable: Buildable { - func build(withListener listener: RandomWinListener) -> RandomWinRouting -} - -public final class RandomWinBuilder: Builder, RandomWinBuildable { - - public override init(dependency: RandomWinDependency) { - super.init(dependency: dependency) - } - - public func build(withListener listener: RandomWinListener) -> RandomWinRouting { - let component = RandomWinComponent(dependency: dependency) - let viewController = RandomWinViewController(player1Name: component.player1Name, - player2Name: component.player2Name) - let interactor = RandomWinInteractor(presenter: viewController, - mutableScoreStream: component.mutableScoreStream) - interactor.listener = listener - return RandomWinRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinInteractor.swift deleted file mode 100644 index 181dd900d..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinInteractor.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -public protocol RandomWinRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol RandomWinPresentable: Presentable { - var listener: RandomWinPresentableListener? { get set } - func announce(winner: PlayerType, withCompletionHandler handler: @escaping () -> ()) -} - -public protocol RandomWinListener: AnyObject { - func didRandomlyWin(with player: PlayerType) -} - -final class RandomWinInteractor: PresentableInteractor, RandomWinInteractable, RandomWinPresentableListener { - - weak var router: RandomWinRouting? - - weak var listener: RandomWinListener? - - init(presenter: RandomWinPresentable, - mutableScoreStream: MutableScoreStream) { - self.mutableScoreStream = mutableScoreStream - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - RandomWinPresentableListener - - func determineWinner() { - let random = arc4random_uniform(100) - let winner = random > 50 ? PlayerType.player1 : PlayerType.player2 - presenter.announce(winner: winner) { - self.mutableScoreStream.updateScore(with: winner) - self.listener?.didRandomlyWin(with: winner) - } - } - - // MARK: - Private - - private let mutableScoreStream: MutableScoreStream -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinRouter.swift b/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinRouter.swift deleted file mode 100644 index 759b8f060..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RandomWinInteractable: Interactable { - var router: RandomWinRouting? { get set } - var listener: RandomWinListener? { get set } -} - -protocol RandomWinViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class RandomWinRouter: ViewableRouter, RandomWinRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: RandomWinInteractable, viewController: RandomWinViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinViewController.swift deleted file mode 100644 index a96621a78..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinViewController.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol RandomWinPresentableListener: AnyObject { - func determineWinner() -} - -final class RandomWinViewController: UIViewController, RandomWinPresentable, RandomWinViewControllable { - - weak var listener: RandomWinPresentableListener? - - init(player1Name: String, - player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.cyan - buildGoButton() - } - - // MARK: - RandomWinPresentable - - func announce(winner: PlayerType, withCompletionHandler handler: @escaping () -> ()) { - let winnerString: String = { - switch winner { - case .player1: - return "\(player1Name) Won!" - case .player2: - return "\(player2Name) Won!" - } - }() - let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "That was random...", style: UIAlertActionStyle.default) { _ in - handler() - } - alert.addAction(closeAction) - present(alert, animated: true, completion: nil) - } - - // MARK: - Private - - private let player1Name: String - private let player2Name: String - - private func buildGoButton() { - let button = UIButton() - button.setTitle("Magic", for: .normal) - button.backgroundColor = UIColor.purple - button.setTitleColor(UIColor.white, for: .normal) - view.addSubview(button) - button.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.leading.trailing.equalTo(self.view).inset(20) - maker.height.equalTo(100) - } - - button.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.determineWinner() - }) - .disposed(by: disposeBag) - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Resources/Default-568h@2x.png b/ios/tutorials/tutorial4-completed/TicTacToe/Resources/Default-568h@2x.png deleted file mode 100644 index 0891b7aab..000000000 Binary files a/ios/tutorials/tutorial4-completed/TicTacToe/Resources/Default-568h@2x.png and /dev/null differ diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootBuilder.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootBuilder.swift deleted file mode 100644 index 8f2775527..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootBuilder.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class RootComponent: Component { - - let rootViewController: RootViewController - - init(dependency: RootDependency, - rootViewController: RootViewController) { - self.rootViewController = rootViewController - super.init(dependency: dependency) - } -} - -// MARK: - Builder - -protocol RootBuildable: Buildable { - func build() -> (launchRouter: LaunchRouting, urlHandler: UrlHandler) -} - -final class RootBuilder: Builder, RootBuildable { - - override init(dependency: RootDependency) { - super.init(dependency: dependency) - } - - func build() -> (launchRouter: LaunchRouting, urlHandler: UrlHandler) { - let viewController = RootViewController() - let component = RootComponent(dependency: dependency, - rootViewController: viewController) - let interactor = RootInteractor(presenter: viewController) - - let loggedOutBuilder = LoggedOutBuilder(dependency: component) - let loggedInBuilder = LoggedInBuilder(dependency: component) - let router = RootRouter(interactor: interactor, - viewController: viewController, - loggedOutBuilder: loggedOutBuilder, - loggedInBuilder: loggedInBuilder) - - return (router, interactor) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootComponent+LoggedIn.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootComponent+LoggedIn.swift deleted file mode 100644 index 2351441c1..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootComponent+LoggedIn.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedIn scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedIn: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedIn scope. -} - -extension RootComponent: LoggedInDependency { - - var loggedInViewController: LoggedInViewControllable { - return rootViewController - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootComponent+LoggedOut.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootComponent+LoggedOut.swift deleted file mode 100644 index a2f32f599..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootComponent+LoggedOut.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedOut scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedOut: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedOut scope. -} - -extension RootComponent: LoggedOutDependency { - - // TODO: Implement properties to provide for LoggedOut scope. -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootInteractor.swift deleted file mode 100644 index ab0b5f80a..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootInteractor.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol RootRouting: ViewableRouting { - func routeToLoggedIn(withPlayer1Name player1Name: String, player2Name: String) -> LoggedInActionableItem -} - -protocol RootPresentable: Presentable { - var listener: RootPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol RootListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class RootInteractor: PresentableInteractor, RootInteractable, RootPresentableListener, RootActionableItem, UrlHandler { - - weak var router: RootRouting? - - weak var listener: RootListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: RootPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutListener - - func didLogin(withPlayer1Name player1Name: String, player2Name: String) { - let loggedInActionableItem = router?.routeToLoggedIn(withPlayer1Name: player1Name, player2Name: player2Name) - if let loggedInActionableItem = loggedInActionableItem { - loggedInActionableItemSubject.onNext(loggedInActionableItem) - } - } - - // MARK: - UrlHandler - - func handle(_ url: URL) { - let launchGameWorkflow = LaunchGameWorkflow(url: url) - launchGameWorkflow - .subscribe(self) - .disposeOnDeactivate(interactor: self) - } - - // MARK: - RootActionableItem - - func waitForLogin() -> Observable<(LoggedInActionableItem, ())> { - return loggedInActionableItemSubject - .map { (loggedInItem: LoggedInActionableItem) -> (LoggedInActionableItem, ()) in - (loggedInItem, ()) - } - } - - // MARK: - Private - - private let loggedInActionableItemSubject = ReplaySubject.create(bufferSize: 1) -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootRouter.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootRouter.swift deleted file mode 100644 index a5aba8aca..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootRouter.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootInteractable: Interactable, LoggedOutListener, LoggedInListener { - var router: RootRouting? { get set } - var listener: RootListener? { get set } -} - -protocol RootViewControllable: ViewControllable { - func replaceModal(viewController: ViewControllable?) -} - -final class RootRouter: LaunchRouter, RootRouting { - - init(interactor: RootInteractable, - viewController: RootViewControllable, - loggedOutBuilder: LoggedOutBuildable, - loggedInBuilder: LoggedInBuildable) { - self.loggedOutBuilder = loggedOutBuilder - self.loggedInBuilder = loggedInBuilder - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - - routeToLoggedOut() - } - - func routeToLoggedIn(withPlayer1Name player1Name: String, player2Name: String) -> LoggedInActionableItem { - // Detach logged out. - if let loggedOut = self.loggedOut { - detachChild(loggedOut) - viewController.replaceModal(viewController: nil) - self.loggedOut = nil - } - - let loggedIn = loggedInBuilder.build(withListener: interactor, player1Name: player1Name, player2Name: player2Name) - attachChild(loggedIn.router) - return loggedIn.actionableItem - } - - // MARK: - Private - - private let loggedOutBuilder: LoggedOutBuildable - private let loggedInBuilder: LoggedInBuildable - - private var loggedOut: ViewableRouting? - - private func routeToLoggedOut() { - let loggedOut = loggedOutBuilder.build(withListener: interactor) - self.loggedOut = loggedOut - attachChild(loggedOut) - viewController.replaceModal(viewController: loggedOut.viewControllable) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootViewController.swift deleted file mode 100644 index 852271ae9..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootViewController.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol RootPresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class RootViewController: UIViewController, RootPresentable, RootViewControllable { - - weak var listener: RootPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - } - - // MARK: - RootViewControllable - - func replaceModal(viewController: ViewControllable?) { - targetViewController = viewController - - guard !animationInProgress else { - return - } - - if presentedViewController != nil { - animationInProgress = true - dismiss(animated: true) { [weak self] in - if self?.targetViewController != nil { - self?.presentTargetViewController() - } else { - self?.animationInProgress = false - } - } - } else { - presentTargetViewController() - } - } - - // MARK: - Private - - private var targetViewController: ViewControllable? - private var animationInProgress = false - - private func presentTargetViewController() { - if let targetViewController = targetViewController { - animationInProgress = true - present(targetViewController.uiviewController, animated: true) { [weak self] in - self?.animationInProgress = false - } - } - } -} - -// MARK: LoggedInViewControllable - -extension RootViewController: LoggedInViewControllable { - -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardBuilder.swift b/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardBuilder.swift deleted file mode 100644 index 4fe9b7c14..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardBuilder.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public protocol BasicScoreBoardDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var scoreStream: ScoreStream { get } -} - -final class BasicScoreBoardComponent: Component { - - fileprivate var player1Name: String { - return dependency.player1Name - } - - fileprivate var player2Name: String { - return dependency.player2Name - } - - fileprivate var scoreStream: ScoreStream { - return dependency.scoreStream - } -} - -// MARK: - Builder - -protocol BasicScoreBoardBuildable: Buildable { - func build(withListener listener: BasicScoreBoardListener) -> BasicScoreBoardRouting -} - -public final class BasicScoreBoardBuilder: Builder, BasicScoreBoardBuildable { - - public override init(dependency: BasicScoreBoardDependency) { - super.init(dependency: dependency) - } - - public func build(withListener listener: BasicScoreBoardListener) -> BasicScoreBoardRouting { - let component = BasicScoreBoardComponent(dependency: dependency) - let viewController = BasicScoreBoardViewController(player1Name: component.player1Name, - player2Name: component.player2Name) - let interactor = BasicScoreBoardInteractor(presenter: viewController, - scoreStream: component.scoreStream) - interactor.listener = listener - return BasicScoreBoardRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardInteractor.swift deleted file mode 100644 index f676af25f..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardInteractor.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -public protocol BasicScoreBoardRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol BasicScoreBoardPresentable: Presentable { - var listener: BasicScoreBoardPresentableListener? { get set } - func set(score: Score) -} - -public protocol BasicScoreBoardListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class BasicScoreBoardInteractor: PresentableInteractor, BasicScoreBoardInteractable, BasicScoreBoardPresentableListener { - - weak var router: BasicScoreBoardRouting? - - weak var listener: BasicScoreBoardListener? - - init(presenter: BasicScoreBoardPresentable, - scoreStream: ScoreStream) { - self.scoreStream = scoreStream - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - - updateScore() - } - - // MARK: - Private - - private let scoreStream: ScoreStream - - private func updateScore() { - scoreStream.score - .subscribe(onNext: { (score: Score) in - self.presenter.set(score: score) - }) - .disposeOnDeactivate(interactor: self) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardRouter.swift b/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardRouter.swift deleted file mode 100644 index 1a14d8ae4..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol BasicScoreBoardInteractable: Interactable { - var router: BasicScoreBoardRouting? { get set } - var listener: BasicScoreBoardListener? { get set } -} - -protocol BasicScoreBoardViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class BasicScoreBoardRouter: ViewableRouter, BasicScoreBoardRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: BasicScoreBoardInteractable, viewController: BasicScoreBoardViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardViewController.swift deleted file mode 100644 index a5cc5b4da..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/ScoreBoard/BasicScoreBoardViewController.swift +++ /dev/null @@ -1,114 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol BasicScoreBoardPresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class BasicScoreBoardViewController: UIViewController, BasicScoreBoardPresentable, BasicScoreBoardViewControllable { - - weak var listener: BasicScoreBoardPresentableListener? - - init(player1Name: String, - player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.clear - buildPlayerLabels() - } - - // MARK: - OffGamePresentable - - func set(score: Score) { - self.score = score - } - - // MARK: - Private - - private let player1Name: String - private let player2Name: String - - private var score: Score? - - private var player1Label: UILabel? - private var player2Label: UILabel? - - private func buildPlayerLabels() { - let labelBuilder: (UIColor) -> UILabel = { (color: UIColor) in - let label = UILabel() - label.font = UIFont.boldSystemFont(ofSize: 35) - label.backgroundColor = UIColor.clear - label.textColor = color - label.textAlignment = .center - return label - } - - let player1Label = labelBuilder(PlayerType.player1.color) - self.player1Label = player1Label - view.addSubview(player1Label) - player1Label.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.leading.trailing.equalTo(self.view) - maker.height.equalTo(40) - } - - let vsLabel = UILabel() - vsLabel.font = UIFont.systemFont(ofSize: 25) - vsLabel.backgroundColor = UIColor.clear - vsLabel.textColor = UIColor.darkGray - vsLabel.textAlignment = .center - vsLabel.text = "vs" - view.addSubview(vsLabel) - vsLabel.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player1Label.snp.bottom).offset(10) - maker.leading.trailing.equalTo(player1Label) - maker.height.equalTo(20) - } - - let player2Label = labelBuilder(PlayerType.player2.color) - self.player2Label = player2Label - view.addSubview(player2Label) - player2Label.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(vsLabel.snp.bottom).offset(10) - maker.height.leading.trailing.equalTo(player1Label) - } - - updatePlayerLabels() - } - - private func updatePlayerLabels() { - let player1Score = score?.player1Score ?? 0 - player1Label?.text = "\(player1Name) (\(player1Score))" - - let player2Score = score?.player2Score ?? 0 - player2Label?.text = "\(player2Name) (\(player2Score))" - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeBuilder.swift b/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeBuilder.swift deleted file mode 100644 index 7b1e2422f..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeBuilder.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol TicTacToeDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var mutableScoreStream: MutableScoreStream { get } -} - -final class TicTacToeComponent: Component { - - fileprivate var player1Name: String { - return dependency.player1Name - } - - fileprivate var player2Name: String { - return dependency.player2Name - } - - fileprivate var mutableScoreStream: MutableScoreStream { - return dependency.mutableScoreStream - } -} - -// MARK: - Builder - -protocol TicTacToeBuildable: Buildable { - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting -} - -final class TicTacToeBuilder: Builder, TicTacToeBuildable { - - override init(dependency: TicTacToeDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting { - let component = TicTacToeComponent(dependency: dependency) - let viewController = TicTacToeViewController(player1Name: component.player1Name, - player2Name: component.player2Name) - let interactor = TicTacToeInteractor(presenter: viewController, - mutableScoreStream: component.mutableScoreStream) - interactor.listener = listener - return TicTacToeRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeInteractor.swift deleted file mode 100644 index 7f7bbffde..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeInteractor.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -public protocol TicTacToeRouting: ViewableRouting { - // TODO: Delcare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol TicTacToePresentable: Presentable { - var listener: TicTacToePresentableListener? { get set } - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) - func announce(winner: PlayerType?, withCompletionHandler handler: @escaping () -> ()) -} - -public protocol TicTacToeListener: AnyObject { - func ticTacToeDidEnd(with winner: PlayerType?) -} - -final class TicTacToeInteractor: PresentableInteractor, TicTacToeInteractable, TicTacToePresentableListener { - - weak var router: TicTacToeRouting? - - weak var listener: TicTacToeListener? - - init(presenter: TicTacToePresentable, - mutableScoreStream: MutableScoreStream) { - self.mutableScoreStream = mutableScoreStream - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - - initBoard() - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - TicTacToePresentableListener - - func placeCurrentPlayerMark(atRow row: Int, col: Int) { - guard board[row][col] == nil else { - return - } - - let currentPlayer = getAndFlipCurrentPlayer() - board[row][col] = currentPlayer - presenter.setCell(atRow: row, col: col, withPlayerType: currentPlayer) - - let endGame = checkEndGame() - if endGame.didEnd { - if let winner = endGame.winner { - mutableScoreStream.updateScore(with: winner) - } - - presenter.announce(winner: endGame.winner) { - self.listener?.ticTacToeDidEnd(with: endGame.winner) - } - } - } - - // MARK: - Private - - private let mutableScoreStream: MutableScoreStream - - private var currentPlayer = PlayerType.player1 - private var board = [[PlayerType?]]() - - private func initBoard() { - for _ in 0.. PlayerType { - let currentPlayer = self.currentPlayer - self.currentPlayer = currentPlayer == .player1 ? .player2 : .player1 - return currentPlayer - } - - private func checkEndGame() -> (winner: PlayerType?, didEnd: Bool) { - let winner = checkWinner() - if let winner = winner { - return (winner, true) - } - let isDraw = checkDraw() - if isDraw { - return (nil, true) - } - - return (nil, false) - } - - private func checkWinner() -> PlayerType? { - // Rows. - for row in 0.. Bool { - for row in 0.., TicTacToeRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: TicTacToeInteractable, viewController: TicTacToeViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift deleted file mode 100644 index bb94ad1b4..000000000 --- a/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ /dev/null @@ -1,140 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol TicTacToePresentableListener: AnyObject { - func placeCurrentPlayerMark(atRow row: Int, col: Int) -} - -final class TicTacToeViewController: UIViewController, TicTacToePresentable, TicTacToeViewControllable { - - weak var listener: TicTacToePresentableListener? - - init(player1Name: String, - player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildCollectionView() - } - - // MARK: - TicTacToePresentable - - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) { - let indexPathRow = row * GameConstants.colCount + col - let cell = collectionView.cellForItem(at: IndexPath(row: indexPathRow, section: Constants.sectionCount - 1)) - cell?.backgroundColor = playerType.color - } - - func announce(winner: PlayerType?, withCompletionHandler handler: @escaping () -> ()) { - let winnerString: String = { - if let winner = winner { - switch winner { - case .player1: - return "\(player1Name) Won!" - case .player2: - return "\(player2Name) Won!" - } - } else { - return "It's a Tie" - } - }() - let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { _ in - handler() - } - alert.addAction(closeAction) - present(alert, animated: true, completion: nil) - } - - // MARK: - Private - - private let player2Name: String - private let player1Name: String - - private lazy var collectionView: UICollectionView = { - let layout = UICollectionViewFlowLayout() - layout.minimumLineSpacing = 0 - layout.minimumInteritemSpacing = 0 - layout.itemSize = CGSize(width: Constants.cellSize, height: Constants.cellSize) - return UICollectionView(frame: CGRect.zero, collectionViewLayout: layout) - }() - - private func buildCollectionView() { - collectionView.dataSource = self - collectionView.delegate = self - collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: Constants.cellIdentifier) - view.addSubview(collectionView) - collectionView.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.size.equalTo(CGSize(width: CGFloat(GameConstants.colCount) * Constants.cellSize, height: CGFloat(GameConstants.rowCount) * Constants.cellSize)) - } - } -} - -fileprivate struct Constants { - static let sectionCount = 1 - static let cellSize: CGFloat = UIScreen.main.bounds.width / CGFloat(GameConstants.colCount) - static let cellIdentifier = "TicTacToeCell" - static let defaultColor = UIColor.white -} - -extension TicTacToeViewController: UICollectionViewDataSource { - - func numberOfSections(in collectionView: UICollectionView) -> Int { - return Constants.sectionCount - } - - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return GameConstants.rowCount * GameConstants.colCount - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let reusedCell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.cellIdentifier, for: indexPath) - reset(cell: reusedCell) - return reusedCell - } - - private func reset(cell: UICollectionViewCell) { - cell.backgroundColor = Constants.defaultColor - cell.contentView.layer.borderWidth = 2 - cell.contentView.layer.borderColor = UIColor.lightGray.cgColor - } -} - -// MARK: - UICollectionViewDelegate - -extension TicTacToeViewController: UICollectionViewDelegate { - - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - let row = indexPath.row / GameConstants.colCount - let col = indexPath.row - row * GameConstants.rowCount - listener?.placeCurrentPlayerMark(atRow: row, col: col) - } -} diff --git a/ios/tutorials/tutorial4/Podfile b/ios/tutorials/tutorial4/Podfile deleted file mode 100644 index 980817e94..000000000 --- a/ios/tutorials/tutorial4/Podfile +++ /dev/null @@ -1,10 +0,0 @@ -platform :ios, '9.0' - -use_frameworks! -inhibit_all_warnings! - -target 'TicTacToe' do - pod 'RIBs', :path => '../../../' - pod 'SnapKit', '~> 4.0.0' - pod 'RxCocoa', '~> 5.1' -end diff --git a/ios/tutorials/tutorial4/README.md b/ios/tutorials/tutorial4/README.md deleted file mode 100644 index 73035842c..000000000 --- a/ios/tutorials/tutorial4/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# RIBs Tutorial 4: Deep Linking - -This project is the starting point for [tutorial 4](https://github.com/uber/RIBs/wiki/iOS-Tutorial-4). - -### Getting started -Install tooling, unless you've done so already: - -``` -/ios/tooling/install-xcode-template.sh -``` - -Then, install pods for the tutorial: - -``` -gem install cocoapods # In case you don't have it -cd /ios/tutorials/tutorial4 -pod install -``` - -Then, open the TicTacToe.xcworkspace that was generated by `pod install` and follow the steps described in [tutorial 4](https://github.com/uber/RIBs/wiki/iOS-Tutorial-4) on the RIBs wiki. diff --git a/ios/tutorials/tutorial4/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial4/TicTacToe.xcodeproj/project.pbxproj deleted file mode 100644 index 5de64de2b..000000000 --- a/ios/tutorials/tutorial4/TicTacToe.xcodeproj/project.pbxproj +++ /dev/null @@ -1,629 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */; }; - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */; }; - E90A68661FB7052F00D303EE /* Stub.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9F1FA389F400B61DF6 /* Stub.swift */; }; - E9C86DA01FA38A0A00B61DF6 /* RandomWinBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9A1FA389EC00B61DF6 /* RandomWinBuilder.swift */; }; - E9C86DA11FA38A0A00B61DF6 /* RandomWinInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9B1FA389EC00B61DF6 /* RandomWinInteractor.swift */; }; - E9C86DA21FA38A0A00B61DF6 /* RandomWinRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9C1FA389EC00B61DF6 /* RandomWinRouter.swift */; }; - E9C86DA31FA38A0A00B61DF6 /* RandomWinViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D9D1FA389EC00B61DF6 /* RandomWinViewController.swift */; }; - E9C86DA81FA38AD600B61DF6 /* ScoreStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DA71FA38AD000B61DF6 /* ScoreStream.swift */; }; - E9C86DA91FA38AEC00B61DF6 /* PlayerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DA61FA38AD000B61DF6 /* PlayerType.swift */; }; - E9C86DB01FA38B7D00B61DF6 /* BasicScoreBoardBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D951FA389E000B61DF6 /* BasicScoreBoardBuilder.swift */; }; - E9C86DB11FA38B7D00B61DF6 /* BasicScoreBoardInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D961FA389E000B61DF6 /* BasicScoreBoardInteractor.swift */; }; - E9C86DB21FA38B7D00B61DF6 /* BasicScoreBoardRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D971FA389E000B61DF6 /* BasicScoreBoardRouter.swift */; }; - E9C86DB31FA38B7D00B61DF6 /* BasicScoreBoardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86D981FA389E000B61DF6 /* BasicScoreBoardViewController.swift */; }; - E9C86DB91FA38D5400B61DF6 /* RootActionableItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DB81FA38D4700B61DF6 /* RootActionableItem.swift */; }; - E9C86DBD1FA3AD6400B61DF6 /* Game.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DBC1FA3AD6400B61DF6 /* Game.swift */; }; - E9C86DBF1FA3AE3700B61DF6 /* RandomWinAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DBE1FA3AE3700B61DF6 /* RandomWinAdapter.swift */; }; - E9C86DC11FA3AE6E00B61DF6 /* TicTacToeAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DC01FA3AE6E00B61DF6 /* TicTacToeAdapter.swift */; }; - E9C86DC31FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C86DC21FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift */; }; - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D351F972FD500D84847 /* AppDelegate.swift */; }; - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D341F972FD500D84847 /* AppComponent.swift */; }; - E9CB1D541F9730E400D84847 /* LoggedInBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */; }; - E9CB1D551F9730E400D84847 /* LoggedInComponent+OffGame.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */; }; - E9CB1D561F9730E400D84847 /* LoggedInComponent+TicTacToe.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */; }; - E9CB1D571F9730E400D84847 /* LoggedInInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */; }; - E9CB1D581F9730E400D84847 /* LoggedInRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */; }; - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */; }; - E9CB1D5A1F9730E700D84847 /* LoggedOutInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */; }; - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */; }; - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */; }; - E9CB1D5D1F9730EB00D84847 /* OffGameBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */; }; - E9CB1D5E1F9730EB00D84847 /* OffGameInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */; }; - E9CB1D5F1F9730EB00D84847 /* OffGameRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D501F972FE500D84847 /* OffGameRouter.swift */; }; - E9CB1D601F9730EB00D84847 /* OffGameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D511F972FE500D84847 /* OffGameViewController.swift */; }; - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D371F972FE400D84847 /* RootBuilder.swift */; }; - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */; }; - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */; }; - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */; }; - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3B1F972FE400D84847 /* RootRouter.swift */; }; - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3C1F972FE400D84847 /* RootViewController.swift */; }; - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */; }; - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */; }; - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */; }; - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.debug.xcconfig"; sourceTree = ""; }; - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TicTacToe.release.xcconfig"; path = "Pods/Target Support Files/Pods-TicTacToe/Pods-TicTacToe.release.xcconfig"; sourceTree = ""; }; - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TicTacToe.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B4A1F972CC500688FCB /* TicTacToe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TicTacToe.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E9894B591F972CC500688FCB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E9C86D951FA389E000B61DF6 /* BasicScoreBoardBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicScoreBoardBuilder.swift; sourceTree = ""; }; - E9C86D961FA389E000B61DF6 /* BasicScoreBoardInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicScoreBoardInteractor.swift; sourceTree = ""; }; - E9C86D971FA389E000B61DF6 /* BasicScoreBoardRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicScoreBoardRouter.swift; sourceTree = ""; }; - E9C86D981FA389E000B61DF6 /* BasicScoreBoardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicScoreBoardViewController.swift; sourceTree = ""; }; - E9C86D9A1FA389EC00B61DF6 /* RandomWinBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinBuilder.swift; sourceTree = ""; }; - E9C86D9B1FA389EC00B61DF6 /* RandomWinInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinInteractor.swift; sourceTree = ""; }; - E9C86D9C1FA389EC00B61DF6 /* RandomWinRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinRouter.swift; sourceTree = ""; }; - E9C86D9D1FA389EC00B61DF6 /* RandomWinViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinViewController.swift; sourceTree = ""; }; - E9C86D9F1FA389F400B61DF6 /* Stub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stub.swift; sourceTree = ""; }; - E9C86DA61FA38AD000B61DF6 /* PlayerType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerType.swift; sourceTree = ""; }; - E9C86DA71FA38AD000B61DF6 /* ScoreStream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScoreStream.swift; sourceTree = ""; }; - E9C86DB81FA38D4700B61DF6 /* RootActionableItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootActionableItem.swift; sourceTree = ""; }; - E9C86DBC1FA3AD6400B61DF6 /* Game.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Game.swift; sourceTree = ""; }; - E9C86DBE1FA3AE3700B61DF6 /* RandomWinAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomWinAdapter.swift; sourceTree = ""; }; - E9C86DC01FA3AE6E00B61DF6 /* TicTacToeAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeAdapter.swift; sourceTree = ""; }; - E9C86DC21FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+RandomWin.swift"; sourceTree = ""; }; - E9CB1D341F972FD500D84847 /* AppComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppComponent.swift; sourceTree = ""; }; - E9CB1D351F972FD500D84847 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E9CB1D371F972FE400D84847 /* RootBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootBuilder.swift; sourceTree = ""; }; - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedIn.swift"; sourceTree = ""; }; - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RootComponent+LoggedOut.swift"; sourceTree = ""; }; - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootInteractor.swift; sourceTree = ""; }; - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootRouter.swift; sourceTree = ""; }; - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeBuilder.swift; sourceTree = ""; }; - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeInteractor.swift; sourceTree = ""; }; - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeRouter.swift; sourceTree = ""; }; - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TicTacToeViewController.swift; sourceTree = ""; }; - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutBuilder.swift; sourceTree = ""; }; - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutInteractor.swift; sourceTree = ""; }; - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutRouter.swift; sourceTree = ""; }; - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedOutViewController.swift; sourceTree = ""; }; - E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInBuilder.swift; sourceTree = ""; }; - E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+OffGame.swift"; sourceTree = ""; }; - E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LoggedInComponent+TicTacToe.swift"; sourceTree = ""; }; - E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInInteractor.swift; sourceTree = ""; }; - E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggedInRouter.swift; sourceTree = ""; }; - E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameBuilder.swift; sourceTree = ""; }; - E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameInteractor.swift; sourceTree = ""; }; - E9CB1D501F972FE500D84847 /* OffGameRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameRouter.swift; sourceTree = ""; }; - E9CB1D511F972FE500D84847 /* OffGameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OffGameViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E9894B471F972CC500688FCB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 59F943336420DE07CA779F6F /* Pods */ = { - isa = PBXGroup; - children = ( - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */, - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 7EDD59511FA135E9005EC8B2 /* Resources */ = { - isa = PBXGroup; - children = ( - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, - ); - path = Resources; - sourceTree = ""; - }; - E9894B411F972CC500688FCB = { - isa = PBXGroup; - children = ( - E9894B4C1F972CC500688FCB /* TicTacToe */, - E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, - F5205CCF508911BE388D8406 /* Frameworks */, - ); - sourceTree = ""; - }; - E9894B4B1F972CC500688FCB /* Products */ = { - isa = PBXGroup; - children = ( - E9894B4A1F972CC500688FCB /* TicTacToe.app */, - ); - name = Products; - sourceTree = ""; - }; - E9894B4C1F972CC500688FCB /* TicTacToe */ = { - isa = PBXGroup; - children = ( - 7EDD59511FA135E9005EC8B2 /* Resources */, - E9C86DB71FA38D4700B61DF6 /* ActionableItems */, - E9CB1D331F972FD500D84847 /* AppStart */, - E9CB1D471F972FE500D84847 /* LoggedIn */, - E9CB1D421F972FE400D84847 /* LoggedOut */, - E9C86DA41FA38AD000B61DF6 /* Models */, - E9CB1D4D1F972FE500D84847 /* OffGame */, - E9C86D9E1FA389F400B61DF6 /* Promo */, - E9C86D991FA389EC00B61DF6 /* RandomWin */, - E9CB1D361F972FE400D84847 /* Root */, - E9C86D931FA389E000B61DF6 /* ScoreBoard */, - E9CB1D3D1F972FE400D84847 /* TicTacToe */, - E9894B591F972CC500688FCB /* Info.plist */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9C86D931FA389E000B61DF6 /* ScoreBoard */ = { - isa = PBXGroup; - children = ( - E9C86D951FA389E000B61DF6 /* BasicScoreBoardBuilder.swift */, - E9C86D961FA389E000B61DF6 /* BasicScoreBoardInteractor.swift */, - E9C86D971FA389E000B61DF6 /* BasicScoreBoardRouter.swift */, - E9C86D981FA389E000B61DF6 /* BasicScoreBoardViewController.swift */, - ); - path = ScoreBoard; - sourceTree = ""; - }; - E9C86D991FA389EC00B61DF6 /* RandomWin */ = { - isa = PBXGroup; - children = ( - E9C86D9A1FA389EC00B61DF6 /* RandomWinBuilder.swift */, - E9C86D9B1FA389EC00B61DF6 /* RandomWinInteractor.swift */, - E9C86D9C1FA389EC00B61DF6 /* RandomWinRouter.swift */, - E9C86D9D1FA389EC00B61DF6 /* RandomWinViewController.swift */, - ); - path = RandomWin; - sourceTree = ""; - }; - E9C86D9E1FA389F400B61DF6 /* Promo */ = { - isa = PBXGroup; - children = ( - E9C86D9F1FA389F400B61DF6 /* Stub.swift */, - ); - path = Promo; - sourceTree = ""; - }; - E9C86DA41FA38AD000B61DF6 /* Models */ = { - isa = PBXGroup; - children = ( - E9C86DA61FA38AD000B61DF6 /* PlayerType.swift */, - E9C86DA71FA38AD000B61DF6 /* ScoreStream.swift */, - ); - path = Models; - sourceTree = ""; - }; - E9C86DB71FA38D4700B61DF6 /* ActionableItems */ = { - isa = PBXGroup; - children = ( - E9C86DB81FA38D4700B61DF6 /* RootActionableItem.swift */, - ); - path = ActionableItems; - sourceTree = ""; - }; - E9CB1D331F972FD500D84847 /* AppStart */ = { - isa = PBXGroup; - children = ( - E9CB1D341F972FD500D84847 /* AppComponent.swift */, - E9CB1D351F972FD500D84847 /* AppDelegate.swift */, - ); - path = AppStart; - sourceTree = ""; - }; - E9CB1D361F972FE400D84847 /* Root */ = { - isa = PBXGroup; - children = ( - E9CB1D371F972FE400D84847 /* RootBuilder.swift */, - E9CB1D381F972FE400D84847 /* RootComponent+LoggedIn.swift */, - E9CB1D391F972FE400D84847 /* RootComponent+LoggedOut.swift */, - E9CB1D3A1F972FE400D84847 /* RootInteractor.swift */, - E9CB1D3B1F972FE400D84847 /* RootRouter.swift */, - E9CB1D3C1F972FE400D84847 /* RootViewController.swift */, - ); - path = Root; - sourceTree = ""; - }; - E9CB1D3D1F972FE400D84847 /* TicTacToe */ = { - isa = PBXGroup; - children = ( - E9CB1D3E1F972FE400D84847 /* TicTacToeBuilder.swift */, - E9CB1D3F1F972FE400D84847 /* TicTacToeInteractor.swift */, - E9CB1D401F972FE400D84847 /* TicTacToeRouter.swift */, - E9CB1D411F972FE400D84847 /* TicTacToeViewController.swift */, - ); - path = TicTacToe; - sourceTree = ""; - }; - E9CB1D421F972FE400D84847 /* LoggedOut */ = { - isa = PBXGroup; - children = ( - E9CB1D431F972FE400D84847 /* LoggedOutBuilder.swift */, - E9CB1D441F972FE400D84847 /* LoggedOutInteractor.swift */, - E9CB1D451F972FE400D84847 /* LoggedOutRouter.swift */, - E9CB1D461F972FE400D84847 /* LoggedOutViewController.swift */, - ); - path = LoggedOut; - sourceTree = ""; - }; - E9CB1D471F972FE500D84847 /* LoggedIn */ = { - isa = PBXGroup; - children = ( - E9C86DBC1FA3AD6400B61DF6 /* Game.swift */, - E9CB1D481F972FE500D84847 /* LoggedInBuilder.swift */, - E9CB1D491F972FE500D84847 /* LoggedInComponent+OffGame.swift */, - E9CB1D4A1F972FE500D84847 /* LoggedInComponent+TicTacToe.swift */, - E9C86DC21FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift */, - E9CB1D4B1F972FE500D84847 /* LoggedInInteractor.swift */, - E9CB1D4C1F972FE500D84847 /* LoggedInRouter.swift */, - E9C86DBE1FA3AE3700B61DF6 /* RandomWinAdapter.swift */, - E9C86DC01FA3AE6E00B61DF6 /* TicTacToeAdapter.swift */, - ); - path = LoggedIn; - sourceTree = ""; - }; - E9CB1D4D1F972FE500D84847 /* OffGame */ = { - isa = PBXGroup; - children = ( - E9CB1D4E1F972FE500D84847 /* OffGameBuilder.swift */, - E9CB1D4F1F972FE500D84847 /* OffGameInteractor.swift */, - E9CB1D501F972FE500D84847 /* OffGameRouter.swift */, - E9CB1D511F972FE500D84847 /* OffGameViewController.swift */, - ); - path = OffGame; - sourceTree = ""; - }; - F5205CCF508911BE388D8406 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - E9894B491F972CC500688FCB /* TicTacToe */ = { - isa = PBXNativeTarget; - buildConfigurationList = E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */; - buildPhases = ( - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */, - E9894B461F972CC500688FCB /* Sources */, - E9894B471F972CC500688FCB /* Frameworks */, - E9894B481F972CC500688FCB /* Resources */, - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TicTacToe; - productName = TicTacToe; - productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E9894B421F972CC500688FCB /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = Uber; - TargetAttributes = { - E9894B491F972CC500688FCB = { - CreatedOnToolsVersion = 9.0; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = E9894B411F972CC500688FCB; - productRefGroup = E9894B4B1F972CC500688FCB /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E9894B491F972CC500688FCB /* TicTacToe */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E9894B481F972CC500688FCB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7EDD59501FA13579005EC8B2 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 01C0219C62DB08840E36B78D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RIBs/RIBs.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - "${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RIBs.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TicTacToe/Pods-TicTacToe-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 64CF0EF6C16C782FD4AF3F3C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-TicTacToe-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E9894B461F972CC500688FCB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E9C86DA31FA38A0A00B61DF6 /* RandomWinViewController.swift in Sources */, - E9C86DA21FA38A0A00B61DF6 /* RandomWinRouter.swift in Sources */, - E9CB1D521F97303800D84847 /* AppDelegate.swift in Sources */, - E9CB1D681F9730F300D84847 /* TicTacToeInteractor.swift in Sources */, - E9C86DB01FA38B7D00B61DF6 /* BasicScoreBoardBuilder.swift in Sources */, - E9CB1D5B1F9730E700D84847 /* LoggedOutRouter.swift in Sources */, - E9C86DC31FA3B5EC00B61DF6 /* LoggedInComponent+RandomWin.swift in Sources */, - E9CB1D571F9730E400D84847 /* LoggedInInteractor.swift in Sources */, - E9CB1D5D1F9730EB00D84847 /* OffGameBuilder.swift in Sources */, - E9CB1D641F9730EF00D84847 /* RootInteractor.swift in Sources */, - E9C86DA91FA38AEC00B61DF6 /* PlayerType.swift in Sources */, - E9CB1D631F9730EF00D84847 /* RootComponent+LoggedOut.swift in Sources */, - E9CB1D591F9730E700D84847 /* LoggedOutBuilder.swift in Sources */, - E90A68661FB7052F00D303EE /* Stub.swift in Sources */, - E9CB1D581F9730E400D84847 /* LoggedInRouter.swift in Sources */, - E9CB1D5F1F9730EB00D84847 /* OffGameRouter.swift in Sources */, - E9CB1D611F9730EF00D84847 /* RootBuilder.swift in Sources */, - E9CB1D671F9730F300D84847 /* TicTacToeBuilder.swift in Sources */, - E9C86DB31FA38B7D00B61DF6 /* BasicScoreBoardViewController.swift in Sources */, - E9CB1D6A1F9730F300D84847 /* TicTacToeViewController.swift in Sources */, - E9C86DC11FA3AE6E00B61DF6 /* TicTacToeAdapter.swift in Sources */, - E9C86DBF1FA3AE3700B61DF6 /* RandomWinAdapter.swift in Sources */, - E9CB1D541F9730E400D84847 /* LoggedInBuilder.swift in Sources */, - E9CB1D551F9730E400D84847 /* LoggedInComponent+OffGame.swift in Sources */, - E9C86DB91FA38D5400B61DF6 /* RootActionableItem.swift in Sources */, - E9CB1D531F97305A00D84847 /* AppComponent.swift in Sources */, - E9CB1D621F9730EF00D84847 /* RootComponent+LoggedIn.swift in Sources */, - E9CB1D5C1F9730E700D84847 /* LoggedOutViewController.swift in Sources */, - E9C86DA81FA38AD600B61DF6 /* ScoreStream.swift in Sources */, - E9CB1D691F9730F300D84847 /* TicTacToeRouter.swift in Sources */, - E9C86DA01FA38A0A00B61DF6 /* RandomWinBuilder.swift in Sources */, - E9CB1D561F9730E400D84847 /* LoggedInComponent+TicTacToe.swift in Sources */, - E9CB1D651F9730EF00D84847 /* RootRouter.swift in Sources */, - E9CB1D661F9730EF00D84847 /* RootViewController.swift in Sources */, - E9C86DB11FA38B7D00B61DF6 /* BasicScoreBoardInteractor.swift in Sources */, - E9C86DB21FA38B7D00B61DF6 /* BasicScoreBoardRouter.swift in Sources */, - E9C86DBD1FA3AD6400B61DF6 /* Game.swift in Sources */, - E9C86DA11FA38A0A00B61DF6 /* RandomWinInteractor.swift in Sources */, - E9CB1D5E1F9730EB00D84847 /* OffGameInteractor.swift in Sources */, - E9CB1D5A1F9730E700D84847 /* LoggedOutInteractor.swift in Sources */, - E9CB1D601F9730EB00D84847 /* OffGameViewController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - E9894B651F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - E9894B661F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - E9894B681F972CC600688FCB /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Debug; - }; - E9894B691F972CC600688FCB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = TicTacToe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E9894B451F972CC500688FCB /* Build configuration list for PBXProject "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B651F972CC600688FCB /* Debug */, - E9894B661F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E9894B671F972CC600688FCB /* Build configuration list for PBXNativeTarget "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9894B681F972CC600688FCB /* Debug */, - E9894B691F972CC600688FCB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E9894B421F972CC500688FCB /* Project object */; -} diff --git a/ios/tutorials/tutorial4/TicTacToe/ActionableItems/RootActionableItem.swift b/ios/tutorials/tutorial4/TicTacToe/ActionableItems/RootActionableItem.swift deleted file mode 100644 index 98ccd9d0b..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/ActionableItems/RootActionableItem.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift - -public protocol RootActionableItem: AnyObject { - -} diff --git a/ios/tutorials/tutorial4/TicTacToe/AppStart/AppComponent.swift b/ios/tutorials/tutorial4/TicTacToe/AppStart/AppComponent.swift deleted file mode 100644 index cc73b41e4..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/AppStart/AppComponent.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class AppComponent: Component, RootDependency { - - init() { - super.init(dependency: EmptyComponent()) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial4/TicTacToe/AppStart/AppDelegate.swift deleted file mode 100644 index d0b07d283..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/AppStart/AppDelegate.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift -import UIKit - -/// Game app delegate. -@UIApplicationMain -public class AppDelegate: UIResponder, UIApplicationDelegate { - - /// The window. - public var window: UIWindow? - - /// Tells the delegate that the launch process is almost done and the app is almost ready to run. - /// - /// - parameter application: Your singleton app object. - /// - parameter launchOptions: A dictionary indicating the reason the app was launched (if any). The contents of - /// this dictionary may be empty in situations where the user launched the app directly. For information about - /// the possible keys in this dictionary and how to handle them, see Launch Options Keys. - /// - returns: false if the app cannot handle the URL resource or continue a user activity, otherwise return true. - public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let window = UIWindow(frame: UIScreen.main.bounds) - self.window = window - - let launchRouter = RootBuilder(dependency: AppComponent()).build() - self.launchRouter = launchRouter - launchRouter.launch(from: window) - - return true - } - - // MARK: - Private - - private var launchRouter: LaunchRouting? -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Info.plist b/ios/tutorials/tutorial4/TicTacToe/Info.plist deleted file mode 100644 index cf61db68d..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/Game.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/Game.swift deleted file mode 100644 index e039a4b2d..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/Game.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public protocol GameListener: AnyObject { - func gameDidEnd(with winner: PlayerType?) -} - -public protocol GameBuildable: Buildable { - func build(withListener listener: GameListener) -> ViewableRouting -} - -public protocol Game { - var id: String { get } - var name: String { get } - var builder: GameBuildable { get } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInBuilder.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInBuilder.swift deleted file mode 100644 index f1ae4616a..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInBuilder.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedInDependency: Dependency { - var loggedInViewController: LoggedInViewControllable { get } -} - -final class LoggedInComponent: Component { - - fileprivate var loggedInViewController: LoggedInViewControllable { - return dependency.loggedInViewController - } - - fileprivate var games: [Game] { - return shared { - return [RandomWinAdapter(dependency: self), TicTacToeAdapter(dependency: self)] - } - } - - var mutableScoreStream: MutableScoreStream { - return shared { ScoreStreamImpl() } - } - - var scoreStream: ScoreStream { - return mutableScoreStream - } - - let player1Name: String - let player2Name: String - - init(dependency: LoggedInDependency, player1Name: String, player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(dependency: dependency) - } -} - -// MARK: - Builder - -protocol LoggedInBuildable: Buildable { - func build(withListener listener: LoggedInListener, player1Name: String, player2Name: String) -> LoggedInRouting -} - -final class LoggedInBuilder: Builder, LoggedInBuildable { - - override init(dependency: LoggedInDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedInListener, player1Name: String, player2Name: String) -> LoggedInRouting { - let component = LoggedInComponent(dependency: dependency, - player1Name: player1Name, - player2Name: player2Name) - let interactor = LoggedInInteractor(games: component.games) - interactor.listener = listener - - let offGameBuilder = OffGameBuilder(dependency: component) - return LoggedInRouter(interactor: interactor, - viewController: component.loggedInViewController, - offGameBuilder: offGameBuilder) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift deleted file mode 100644 index b8fbc434b..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+OffGame.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the OffGame scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyOffGame: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the OffGame scope. -} - -extension LoggedInComponent: OffGameDependency { - - // TODO: Implement properties to provide for OffGame scope. -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+RandomWin.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+RandomWin.swift deleted file mode 100644 index 6892dbe75..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+RandomWin.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -extension LoggedInComponent: RandomWinDependency { -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift deleted file mode 100644 index daa3c2a9e..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInComponent+TicTacToe.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of LoggedIn to provide for the TicTacToe scope. -// TODO: Update LoggedInDependency protocol to inherit this protocol. -protocol LoggedInDependencyTicTacToe: Dependency { - - // TODO: Declare dependencies needed from the parent scope of LoggedIn to provide dependencies - // for the TicTacToe scope. -} - -extension LoggedInComponent: TicTacToeDependency { - - // TODO: Implement properties to provide for TicTacToe scope. -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInInteractor.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInInteractor.swift deleted file mode 100644 index f3cbe5b78..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInInteractor.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol LoggedInRouting: Routing { - func cleanupViews() - func routeToOffGame(with games: [Game]) - func routeToGame(with gameBuilder: GameBuildable) -} - -protocol LoggedInListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class LoggedInInteractor: Interactor, LoggedInInteractable { - - weak var router: LoggedInRouting? - weak var listener: LoggedInListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - init(games: [Game]) { - self.games = games - super.init() - } - - override func didBecomeActive() { - super.didBecomeActive() - - router?.routeToOffGame(with: games) - } - - override func willResignActive() { - super.willResignActive() - - router?.cleanupViews() - // TODO: Pause any business logic. - } - - // MARK: - OffGameListener - - func startGame(with gameBuilder: GameBuildable) { - router?.routeToGame(with: gameBuilder) - } - - // MARK: - TicTacToeListener - - func gameDidEnd(with winner: PlayerType?) { - router?.routeToOffGame(with: games) - } - - // MARK: - Private - - private var games = [Game]() - -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInRouter.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInRouter.swift deleted file mode 100644 index 33d359afb..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/LoggedInRouter.swift +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedInInteractable: Interactable, OffGameListener, GameListener { - var router: LoggedInRouting? { get set } - var listener: LoggedInListener? { get set } -} - -protocol LoggedInViewControllable: ViewControllable { - func replaceModal(viewController: ViewControllable?) -} - -final class LoggedInRouter: Router, LoggedInRouting { - - init(interactor: LoggedInInteractable, - viewController: LoggedInViewControllable, - offGameBuilder: OffGameBuildable) { - self.viewController = viewController - self.offGameBuilder = offGameBuilder - super.init(interactor: interactor) - interactor.router = self - } - - // MARK: - LoggedInRouting - - func cleanupViews() { - if currentChild != nil { - viewController.replaceModal(viewController: nil) - } - } - - func routeToOffGame(with games: [Game]) { - detachCurrentChild() - attachOffGame(with: games) - } - - func routeToGame(with gameBuilder: GameBuildable) { - detachCurrentChild() - - let game = gameBuilder.build(withListener: interactor) - self.currentChild = game - attachChild(game) - viewController.replaceModal(viewController: game.viewControllable) - } - - // MARK: - Private - - private let viewController: LoggedInViewControllable - private let offGameBuilder: OffGameBuildable - - private var currentChild: ViewableRouting? - - private func attachOffGame(with games: [Game]) { - let offGame = offGameBuilder.build(withListener: interactor, games: games) - self.currentChild = offGame - attachChild(offGame) - viewController.replaceModal(viewController: offGame.viewControllable) - } - - private func detachCurrentChild() { - if let currentChild = currentChild { - detachChild(currentChild) - viewController.replaceModal(viewController: nil) - } - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/RandomWinAdapter.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/RandomWinAdapter.swift deleted file mode 100644 index d069e299c..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/RandomWinAdapter.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class RandomWinAdapter: Game, GameBuildable, RandomWinListener { - - let id = "randomwin" - let name = "Random Win" - var builder: GameBuildable { - return self - } - - private let randomWinBuilder: RandomWinBuilder - - private weak var listener: GameListener? - - init(dependency: RandomWinDependency) { - randomWinBuilder = RandomWinBuilder(dependency: dependency) - } - - func build(withListener listener: GameListener) -> ViewableRouting { - self.listener = listener - return randomWinBuilder.build(withListener: self) - } - - func didRandomlyWin(with player: PlayerType) { - listener?.gameDidEnd(with: player) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/TicTacToeAdapter.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedIn/TicTacToeAdapter.swift deleted file mode 100644 index 3a1daf23a..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedIn/TicTacToeAdapter.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -class TicTacToeAdapter: Game, GameBuildable, TicTacToeListener { - let id = "tictactoe" - let name = "Tic Tac Toe" - let ticTacToeBuilder: TicTacToeBuilder - var builder: GameBuildable { - return self - } - - weak var gameListener: GameListener? - - init(dependency: TicTacToeDependency) { - ticTacToeBuilder = TicTacToeBuilder(dependency: dependency) - } - - func build(withListener listener: GameListener) -> ViewableRouting { - gameListener = listener - return ticTacToeBuilder.build(withListener: self) - } - - func ticTacToeDidEnd(with winner: PlayerType?) { - gameListener?.gameDidEnd(with: winner) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutBuilder.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutBuilder.swift deleted file mode 100644 index f023e78d7..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutBuilder.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class LoggedOutComponent: Component { - - // TODO: Declare 'fileprivate' dependencies that are only used by this RIB. -} - -// MARK: - Builder - -protocol LoggedOutBuildable: Buildable { - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting -} - -final class LoggedOutBuilder: Builder, LoggedOutBuildable { - - override init(dependency: LoggedOutDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: LoggedOutListener) -> LoggedOutRouting { - _ = LoggedOutComponent(dependency: dependency) - let viewController = LoggedOutViewController() - let interactor = LoggedOutInteractor(presenter: viewController) - interactor.listener = listener - return LoggedOutRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutInteractor.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutInteractor.swift deleted file mode 100644 index 6dea7cba9..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutInteractor.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol LoggedOutRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol LoggedOutPresentable: Presentable { - var listener: LoggedOutPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol LoggedOutListener: AnyObject { - func didLogin(withPlayer1Name player1Name: String, player2Name: String) -} - -final class LoggedOutInteractor: PresentableInteractor, LoggedOutInteractable, LoggedOutPresentableListener { - - weak var router: LoggedOutRouting? - - weak var listener: LoggedOutListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: LoggedOutPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutPresentableListener - - func login(withPlayer1Name player1Name: String?, player2Name: String?) { - let player1NameWithDefault = playerName(player1Name, withDefaultName: "Player 1") - let player2NameWithDefault = playerName(player2Name, withDefaultName: "Player 2") - - listener?.didLogin(withPlayer1Name: player1NameWithDefault, player2Name: player2NameWithDefault) - } - - private func playerName(_ name: String?, withDefaultName defaultName: String) -> String { - if let name = name { - return name.isEmpty ? defaultName : name - } else { - return defaultName - } - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutRouter.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutRouter.swift deleted file mode 100644 index c9cadb437..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol LoggedOutInteractable: Interactable { - var router: LoggedOutRouting? { get set } - var listener: LoggedOutListener? { get set } -} - -protocol LoggedOutViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class LoggedOutRouter: ViewableRouter, LoggedOutRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: LoggedOutInteractable, viewController: LoggedOutViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutViewController.swift deleted file mode 100644 index 42670412c..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol LoggedOutPresentableListener: AnyObject { - func login(withPlayer1Name: String?, player2Name: String?) -} - -final class LoggedOutViewController: UIViewController, LoggedOutPresentable, LoggedOutViewControllable { - - weak var listener: LoggedOutPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - let playerFields = buildPlayerFields() - buildLoginButton(withPlayer1Field: playerFields.player1Field, player2Field: playerFields.player2Field) - } - - // MARK: - Private - - private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { - let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line - view.addSubview(player1Field) - player1Field.placeholder = "Player 1 name" - player1Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(self.view).offset(100) - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(40) - } - - let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line - view.addSubview(player2Field) - player2Field.placeholder = "Player 2 name" - player2Field.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player1Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - - return (player1Field, player2Field) - } - - private func buildLoginButton(withPlayer1Field player1Field: UITextField, player2Field: UITextField) { - let loginButton = UIButton() - view.addSubview(loginButton) - loginButton.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player2Field.snp.bottom).offset(20) - maker.left.right.height.equalTo(player1Field) - } - loginButton.setTitle("Login", for: .normal) - loginButton.setTitleColor(UIColor.white, for: .normal) - loginButton.backgroundColor = UIColor.black - loginButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.login(withPlayer1Name: player1Field.text, player2Name: player2Field.text) - }) - .disposed(by: disposeBag) - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Models/PlayerType.swift b/ios/tutorials/tutorial4/TicTacToe/Models/PlayerType.swift deleted file mode 100644 index 783eba65b..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Models/PlayerType.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import UIKit - -public enum PlayerType: Int { - case player1 = 1 - case player2 - - var color: UIColor { - switch self { - case .player1: - return UIColor.red - case .player2: - return UIColor.blue - } - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Models/ScoreStream.swift b/ios/tutorials/tutorial4/TicTacToe/Models/ScoreStream.swift deleted file mode 100644 index f2367ebab..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Models/ScoreStream.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RxSwift -import RxCocoa - -public struct Score { - public let player1Score: Int - public let player2Score: Int - - public static func equals(lhs: Score, rhs: Score) -> Bool { - return lhs.player1Score == rhs.player1Score && lhs.player2Score == rhs.player2Score - } -} - -public protocol ScoreStream: AnyObject { - var score: Observable { get } -} - -public protocol MutableScoreStream: ScoreStream { - func updateScore(with winner: PlayerType) -} - -public class ScoreStreamImpl: MutableScoreStream { - - public init() {} - - public var score: Observable { - return variable - .asObservable() - .distinctUntilChanged { (lhs: Score, rhs: Score) -> Bool in - Score.equals(lhs: lhs, rhs: rhs) - } - } - - public func updateScore(with winner: PlayerType) { - let newScore: Score = { - let currentScore = variable.value - switch winner { - case .player1: - return Score(player1Score: currentScore.player1Score + 1, player2Score: currentScore.player2Score) - case .player2: - return Score(player1Score: currentScore.player1Score, player2Score: currentScore.player2Score + 1) - } - }() - variable.accept(newScore) - } - - // MARK: - Private - - private let variable = BehaviorRelay(value: Score(player1Score: 0, player2Score: 0)) -} diff --git a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameBuilder.swift b/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameBuilder.swift deleted file mode 100644 index a38aa6dfd..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameBuilder.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public protocol OffGameDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var scoreStream: ScoreStream { get } -} - -final class OffGameComponent: Component, BasicScoreBoardDependency { - - var player1Name: String { - return dependency.player1Name - } - - var player2Name: String { - return dependency.player2Name - } - - var scoreStream: ScoreStream { - return dependency.scoreStream - } -} - -// MARK: - Builder - -protocol OffGameBuildable: Buildable { - func build(withListener listener: OffGameListener, games: [Game]) -> OffGameRouting -} - -final class OffGameBuilder: Builder, OffGameBuildable { - - override init(dependency: OffGameDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: OffGameListener, games: [Game]) -> OffGameRouting { - let component = OffGameComponent(dependency: dependency) - let viewController = OffGameViewController(games: games) - let interactor = OffGameInteractor(presenter: viewController) - interactor.listener = listener - - let scoreBoardBuilder = BasicScoreBoardBuilder(dependency: component) - let router = OffGameRouter(interactor: interactor, - viewController: viewController, - scoreBoardBuilder: scoreBoardBuilder) - return router - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameInteractor.swift b/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameInteractor.swift deleted file mode 100644 index aa90095c2..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameInteractor.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol OffGameRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol OffGamePresentable: Presentable { - var listener: OffGamePresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol OffGameListener: AnyObject { - func startGame(with gameBuilder: GameBuildable) -} - -final class OffGameInteractor: PresentableInteractor, OffGameInteractable, OffGamePresentableListener { - - weak var router: OffGameRouting? - - weak var listener: OffGameListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: OffGamePresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - OffGamePresentableListener - - func start(_ game: Game) { - listener?.startGame(with: game.builder) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameRouter.swift b/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameRouter.swift deleted file mode 100644 index f8b3e72b4..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameRouter.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol OffGameInteractable: Interactable, BasicScoreBoardListener { - var router: OffGameRouting? { get set } - var listener: OffGameListener? { get set } -} - -protocol OffGameViewControllable: ViewControllable { - func show(scoreBoardView: ViewControllable) -} - -final class OffGameRouter: ViewableRouter, OffGameRouting { - - init(interactor: OffGameInteractable, - viewController: OffGameViewControllable, - scoreBoardBuilder: BasicScoreBoardBuildable) { - self.scoreBoardBuilder = scoreBoardBuilder - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - - attachScoreBoard() - } - - // MARK: - Private - - private var scoreBoardBuilder: BasicScoreBoardBuildable - - private func attachScoreBoard() { - let scoreBoard = scoreBoardBuilder.build(withListener: interactor) - attachChild(scoreBoard) - viewController.show(scoreBoardView: scoreBoard.viewControllable) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameViewController.swift b/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameViewController.swift deleted file mode 100644 index 59207c0b6..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameViewController.swift +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol OffGamePresentableListener: AnyObject { - func start(_ game: Game) -} - -final class OffGameViewController: UIViewController, OffGamePresentable, OffGameViewControllable { - - weak var listener: OffGamePresentableListener? - - init(games: [Game]) { - self.games = games - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildStartButtons() - } - - func show(scoreBoardView: ViewControllable) { - addChildViewController(scoreBoardView.uiviewController) - view.addSubview(scoreBoardView.uiviewController.view) - scoreBoardView.uiviewController.view.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(self.view).offset(70) - maker.leading.trailing.equalTo(self.view).inset(20) - maker.height.equalTo(120) - } - } - - // MARK: - Private - - private let games: [Game] - - private func buildStartButtons() { - var previousButton: UIView? - for game in games { - previousButton = buildStartButton(with: game, previousButton: previousButton) - } - } - - private func buildStartButton(with game: Game, previousButton: UIView?) -> UIButton { - let startButton = UIButton() - view.addSubview(startButton) - startButton.accessibilityIdentifier = game.name - startButton.snp.makeConstraints { (maker: ConstraintMaker) in - if let previousButton = previousButton { - maker.bottom.equalTo(previousButton.snp.top).offset(-20) - } else { - maker.bottom.equalTo(self.view.snp.bottom).inset(30) - } - maker.leading.trailing.equalTo(self.view).inset(40) - maker.height.equalTo(50) - } - startButton.setTitle(game.name, for: .normal) - startButton.setTitleColor(UIColor.white, for: .normal) - startButton.backgroundColor = UIColor.black - startButton.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.start(game) - }) - .disposed(by: disposeBag) - - return startButton - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Promo/Stub.swift b/ios/tutorials/tutorial4/TicTacToe/Promo/Stub.swift deleted file mode 100644 index f58e104ae..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Promo/Stub.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public class LaunchGameWorkflow: Workflow { - init(url: URL) { super.init() } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinBuilder.swift b/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinBuilder.swift deleted file mode 100644 index 3e9a205fb..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinBuilder.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public protocol RandomWinDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var mutableScoreStream: MutableScoreStream { get } -} - -final class RandomWinComponent: Component { - - fileprivate var player1Name: String { - return dependency.player1Name - } - - fileprivate var player2Name: String { - return dependency.player2Name - } - - fileprivate var mutableScoreStream: MutableScoreStream { - return dependency.mutableScoreStream - } -} - -// MARK: - Builder - -protocol RandomWinBuildable: Buildable { - func build(withListener listener: RandomWinListener) -> RandomWinRouting -} - -public final class RandomWinBuilder: Builder, RandomWinBuildable { - - public override init(dependency: RandomWinDependency) { - super.init(dependency: dependency) - } - - public func build(withListener listener: RandomWinListener) -> RandomWinRouting { - let component = RandomWinComponent(dependency: dependency) - let viewController = RandomWinViewController(player1Name: component.player1Name, - player2Name: component.player2Name) - let interactor = RandomWinInteractor(presenter: viewController, - mutableScoreStream: component.mutableScoreStream) - interactor.listener = listener - return RandomWinRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinInteractor.swift b/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinInteractor.swift deleted file mode 100644 index 181dd900d..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinInteractor.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -public protocol RandomWinRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol RandomWinPresentable: Presentable { - var listener: RandomWinPresentableListener? { get set } - func announce(winner: PlayerType, withCompletionHandler handler: @escaping () -> ()) -} - -public protocol RandomWinListener: AnyObject { - func didRandomlyWin(with player: PlayerType) -} - -final class RandomWinInteractor: PresentableInteractor, RandomWinInteractable, RandomWinPresentableListener { - - weak var router: RandomWinRouting? - - weak var listener: RandomWinListener? - - init(presenter: RandomWinPresentable, - mutableScoreStream: MutableScoreStream) { - self.mutableScoreStream = mutableScoreStream - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - RandomWinPresentableListener - - func determineWinner() { - let random = arc4random_uniform(100) - let winner = random > 50 ? PlayerType.player1 : PlayerType.player2 - presenter.announce(winner: winner) { - self.mutableScoreStream.updateScore(with: winner) - self.listener?.didRandomlyWin(with: winner) - } - } - - // MARK: - Private - - private let mutableScoreStream: MutableScoreStream -} diff --git a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinRouter.swift b/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinRouter.swift deleted file mode 100644 index 759b8f060..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RandomWinInteractable: Interactable { - var router: RandomWinRouting? { get set } - var listener: RandomWinListener? { get set } -} - -protocol RandomWinViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class RandomWinRouter: ViewableRouter, RandomWinRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: RandomWinInteractable, viewController: RandomWinViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinViewController.swift b/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinViewController.swift deleted file mode 100644 index a96621a78..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinViewController.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxCocoa -import RxSwift -import SnapKit -import UIKit - -protocol RandomWinPresentableListener: AnyObject { - func determineWinner() -} - -final class RandomWinViewController: UIViewController, RandomWinPresentable, RandomWinViewControllable { - - weak var listener: RandomWinPresentableListener? - - init(player1Name: String, - player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.cyan - buildGoButton() - } - - // MARK: - RandomWinPresentable - - func announce(winner: PlayerType, withCompletionHandler handler: @escaping () -> ()) { - let winnerString: String = { - switch winner { - case .player1: - return "\(player1Name) Won!" - case .player2: - return "\(player2Name) Won!" - } - }() - let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "That was random...", style: UIAlertActionStyle.default) { _ in - handler() - } - alert.addAction(closeAction) - present(alert, animated: true, completion: nil) - } - - // MARK: - Private - - private let player1Name: String - private let player2Name: String - - private func buildGoButton() { - let button = UIButton() - button.setTitle("Magic", for: .normal) - button.backgroundColor = UIColor.purple - button.setTitleColor(UIColor.white, for: .normal) - view.addSubview(button) - button.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.leading.trailing.equalTo(self.view).inset(20) - maker.height.equalTo(100) - } - - button.rx.tap - .subscribe(onNext: { [weak self] in - self?.listener?.determineWinner() - }) - .disposed(by: disposeBag) - } - - private let disposeBag = DisposeBag() -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Resources/Default-568h@2x.png b/ios/tutorials/tutorial4/TicTacToe/Resources/Default-568h@2x.png deleted file mode 100644 index 0891b7aab..000000000 Binary files a/ios/tutorials/tutorial4/TicTacToe/Resources/Default-568h@2x.png and /dev/null differ diff --git a/ios/tutorials/tutorial4/TicTacToe/Root/RootBuilder.swift b/ios/tutorials/tutorial4/TicTacToe/Root/RootBuilder.swift deleted file mode 100644 index d61d8a5bc..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Root/RootBuilder.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootDependency: Dependency { - // TODO: Declare the set of dependencies required by this RIB, but cannot be - // created by this RIB. -} - -final class RootComponent: Component { - - let rootViewController: RootViewController - - init(dependency: RootDependency, - rootViewController: RootViewController) { - self.rootViewController = rootViewController - super.init(dependency: dependency) - } -} - -// MARK: - Builder - -protocol RootBuildable: Buildable { - func build() -> LaunchRouting -} - -final class RootBuilder: Builder, RootBuildable { - - override init(dependency: RootDependency) { - super.init(dependency: dependency) - } - - func build() -> LaunchRouting { - let viewController = RootViewController() - let component = RootComponent(dependency: dependency, - rootViewController: viewController) - let interactor = RootInteractor(presenter: viewController) - - let loggedOutBuilder = LoggedOutBuilder(dependency: component) - let loggedInBuilder = LoggedInBuilder(dependency: component) - return RootRouter(interactor: interactor, - viewController: viewController, - loggedOutBuilder: loggedOutBuilder, - loggedInBuilder: loggedInBuilder) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Root/RootComponent+LoggedIn.swift b/ios/tutorials/tutorial4/TicTacToe/Root/RootComponent+LoggedIn.swift deleted file mode 100644 index 2351441c1..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Root/RootComponent+LoggedIn.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedIn scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedIn: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedIn scope. -} - -extension RootComponent: LoggedInDependency { - - var loggedInViewController: LoggedInViewControllable { - return rootViewController - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Root/RootComponent+LoggedOut.swift b/ios/tutorials/tutorial4/TicTacToe/Root/RootComponent+LoggedOut.swift deleted file mode 100644 index a2f32f599..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Root/RootComponent+LoggedOut.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -/// The dependencies needed from the parent scope of Root to provide for the LoggedOut scope. -// TODO: Update RootDependency protocol to inherit this protocol. -protocol RootDependencyLoggedOut: Dependency { - - // TODO: Declare dependencies needed from the parent scope of Root to provide dependencies - // for the LoggedOut scope. -} - -extension RootComponent: LoggedOutDependency { - - // TODO: Implement properties to provide for LoggedOut scope. -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Root/RootInteractor.swift b/ios/tutorials/tutorial4/TicTacToe/Root/RootInteractor.swift deleted file mode 100644 index a3fb513e0..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Root/RootInteractor.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -protocol RootRouting: ViewableRouting { - func routeToLoggedIn(withPlayer1Name player1Name: String, player2Name: String) -} - -protocol RootPresentable: Presentable { - var listener: RootPresentableListener? { get set } - // TODO: Declare methods the interactor can invoke the presenter to present data. -} - -protocol RootListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class RootInteractor: PresentableInteractor, RootInteractable, RootPresentableListener { - - weak var router: RootRouting? - - weak var listener: RootListener? - - // TODO: Add additional dependencies to constructor. Do not perform any logic - // in constructor. - override init(presenter: RootPresentable) { - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - // TODO: Implement business logic here. - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - LoggedOutListener - - func didLogin(withPlayer1Name player1Name: String, player2Name: String) { - router?.routeToLoggedIn(withPlayer1Name: player1Name, player2Name: player2Name) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Root/RootRouter.swift b/ios/tutorials/tutorial4/TicTacToe/Root/RootRouter.swift deleted file mode 100644 index 74742285b..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Root/RootRouter.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol RootInteractable: Interactable, LoggedOutListener, LoggedInListener { - var router: RootRouting? { get set } - var listener: RootListener? { get set } -} - -protocol RootViewControllable: ViewControllable { - func replaceModal(viewController: ViewControllable?) -} - -final class RootRouter: LaunchRouter, RootRouting { - - init(interactor: RootInteractable, - viewController: RootViewControllable, - loggedOutBuilder: LoggedOutBuildable, - loggedInBuilder: LoggedInBuildable) { - self.loggedOutBuilder = loggedOutBuilder - self.loggedInBuilder = loggedInBuilder - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } - - override func didLoad() { - super.didLoad() - - routeToLoggedOut() - } - - func routeToLoggedIn(withPlayer1Name player1Name: String, player2Name: String) { - // Detach logged out. - if let loggedOut = self.loggedOut { - detachChild(loggedOut) - viewController.replaceModal(viewController: nil) - self.loggedOut = nil - } - - let loggedIn = loggedInBuilder.build(withListener: interactor, player1Name: player1Name, player2Name: player2Name) - attachChild(loggedIn) - } - - // MARK: - Private - - private let loggedOutBuilder: LoggedOutBuildable - private let loggedInBuilder: LoggedInBuildable - - private var loggedOut: ViewableRouting? - - private func routeToLoggedOut() { - let loggedOut = loggedOutBuilder.build(withListener: interactor) - self.loggedOut = loggedOut - attachChild(loggedOut) - viewController.replaceModal(viewController: loggedOut.viewControllable) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/Root/RootViewController.swift b/ios/tutorials/tutorial4/TicTacToe/Root/RootViewController.swift deleted file mode 100644 index 852271ae9..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/Root/RootViewController.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol RootPresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class RootViewController: UIViewController, RootPresentable, RootViewControllable { - - weak var listener: RootPresentableListener? - - init() { - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.white - } - - // MARK: - RootViewControllable - - func replaceModal(viewController: ViewControllable?) { - targetViewController = viewController - - guard !animationInProgress else { - return - } - - if presentedViewController != nil { - animationInProgress = true - dismiss(animated: true) { [weak self] in - if self?.targetViewController != nil { - self?.presentTargetViewController() - } else { - self?.animationInProgress = false - } - } - } else { - presentTargetViewController() - } - } - - // MARK: - Private - - private var targetViewController: ViewControllable? - private var animationInProgress = false - - private func presentTargetViewController() { - if let targetViewController = targetViewController { - animationInProgress = true - present(targetViewController.uiviewController, animated: true) { [weak self] in - self?.animationInProgress = false - } - } - } -} - -// MARK: LoggedInViewControllable - -extension RootViewController: LoggedInViewControllable { - -} diff --git a/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardBuilder.swift b/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardBuilder.swift deleted file mode 100644 index 4fe9b7c14..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardBuilder.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -public protocol BasicScoreBoardDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var scoreStream: ScoreStream { get } -} - -final class BasicScoreBoardComponent: Component { - - fileprivate var player1Name: String { - return dependency.player1Name - } - - fileprivate var player2Name: String { - return dependency.player2Name - } - - fileprivate var scoreStream: ScoreStream { - return dependency.scoreStream - } -} - -// MARK: - Builder - -protocol BasicScoreBoardBuildable: Buildable { - func build(withListener listener: BasicScoreBoardListener) -> BasicScoreBoardRouting -} - -public final class BasicScoreBoardBuilder: Builder, BasicScoreBoardBuildable { - - public override init(dependency: BasicScoreBoardDependency) { - super.init(dependency: dependency) - } - - public func build(withListener listener: BasicScoreBoardListener) -> BasicScoreBoardRouting { - let component = BasicScoreBoardComponent(dependency: dependency) - let viewController = BasicScoreBoardViewController(player1Name: component.player1Name, - player2Name: component.player2Name) - let interactor = BasicScoreBoardInteractor(presenter: viewController, - scoreStream: component.scoreStream) - interactor.listener = listener - return BasicScoreBoardRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardInteractor.swift b/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardInteractor.swift deleted file mode 100644 index f676af25f..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardInteractor.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -public protocol BasicScoreBoardRouting: ViewableRouting { - // TODO: Declare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol BasicScoreBoardPresentable: Presentable { - var listener: BasicScoreBoardPresentableListener? { get set } - func set(score: Score) -} - -public protocol BasicScoreBoardListener: AnyObject { - // TODO: Declare methods the interactor can invoke to communicate with other RIBs. -} - -final class BasicScoreBoardInteractor: PresentableInteractor, BasicScoreBoardInteractable, BasicScoreBoardPresentableListener { - - weak var router: BasicScoreBoardRouting? - - weak var listener: BasicScoreBoardListener? - - init(presenter: BasicScoreBoardPresentable, - scoreStream: ScoreStream) { - self.scoreStream = scoreStream - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - - updateScore() - } - - // MARK: - Private - - private let scoreStream: ScoreStream - - private func updateScore() { - scoreStream.score - .subscribe(onNext: { (score: Score) in - self.presenter.set(score: score) - }) - .disposeOnDeactivate(interactor: self) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardRouter.swift b/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardRouter.swift deleted file mode 100644 index 1a14d8ae4..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardRouter.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol BasicScoreBoardInteractable: Interactable { - var router: BasicScoreBoardRouting? { get set } - var listener: BasicScoreBoardListener? { get set } -} - -protocol BasicScoreBoardViewControllable: ViewControllable { - // TODO: Declare methods the router invokes to manipulate the view hierarchy. -} - -final class BasicScoreBoardRouter: ViewableRouter, BasicScoreBoardRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: BasicScoreBoardInteractable, viewController: BasicScoreBoardViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardViewController.swift b/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardViewController.swift deleted file mode 100644 index a5cc5b4da..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/ScoreBoard/BasicScoreBoardViewController.swift +++ /dev/null @@ -1,114 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol BasicScoreBoardPresentableListener: AnyObject { - // TODO: Declare properties and methods that the view controller can invoke to perform - // business logic, such as signIn(). This protocol is implemented by the corresponding - // interactor class. -} - -final class BasicScoreBoardViewController: UIViewController, BasicScoreBoardPresentable, BasicScoreBoardViewControllable { - - weak var listener: BasicScoreBoardPresentableListener? - - init(player1Name: String, - player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.clear - buildPlayerLabels() - } - - // MARK: - OffGamePresentable - - func set(score: Score) { - self.score = score - } - - // MARK: - Private - - private let player1Name: String - private let player2Name: String - - private var score: Score? - - private var player1Label: UILabel? - private var player2Label: UILabel? - - private func buildPlayerLabels() { - let labelBuilder: (UIColor) -> UILabel = { (color: UIColor) in - let label = UILabel() - label.font = UIFont.boldSystemFont(ofSize: 35) - label.backgroundColor = UIColor.clear - label.textColor = color - label.textAlignment = .center - return label - } - - let player1Label = labelBuilder(PlayerType.player1.color) - self.player1Label = player1Label - view.addSubview(player1Label) - player1Label.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.leading.trailing.equalTo(self.view) - maker.height.equalTo(40) - } - - let vsLabel = UILabel() - vsLabel.font = UIFont.systemFont(ofSize: 25) - vsLabel.backgroundColor = UIColor.clear - vsLabel.textColor = UIColor.darkGray - vsLabel.textAlignment = .center - vsLabel.text = "vs" - view.addSubview(vsLabel) - vsLabel.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(player1Label.snp.bottom).offset(10) - maker.leading.trailing.equalTo(player1Label) - maker.height.equalTo(20) - } - - let player2Label = labelBuilder(PlayerType.player2.color) - self.player2Label = player2Label - view.addSubview(player2Label) - player2Label.snp.makeConstraints { (maker: ConstraintMaker) in - maker.top.equalTo(vsLabel.snp.bottom).offset(10) - maker.height.leading.trailing.equalTo(player1Label) - } - - updatePlayerLabels() - } - - private func updatePlayerLabels() { - let player1Score = score?.player1Score ?? 0 - player1Label?.text = "\(player1Name) (\(player1Score))" - - let player2Score = score?.player2Score ?? 0 - player2Label?.text = "\(player2Name) (\(player2Score))" - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeBuilder.swift b/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeBuilder.swift deleted file mode 100644 index 7b1e2422f..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeBuilder.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs - -protocol TicTacToeDependency: Dependency { - var player1Name: String { get } - var player2Name: String { get } - var mutableScoreStream: MutableScoreStream { get } -} - -final class TicTacToeComponent: Component { - - fileprivate var player1Name: String { - return dependency.player1Name - } - - fileprivate var player2Name: String { - return dependency.player2Name - } - - fileprivate var mutableScoreStream: MutableScoreStream { - return dependency.mutableScoreStream - } -} - -// MARK: - Builder - -protocol TicTacToeBuildable: Buildable { - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting -} - -final class TicTacToeBuilder: Builder, TicTacToeBuildable { - - override init(dependency: TicTacToeDependency) { - super.init(dependency: dependency) - } - - func build(withListener listener: TicTacToeListener) -> TicTacToeRouting { - let component = TicTacToeComponent(dependency: dependency) - let viewController = TicTacToeViewController(player1Name: component.player1Name, - player2Name: component.player2Name) - let interactor = TicTacToeInteractor(presenter: viewController, - mutableScoreStream: component.mutableScoreStream) - interactor.listener = listener - return TicTacToeRouter(interactor: interactor, viewController: viewController) - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeInteractor.swift b/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeInteractor.swift deleted file mode 100644 index 7f7bbffde..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeInteractor.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import RxSwift - -public protocol TicTacToeRouting: ViewableRouting { - // TODO: Delcare methods the interactor can invoke to manage sub-tree via the router. -} - -protocol TicTacToePresentable: Presentable { - var listener: TicTacToePresentableListener? { get set } - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) - func announce(winner: PlayerType?, withCompletionHandler handler: @escaping () -> ()) -} - -public protocol TicTacToeListener: AnyObject { - func ticTacToeDidEnd(with winner: PlayerType?) -} - -final class TicTacToeInteractor: PresentableInteractor, TicTacToeInteractable, TicTacToePresentableListener { - - weak var router: TicTacToeRouting? - - weak var listener: TicTacToeListener? - - init(presenter: TicTacToePresentable, - mutableScoreStream: MutableScoreStream) { - self.mutableScoreStream = mutableScoreStream - super.init(presenter: presenter) - presenter.listener = self - } - - override func didBecomeActive() { - super.didBecomeActive() - - initBoard() - } - - override func willResignActive() { - super.willResignActive() - // TODO: Pause any business logic. - } - - // MARK: - TicTacToePresentableListener - - func placeCurrentPlayerMark(atRow row: Int, col: Int) { - guard board[row][col] == nil else { - return - } - - let currentPlayer = getAndFlipCurrentPlayer() - board[row][col] = currentPlayer - presenter.setCell(atRow: row, col: col, withPlayerType: currentPlayer) - - let endGame = checkEndGame() - if endGame.didEnd { - if let winner = endGame.winner { - mutableScoreStream.updateScore(with: winner) - } - - presenter.announce(winner: endGame.winner) { - self.listener?.ticTacToeDidEnd(with: endGame.winner) - } - } - } - - // MARK: - Private - - private let mutableScoreStream: MutableScoreStream - - private var currentPlayer = PlayerType.player1 - private var board = [[PlayerType?]]() - - private func initBoard() { - for _ in 0.. PlayerType { - let currentPlayer = self.currentPlayer - self.currentPlayer = currentPlayer == .player1 ? .player2 : .player1 - return currentPlayer - } - - private func checkEndGame() -> (winner: PlayerType?, didEnd: Bool) { - let winner = checkWinner() - if let winner = winner { - return (winner, true) - } - let isDraw = checkDraw() - if isDraw { - return (nil, true) - } - - return (nil, false) - } - - private func checkWinner() -> PlayerType? { - // Rows. - for row in 0.. Bool { - for row in 0.., TicTacToeRouting { - - // TODO: Constructor inject child builder protocols to allow building children. - override init(interactor: TicTacToeInteractable, viewController: TicTacToeViewControllable) { - super.init(interactor: interactor, viewController: viewController) - interactor.router = self - } -} diff --git a/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeViewController.swift deleted file mode 100644 index bb94ad1b4..000000000 --- a/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ /dev/null @@ -1,140 +0,0 @@ -// -// Copyright (c) 2017. Uber Technologies -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import RIBs -import SnapKit -import UIKit - -protocol TicTacToePresentableListener: AnyObject { - func placeCurrentPlayerMark(atRow row: Int, col: Int) -} - -final class TicTacToeViewController: UIViewController, TicTacToePresentable, TicTacToeViewControllable { - - weak var listener: TicTacToePresentableListener? - - init(player1Name: String, - player2Name: String) { - self.player1Name = player1Name - self.player2Name = player2Name - super.init(nibName: nil, bundle: nil) - } - - required init?(coder aDecoder: NSCoder) { - fatalError("Method is not supported") - } - - override func viewDidLoad() { - super.viewDidLoad() - - view.backgroundColor = UIColor.yellow - buildCollectionView() - } - - // MARK: - TicTacToePresentable - - func setCell(atRow row: Int, col: Int, withPlayerType playerType: PlayerType) { - let indexPathRow = row * GameConstants.colCount + col - let cell = collectionView.cellForItem(at: IndexPath(row: indexPathRow, section: Constants.sectionCount - 1)) - cell?.backgroundColor = playerType.color - } - - func announce(winner: PlayerType?, withCompletionHandler handler: @escaping () -> ()) { - let winnerString: String = { - if let winner = winner { - switch winner { - case .player1: - return "\(player1Name) Won!" - case .player2: - return "\(player2Name) Won!" - } - } else { - return "It's a Tie" - } - }() - let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { _ in - handler() - } - alert.addAction(closeAction) - present(alert, animated: true, completion: nil) - } - - // MARK: - Private - - private let player2Name: String - private let player1Name: String - - private lazy var collectionView: UICollectionView = { - let layout = UICollectionViewFlowLayout() - layout.minimumLineSpacing = 0 - layout.minimumInteritemSpacing = 0 - layout.itemSize = CGSize(width: Constants.cellSize, height: Constants.cellSize) - return UICollectionView(frame: CGRect.zero, collectionViewLayout: layout) - }() - - private func buildCollectionView() { - collectionView.dataSource = self - collectionView.delegate = self - collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: Constants.cellIdentifier) - view.addSubview(collectionView) - collectionView.snp.makeConstraints { (maker: ConstraintMaker) in - maker.center.equalTo(self.view.snp.center) - maker.size.equalTo(CGSize(width: CGFloat(GameConstants.colCount) * Constants.cellSize, height: CGFloat(GameConstants.rowCount) * Constants.cellSize)) - } - } -} - -fileprivate struct Constants { - static let sectionCount = 1 - static let cellSize: CGFloat = UIScreen.main.bounds.width / CGFloat(GameConstants.colCount) - static let cellIdentifier = "TicTacToeCell" - static let defaultColor = UIColor.white -} - -extension TicTacToeViewController: UICollectionViewDataSource { - - func numberOfSections(in collectionView: UICollectionView) -> Int { - return Constants.sectionCount - } - - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return GameConstants.rowCount * GameConstants.colCount - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let reusedCell = collectionView.dequeueReusableCell(withReuseIdentifier: Constants.cellIdentifier, for: indexPath) - reset(cell: reusedCell) - return reusedCell - } - - private func reset(cell: UICollectionViewCell) { - cell.backgroundColor = Constants.defaultColor - cell.contentView.layer.borderWidth = 2 - cell.contentView.layer.borderColor = UIColor.lightGray.cgColor - } -} - -// MARK: - UICollectionViewDelegate - -extension TicTacToeViewController: UICollectionViewDelegate { - - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - let row = indexPath.row / GameConstants.colCount - let col = indexPath.row - row * GameConstants.rowCount - listener?.placeCurrentPlayerMark(atRow: row, col: col) - } -} diff --git a/android/libraries/rib-android-compose/build.gradle b/libraries/rib-android-compose/build.gradle similarity index 100% rename from android/libraries/rib-android-compose/build.gradle rename to libraries/rib-android-compose/build.gradle diff --git a/android/libraries/rib-android-compose/gradle.properties b/libraries/rib-android-compose/gradle.properties similarity index 100% rename from android/libraries/rib-android-compose/gradle.properties rename to libraries/rib-android-compose/gradle.properties diff --git a/android/libraries/rib-android-compose/src/main/kotlin/com/uber/rib/core/BasicComposeRouter.kt b/libraries/rib-android-compose/src/main/kotlin/com/uber/rib/core/BasicComposeRouter.kt similarity index 100% rename from android/libraries/rib-android-compose/src/main/kotlin/com/uber/rib/core/BasicComposeRouter.kt rename to libraries/rib-android-compose/src/main/kotlin/com/uber/rib/core/BasicComposeRouter.kt diff --git a/android/libraries/rib-android-compose/src/main/kotlin/com/uber/rib/core/ComposePresenter.kt b/libraries/rib-android-compose/src/main/kotlin/com/uber/rib/core/ComposePresenter.kt similarity index 100% rename from android/libraries/rib-android-compose/src/main/kotlin/com/uber/rib/core/ComposePresenter.kt rename to libraries/rib-android-compose/src/main/kotlin/com/uber/rib/core/ComposePresenter.kt diff --git a/android/libraries/rib-android-core/build.gradle b/libraries/rib-android-core/build.gradle similarity index 100% rename from android/libraries/rib-android-core/build.gradle rename to libraries/rib-android-core/build.gradle diff --git a/android/libraries/rib-android-core/gradle.properties b/libraries/rib-android-core/gradle.properties similarity index 100% rename from android/libraries/rib-android-core/gradle.properties rename to libraries/rib-android-core/gradle.properties diff --git a/android/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/ActivityDelegate.kt b/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/ActivityDelegate.kt similarity index 100% rename from android/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/ActivityDelegate.kt rename to libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/ActivityDelegate.kt diff --git a/android/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/CoreAppCompatActivity.kt b/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/CoreAppCompatActivity.kt similarity index 100% rename from android/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/CoreAppCompatActivity.kt rename to libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/CoreAppCompatActivity.kt diff --git a/android/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/HasActivityDelegate.kt b/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/HasActivityDelegate.kt similarity index 100% rename from android/libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/HasActivityDelegate.kt rename to libraries/rib-android-core/src/main/kotlin/com/uber/rib/core/HasActivityDelegate.kt diff --git a/android/libraries/rib-android-core/src/test/resources/robolectric.properties b/libraries/rib-android-core/src/test/resources/robolectric.properties similarity index 100% rename from android/libraries/rib-android-core/src/test/resources/robolectric.properties rename to libraries/rib-android-core/src/test/resources/robolectric.properties diff --git a/android/libraries/rib-android/build.gradle.kts b/libraries/rib-android/build.gradle.kts similarity index 100% rename from android/libraries/rib-android/build.gradle.kts rename to libraries/rib-android/build.gradle.kts diff --git a/android/libraries/rib-android/gradle.properties b/libraries/rib-android/gradle.properties similarity index 100% rename from android/libraries/rib-android/gradle.properties rename to libraries/rib-android/gradle.properties diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ActivityContext.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ActivityContext.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ActivityContext.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/ActivityContext.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ActivityStarter.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ActivityStarter.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ActivityStarter.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/ActivityStarter.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/BasicViewRouter.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/BasicViewRouter.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/BasicViewRouter.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/BasicViewRouter.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentCreator.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentCreator.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentCreator.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentCreator.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentCreatorImpl.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentCreatorImpl.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentCreatorImpl.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentCreatorImpl.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentFactory.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentFactory.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentFactory.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/IntentFactory.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibActivity.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibActivity.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibActivity.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibActivity.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibDebugOverlay.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibDebugOverlay.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibDebugOverlay.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/RibDebugOverlay.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RxActivityEvents.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RxActivityEvents.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/RxActivityEvents.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/RxActivityEvents.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewBuilder.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewBuilder.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewBuilder.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewBuilder.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewPresenter.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewPresenter.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewPresenter.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewPresenter.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewRouter.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewRouter.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewRouter.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/ViewRouter.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/XRay.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/XRay.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/XRay.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/XRay.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityCallbackEvent.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityCallbackEvent.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityCallbackEvent.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityCallbackEvent.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityEvent.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityEvent.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityEvent.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityEvent.kt diff --git a/android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityLifecycleEvent.kt b/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityLifecycleEvent.kt similarity index 100% rename from android/libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityLifecycleEvent.kt rename to libraries/rib-android/src/main/kotlin/com/uber/rib/core/lifecycle/ActivityLifecycleEvent.kt diff --git a/android/libraries/rib-android/src/test/kotlin/com/uber/rib/core/BundleTest.kt b/libraries/rib-android/src/test/kotlin/com/uber/rib/core/BundleTest.kt similarity index 100% rename from android/libraries/rib-android/src/test/kotlin/com/uber/rib/core/BundleTest.kt rename to libraries/rib-android/src/test/kotlin/com/uber/rib/core/BundleTest.kt diff --git a/android/libraries/rib-android/src/test/kotlin/com/uber/rib/core/RibActivityTest.kt b/libraries/rib-android/src/test/kotlin/com/uber/rib/core/RibActivityTest.kt similarity index 100% rename from android/libraries/rib-android/src/test/kotlin/com/uber/rib/core/RibActivityTest.kt rename to libraries/rib-android/src/test/kotlin/com/uber/rib/core/RibActivityTest.kt diff --git a/android/libraries/rib-android/src/test/kotlin/com/uber/rib/core/ViewBuilderTest.kt b/libraries/rib-android/src/test/kotlin/com/uber/rib/core/ViewBuilderTest.kt similarity index 100% rename from android/libraries/rib-android/src/test/kotlin/com/uber/rib/core/ViewBuilderTest.kt rename to libraries/rib-android/src/test/kotlin/com/uber/rib/core/ViewBuilderTest.kt diff --git a/android/libraries/rib-android/src/test/kotlin/com/uber/rib/core/XRayTest.kt b/libraries/rib-android/src/test/kotlin/com/uber/rib/core/XRayTest.kt similarity index 100% rename from android/libraries/rib-android/src/test/kotlin/com/uber/rib/core/XRayTest.kt rename to libraries/rib-android/src/test/kotlin/com/uber/rib/core/XRayTest.kt diff --git a/android/libraries/rib-android/src/test/resources/robolectric.properties b/libraries/rib-android/src/test/resources/robolectric.properties similarity index 100% rename from android/libraries/rib-android/src/test/resources/robolectric.properties rename to libraries/rib-android/src/test/resources/robolectric.properties diff --git a/android/libraries/rib-base/README.md b/libraries/rib-base/README.md similarity index 100% rename from android/libraries/rib-base/README.md rename to libraries/rib-base/README.md diff --git a/android/libraries/rib-base/build.gradle b/libraries/rib-base/build.gradle similarity index 100% rename from android/libraries/rib-base/build.gradle rename to libraries/rib-base/build.gradle diff --git a/android/libraries/rib-base/gradle.properties b/libraries/rib-base/gradle.properties similarity index 100% rename from android/libraries/rib-base/gradle.properties rename to libraries/rib-base/gradle.properties diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/BasicInteractor.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/BasicInteractor.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/BasicInteractor.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/BasicInteractor.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/BasicRouter.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/BasicRouter.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/BasicRouter.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/BasicRouter.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Builder.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Builder.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Builder.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/Builder.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Bundle.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Bundle.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Bundle.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/Bundle.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/EmptyPresenter.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/EmptyPresenter.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/EmptyPresenter.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/EmptyPresenter.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/FlowAsScope.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/FlowAsScope.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/FlowAsScope.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/FlowAsScope.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Initializer.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Initializer.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Initializer.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/Initializer.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Interactor.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Interactor.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Interactor.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/Interactor.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorAndViewModule.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorAndViewModule.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorAndViewModule.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorAndViewModule.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorBaseComponent.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorBaseComponent.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorBaseComponent.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorBaseComponent.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorComponent.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorComponent.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorComponent.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorComponent.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorModule.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorModule.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorModule.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorModule.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorType.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorType.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorType.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/InteractorType.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/LazyBackingProperty.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/LazyBackingProperty.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/LazyBackingProperty.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/LazyBackingProperty.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Presenter.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Presenter.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Presenter.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/Presenter.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Rib.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Rib.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Rib.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/Rib.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibBuilder.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibBuilder.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibBuilder.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibBuilder.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibCoroutineWorker.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibCoroutineWorker.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibCoroutineWorker.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibCoroutineWorker.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibEventType.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibEventType.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibEventType.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibEventType.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibEvents.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibEvents.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibEvents.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibEvents.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibInteractor.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibInteractor.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibInteractor.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibInteractor.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibRefWatcher.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibRefWatcher.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibRefWatcher.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibRefWatcher.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibRouterEvent.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibRouterEvent.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibRouterEvent.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/RibRouterEvent.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/Router.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Worker.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Worker.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/Worker.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/Worker.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerBinder.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerBinder.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerBinder.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerBinder.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerScopeProvider.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerScopeProvider.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerScopeProvider.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerScopeProvider.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerUnbinder.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerUnbinder.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerUnbinder.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/WorkerUnbinder.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/internal/CoreFriendModuleApi.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/internal/CoreFriendModuleApi.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/internal/CoreFriendModuleApi.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/internal/CoreFriendModuleApi.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/InteractorEvent.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/InteractorEvent.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/InteractorEvent.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/InteractorEvent.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/PresenterEvent.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/PresenterEvent.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/PresenterEvent.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/PresenterEvent.kt diff --git a/android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/WorkerEvent.kt b/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/WorkerEvent.kt similarity index 100% rename from android/libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/WorkerEvent.kt rename to libraries/rib-base/src/main/kotlin/com/uber/rib/core/lifecycle/WorkerEvent.kt diff --git a/android/libraries/rib-base/src/test/kotlin/android/os/Bundle.kt b/libraries/rib-base/src/test/kotlin/android/os/Bundle.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/android/os/Bundle.kt rename to libraries/rib-base/src/test/kotlin/android/os/Bundle.kt diff --git a/android/libraries/rib-base/src/test/kotlin/android/os/Parcelable.kt b/libraries/rib-base/src/test/kotlin/android/os/Parcelable.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/android/os/Parcelable.kt rename to libraries/rib-base/src/test/kotlin/android/os/Parcelable.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/InteractorAndRouterTest.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/InteractorAndRouterTest.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/InteractorAndRouterTest.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/InteractorAndRouterTest.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/LazyBackingPropertyTest.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/LazyBackingPropertyTest.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/LazyBackingPropertyTest.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/LazyBackingPropertyTest.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RecordingObserver.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RecordingObserver.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RecordingObserver.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/RecordingObserver.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibCoroutineWorkerTest.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibCoroutineWorkerTest.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibCoroutineWorkerTest.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibCoroutineWorkerTest.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibEventsUtils.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibEventsUtils.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibEventsUtils.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibEventsUtils.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibRefWatcherTest.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibRefWatcherTest.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibRefWatcherTest.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/RibRefWatcherTest.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RouterTest.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RouterTest.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/RouterTest.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/RouterTest.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerBinderTest.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerBinderTest.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerBinderTest.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerBinderTest.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerScopeProviderTest.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerScopeProviderTest.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerScopeProviderTest.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerScopeProviderTest.kt diff --git a/android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerTest.kt b/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerTest.kt similarity index 100% rename from android/libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerTest.kt rename to libraries/rib-base/src/test/kotlin/com/uber/rib/core/WorkerTest.kt diff --git a/android/libraries/rib-compiler-app/README.md b/libraries/rib-compiler-app/README.md similarity index 100% rename from android/libraries/rib-compiler-app/README.md rename to libraries/rib-compiler-app/README.md diff --git a/android/libraries/rib-compiler-app/build.gradle b/libraries/rib-compiler-app/build.gradle similarity index 100% rename from android/libraries/rib-compiler-app/build.gradle rename to libraries/rib-compiler-app/build.gradle diff --git a/android/libraries/rib-compiler-app/gradle.properties b/libraries/rib-compiler-app/gradle.properties similarity index 100% rename from android/libraries/rib-compiler-app/gradle.properties rename to libraries/rib-compiler-app/gradle.properties diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/AnnotatedClass.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/AnnotatedClass.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/AnnotatedClass.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/AnnotatedClass.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/AnnotationVerifier.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/AnnotationVerifier.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/AnnotationVerifier.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/AnnotationVerifier.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/CompilerUtils.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/CompilerUtils.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/CompilerUtils.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/CompilerUtils.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/Constants.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/Constants.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/Constants.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/Constants.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ErrorReporter.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ErrorReporter.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ErrorReporter.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ErrorReporter.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/Generator.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/Generator.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/Generator.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/Generator.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/InteractorAnnotatedClass.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/InteractorAnnotatedClass.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/InteractorAnnotatedClass.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/InteractorAnnotatedClass.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/InteractorAnnotationVerifier.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/InteractorAnnotationVerifier.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/InteractorAnnotationVerifier.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/InteractorAnnotationVerifier.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ProcessContext.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ProcessContext.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ProcessContext.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ProcessContext.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ProcessorPipeline.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ProcessorPipeline.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ProcessorPipeline.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/ProcessorPipeline.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/RibInteractorProcessorPipeline.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/RibInteractorProcessorPipeline.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/RibInteractorProcessorPipeline.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/RibInteractorProcessorPipeline.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/RibProcessor.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/RibProcessor.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/RibProcessor.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/RibProcessor.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/TypeProcessorPipeline.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/TypeProcessorPipeline.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/TypeProcessorPipeline.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/TypeProcessorPipeline.kt diff --git a/android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/VerificationFailedException.kt b/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/VerificationFailedException.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/VerificationFailedException.kt rename to libraries/rib-compiler-app/src/main/kotlin/com/uber/rib/compiler/VerificationFailedException.kt diff --git a/android/libraries/rib-compiler-app/src/test/kotlin/com/uber/rib/compiler/InteractorAnnotationVerifierTest.kt b/libraries/rib-compiler-app/src/test/kotlin/com/uber/rib/compiler/InteractorAnnotationVerifierTest.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/test/kotlin/com/uber/rib/compiler/InteractorAnnotationVerifierTest.kt rename to libraries/rib-compiler-app/src/test/kotlin/com/uber/rib/compiler/InteractorAnnotationVerifierTest.kt diff --git a/android/libraries/rib-compiler-app/src/test/kotlin/com/uber/rib/compiler/InteractorProcessorTestBase.kt b/libraries/rib-compiler-app/src/test/kotlin/com/uber/rib/compiler/InteractorProcessorTestBase.kt similarity index 100% rename from android/libraries/rib-compiler-app/src/test/kotlin/com/uber/rib/compiler/InteractorProcessorTestBase.kt rename to libraries/rib-compiler-app/src/test/kotlin/com/uber/rib/compiler/InteractorProcessorTestBase.kt diff --git a/android/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedInteractor.java b/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedInteractor.java similarity index 100% rename from android/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedInteractor.java rename to libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedInteractor.java diff --git a/android/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedInteractorNoSuffix.java b/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedInteractorNoSuffix.java similarity index 100% rename from android/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedInteractorNoSuffix.java rename to libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedInteractorNoSuffix.java diff --git a/android/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedNonInteractor.java b/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedNonInteractor.java similarity index 100% rename from android/libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedNonInteractor.java rename to libraries/rib-compiler-app/src/test/resources/fixtures/AnnotatedNonInteractor.java diff --git a/android/libraries/rib-compiler-app/src/test/resources/fixtures/CustomConstructorInteractor.java b/libraries/rib-compiler-app/src/test/resources/fixtures/CustomConstructorInteractor.java similarity index 100% rename from android/libraries/rib-compiler-app/src/test/resources/fixtures/CustomConstructorInteractor.java rename to libraries/rib-compiler-app/src/test/resources/fixtures/CustomConstructorInteractor.java diff --git a/android/libraries/rib-compiler-test/README.md b/libraries/rib-compiler-test/README.md similarity index 100% rename from android/libraries/rib-compiler-test/README.md rename to libraries/rib-compiler-test/README.md diff --git a/android/libraries/rib-compiler-test/build.gradle b/libraries/rib-compiler-test/build.gradle similarity index 100% rename from android/libraries/rib-compiler-test/build.gradle rename to libraries/rib-compiler-test/build.gradle diff --git a/android/libraries/rib-compiler-test/gradle.properties b/libraries/rib-compiler-test/gradle.properties similarity index 100% rename from android/libraries/rib-compiler-test/gradle.properties rename to libraries/rib-compiler-test/gradle.properties diff --git a/android/libraries/rib-compiler-test/libs/tools.jar b/libraries/rib-compiler-test/libs/tools.jar similarity index 100% rename from android/libraries/rib-compiler-test/libs/tools.jar rename to libraries/rib-compiler-test/libs/tools.jar diff --git a/android/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/Constants.kt b/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/Constants.kt similarity index 100% rename from android/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/Constants.kt rename to libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/Constants.kt diff --git a/android/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/InteractorTestGenerator.kt b/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/InteractorTestGenerator.kt similarity index 100% rename from android/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/InteractorTestGenerator.kt rename to libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/InteractorTestGenerator.kt diff --git a/android/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/RibTestProcessor.kt b/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/RibTestProcessor.kt similarity index 100% rename from android/libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/RibTestProcessor.kt rename to libraries/rib-compiler-test/src/main/kotlin/com/uber/rib/compiler/RibTestProcessor.kt diff --git a/android/libraries/rib-compiler-test/src/test/kotlin/com/uber/rib/compiler/InteractorTestGeneratorProcessorTestBase.kt b/libraries/rib-compiler-test/src/test/kotlin/com/uber/rib/compiler/InteractorTestGeneratorProcessorTestBase.kt similarity index 100% rename from android/libraries/rib-compiler-test/src/test/kotlin/com/uber/rib/compiler/InteractorTestGeneratorProcessorTestBase.kt rename to libraries/rib-compiler-test/src/test/kotlin/com/uber/rib/compiler/InteractorTestGeneratorProcessorTestBase.kt diff --git a/android/libraries/rib-compiler-test/src/test/kotlin/com/uber/rib/compiler/InteractorTestGeneratorTest.kt b/libraries/rib-compiler-test/src/test/kotlin/com/uber/rib/compiler/InteractorTestGeneratorTest.kt similarity index 100% rename from android/libraries/rib-compiler-test/src/test/kotlin/com/uber/rib/compiler/InteractorTestGeneratorTest.kt rename to libraries/rib-compiler-test/src/test/kotlin/com/uber/rib/compiler/InteractorTestGeneratorTest.kt diff --git a/android/libraries/rib-compiler-test/src/test/resources/fixtures/AnnotatedBasicInteractor.java b/libraries/rib-compiler-test/src/test/resources/fixtures/AnnotatedBasicInteractor.java similarity index 100% rename from android/libraries/rib-compiler-test/src/test/resources/fixtures/AnnotatedBasicInteractor.java rename to libraries/rib-compiler-test/src/test/resources/fixtures/AnnotatedBasicInteractor.java diff --git a/android/libraries/rib-compiler-test/src/test/resources/fixtures/AnnotatedInteractor.java b/libraries/rib-compiler-test/src/test/resources/fixtures/AnnotatedInteractor.java similarity index 100% rename from android/libraries/rib-compiler-test/src/test/resources/fixtures/AnnotatedInteractor.java rename to libraries/rib-compiler-test/src/test/resources/fixtures/AnnotatedInteractor.java diff --git a/android/libraries/rib-compiler-test/src/test/resources/fixtures/TestAnnotatedBasicInteractor.java b/libraries/rib-compiler-test/src/test/resources/fixtures/TestAnnotatedBasicInteractor.java similarity index 100% rename from android/libraries/rib-compiler-test/src/test/resources/fixtures/TestAnnotatedBasicInteractor.java rename to libraries/rib-compiler-test/src/test/resources/fixtures/TestAnnotatedBasicInteractor.java diff --git a/android/libraries/rib-compiler-test/src/test/resources/fixtures/TestAnnotatedInteractor.java b/libraries/rib-compiler-test/src/test/resources/fixtures/TestAnnotatedInteractor.java similarity index 100% rename from android/libraries/rib-compiler-test/src/test/resources/fixtures/TestAnnotatedInteractor.java rename to libraries/rib-compiler-test/src/test/resources/fixtures/TestAnnotatedInteractor.java diff --git a/android/libraries/rib-compiler-test/src/test/resources/fixtures/TestForcedBasicInteractor.java b/libraries/rib-compiler-test/src/test/resources/fixtures/TestForcedBasicInteractor.java similarity index 100% rename from android/libraries/rib-compiler-test/src/test/resources/fixtures/TestForcedBasicInteractor.java rename to libraries/rib-compiler-test/src/test/resources/fixtures/TestForcedBasicInteractor.java diff --git a/android/libraries/rib-coroutines-test/README.md b/libraries/rib-coroutines-test/README.md similarity index 100% rename from android/libraries/rib-coroutines-test/README.md rename to libraries/rib-coroutines-test/README.md diff --git a/android/libraries/rib-coroutines-test/build.gradle.kts b/libraries/rib-coroutines-test/build.gradle.kts similarity index 100% rename from android/libraries/rib-coroutines-test/build.gradle.kts rename to libraries/rib-coroutines-test/build.gradle.kts diff --git a/android/libraries/rib-coroutines-test/gradle.properties b/libraries/rib-coroutines-test/gradle.properties similarity index 100% rename from android/libraries/rib-coroutines-test/gradle.properties rename to libraries/rib-coroutines-test/gradle.properties diff --git a/android/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/RibCoroutinesRule.kt b/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/RibCoroutinesRule.kt similarity index 100% rename from android/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/RibCoroutinesRule.kt rename to libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/RibCoroutinesRule.kt diff --git a/android/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/TestRibCoroutineScopes.kt b/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/TestRibCoroutineScopes.kt similarity index 100% rename from android/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/TestRibCoroutineScopes.kt rename to libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/TestRibCoroutineScopes.kt diff --git a/android/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/TestRibDispatchers.kt b/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/TestRibDispatchers.kt similarity index 100% rename from android/libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/TestRibDispatchers.kt rename to libraries/rib-coroutines-test/src/main/kotlin/com/uber/rib/core/TestRibDispatchers.kt diff --git a/android/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibCoroutinesRuleTest.kt b/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibCoroutinesRuleTest.kt similarity index 100% rename from android/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibCoroutinesRuleTest.kt rename to libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibCoroutinesRuleTest.kt diff --git a/android/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibDispatchersTest.kt b/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibDispatchersTest.kt similarity index 100% rename from android/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibDispatchersTest.kt rename to libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibDispatchersTest.kt diff --git a/android/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibScopesTest.kt b/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibScopesTest.kt similarity index 100% rename from android/libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibScopesTest.kt rename to libraries/rib-coroutines-test/src/test/kotlin/com/uber/rib/core/RibScopesTest.kt diff --git a/android/libraries/rib-coroutines/README.md b/libraries/rib-coroutines/README.md similarity index 100% rename from android/libraries/rib-coroutines/README.md rename to libraries/rib-coroutines/README.md diff --git a/android/libraries/rib-coroutines/build.gradle b/libraries/rib-coroutines/build.gradle similarity index 100% rename from android/libraries/rib-coroutines/build.gradle rename to libraries/rib-coroutines/build.gradle diff --git a/android/libraries/rib-coroutines/gradle.properties b/libraries/rib-coroutines/gradle.properties similarity index 100% rename from android/libraries/rib-coroutines/gradle.properties rename to libraries/rib-coroutines/gradle.properties diff --git a/android/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibCoroutineScopes.kt b/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibCoroutineScopes.kt similarity index 100% rename from android/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibCoroutineScopes.kt rename to libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibCoroutineScopes.kt diff --git a/android/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibCoroutinesConfig.kt b/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibCoroutinesConfig.kt similarity index 100% rename from android/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibCoroutinesConfig.kt rename to libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibCoroutinesConfig.kt diff --git a/android/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibDispatchers.kt b/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibDispatchers.kt similarity index 100% rename from android/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibDispatchers.kt rename to libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/RibDispatchers.kt diff --git a/android/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/internal/CoroutinesFriendModuleApi.kt b/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/internal/CoroutinesFriendModuleApi.kt similarity index 100% rename from android/libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/internal/CoroutinesFriendModuleApi.kt rename to libraries/rib-coroutines/src/main/kotlin/com/uber/rib/core/internal/CoroutinesFriendModuleApi.kt diff --git a/android/libraries/rib-debug-utils/build.gradle.kts b/libraries/rib-debug-utils/build.gradle.kts similarity index 100% rename from android/libraries/rib-debug-utils/build.gradle.kts rename to libraries/rib-debug-utils/build.gradle.kts diff --git a/android/libraries/rib-debug-utils/gradle.properties b/libraries/rib-debug-utils/gradle.properties similarity index 100% rename from android/libraries/rib-debug-utils/gradle.properties rename to libraries/rib-debug-utils/gradle.properties diff --git a/android/libraries/rib-debug-utils/src/main/kotlin/com/uber/rib/core/RouterDebugUtils.kt b/libraries/rib-debug-utils/src/main/kotlin/com/uber/rib/core/RouterDebugUtils.kt similarity index 100% rename from android/libraries/rib-debug-utils/src/main/kotlin/com/uber/rib/core/RouterDebugUtils.kt rename to libraries/rib-debug-utils/src/main/kotlin/com/uber/rib/core/RouterDebugUtils.kt diff --git a/android/libraries/rib-router-navigator/README.md b/libraries/rib-router-navigator/README.md similarity index 100% rename from android/libraries/rib-router-navigator/README.md rename to libraries/rib-router-navigator/README.md diff --git a/android/libraries/rib-router-navigator/build.gradle b/libraries/rib-router-navigator/build.gradle similarity index 100% rename from android/libraries/rib-router-navigator/build.gradle rename to libraries/rib-router-navigator/build.gradle diff --git a/android/libraries/rib-router-navigator/gradle.properties b/libraries/rib-router-navigator/gradle.properties similarity index 100% rename from android/libraries/rib-router-navigator/gradle.properties rename to libraries/rib-router-navigator/gradle.properties diff --git a/android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterAndState.kt b/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterAndState.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterAndState.kt rename to libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterAndState.kt diff --git a/android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigator.kt b/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigator.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigator.kt rename to libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigator.kt diff --git a/android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEvent.kt b/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEvent.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEvent.kt rename to libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEvent.kt diff --git a/android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEventType.kt b/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEventType.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEventType.kt rename to libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEventType.kt diff --git a/android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEvents.kt b/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEvents.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEvents.kt rename to libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorEvents.kt diff --git a/android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorFactory.kt b/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorFactory.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorFactory.kt rename to libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorFactory.kt diff --git a/android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorState.kt b/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorState.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorState.kt rename to libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/RouterNavigatorState.kt diff --git a/android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/StackRouterNavigator.kt b/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/StackRouterNavigator.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/StackRouterNavigator.kt rename to libraries/rib-router-navigator/src/main/kotlin/com/uber/rib/core/StackRouterNavigator.kt diff --git a/android/libraries/rib-router-navigator/src/test/kotlin/com/uber/rib/core/RouterAndStateTest.kt b/libraries/rib-router-navigator/src/test/kotlin/com/uber/rib/core/RouterAndStateTest.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/test/kotlin/com/uber/rib/core/RouterAndStateTest.kt rename to libraries/rib-router-navigator/src/test/kotlin/com/uber/rib/core/RouterAndStateTest.kt diff --git a/android/libraries/rib-router-navigator/src/test/kotlin/com/uber/rib/core/StackRouterNavigatorTest.kt b/libraries/rib-router-navigator/src/test/kotlin/com/uber/rib/core/StackRouterNavigatorTest.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/test/kotlin/com/uber/rib/core/StackRouterNavigatorTest.kt rename to libraries/rib-router-navigator/src/test/kotlin/com/uber/rib/core/StackRouterNavigatorTest.kt diff --git a/android/libraries/rib-router-navigator/src/test/kotlin/os/Bundle.kt b/libraries/rib-router-navigator/src/test/kotlin/os/Bundle.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/test/kotlin/os/Bundle.kt rename to libraries/rib-router-navigator/src/test/kotlin/os/Bundle.kt diff --git a/android/libraries/rib-router-navigator/src/test/kotlin/os/Parcelable.kt b/libraries/rib-router-navigator/src/test/kotlin/os/Parcelable.kt similarity index 100% rename from android/libraries/rib-router-navigator/src/test/kotlin/os/Parcelable.kt rename to libraries/rib-router-navigator/src/test/kotlin/os/Parcelable.kt diff --git a/android/libraries/rib-screen-stack-base/README.md b/libraries/rib-screen-stack-base/README.md similarity index 100% rename from android/libraries/rib-screen-stack-base/README.md rename to libraries/rib-screen-stack-base/README.md diff --git a/android/libraries/rib-screen-stack-base/build.gradle b/libraries/rib-screen-stack-base/build.gradle similarity index 100% rename from android/libraries/rib-screen-stack-base/build.gradle rename to libraries/rib-screen-stack-base/build.gradle diff --git a/android/libraries/rib-screen-stack-base/gradle.properties b/libraries/rib-screen-stack-base/gradle.properties similarity index 100% rename from android/libraries/rib-screen-stack-base/gradle.properties rename to libraries/rib-screen-stack-base/gradle.properties diff --git a/android/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/ScreenStackBase.kt b/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/ScreenStackBase.kt similarity index 100% rename from android/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/ScreenStackBase.kt rename to libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/ScreenStackBase.kt diff --git a/android/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/ViewProvider.kt b/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/ViewProvider.kt similarity index 100% rename from android/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/ViewProvider.kt rename to libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/ViewProvider.kt diff --git a/android/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/lifecycle/ScreenStackEvent.kt b/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/lifecycle/ScreenStackEvent.kt similarity index 100% rename from android/libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/lifecycle/ScreenStackEvent.kt rename to libraries/rib-screen-stack-base/src/main/kotlin/com/uber/rib/core/screenstack/lifecycle/ScreenStackEvent.kt diff --git a/android/libraries/rib-test/README.md b/libraries/rib-test/README.md similarity index 100% rename from android/libraries/rib-test/README.md rename to libraries/rib-test/README.md diff --git a/android/libraries/rib-test/build.gradle.kts b/libraries/rib-test/build.gradle.kts similarity index 100% rename from android/libraries/rib-test/build.gradle.kts rename to libraries/rib-test/build.gradle.kts diff --git a/android/libraries/rib-test/gradle.properties b/libraries/rib-test/gradle.properties similarity index 100% rename from android/libraries/rib-test/gradle.properties rename to libraries/rib-test/gradle.properties diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/AndroidRecordingRx2Observer.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/AndroidRecordingRx2Observer.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/AndroidRecordingRx2Observer.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/AndroidRecordingRx2Observer.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeComponent.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeComponent.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeComponent.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeComponent.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeInteractor.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeInteractor.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeInteractor.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeInteractor.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakePresenter.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakePresenter.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakePresenter.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakePresenter.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeRouter.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeRouter.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeRouter.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeRouter.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeWorker.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeWorker.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeWorker.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/FakeWorker.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/InteractorHelper.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/InteractorHelper.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/InteractorHelper.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/InteractorHelper.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/PresenterHelper.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/PresenterHelper.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/PresenterHelper.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/PresenterHelper.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/RibTestBasePlaceholder.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/RibTestBasePlaceholder.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/RibTestBasePlaceholder.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/RibTestBasePlaceholder.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/RouterHelper.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/RouterHelper.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/RouterHelper.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/RouterHelper.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/TestRibCoroutineWorker.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/TestRibCoroutineWorker.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/TestRibCoroutineWorker.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/TestRibCoroutineWorker.kt diff --git a/android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/WorkerHelper.kt b/libraries/rib-test/src/main/kotlin/com/uber/rib/core/WorkerHelper.kt similarity index 100% rename from android/libraries/rib-test/src/main/kotlin/com/uber/rib/core/WorkerHelper.kt rename to libraries/rib-test/src/main/kotlin/com/uber/rib/core/WorkerHelper.kt diff --git a/android/libraries/rib-workflow-test/build.gradle.kts b/libraries/rib-workflow-test/build.gradle.kts similarity index 100% rename from android/libraries/rib-workflow-test/build.gradle.kts rename to libraries/rib-workflow-test/build.gradle.kts diff --git a/android/libraries/rib-workflow-test/gradle.properties b/libraries/rib-workflow-test/gradle.properties similarity index 100% rename from android/libraries/rib-workflow-test/gradle.properties rename to libraries/rib-workflow-test/gradle.properties diff --git a/android/libraries/rib-workflow-test/src/main/kotlin/com/uber/rib/workflow/core/StepTester.kt b/libraries/rib-workflow-test/src/main/kotlin/com/uber/rib/workflow/core/StepTester.kt similarity index 100% rename from android/libraries/rib-workflow-test/src/main/kotlin/com/uber/rib/workflow/core/StepTester.kt rename to libraries/rib-workflow-test/src/main/kotlin/com/uber/rib/workflow/core/StepTester.kt diff --git a/android/libraries/rib-workflow/README.md b/libraries/rib-workflow/README.md similarity index 100% rename from android/libraries/rib-workflow/README.md rename to libraries/rib-workflow/README.md diff --git a/android/libraries/rib-workflow/build.gradle b/libraries/rib-workflow/build.gradle similarity index 100% rename from android/libraries/rib-workflow/build.gradle rename to libraries/rib-workflow/build.gradle diff --git a/android/libraries/rib-workflow/gradle.properties b/libraries/rib-workflow/gradle.properties similarity index 100% rename from android/libraries/rib-workflow/gradle.properties rename to libraries/rib-workflow/gradle.properties diff --git a/android/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/ActionableItem.kt b/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/ActionableItem.kt similarity index 100% rename from android/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/ActionableItem.kt rename to libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/ActionableItem.kt diff --git a/android/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/Step.kt b/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/Step.kt similarity index 100% rename from android/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/Step.kt rename to libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/Step.kt diff --git a/android/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/Workflow.kt b/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/Workflow.kt similarity index 100% rename from android/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/Workflow.kt rename to libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/Workflow.kt diff --git a/android/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/internal/WorkflowFriendModuleApi.kt b/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/internal/WorkflowFriendModuleApi.kt similarity index 100% rename from android/libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/internal/WorkflowFriendModuleApi.kt rename to libraries/rib-workflow/src/main/kotlin/com/uber/rib/workflow/core/internal/WorkflowFriendModuleApi.kt diff --git a/android/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/AndroidSchedulersRule.kt b/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/AndroidSchedulersRule.kt similarity index 100% rename from android/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/AndroidSchedulersRule.kt rename to libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/AndroidSchedulersRule.kt diff --git a/android/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/DelegatingScheduler.kt b/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/DelegatingScheduler.kt similarity index 100% rename from android/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/DelegatingScheduler.kt rename to libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/DelegatingScheduler.kt diff --git a/android/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/StepTest.kt b/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/StepTest.kt similarity index 100% rename from android/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/StepTest.kt rename to libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/StepTest.kt diff --git a/android/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/WorkflowTest.kt b/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/WorkflowTest.kt similarity index 100% rename from android/libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/WorkflowTest.kt rename to libraries/rib-workflow/src/test/kotlin/com/uber/rib/workflow/core/WorkflowTest.kt diff --git a/android/releasing.sh b/releasing.sh similarity index 90% rename from android/releasing.sh rename to releasing.sh index 2721fca7a..60a34cab6 100755 --- a/android/releasing.sh +++ b/releasing.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e ROOT_DIR="$(git rev-parse --show-toplevel)" -ANDROID_DIR="$ROOT_DIR/android" +ANDROID_DIR="$ROOT_DIR" # Change the version in `gradle.properties` to a non-SNAPSHOT version sed -i '' 's|-SNAPSHOT||' $ANDROID_DIR/gradle.properties @@ -10,7 +10,7 @@ echo "Preparing to release: $NEW_VERSION" # Update the `README.md` with the new version OLD_VERSION=$(grep -iE "'com.uber.rib:rib-" $ROOT_DIR/README.md | grep -Eo "\d+\.\d+\.\d+" | sort | uniq) -find $ROOT_DIR -type f -name 'README.md' | grep -v 'ios' | xargs sed -i '' "s|$OLD_VERSION|$NEW_VERSION|g" +find $ROOT_DIR -type f -name 'README.md' | xargs sed -i '' "s|$OLD_VERSION|$NEW_VERSION|g" # Update the `CHANGELOG.md` for the impending release vim $ROOT_DIR/CHANGELOG.md diff --git a/android/settings.gradle b/settings.gradle similarity index 100% rename from android/settings.gradle rename to settings.gradle diff --git a/android/tooling/rib-flipper-plugin/README.md b/tooling/rib-flipper-plugin/README.md similarity index 100% rename from android/tooling/rib-flipper-plugin/README.md rename to tooling/rib-flipper-plugin/README.md diff --git a/android/tooling/rib-flipper-plugin/build.gradle b/tooling/rib-flipper-plugin/build.gradle similarity index 100% rename from android/tooling/rib-flipper-plugin/build.gradle rename to tooling/rib-flipper-plugin/build.gradle diff --git a/android/tooling/rib-flipper-plugin/desktop/README.md b/tooling/rib-flipper-plugin/desktop/README.md similarity index 100% rename from android/tooling/rib-flipper-plugin/desktop/README.md rename to tooling/rib-flipper-plugin/desktop/README.md diff --git a/android/tooling/rib-flipper-plugin/desktop/package.json b/tooling/rib-flipper-plugin/desktop/package.json similarity index 100% rename from android/tooling/rib-flipper-plugin/desktop/package.json rename to tooling/rib-flipper-plugin/desktop/package.json diff --git a/android/tooling/rib-flipper-plugin/desktop/src/TreeChart.js b/tooling/rib-flipper-plugin/desktop/src/TreeChart.js similarity index 100% rename from android/tooling/rib-flipper-plugin/desktop/src/TreeChart.js rename to tooling/rib-flipper-plugin/desktop/src/TreeChart.js diff --git a/android/tooling/rib-flipper-plugin/desktop/src/index.js b/tooling/rib-flipper-plugin/desktop/src/index.js similarity index 100% rename from android/tooling/rib-flipper-plugin/desktop/src/index.js rename to tooling/rib-flipper-plugin/desktop/src/index.js diff --git a/android/tooling/rib-flipper-plugin/desktop/src/utils.js b/tooling/rib-flipper-plugin/desktop/src/utils.js similarity index 100% rename from android/tooling/rib-flipper-plugin/desktop/src/utils.js rename to tooling/rib-flipper-plugin/desktop/src/utils.js diff --git a/android/tooling/rib-flipper-plugin/gradle.properties b/tooling/rib-flipper-plugin/gradle.properties similarity index 100% rename from android/tooling/rib-flipper-plugin/gradle.properties rename to tooling/rib-flipper-plugin/gradle.properties diff --git a/android/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibEventPayload.kt b/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibEventPayload.kt similarity index 100% rename from android/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibEventPayload.kt rename to tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibEventPayload.kt diff --git a/android/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibTreeMessageType.kt b/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibTreeMessageType.kt similarity index 100% rename from android/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibTreeMessageType.kt rename to tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibTreeMessageType.kt diff --git a/android/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibTreePlugin.kt b/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibTreePlugin.kt similarity index 100% rename from android/tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibTreePlugin.kt rename to tooling/rib-flipper-plugin/src/main/kotlin/com/uber/rib/flipper/RibTreePlugin.kt diff --git a/android/tooling/rib-intellij-plugin/README.md b/tooling/rib-intellij-plugin/README.md similarity index 100% rename from android/tooling/rib-intellij-plugin/README.md rename to tooling/rib-intellij-plugin/README.md diff --git a/android/tooling/rib-intellij-plugin/build.gradle b/tooling/rib-intellij-plugin/build.gradle similarity index 100% rename from android/tooling/rib-intellij-plugin/build.gradle rename to tooling/rib-intellij-plugin/build.gradle diff --git a/android/tooling/rib-intellij-plugin/deploy/rib-intellij-plugin.jar b/tooling/rib-intellij-plugin/deploy/rib-intellij-plugin.jar similarity index 100% rename from android/tooling/rib-intellij-plugin/deploy/rib-intellij-plugin.jar rename to tooling/rib-intellij-plugin/deploy/rib-intellij-plugin.jar diff --git a/android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/README.md b/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/README.md similarity index 100% rename from android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/README.md rename to tooling/rib-intellij-plugin/native/intellij-broadcast-rib/README.md diff --git a/android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/build.gradle b/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/build.gradle similarity index 100% rename from android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/build.gradle rename to tooling/rib-intellij-plugin/native/intellij-broadcast-rib/build.gradle diff --git a/android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/gradle.properties b/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/gradle.properties similarity index 100% rename from android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/gradle.properties rename to tooling/rib-intellij-plugin/native/intellij-broadcast-rib/gradle.properties diff --git a/android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyDebugBroadcastHandler.java b/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyDebugBroadcastHandler.java similarity index 100% rename from android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyDebugBroadcastHandler.java rename to tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyDebugBroadcastHandler.java diff --git a/android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyPayload.java b/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyPayload.java similarity index 100% rename from android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyPayload.java rename to tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyPayload.java diff --git a/android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyUtils.java b/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyUtils.java similarity index 100% rename from android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyUtils.java rename to tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyUtils.java diff --git a/android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyWithSelectionPayload.java b/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyWithSelectionPayload.java similarity index 100% rename from android/tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyWithSelectionPayload.java rename to tooling/rib-intellij-plugin/native/intellij-broadcast-rib/src/main/java/com/uber/debug/broadcast/rib/RibHierarchyWithSelectionPayload.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateAction.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateAction.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateAction.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateAction.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibAction.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibAction.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibAction.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibAction.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibDialog.form b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibDialog.form similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibDialog.form rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibDialog.form diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibDialog.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibDialog.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibDialog.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/GenerateRibDialog.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/Generators.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/Generators.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/Generators.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/action/rib/Generators.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/Generator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/Generator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/Generator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/Generator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/GeneratorPair.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/GeneratorPair.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/GeneratorPair.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/GeneratorPair.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/BuilderGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/BuilderGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/BuilderGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/BuilderGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithEmptyPresenterGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithEmptyPresenterGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithEmptyPresenterGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithEmptyPresenterGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithEmptyPresenterTestGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithEmptyPresenterTestGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithEmptyPresenterTestGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithEmptyPresenterTestGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithPresenterGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithPresenterGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithPresenterGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithPresenterGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithPresenterTestGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithPresenterTestGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithPresenterTestGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/InteractorWithPresenterTestGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/RouterGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/RouterGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/RouterGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/RouterGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/RouterTestGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/RouterTestGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/RouterTestGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/RouterTestGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewBuilderGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewBuilderGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewBuilderGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewBuilderGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewRouterGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewRouterGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewRouterGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewRouterGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewRouterTestGenerator.java b/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewRouterTestGenerator.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewRouterTestGenerator.java rename to tooling/rib-intellij-plugin/src/main/java/com/uber/presidio/intellij_plugin/generator/rib/ViewRouterTestGenerator.java diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/AndroidDeviceRepository.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/AndroidDeviceRepository.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/AndroidDeviceRepository.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/AndroidDeviceRepository.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/AttachRibProjectServiceActivity.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/AttachRibProjectServiceActivity.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/AttachRibProjectServiceActivity.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/AttachRibProjectServiceActivity.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/CommandLineUtils.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/CommandLineUtils.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/CommandLineUtils.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/CommandLineUtils.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyBrowser.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyBrowser.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyBrowser.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyBrowser.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyPanel.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyPanel.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyPanel.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyPanel.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyUtils.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyUtils.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyUtils.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibHierarchyUtils.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibIcons.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibIcons.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibIcons.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibIcons.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibProjectService.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibProjectService.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibProjectService.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibProjectService.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibViewBrowser.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibViewBrowser.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibViewBrowser.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibViewBrowser.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/AckRequest.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/AckRequest.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/AckRequest.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/AckRequest.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/LogcatMessageDecoder.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/LogcatMessageDecoder.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/LogcatMessageDecoder.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/LogcatMessageDecoder.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/LogcatRequestProcessor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/LogcatRequestProcessor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/LogcatRequestProcessor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/LogcatRequestProcessor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/Request.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/Request.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/Request.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/Request.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RequestProcessor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RequestProcessor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RequestProcessor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RequestProcessor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/Response.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/Response.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/Response.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/Response.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibHierarchyRequest.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibHierarchyRequest.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibHierarchyRequest.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibHierarchyRequest.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibHighlightRequest.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibHighlightRequest.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibHighlightRequest.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibHighlightRequest.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibLocateRequest.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibLocateRequest.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibLocateRequest.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/io/RibLocateRequest.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/HierarchyBrowserBase.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/HierarchyBrowserBase.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/HierarchyBrowserBase.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/HierarchyBrowserBase.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyActivityDescriptor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyActivityDescriptor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyActivityDescriptor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyActivityDescriptor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyApplicationDescriptor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyApplicationDescriptor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyApplicationDescriptor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyApplicationDescriptor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyDescriptor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyDescriptor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyDescriptor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyDescriptor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyNodeDescriptor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyNodeDescriptor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyNodeDescriptor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyNodeDescriptor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyRootNodeDescriptor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyRootNodeDescriptor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyRootNodeDescriptor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyRootNodeDescriptor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyTreeStructure.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyTreeStructure.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyTreeStructure.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibHierarchyTreeStructure.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewNodeDescriptor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewNodeDescriptor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewNodeDescriptor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewNodeDescriptor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewRootNodeDescriptor.kt b/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewRootNodeDescriptor.kt similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewRootNodeDescriptor.kt rename to tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/RibViewRootNodeDescriptor.kt diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/META-INF/plugin.xml b/tooling/rib-intellij-plugin/src/main/resources/META-INF/plugin.xml similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/META-INF/plugin.xml rename to tooling/rib-intellij-plugin/src/main/resources/META-INF/plugin.xml diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/icons/generate_rib.png b/tooling/rib-intellij-plugin/src/main/resources/icons/generate_rib.png similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/icons/generate_rib.png rename to tooling/rib-intellij-plugin/src/main/resources/icons/generate_rib.png diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/icons/generate_rib@2x.png b/tooling/rib-intellij-plugin/src/main/resources/icons/generate_rib@2x.png similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/icons/generate_rib@2x.png rename to tooling/rib-intellij-plugin/src/main/resources/icons/generate_rib@2x.png diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/icons/phone.png b/tooling/rib-intellij-plugin/src/main/resources/icons/phone.png similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/icons/phone.png rename to tooling/rib-intellij-plugin/src/main/resources/icons/phone.png diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/icons/phone@2x.png b/tooling/rib-intellij-plugin/src/main/resources/icons/phone@2x.png similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/icons/phone@2x.png rename to tooling/rib-intellij-plugin/src/main/resources/icons/phone@2x.png diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/icons/rib.png b/tooling/rib-intellij-plugin/src/main/resources/icons/rib.png similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/icons/rib.png rename to tooling/rib-intellij-plugin/src/main/resources/icons/rib.png diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/icons/rib@2x.png b/tooling/rib-intellij-plugin/src/main/resources/icons/rib@2x.png similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/icons/rib@2x.png rename to tooling/rib-intellij-plugin/src/main/resources/icons/rib@2x.png diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/partials/ExampleInteractorTest.java.partial b/tooling/rib-intellij-plugin/src/main/resources/partials/ExampleInteractorTest.java.partial similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/partials/ExampleInteractorTest.java.partial rename to tooling/rib-intellij-plugin/src/main/resources/partials/ExampleInteractorTest.java.partial diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/partials/ExampleRouterTest.java.partial b/tooling/rib-intellij-plugin/src/main/resources/partials/ExampleRouterTest.java.partial similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/partials/ExampleRouterTest.java.partial rename to tooling/rib-intellij-plugin/src/main/resources/partials/ExampleRouterTest.java.partial diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/partials/RibInteractorDidBecomeActive.java.partial b/tooling/rib-intellij-plugin/src/main/resources/partials/RibInteractorDidBecomeActive.java.partial similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/partials/RibInteractorDidBecomeActive.java.partial rename to tooling/rib-intellij-plugin/src/main/resources/partials/RibInteractorDidBecomeActive.java.partial diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/partials/RibInteractorWillResignActive.java.partial b/tooling/rib-intellij-plugin/src/main/resources/partials/RibInteractorWillResignActive.java.partial similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/partials/RibInteractorWillResignActive.java.partial rename to tooling/rib-intellij-plugin/src/main/resources/partials/RibInteractorWillResignActive.java.partial diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibBuilder.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibBuilder.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibBuilder.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibBuilder.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithEmptyPresenter.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithEmptyPresenter.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithEmptyPresenter.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithEmptyPresenter.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithEmptyPresenterTest.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithEmptyPresenterTest.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithEmptyPresenterTest.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithEmptyPresenterTest.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithPresenter.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithPresenter.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithPresenter.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithPresenter.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithPresenterTest.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithPresenterTest.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithPresenterTest.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibInteractorWithPresenterTest.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibRouter.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibRouter.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibRouter.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibRouter.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibRouterTest.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibRouterTest.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibRouterTest.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibRouterTest.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibView.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibView.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibView.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibView.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewBuilder.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewBuilder.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewBuilder.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewBuilder.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewRouter.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewRouter.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewRouter.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewRouter.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewRouterTest.java.template b/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewRouterTest.java.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewRouterTest.java.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/java/RibViewRouterTest.java.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibBuilder.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibBuilder.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibBuilder.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibBuilder.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithEmptyPresenter.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithEmptyPresenter.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithEmptyPresenter.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithEmptyPresenter.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithEmptyPresenterTest.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithEmptyPresenterTest.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithEmptyPresenterTest.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithEmptyPresenterTest.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithPresenter.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithPresenter.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithPresenter.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithPresenter.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithPresenterTest.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithPresenterTest.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithPresenterTest.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibInteractorWithPresenterTest.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibRouter.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibRouter.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibRouter.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibRouter.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibRouterTest.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibRouterTest.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibRouterTest.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibRouterTest.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibView.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibView.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibView.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibView.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewBuilder.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewBuilder.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewBuilder.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewBuilder.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewRouter.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewRouter.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewRouter.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewRouter.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewRouterTest.kt.template b/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewRouterTest.kt.template similarity index 100% rename from android/tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewRouterTest.kt.template rename to tooling/rib-intellij-plugin/src/main/resources/templates/kotlin/RibViewRouterTest.kt.template diff --git a/android/tooling/rib-intellij-plugin/src/test/java/com/uber/presidio/intellij_plugin/action/rib/RibGeneratorsTest.java b/tooling/rib-intellij-plugin/src/test/java/com/uber/presidio/intellij_plugin/action/rib/RibGeneratorsTest.java similarity index 100% rename from android/tooling/rib-intellij-plugin/src/test/java/com/uber/presidio/intellij_plugin/action/rib/RibGeneratorsTest.java rename to tooling/rib-intellij-plugin/src/test/java/com/uber/presidio/intellij_plugin/action/rib/RibGeneratorsTest.java diff --git a/android/tooling/utils/intellij-broadcast-core/README.md b/tooling/utils/intellij-broadcast-core/README.md similarity index 100% rename from android/tooling/utils/intellij-broadcast-core/README.md rename to tooling/utils/intellij-broadcast-core/README.md diff --git a/android/tooling/utils/intellij-broadcast-core/build.gradle b/tooling/utils/intellij-broadcast-core/build.gradle similarity index 100% rename from android/tooling/utils/intellij-broadcast-core/build.gradle rename to tooling/utils/intellij-broadcast-core/build.gradle diff --git a/android/tooling/utils/intellij-broadcast-core/gradle.properties b/tooling/utils/intellij-broadcast-core/gradle.properties similarity index 100% rename from android/tooling/utils/intellij-broadcast-core/gradle.properties rename to tooling/utils/intellij-broadcast-core/gradle.properties diff --git a/android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/AckDebugBroadcastHandler.java b/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/AckDebugBroadcastHandler.java similarity index 100% rename from android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/AckDebugBroadcastHandler.java rename to tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/AckDebugBroadcastHandler.java diff --git a/android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastReceiver.java b/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastReceiver.java similarity index 100% rename from android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastReceiver.java rename to tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastReceiver.java diff --git a/android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastRequest.java b/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastRequest.java similarity index 100% rename from android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastRequest.java rename to tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastRequest.java diff --git a/android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastResponse.java b/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastResponse.java similarity index 100% rename from android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastResponse.java rename to tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastResponse.java diff --git a/android/tutorials/tutorial1/README.md b/tutorials/tutorial1/README.md similarity index 100% rename from android/tutorials/tutorial1/README.md rename to tutorials/tutorial1/README.md diff --git a/android/tutorials/tutorial1/build.gradle b/tutorials/tutorial1/build.gradle similarity index 100% rename from android/tutorials/tutorial1/build.gradle rename to tutorials/tutorial1/build.gradle diff --git a/android/tutorials/tutorial1/src/main/AndroidManifest.xml b/tutorials/tutorial1/src/main/AndroidManifest.xml similarity index 100% rename from android/tutorials/tutorial1/src/main/AndroidManifest.xml rename to tutorials/tutorial1/src/main/AndroidManifest.xml diff --git a/android/tutorials/tutorial1/src/main/java/com/uber/rib/RootActivity.java b/tutorials/tutorial1/src/main/java/com/uber/rib/RootActivity.java similarity index 100% rename from android/tutorials/tutorial1/src/main/java/com/uber/rib/RootActivity.java rename to tutorials/tutorial1/src/main/java/com/uber/rib/RootActivity.java diff --git a/android/tutorials/tutorial1/src/main/java/com/uber/rib/SampleApplication.java b/tutorials/tutorial1/src/main/java/com/uber/rib/SampleApplication.java similarity index 100% rename from android/tutorials/tutorial1/src/main/java/com/uber/rib/SampleApplication.java rename to tutorials/tutorial1/src/main/java/com/uber/rib/SampleApplication.java diff --git a/android/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootBuilder.java b/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootBuilder.java similarity index 100% rename from android/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootBuilder.java rename to tutorials/tutorial1/src/main/java/com/uber/rib/root/RootBuilder.java diff --git a/android/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootInteractor.java b/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootInteractor.java similarity index 100% rename from android/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootInteractor.java rename to tutorials/tutorial1/src/main/java/com/uber/rib/root/RootInteractor.java diff --git a/android/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootRouter.java b/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootRouter.java similarity index 100% rename from android/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootRouter.java rename to tutorials/tutorial1/src/main/java/com/uber/rib/root/RootRouter.java diff --git a/android/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootView.java b/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootView.java similarity index 100% rename from android/tutorials/tutorial1/src/main/java/com/uber/rib/root/RootView.java rename to tutorials/tutorial1/src/main/java/com/uber/rib/root/RootView.java diff --git a/android/tutorials/tutorial1/src/main/res/drawable-hdpi/ub__ic_launcher.png b/tutorials/tutorial1/src/main/res/drawable-hdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial1/src/main/res/drawable-hdpi/ub__ic_launcher.png rename to tutorials/tutorial1/src/main/res/drawable-hdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial1/src/main/res/drawable-mdpi/ub__ic_launcher.png b/tutorials/tutorial1/src/main/res/drawable-mdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial1/src/main/res/drawable-mdpi/ub__ic_launcher.png rename to tutorials/tutorial1/src/main/res/drawable-mdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial1/src/main/res/drawable-xhdpi/ub__ic_launcher.png b/tutorials/tutorial1/src/main/res/drawable-xhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial1/src/main/res/drawable-xhdpi/ub__ic_launcher.png rename to tutorials/tutorial1/src/main/res/drawable-xhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial1/src/main/res/drawable-xxhdpi/ub__ic_launcher.png b/tutorials/tutorial1/src/main/res/drawable-xxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial1/src/main/res/drawable-xxhdpi/ub__ic_launcher.png rename to tutorials/tutorial1/src/main/res/drawable-xxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial1/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png b/tutorials/tutorial1/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial1/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png rename to tutorials/tutorial1/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial1/src/main/res/layout/root_rib.xml b/tutorials/tutorial1/src/main/res/layout/root_rib.xml similarity index 100% rename from android/tutorials/tutorial1/src/main/res/layout/root_rib.xml rename to tutorials/tutorial1/src/main/res/layout/root_rib.xml diff --git a/android/tutorials/tutorial1/src/main/res/values/ub__strings.xml b/tutorials/tutorial1/src/main/res/values/ub__strings.xml similarity index 100% rename from android/tutorials/tutorial1/src/main/res/values/ub__strings.xml rename to tutorials/tutorial1/src/main/res/values/ub__strings.xml diff --git a/android/tutorials/tutorial1/src/test/java/com/uber/rib/root/RootInteractorTest.java b/tutorials/tutorial1/src/test/java/com/uber/rib/root/RootInteractorTest.java similarity index 100% rename from android/tutorials/tutorial1/src/test/java/com/uber/rib/root/RootInteractorTest.java rename to tutorials/tutorial1/src/test/java/com/uber/rib/root/RootInteractorTest.java diff --git a/android/tutorials/tutorial1/src/test/java/com/uber/rib/root/RootRouterTest.java b/tutorials/tutorial1/src/test/java/com/uber/rib/root/RootRouterTest.java similarity index 100% rename from android/tutorials/tutorial1/src/test/java/com/uber/rib/root/RootRouterTest.java rename to tutorials/tutorial1/src/test/java/com/uber/rib/root/RootRouterTest.java diff --git a/android/tutorials/tutorial1/tutorial_assets/create_rib.png b/tutorials/tutorial1/tutorial_assets/create_rib.png similarity index 100% rename from android/tutorials/tutorial1/tutorial_assets/create_rib.png rename to tutorials/tutorial1/tutorial_assets/create_rib.png diff --git a/android/tutorials/tutorial1/tutorial_assets/logged_out.png b/tutorials/tutorial1/tutorial_assets/logged_out.png similarity index 100% rename from android/tutorials/tutorial1/tutorial_assets/logged_out.png rename to tutorials/tutorial1/tutorial_assets/logged_out.png diff --git a/android/tutorials/tutorial1/tutorial_assets/logged_out_files.png b/tutorials/tutorial1/tutorial_assets/logged_out_files.png similarity index 100% rename from android/tutorials/tutorial1/tutorial_assets/logged_out_files.png rename to tutorials/tutorial1/tutorial_assets/logged_out_files.png diff --git a/android/tutorials/tutorial1/tutorial_assets/logged_out_package.png b/tutorials/tutorial1/tutorial_assets/logged_out_package.png similarity index 100% rename from android/tutorials/tutorial1/tutorial_assets/logged_out_package.png rename to tutorials/tutorial1/tutorial_assets/logged_out_package.png diff --git a/android/tutorials/tutorial2/README.md b/tutorials/tutorial2/README.md similarity index 100% rename from android/tutorials/tutorial2/README.md rename to tutorials/tutorial2/README.md diff --git a/android/tutorials/tutorial2/build.gradle b/tutorials/tutorial2/build.gradle similarity index 100% rename from android/tutorials/tutorial2/build.gradle rename to tutorials/tutorial2/build.gradle diff --git a/android/tutorials/tutorial2/src/main/AndroidManifest.xml b/tutorials/tutorial2/src/main/AndroidManifest.xml similarity index 100% rename from android/tutorials/tutorial2/src/main/AndroidManifest.xml rename to tutorials/tutorial2/src/main/AndroidManifest.xml diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/RootActivity.java b/tutorials/tutorial2/src/main/java/com/uber/rib/RootActivity.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/RootActivity.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/RootActivity.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/SampleApplication.java b/tutorials/tutorial2/src/main/java/com/uber/rib/SampleApplication.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/SampleApplication.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/SampleApplication.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootBuilder.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootBuilder.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootBuilder.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/RootBuilder.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootInteractor.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootInteractor.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootInteractor.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/RootInteractor.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootRouter.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootRouter.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootRouter.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/RootRouter.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootView.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootView.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/RootView.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/RootView.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java diff --git a/android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java b/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java similarity index 100% rename from android/tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java rename to tutorials/tutorial2/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java diff --git a/android/tutorials/tutorial2/src/main/res/drawable-hdpi/ub__ic_launcher.png b/tutorials/tutorial2/src/main/res/drawable-hdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial2/src/main/res/drawable-hdpi/ub__ic_launcher.png rename to tutorials/tutorial2/src/main/res/drawable-hdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial2/src/main/res/drawable-mdpi/ub__ic_launcher.png b/tutorials/tutorial2/src/main/res/drawable-mdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial2/src/main/res/drawable-mdpi/ub__ic_launcher.png rename to tutorials/tutorial2/src/main/res/drawable-mdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial2/src/main/res/drawable-xhdpi/ub__ic_launcher.png b/tutorials/tutorial2/src/main/res/drawable-xhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial2/src/main/res/drawable-xhdpi/ub__ic_launcher.png rename to tutorials/tutorial2/src/main/res/drawable-xhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial2/src/main/res/drawable-xxhdpi/ub__ic_launcher.png b/tutorials/tutorial2/src/main/res/drawable-xxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial2/src/main/res/drawable-xxhdpi/ub__ic_launcher.png rename to tutorials/tutorial2/src/main/res/drawable-xxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial2/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png b/tutorials/tutorial2/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial2/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png rename to tutorials/tutorial2/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial2/src/main/res/layout/logged_out_rib.xml b/tutorials/tutorial2/src/main/res/layout/logged_out_rib.xml similarity index 100% rename from android/tutorials/tutorial2/src/main/res/layout/logged_out_rib.xml rename to tutorials/tutorial2/src/main/res/layout/logged_out_rib.xml diff --git a/android/tutorials/tutorial2/src/main/res/layout/off_game_rib.xml b/tutorials/tutorial2/src/main/res/layout/off_game_rib.xml similarity index 100% rename from android/tutorials/tutorial2/src/main/res/layout/off_game_rib.xml rename to tutorials/tutorial2/src/main/res/layout/off_game_rib.xml diff --git a/android/tutorials/tutorial2/src/main/res/layout/root_rib.xml b/tutorials/tutorial2/src/main/res/layout/root_rib.xml similarity index 100% rename from android/tutorials/tutorial2/src/main/res/layout/root_rib.xml rename to tutorials/tutorial2/src/main/res/layout/root_rib.xml diff --git a/android/tutorials/tutorial2/src/main/res/layout/tic_tac_toe_rib.xml b/tutorials/tutorial2/src/main/res/layout/tic_tac_toe_rib.xml similarity index 100% rename from android/tutorials/tutorial2/src/main/res/layout/tic_tac_toe_rib.xml rename to tutorials/tutorial2/src/main/res/layout/tic_tac_toe_rib.xml diff --git a/android/tutorials/tutorial2/src/main/res/values/ub__strings.xml b/tutorials/tutorial2/src/main/res/values/ub__strings.xml similarity index 100% rename from android/tutorials/tutorial2/src/main/res/values/ub__strings.xml rename to tutorials/tutorial2/src/main/res/values/ub__strings.xml diff --git a/android/tutorials/tutorial2/src/test/java/com/uber/rib/root/RootInteractorTest.java b/tutorials/tutorial2/src/test/java/com/uber/rib/root/RootInteractorTest.java similarity index 100% rename from android/tutorials/tutorial2/src/test/java/com/uber/rib/root/RootInteractorTest.java rename to tutorials/tutorial2/src/test/java/com/uber/rib/root/RootInteractorTest.java diff --git a/android/tutorials/tutorial2/src/test/java/com/uber/rib/root/RootRouterTest.java b/tutorials/tutorial2/src/test/java/com/uber/rib/root/RootRouterTest.java similarity index 100% rename from android/tutorials/tutorial2/src/test/java/com/uber/rib/root/RootRouterTest.java rename to tutorials/tutorial2/src/test/java/com/uber/rib/root/RootRouterTest.java diff --git a/android/tutorials/tutorial2/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java b/tutorials/tutorial2/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java similarity index 100% rename from android/tutorials/tutorial2/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java rename to tutorials/tutorial2/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java diff --git a/android/tutorials/tutorial2/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java b/tutorials/tutorial2/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java similarity index 100% rename from android/tutorials/tutorial2/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java rename to tutorials/tutorial2/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java diff --git a/android/tutorials/tutorial2/tutorial_assets/overview.png b/tutorials/tutorial2/tutorial_assets/overview.png similarity index 100% rename from android/tutorials/tutorial2/tutorial_assets/overview.png rename to tutorials/tutorial2/tutorial_assets/overview.png diff --git a/android/tutorials/tutorial2/tutorial_assets/result.png b/tutorials/tutorial2/tutorial_assets/result.png similarity index 100% rename from android/tutorials/tutorial2/tutorial_assets/result.png rename to tutorials/tutorial2/tutorial_assets/result.png diff --git a/android/tutorials/tutorial3-completed/README.md b/tutorials/tutorial3-completed/README.md similarity index 100% rename from android/tutorials/tutorial3-completed/README.md rename to tutorials/tutorial3-completed/README.md diff --git a/android/tutorials/tutorial3-completed/build.gradle b/tutorials/tutorial3-completed/build.gradle similarity index 100% rename from android/tutorials/tutorial3-completed/build.gradle rename to tutorials/tutorial3-completed/build.gradle diff --git a/android/tutorials/tutorial3-completed/src/main/AndroidManifest.xml b/tutorials/tutorial3-completed/src/main/AndroidManifest.xml similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/AndroidManifest.xml rename to tutorials/tutorial3-completed/src/main/AndroidManifest.xml diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/RootActivity.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/RootActivity.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/RootActivity.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/RootActivity.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/SampleApplication.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/SampleApplication.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/SampleApplication.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/SampleApplication.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootBuilder.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootBuilder.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootBuilder.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootBuilder.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootInteractor.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootInteractor.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootInteractor.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootInteractor.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootRouter.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootRouter.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootRouter.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootRouter.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootView.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootView.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootView.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/RootView.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/ScoreStream.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/ScoreStream.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/ScoreStream.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/ScoreStream.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java diff --git a/android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java b/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java rename to tutorials/tutorial3-completed/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java diff --git a/android/tutorials/tutorial3-completed/src/main/res/drawable-hdpi/ub__ic_launcher.png b/tutorials/tutorial3-completed/src/main/res/drawable-hdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/drawable-hdpi/ub__ic_launcher.png rename to tutorials/tutorial3-completed/src/main/res/drawable-hdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3-completed/src/main/res/drawable-mdpi/ub__ic_launcher.png b/tutorials/tutorial3-completed/src/main/res/drawable-mdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/drawable-mdpi/ub__ic_launcher.png rename to tutorials/tutorial3-completed/src/main/res/drawable-mdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3-completed/src/main/res/drawable-xhdpi/ub__ic_launcher.png b/tutorials/tutorial3-completed/src/main/res/drawable-xhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/drawable-xhdpi/ub__ic_launcher.png rename to tutorials/tutorial3-completed/src/main/res/drawable-xhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3-completed/src/main/res/drawable-xxhdpi/ub__ic_launcher.png b/tutorials/tutorial3-completed/src/main/res/drawable-xxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/drawable-xxhdpi/ub__ic_launcher.png rename to tutorials/tutorial3-completed/src/main/res/drawable-xxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3-completed/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png b/tutorials/tutorial3-completed/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png rename to tutorials/tutorial3-completed/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3-completed/src/main/res/layout/logged_out_rib.xml b/tutorials/tutorial3-completed/src/main/res/layout/logged_out_rib.xml similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/layout/logged_out_rib.xml rename to tutorials/tutorial3-completed/src/main/res/layout/logged_out_rib.xml diff --git a/android/tutorials/tutorial3-completed/src/main/res/layout/off_game_rib.xml b/tutorials/tutorial3-completed/src/main/res/layout/off_game_rib.xml similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/layout/off_game_rib.xml rename to tutorials/tutorial3-completed/src/main/res/layout/off_game_rib.xml diff --git a/android/tutorials/tutorial3-completed/src/main/res/layout/root_rib.xml b/tutorials/tutorial3-completed/src/main/res/layout/root_rib.xml similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/layout/root_rib.xml rename to tutorials/tutorial3-completed/src/main/res/layout/root_rib.xml diff --git a/android/tutorials/tutorial3-completed/src/main/res/layout/tic_tac_toe_rib.xml b/tutorials/tutorial3-completed/src/main/res/layout/tic_tac_toe_rib.xml similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/layout/tic_tac_toe_rib.xml rename to tutorials/tutorial3-completed/src/main/res/layout/tic_tac_toe_rib.xml diff --git a/android/tutorials/tutorial3-completed/src/main/res/values/ub__strings.xml b/tutorials/tutorial3-completed/src/main/res/values/ub__strings.xml similarity index 100% rename from android/tutorials/tutorial3-completed/src/main/res/values/ub__strings.xml rename to tutorials/tutorial3-completed/src/main/res/values/ub__strings.xml diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/RootInteractorTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/RootInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/RootInteractorTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/RootInteractorTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/RootRouterTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/RootRouterTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/RootRouterTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/RootRouterTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/LoggedInInteractorTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/LoggedInInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/LoggedInInteractorTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/LoggedInInteractorTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/LoggedInRouterTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/LoggedInRouterTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/LoggedInRouterTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/LoggedInRouterTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameInteractorTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameInteractorTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameInteractorTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameRouterTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameRouterTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameRouterTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameRouterTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractorTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractorTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractorTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouterTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouterTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouterTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouterTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java diff --git a/android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java b/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java similarity index 100% rename from android/tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java rename to tutorials/tutorial3-completed/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java diff --git a/android/tutorials/tutorial3/README.md b/tutorials/tutorial3/README.md similarity index 100% rename from android/tutorials/tutorial3/README.md rename to tutorials/tutorial3/README.md diff --git a/android/tutorials/tutorial3/build.gradle b/tutorials/tutorial3/build.gradle similarity index 100% rename from android/tutorials/tutorial3/build.gradle rename to tutorials/tutorial3/build.gradle diff --git a/android/tutorials/tutorial3/src/main/AndroidManifest.xml b/tutorials/tutorial3/src/main/AndroidManifest.xml similarity index 100% rename from android/tutorials/tutorial3/src/main/AndroidManifest.xml rename to tutorials/tutorial3/src/main/AndroidManifest.xml diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/RootActivity.java b/tutorials/tutorial3/src/main/java/com/uber/rib/RootActivity.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/RootActivity.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/RootActivity.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/SampleApplication.java b/tutorials/tutorial3/src/main/java/com/uber/rib/SampleApplication.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/SampleApplication.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/SampleApplication.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootBuilder.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootBuilder.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootBuilder.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/RootBuilder.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootInteractor.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootInteractor.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootInteractor.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/RootInteractor.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootRouter.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootRouter.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootRouter.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/RootRouter.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootView.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootView.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/RootView.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/RootView.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java diff --git a/android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java b/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java similarity index 100% rename from android/tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java rename to tutorials/tutorial3/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java diff --git a/android/tutorials/tutorial3/src/main/res/drawable-hdpi/ub__ic_launcher.png b/tutorials/tutorial3/src/main/res/drawable-hdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3/src/main/res/drawable-hdpi/ub__ic_launcher.png rename to tutorials/tutorial3/src/main/res/drawable-hdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3/src/main/res/drawable-mdpi/ub__ic_launcher.png b/tutorials/tutorial3/src/main/res/drawable-mdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3/src/main/res/drawable-mdpi/ub__ic_launcher.png rename to tutorials/tutorial3/src/main/res/drawable-mdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3/src/main/res/drawable-xhdpi/ub__ic_launcher.png b/tutorials/tutorial3/src/main/res/drawable-xhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3/src/main/res/drawable-xhdpi/ub__ic_launcher.png rename to tutorials/tutorial3/src/main/res/drawable-xhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3/src/main/res/drawable-xxhdpi/ub__ic_launcher.png b/tutorials/tutorial3/src/main/res/drawable-xxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3/src/main/res/drawable-xxhdpi/ub__ic_launcher.png rename to tutorials/tutorial3/src/main/res/drawable-xxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png b/tutorials/tutorial3/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial3/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png rename to tutorials/tutorial3/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial3/src/main/res/layout/logged_out_rib.xml b/tutorials/tutorial3/src/main/res/layout/logged_out_rib.xml similarity index 100% rename from android/tutorials/tutorial3/src/main/res/layout/logged_out_rib.xml rename to tutorials/tutorial3/src/main/res/layout/logged_out_rib.xml diff --git a/android/tutorials/tutorial3/src/main/res/layout/off_game_rib.xml b/tutorials/tutorial3/src/main/res/layout/off_game_rib.xml similarity index 100% rename from android/tutorials/tutorial3/src/main/res/layout/off_game_rib.xml rename to tutorials/tutorial3/src/main/res/layout/off_game_rib.xml diff --git a/android/tutorials/tutorial3/src/main/res/layout/root_rib.xml b/tutorials/tutorial3/src/main/res/layout/root_rib.xml similarity index 100% rename from android/tutorials/tutorial3/src/main/res/layout/root_rib.xml rename to tutorials/tutorial3/src/main/res/layout/root_rib.xml diff --git a/android/tutorials/tutorial3/src/main/res/layout/tic_tac_toe_rib.xml b/tutorials/tutorial3/src/main/res/layout/tic_tac_toe_rib.xml similarity index 100% rename from android/tutorials/tutorial3/src/main/res/layout/tic_tac_toe_rib.xml rename to tutorials/tutorial3/src/main/res/layout/tic_tac_toe_rib.xml diff --git a/android/tutorials/tutorial3/src/main/res/values/ub__strings.xml b/tutorials/tutorial3/src/main/res/values/ub__strings.xml similarity index 100% rename from android/tutorials/tutorial3/src/main/res/values/ub__strings.xml rename to tutorials/tutorial3/src/main/res/values/ub__strings.xml diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/RootInteractorTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/RootInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/RootInteractorTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/RootInteractorTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/RootRouterTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/RootRouterTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/RootRouterTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/RootRouterTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/LoggedInInteractorTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/LoggedInInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/LoggedInInteractorTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/LoggedInInteractorTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/LoggedInRouterTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/LoggedInRouterTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/LoggedInRouterTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/LoggedInRouterTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameInteractorTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameInteractorTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameInteractorTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameRouterTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameRouterTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameRouterTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/offgame/OffGameRouterTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractorTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractorTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractorTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouterTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouterTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouterTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouterTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedout/LoggedOutInteractorTest.java diff --git a/android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java b/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java similarity index 100% rename from android/tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java rename to tutorials/tutorial3/src/test/java/com/uber/rib/root/loggedout/LoggedOutRouterTest.java diff --git a/android/tutorials/tutorial3/tutorial_assets/off_game.png b/tutorials/tutorial3/tutorial_assets/off_game.png similarity index 100% rename from android/tutorials/tutorial3/tutorial_assets/off_game.png rename to tutorials/tutorial3/tutorial_assets/off_game.png diff --git a/android/tutorials/tutorial4/README.md b/tutorials/tutorial4/README.md similarity index 100% rename from android/tutorials/tutorial4/README.md rename to tutorials/tutorial4/README.md diff --git a/android/tutorials/tutorial4/build.gradle b/tutorials/tutorial4/build.gradle similarity index 100% rename from android/tutorials/tutorial4/build.gradle rename to tutorials/tutorial4/build.gradle diff --git a/android/tutorials/tutorial4/src/main/AndroidManifest.xml b/tutorials/tutorial4/src/main/AndroidManifest.xml similarity index 100% rename from android/tutorials/tutorial4/src/main/AndroidManifest.xml rename to tutorials/tutorial4/src/main/AndroidManifest.xml diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/RootActivity.java b/tutorials/tutorial4/src/main/java/com/uber/rib/RootActivity.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/RootActivity.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/RootActivity.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/SampleApplication.java b/tutorials/tutorial4/src/main/java/com/uber/rib/SampleApplication.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/SampleApplication.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/SampleApplication.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootActionableItem.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootActionableItem.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootActionableItem.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/RootActionableItem.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootBuilder.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootBuilder.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootBuilder.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/RootBuilder.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootInteractor.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootInteractor.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootInteractor.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/RootInteractor.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootRouter.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootRouter.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootRouter.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/RootRouter.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootView.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootView.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootView.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/RootView.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootWorkflow.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootWorkflow.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootWorkflow.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/RootWorkflow.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootWorkflowModel.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootWorkflowModel.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/RootWorkflowModel.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/RootWorkflowModel.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/UserName.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/UserName.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/UserName.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/UserName.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/WorkflowFactory.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/WorkflowFactory.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/WorkflowFactory.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/WorkflowFactory.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/GameKey.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/GameKey.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/GameKey.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/GameKey.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/GameProvider.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/GameProvider.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/GameProvider.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/GameProvider.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInActionableItem.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInActionableItem.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInActionableItem.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInActionableItem.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInBuilder.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInInteractor.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/LoggedInRouter.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/MutableScoreStream.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/ScoreStream.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/ScoreStream.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/ScoreStream.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/ScoreStream.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameBuilder.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameInteractor.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameRouter.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/offgame/OffGameView.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerBuilder.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerBuilder.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerBuilder.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerBuilder.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerInteractor.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerInteractor.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerInteractor.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerInteractor.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerRouter.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerRouter.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerRouter.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerRouter.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerView.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerView.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerView.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/randomWinner/RandomWinnerView.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/Board.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/BoardCoordinate.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeBuilder.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeInteractor.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeRouter.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedin/tictactoe/TicTacToeView.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutBuilder.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutInteractor.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutRouter.java diff --git a/android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java b/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java similarity index 100% rename from android/tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java rename to tutorials/tutorial4/src/main/java/com/uber/rib/root/loggedout/LoggedOutView.java diff --git a/android/tutorials/tutorial4/src/main/res/drawable-hdpi/ub__ic_launcher.png b/tutorials/tutorial4/src/main/res/drawable-hdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial4/src/main/res/drawable-hdpi/ub__ic_launcher.png rename to tutorials/tutorial4/src/main/res/drawable-hdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial4/src/main/res/drawable-mdpi/ub__ic_launcher.png b/tutorials/tutorial4/src/main/res/drawable-mdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial4/src/main/res/drawable-mdpi/ub__ic_launcher.png rename to tutorials/tutorial4/src/main/res/drawable-mdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial4/src/main/res/drawable-xhdpi/ub__ic_launcher.png b/tutorials/tutorial4/src/main/res/drawable-xhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial4/src/main/res/drawable-xhdpi/ub__ic_launcher.png rename to tutorials/tutorial4/src/main/res/drawable-xhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial4/src/main/res/drawable-xxhdpi/ub__ic_launcher.png b/tutorials/tutorial4/src/main/res/drawable-xxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial4/src/main/res/drawable-xxhdpi/ub__ic_launcher.png rename to tutorials/tutorial4/src/main/res/drawable-xxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial4/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png b/tutorials/tutorial4/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png similarity index 100% rename from android/tutorials/tutorial4/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png rename to tutorials/tutorial4/src/main/res/drawable-xxxhdpi/ub__ic_launcher.png diff --git a/android/tutorials/tutorial4/src/main/res/layout/game_button.xml b/tutorials/tutorial4/src/main/res/layout/game_button.xml similarity index 100% rename from android/tutorials/tutorial4/src/main/res/layout/game_button.xml rename to tutorials/tutorial4/src/main/res/layout/game_button.xml diff --git a/android/tutorials/tutorial4/src/main/res/layout/logged_out_rib.xml b/tutorials/tutorial4/src/main/res/layout/logged_out_rib.xml similarity index 100% rename from android/tutorials/tutorial4/src/main/res/layout/logged_out_rib.xml rename to tutorials/tutorial4/src/main/res/layout/logged_out_rib.xml diff --git a/android/tutorials/tutorial4/src/main/res/layout/off_game_rib.xml b/tutorials/tutorial4/src/main/res/layout/off_game_rib.xml similarity index 100% rename from android/tutorials/tutorial4/src/main/res/layout/off_game_rib.xml rename to tutorials/tutorial4/src/main/res/layout/off_game_rib.xml diff --git a/android/tutorials/tutorial4/src/main/res/layout/root_rib.xml b/tutorials/tutorial4/src/main/res/layout/root_rib.xml similarity index 100% rename from android/tutorials/tutorial4/src/main/res/layout/root_rib.xml rename to tutorials/tutorial4/src/main/res/layout/root_rib.xml diff --git a/android/tutorials/tutorial4/src/main/res/layout/tic_tac_toe_rib.xml b/tutorials/tutorial4/src/main/res/layout/tic_tac_toe_rib.xml similarity index 100% rename from android/tutorials/tutorial4/src/main/res/layout/tic_tac_toe_rib.xml rename to tutorials/tutorial4/src/main/res/layout/tic_tac_toe_rib.xml diff --git a/android/tutorials/tutorial4/src/main/res/values/ub__strings.xml b/tutorials/tutorial4/src/main/res/values/ub__strings.xml similarity index 100% rename from android/tutorials/tutorial4/src/main/res/values/ub__strings.xml rename to tutorials/tutorial4/src/main/res/values/ub__strings.xml