From 13e43d0f3a32930e8e2bda56d34e26e392cac50a Mon Sep 17 00:00:00 2001 From: Adam Share Date: Fri, 25 Sep 2020 12:00:31 -0300 Subject: [PATCH] tutorial migration to SPM --- ios/tutorials/tutorial1/Podfile | 10 - .../TicTacToe.xcodeproj/project.pbxproj | 147 +++++------ .../TicTacToe/LoggedOut/DELETE_ME.swift | 1 + ios/tutorials/tutorial2/Podfile | 14 - .../TicTacToe.xcodeproj/project.pbxproj | 245 ++++++++---------- .../TicTacToe/AppStart/AppDelegate.swift | 2 +- .../LoggedOut/LoggedOutViewController.swift | 4 +- .../tutorial2/TicTacToe/Root/RootRouter.swift | 1 + .../TicTacToe/TicTacToeViewController.swift | 2 +- ios/tutorials/tutorial3-completed/Podfile | 10 - .../TicTacToe.xcodeproj/project.pbxproj | 172 ++++++------ .../TicTacToe/AppStart/AppDelegate.swift | 2 +- .../TicTacToe/LoggedIn/LoggedInRouter.swift | 1 + .../LoggedOut/LoggedOutViewController.swift | 4 +- .../TicTacToe/Models/ScoreStream.swift | 10 +- .../TicTacToe/Root/RootRouter.swift | 1 + .../TicTacToe/TicTacToeViewController.swift | 2 +- ios/tutorials/tutorial3/Podfile | 10 - .../TicTacToe.xcodeproj/project.pbxproj | 160 ++++++------ .../TicTacToe/AppStart/AppDelegate.swift | 2 +- .../TicTacToe/LoggedIn/LoggedInRouter.swift | 1 + .../LoggedOut/LoggedOutViewController.swift | 4 +- .../TicTacToe/TicTacToeViewController.swift | 2 +- ios/tutorials/tutorial4-completed/Podfile | 10 - .../TicTacToe.xcodeproj/project.pbxproj | 160 ++++++------ .../TicTacToe/AppStart/AppDelegate.swift | 2 +- .../LoggedOut/LoggedOutViewController.swift | 4 +- .../TicTacToe/Models/ScoreStream.swift | 5 +- .../OffGame/OffGameViewController.swift | 2 +- .../TicTacToe/Promo/LaunchGameWorkflow.swift | 1 + .../RandomWin/RandomWinInteractor.swift | 1 + .../RandomWin/RandomWinViewController.swift | 2 +- .../TicTacToe/Root/RootInteractor.swift | 1 + .../TicTacToe/Root/RootViewController.swift | 1 + .../TicTacToe/TicTacToeViewController.swift | 2 +- ios/tutorials/tutorial4/Podfile | 10 - .../TicTacToe.xcodeproj/project.pbxproj | 160 ++++++------ .../TicTacToe/AppStart/AppDelegate.swift | 2 +- .../LoggedOut/LoggedOutViewController.swift | 4 +- .../TicTacToe/Models/ScoreStream.swift | 5 +- .../OffGame/OffGameViewController.swift | 2 +- .../tutorial4/TicTacToe/Promo/Stub.swift | 1 + .../RandomWin/RandomWinInteractor.swift | 1 + .../RandomWin/RandomWinViewController.swift | 2 +- .../TicTacToe/Root/RootViewController.swift | 1 + .../TicTacToe/TicTacToeViewController.swift | 2 +- 46 files changed, 574 insertions(+), 614 deletions(-) delete mode 100644 ios/tutorials/tutorial1/Podfile delete mode 100644 ios/tutorials/tutorial2/Podfile delete mode 100644 ios/tutorials/tutorial3-completed/Podfile delete mode 100644 ios/tutorials/tutorial3/Podfile delete mode 100644 ios/tutorials/tutorial4-completed/Podfile delete mode 100644 ios/tutorials/tutorial4/Podfile diff --git a/ios/tutorials/tutorial1/Podfile b/ios/tutorials/tutorial1/Podfile deleted file mode 100644 index 980817e94..000000000 --- a/ios/tutorials/tutorial1/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/tutorial1/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial1/TicTacToe.xcodeproj/project.pbxproj index 0c8b1ff37..9713235ab 100644 --- a/ios/tutorials/tutorial1/TicTacToe.xcodeproj/project.pbxproj +++ b/ios/tutorials/tutorial1/TicTacToe.xcodeproj/project.pbxproj @@ -3,12 +3,15 @@ archiveVersion = 1; classes = { }; - objectVersion = 48; + objectVersion = 52; 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 */; }; + E37156A32503ABBA00797747 /* RIBs in Frameworks */ = {isa = PBXBuildFile; productRef = E37156A22503ABBA00797747 /* RIBs */; }; + E3EB47DD2503A74F00B50167 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = E3EB47DC2503A74F00B50167 /* RxCocoa */; }; + E3EB47DF2503A74F00B50167 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E3EB47DE2503A74F00B50167 /* RxSwift */; }; + E3EB47E22503A7DC00B50167 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = E3EB47E12503A7DC00B50167 /* SnapKit */; }; 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 */; }; @@ -21,9 +24,7 @@ /* 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; }; + E37156A12503A8E100797747 /* RIBs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = RIBs; path = ../../..; 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 = ""; }; E9C3E1E91FA1BD0400781364 /* DELETE_ME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DELETE_ME.swift; sourceTree = ""; }; @@ -41,22 +42,16 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, + E37156A32503ABBA00797747 /* RIBs in Frameworks */, + E3EB47E22503A7DC00B50167 /* SnapKit in Frameworks */, + E3EB47DF2503A74F00B50167 /* RxSwift in Frameworks */, + E3EB47DD2503A74F00B50167 /* RxCocoa 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 = ( @@ -68,9 +63,9 @@ E9894B411F972CC500688FCB = { isa = PBXGroup; children = ( + E37156A12503A8E100797747 /* RIBs */, E9894B4C1F972CC500688FCB /* TicTacToe */, E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, F5205CCF508911BE388D8406 /* Frameworks */, ); sourceTree = ""; @@ -127,7 +122,6 @@ F5205CCF508911BE388D8406 /* Frameworks */ = { isa = PBXGroup; children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, ); name = Frameworks; sourceTree = ""; @@ -139,17 +133,21 @@ 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; + packageProductDependencies = ( + E3EB47DC2503A74F00B50167 /* RxCocoa */, + E3EB47DE2503A74F00B50167 /* RxSwift */, + E3EB47E12503A7DC00B50167 /* SnapKit */, + E37156A22503ABBA00797747 /* RIBs */, + ); productName = TicTacToe; productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; productType = "com.apple.product-type.application"; @@ -179,6 +177,10 @@ Base, ); mainGroup = E9894B411F972CC500688FCB; + packageReferences = ( + E3EB47DB2503A74F00B50167 /* XCRemoteSwiftPackageReference "RxSwift" */, + E3EB47E02503A7DC00B50167 /* XCRemoteSwiftPackageReference "SnapKit" */, + ); productRefGroup = E9894B4B1F972CC500688FCB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -199,53 +201,6 @@ }; /* 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; @@ -315,7 +270,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -369,10 +324,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; @@ -380,11 +336,13 @@ }; 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 4.0; @@ -394,11 +352,13 @@ }; 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 4.0; @@ -428,6 +388,47 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E3EB47DB2503A74F00B50167 /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.1.0; + }; + }; + E3EB47E02503A7DC00B50167 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + branch = develop; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E37156A22503ABBA00797747 /* RIBs */ = { + isa = XCSwiftPackageProductDependency; + productName = RIBs; + }; + E3EB47DC2503A74F00B50167 /* RxCocoa */ = { + isa = XCSwiftPackageProductDependency; + package = E3EB47DB2503A74F00B50167 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxCocoa; + }; + E3EB47DE2503A74F00B50167 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = E3EB47DB2503A74F00B50167 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + E3EB47E12503A7DC00B50167 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = E3EB47E02503A7DC00B50167 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = E9894B421F972CC500688FCB /* Project object */; } diff --git a/ios/tutorials/tutorial1/TicTacToe/LoggedOut/DELETE_ME.swift b/ios/tutorials/tutorial1/TicTacToe/LoggedOut/DELETE_ME.swift index 0aa439dc1..74a94487e 100644 --- a/ios/tutorials/tutorial1/TicTacToe/LoggedOut/DELETE_ME.swift +++ b/ios/tutorials/tutorial1/TicTacToe/LoggedOut/DELETE_ME.swift @@ -15,6 +15,7 @@ // import RIBs +import UIKit protocol LoggedOutDependency {} 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/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial2/TicTacToe.xcodeproj/project.pbxproj index 0f044421f..3f2108eed 100644 --- a/ios/tutorials/tutorial2/TicTacToe.xcodeproj/project.pbxproj +++ b/ios/tutorials/tutorial2/TicTacToe.xcodeproj/project.pbxproj @@ -3,13 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 48; + objectVersion = 52; 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 */; }; + E37156DA2503D8D900797747 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = E37156D92503D8D900797747 /* RxRelay */; }; + E37156DC2503D8D900797747 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E37156DB2503D8D900797747 /* RxSwift */; }; + E37156DE2503D8D900797747 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = E37156DD2503D8D900797747 /* RxCocoa */; }; + E37156E12503D8FB00797747 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = E37156E02503D8FB00797747 /* SnapKit */; }; + E37156E52503D92D00797747 /* RIBs in Frameworks */ = {isa = PBXBuildFile; productRef = E37156E42503D92D00797747 /* RIBs */; }; 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 */; }; @@ -41,13 +44,8 @@ /* 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; }; + E37156E22503D91F00797747 /* RIBs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = RIBs; path = ../../..; 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 = ""; }; E9C3E1EB1FA1BF9700781364 /* DELETE_ME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DELETE_ME.swift; sourceTree = ""; }; @@ -79,7 +77,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, + E37156E52503D92D00797747 /* RIBs in Frameworks */, + E37156DE2503D8D900797747 /* RxCocoa in Frameworks */, + E37156E12503D8FB00797747 /* SnapKit in Frameworks */, + E37156DC2503D8D900797747 /* RxSwift in Frameworks */, + E37156DA2503D8D900797747 /* RxRelay in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -87,40 +89,35 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 902781EB24A674D0368A3917 /* Pods_TicTacToeTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 59F943336420DE07CA779F6F /* Pods */ = { + 7EDD59511FA135E9005EC8B2 /* Resources */ = { isa = PBXGroup; children = ( - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */, - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */, - 125BC081886F3825A4B7C3E3 /* Pods-TicTacToeTests.debug.xcconfig */, - 1CC7657EC6690F406564B055 /* Pods-TicTacToeTests.release.xcconfig */, + 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, ); - name = Pods; + path = Resources; sourceTree = ""; }; - 7EDD59511FA135E9005EC8B2 /* Resources */ = { + E37156E32503D92D00797747 /* Frameworks */ = { isa = PBXGroup; children = ( - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, ); - path = Resources; + name = Frameworks; sourceTree = ""; }; E9894B411F972CC500688FCB = { isa = PBXGroup; children = ( + E37156E22503D91F00797747 /* RIBs */, E9894B4C1F972CC500688FCB /* TicTacToe */, E9C86D881FA3586500B61DF6 /* TicTacToeTests */, E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, - F5205CCF508911BE388D8406 /* Frameworks */, + E37156E32503D92D00797747 /* Frameworks */, ); sourceTree = ""; }; @@ -210,15 +207,6 @@ 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 */ @@ -226,17 +214,22 @@ 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; + packageProductDependencies = ( + E37156D92503D8D900797747 /* RxRelay */, + E37156DB2503D8D900797747 /* RxSwift */, + E37156DD2503D8D900797747 /* RxCocoa */, + E37156E02503D8FB00797747 /* SnapKit */, + E37156E42503D92D00797747 /* RIBs */, + ); productName = TicTacToe; productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; productType = "com.apple.product-type.application"; @@ -245,11 +238,9 @@ 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 = ( ); @@ -273,10 +264,12 @@ TargetAttributes = { E9894B491F972CC500688FCB = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; }; E9C86D861FA3586500B61DF6 = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; TestTargetID = E9894B491F972CC500688FCB; }; @@ -291,6 +284,10 @@ Base, ); mainGroup = E9894B411F972CC500688FCB; + packageReferences = ( + E37156D82503D8D900797747 /* XCRemoteSwiftPackageReference "RxSwift" */, + E37156DF2503D8FB00797747 /* XCRemoteSwiftPackageReference "SnapKit" */, + ); productRefGroup = E9894B4B1F972CC500688FCB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -319,93 +316,6 @@ }; /* 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; @@ -500,7 +410,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -554,10 +464,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; @@ -565,44 +476,51 @@ }; 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.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"; + IPHONEOS_DEPLOYMENT_TARGET = 13.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; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TicTacToe.app/TicTacToe"; }; @@ -610,16 +528,19 @@ }; 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"; + IPHONEOS_DEPLOYMENT_TARGET = 13.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; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TicTacToe.app/TicTacToe"; }; @@ -656,6 +577,52 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E37156D82503D8D900797747 /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.1.0; + }; + }; + E37156DF2503D8FB00797747 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + branch = develop; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E37156D92503D8D900797747 /* RxRelay */ = { + isa = XCSwiftPackageProductDependency; + package = E37156D82503D8D900797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxRelay; + }; + E37156DB2503D8D900797747 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = E37156D82503D8D900797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + E37156DD2503D8D900797747 /* RxCocoa */ = { + isa = XCSwiftPackageProductDependency; + package = E37156D82503D8D900797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxCocoa; + }; + E37156E02503D8FB00797747 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = E37156DF2503D8FB00797747 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; + E37156E42503D92D00797747 /* RIBs */ = { + isa = XCSwiftPackageProductDependency; + productName = RIBs; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = E9894B421F972CC500688FCB /* Project object */; } diff --git a/ios/tutorials/tutorial2/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial2/TicTacToe/AppStart/AppDelegate.swift index d0b07d283..1daf53272 100644 --- a/ios/tutorials/tutorial2/TicTacToe/AppStart/AppDelegate.swift +++ b/ios/tutorials/tutorial2/TicTacToe/AppStart/AppDelegate.swift @@ -32,7 +32,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { /// 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 { + public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let window = UIWindow(frame: UIScreen.main.bounds) self.window = window diff --git a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutViewController.swift index b8349272b..ff1439811 100644 --- a/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ b/ios/tutorials/tutorial2/TicTacToe/LoggedOut/LoggedOutViewController.swift @@ -48,7 +48,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line + player1Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player1Field) player1Field.placeholder = "Player 1 name" player1Field.snp.makeConstraints { (maker: ConstraintMaker) in @@ -58,7 +58,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log } let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line + player2Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player2Field) player2Field.placeholder = "Player 2 name" player2Field.snp.makeConstraints { (maker: ConstraintMaker) in diff --git a/ios/tutorials/tutorial2/TicTacToe/Root/RootRouter.swift b/ios/tutorials/tutorial2/TicTacToe/Root/RootRouter.swift index d1192bb63..24930773f 100644 --- a/ios/tutorials/tutorial2/TicTacToe/Root/RootRouter.swift +++ b/ios/tutorials/tutorial2/TicTacToe/Root/RootRouter.swift @@ -51,6 +51,7 @@ final class RootRouter: LaunchRouter, Ro let loggedOut = loggedOutBuilder.build(withListener: interactor) self.loggedOut = loggedOut attachChild(loggedOut) + loggedOut.viewControllable.uiviewController.modalPresentationStyle = .fullScreen viewController.present(viewController: loggedOut.viewControllable) } } diff --git a/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeViewController.swift index 10ea0260a..98ead225c 100644 --- a/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ b/ios/tutorials/tutorial2/TicTacToe/TicTacToe/TicTacToeViewController.swift @@ -68,7 +68,7 @@ final class TicTacToeViewController: UIViewController, TicTacToePresentable, Tic } }() let alert = UIAlertController(title: "\(winnerString) Won!", message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { [weak self] _ in + let closeAction = UIAlertAction(title: "Close Game", style: UIAlertAction.Style.default) { [weak self] _ in self?.listener?.closeGame() } alert.addAction(closeAction) 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/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial3-completed/TicTacToe.xcodeproj/project.pbxproj index b432bd0a6..0660c4993 100644 --- a/ios/tutorials/tutorial3-completed/TicTacToe.xcodeproj/project.pbxproj +++ b/ios/tutorials/tutorial3-completed/TicTacToe.xcodeproj/project.pbxproj @@ -3,12 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 48; + objectVersion = 52; 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 */; }; + E37156E82503DB6E00797747 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = E37156E72503DB6E00797747 /* SnapKit */; }; + E37156EB2503DBAA00797747 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = E37156EA2503DBAA00797747 /* RxRelay */; }; + E37156ED2503DBAA00797747 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E37156EC2503DBAA00797747 /* RxSwift */; }; + E37156EF2503DBAA00797747 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = E37156EE2503DBAA00797747 /* RxCocoa */; }; + E37156F32503DBC400797747 /* RIBs in Frameworks */ = {isa = PBXBuildFile; productRef = E37156F22503DBC400797747 /* RIBs */; }; 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 */; }; @@ -39,9 +43,7 @@ /* 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; }; + E37156F02503DBB200797747 /* RIBs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = RIBs; path = ../../..; 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 = ""; }; E9CB1D341F972FD500D84847 /* AppComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppComponent.swift; sourceTree = ""; }; @@ -77,37 +79,39 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, + E37156F32503DBC400797747 /* RIBs in Frameworks */, + E37156ED2503DBAA00797747 /* RxSwift in Frameworks */, + E37156EB2503DBAA00797747 /* RxRelay in Frameworks */, + E37156EF2503DBAA00797747 /* RxCocoa in Frameworks */, + E37156E82503DB6E00797747 /* SnapKit in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 59F943336420DE07CA779F6F /* Pods */ = { + 7EDD59511FA135E9005EC8B2 /* Resources */ = { isa = PBXGroup; children = ( - 833B15CABE3CBE09720A0409 /* Pods-TicTacToe.debug.xcconfig */, - A791EBDAD202886E66137B9C /* Pods-TicTacToe.release.xcconfig */, + 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, ); - name = Pods; + path = Resources; sourceTree = ""; }; - 7EDD59511FA135E9005EC8B2 /* Resources */ = { + E37156F12503DBC400797747 /* Frameworks */ = { isa = PBXGroup; children = ( - 7EDD594F1FA13579005EC8B2 /* Default-568h@2x.png */, ); - path = Resources; + name = Frameworks; sourceTree = ""; }; E9894B411F972CC500688FCB = { isa = PBXGroup; children = ( + E37156F02503DBB200797747 /* RIBs */, E9894B4C1F972CC500688FCB /* TicTacToe */, E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, - F5205CCF508911BE388D8406 /* Frameworks */, + E37156F12503DBC400797747 /* Frameworks */, ); sourceTree = ""; }; @@ -210,14 +214,6 @@ path = Models; sourceTree = ""; }; - F5205CCF508911BE388D8406 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -225,17 +221,22 @@ 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; + packageProductDependencies = ( + E37156E72503DB6E00797747 /* SnapKit */, + E37156EA2503DBAA00797747 /* RxRelay */, + E37156EC2503DBAA00797747 /* RxSwift */, + E37156EE2503DBAA00797747 /* RxCocoa */, + E37156F22503DBC400797747 /* RIBs */, + ); productName = TicTacToe; productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; productType = "com.apple.product-type.application"; @@ -252,6 +253,7 @@ TargetAttributes = { E9894B491F972CC500688FCB = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; }; }; @@ -265,6 +267,10 @@ Base, ); mainGroup = E9894B411F972CC500688FCB; + packageReferences = ( + E37156E62503DB6E00797747 /* XCRemoteSwiftPackageReference "SnapKit" */, + E37156E92503DBAA00797747 /* XCRemoteSwiftPackageReference "RxSwift" */, + ); productRefGroup = E9894B4B1F972CC500688FCB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -285,53 +291,6 @@ }; /* 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; @@ -419,7 +378,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -473,10 +432,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; @@ -484,28 +444,32 @@ }; 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -532,6 +496,52 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E37156E62503DB6E00797747 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + branch = develop; + kind = branch; + }; + }; + E37156E92503DBAA00797747 /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.1.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E37156E72503DB6E00797747 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = E37156E62503DB6E00797747 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; + E37156EA2503DBAA00797747 /* RxRelay */ = { + isa = XCSwiftPackageProductDependency; + package = E37156E92503DBAA00797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxRelay; + }; + E37156EC2503DBAA00797747 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = E37156E92503DBAA00797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + E37156EE2503DBAA00797747 /* RxCocoa */ = { + isa = XCSwiftPackageProductDependency; + package = E37156E92503DBAA00797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxCocoa; + }; + E37156F22503DBC400797747 /* RIBs */ = { + isa = XCSwiftPackageProductDependency; + productName = RIBs; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = E9894B421F972CC500688FCB /* Project object */; } diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppDelegate.swift index d0b07d283..1daf53272 100644 --- a/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppDelegate.swift +++ b/ios/tutorials/tutorial3-completed/TicTacToe/AppStart/AppDelegate.swift @@ -32,7 +32,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { /// 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 { + public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let window = UIWindow(frame: UIScreen.main.bounds) self.window = window diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInRouter.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInRouter.swift index 5dac47535..06344964c 100644 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInRouter.swift +++ b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedIn/LoggedInRouter.swift @@ -78,6 +78,7 @@ final class LoggedInRouter: Router, LoggedInRouting { let offGame = offGameBuilder.build(withListener: interactor) self.currentChild = offGame attachChild(offGame) + offGame.viewControllable.uiviewController.modalPresentationStyle = .fullScreen viewController.present(viewController: offGame.viewControllable) } diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift index b8349272b..ff1439811 100644 --- a/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ b/ios/tutorials/tutorial3-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift @@ -48,7 +48,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line + player1Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player1Field) player1Field.placeholder = "Player 1 name" player1Field.snp.makeConstraints { (maker: ConstraintMaker) in @@ -58,7 +58,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log } let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line + player2Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player2Field) player2Field.placeholder = "Player 2 name" player2Field.snp.makeConstraints { (maker: ConstraintMaker) in diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Models/ScoreStream.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Models/ScoreStream.swift index 73dfd350a..419af7e6b 100644 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Models/ScoreStream.swift +++ b/ios/tutorials/tutorial3-completed/TicTacToe/Models/ScoreStream.swift @@ -15,6 +15,7 @@ // import RxSwift +import RxRelay struct Score { let player1Score: Int @@ -53,10 +54,11 @@ class ScoreStreamImpl: MutableScoreStream { return Score(player1Score: currentScore.player1Score, player2Score: currentScore.player2Score + 1) } }() - variable.value = newScore + + variable.accept(newScore) } - + // MARK: - Private - - private let variable = Variable(Score(player1Score: 0, player2Score: 0)) + + private let variable = BehaviorRelay(value: Score(player1Score: 0, player2Score: 0)) } diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootRouter.swift b/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootRouter.swift index 1cbed145f..f2103696b 100644 --- a/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootRouter.swift +++ b/ios/tutorials/tutorial3-completed/TicTacToe/Root/RootRouter.swift @@ -67,6 +67,7 @@ final class RootRouter: LaunchRouter, Ro let loggedOut = loggedOutBuilder.build(withListener: interactor) self.loggedOut = loggedOut attachChild(loggedOut) + loggedOut.viewControllable.uiviewController.modalPresentationStyle = .fullScreen viewController.present(viewController: loggedOut.viewControllable) } } diff --git a/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift index b6bef305d..0b7f8ecda 100644 --- a/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ b/ios/tutorials/tutorial3-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift @@ -66,7 +66,7 @@ final class TicTacToeViewController: UIViewController, TicTacToePresentable, Tic } }() let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { _ in + let closeAction = UIAlertAction(title: "Close Game", style: UIAlertAction.Style.default) { _ in handler() } alert.addAction(closeAction) 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/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial3/TicTacToe.xcodeproj/project.pbxproj index 6e9d0e1f5..f04837697 100644 --- a/ios/tutorials/tutorial3/TicTacToe.xcodeproj/project.pbxproj +++ b/ios/tutorials/tutorial3/TicTacToe.xcodeproj/project.pbxproj @@ -3,12 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 48; + objectVersion = 52; 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 */; }; + E37156CD2503D70F00797747 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = E37156CC2503D70F00797747 /* SnapKit */; }; + E37156D02503D78A00797747 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = E37156CF2503D78A00797747 /* RxRelay */; }; + E37156D22503D78A00797747 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E37156D12503D78A00797747 /* RxSwift */; }; + E37156D42503D78A00797747 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = E37156D32503D78A00797747 /* RxCocoa */; }; + E37156D72503D7C100797747 /* RIBs in Frameworks */ = {isa = PBXBuildFile; productRef = E37156D62503D7C100797747 /* RIBs */; }; 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 */; }; @@ -38,9 +42,7 @@ /* 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; }; + E37156D52503D79900797747 /* RIBs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = RIBs; path = ../../..; 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 = ""; }; E9CB1D341F972FD500D84847 /* AppComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppComponent.swift; sourceTree = ""; }; @@ -75,22 +77,17 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, + E37156D72503D7C100797747 /* RIBs in Frameworks */, + E37156D22503D78A00797747 /* RxSwift in Frameworks */, + E37156D02503D78A00797747 /* RxRelay in Frameworks */, + E37156D42503D78A00797747 /* RxCocoa in Frameworks */, + E37156CD2503D70F00797747 /* SnapKit 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 = ( @@ -102,9 +99,9 @@ E9894B411F972CC500688FCB = { isa = PBXGroup; children = ( + E37156D52503D79900797747 /* RIBs */, E9894B4C1F972CC500688FCB /* TicTacToe */, E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, F5205CCF508911BE388D8406 /* Frameworks */, ); sourceTree = ""; @@ -202,7 +199,6 @@ F5205CCF508911BE388D8406 /* Frameworks */ = { isa = PBXGroup; children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, ); name = Frameworks; sourceTree = ""; @@ -214,17 +210,22 @@ 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; + packageProductDependencies = ( + E37156CC2503D70F00797747 /* SnapKit */, + E37156CF2503D78A00797747 /* RxRelay */, + E37156D12503D78A00797747 /* RxSwift */, + E37156D32503D78A00797747 /* RxCocoa */, + E37156D62503D7C100797747 /* RIBs */, + ); productName = TicTacToe; productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; productType = "com.apple.product-type.application"; @@ -241,6 +242,7 @@ TargetAttributes = { E9894B491F972CC500688FCB = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; }; }; @@ -254,6 +256,10 @@ Base, ); mainGroup = E9894B411F972CC500688FCB; + packageReferences = ( + E37156CB2503D70F00797747 /* XCRemoteSwiftPackageReference "SnapKit" */, + E37156CE2503D78A00797747 /* XCRemoteSwiftPackageReference "RxSwift" */, + ); productRefGroup = E9894B4B1F972CC500688FCB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -274,53 +280,6 @@ }; /* 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; @@ -407,7 +366,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -461,10 +420,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; @@ -472,28 +432,32 @@ }; 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -520,6 +484,52 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E37156CB2503D70F00797747 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + branch = develop; + kind = branch; + }; + }; + E37156CE2503D78A00797747 /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.1.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E37156CC2503D70F00797747 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = E37156CB2503D70F00797747 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; + E37156CF2503D78A00797747 /* RxRelay */ = { + isa = XCSwiftPackageProductDependency; + package = E37156CE2503D78A00797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxRelay; + }; + E37156D12503D78A00797747 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = E37156CE2503D78A00797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + E37156D32503D78A00797747 /* RxCocoa */ = { + isa = XCSwiftPackageProductDependency; + package = E37156CE2503D78A00797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxCocoa; + }; + E37156D62503D7C100797747 /* RIBs */ = { + isa = XCSwiftPackageProductDependency; + productName = RIBs; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = E9894B421F972CC500688FCB /* Project object */; } diff --git a/ios/tutorials/tutorial3/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial3/TicTacToe/AppStart/AppDelegate.swift index d0b07d283..1daf53272 100644 --- a/ios/tutorials/tutorial3/TicTacToe/AppStart/AppDelegate.swift +++ b/ios/tutorials/tutorial3/TicTacToe/AppStart/AppDelegate.swift @@ -32,7 +32,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { /// 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 { + public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let window = UIWindow(frame: UIScreen.main.bounds) self.window = window diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInRouter.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInRouter.swift index 5dac47535..06344964c 100644 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInRouter.swift +++ b/ios/tutorials/tutorial3/TicTacToe/LoggedIn/LoggedInRouter.swift @@ -78,6 +78,7 @@ final class LoggedInRouter: Router, LoggedInRouting { let offGame = offGameBuilder.build(withListener: interactor) self.currentChild = offGame attachChild(offGame) + offGame.viewControllable.uiviewController.modalPresentationStyle = .fullScreen viewController.present(viewController: offGame.viewControllable) } diff --git a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutViewController.swift index b8349272b..ff1439811 100644 --- a/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ b/ios/tutorials/tutorial3/TicTacToe/LoggedOut/LoggedOutViewController.swift @@ -48,7 +48,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line + player1Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player1Field) player1Field.placeholder = "Player 1 name" player1Field.snp.makeConstraints { (maker: ConstraintMaker) in @@ -58,7 +58,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log } let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line + player2Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player2Field) player2Field.placeholder = "Player 2 name" player2Field.snp.makeConstraints { (maker: ConstraintMaker) in diff --git a/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeViewController.swift index b64256238..d74026c79 100644 --- a/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ b/ios/tutorials/tutorial3/TicTacToe/TicTacToe/TicTacToeViewController.swift @@ -60,7 +60,7 @@ final class TicTacToeViewController: UIViewController, TicTacToePresentable, Tic } }() let alert = UIAlertController(title: "\(winnerString) Won!", message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { [weak self] _ in + let closeAction = UIAlertAction(title: "Close Game", style: UIAlertAction.Style.default) { [weak self] _ in self?.listener?.closeGame() } alert.addAction(closeAction) 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/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial4-completed/TicTacToe.xcodeproj/project.pbxproj index 9c9f2d5d8..03b156eb0 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe.xcodeproj/project.pbxproj +++ b/ios/tutorials/tutorial4-completed/TicTacToe.xcodeproj/project.pbxproj @@ -3,12 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 48; + objectVersion = 52; 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 */; }; + E37156A72503AC9400797747 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = E37156A62503AC9400797747 /* SnapKit */; }; + E37156B62503ADF200797747 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E37156B52503ADF200797747 /* RxSwift */; }; + E37156B82503ADF200797747 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = E37156B72503ADF200797747 /* RxRelay */; }; + E37156BA2503ADF200797747 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = E37156B92503ADF200797747 /* RxCocoa */; }; + E37156BD2503AE3700797747 /* RIBs in Frameworks */ = {isa = PBXBuildFile; productRef = E37156BC2503AE3700797747 /* RIBs */; }; 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 */; }; @@ -55,9 +59,7 @@ /* 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; }; + E37156BB2503AE2D00797747 /* RIBs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = RIBs; path = ../../..; sourceTree = ""; }; 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; }; @@ -109,22 +111,17 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, + E37156BD2503AE3700797747 /* RIBs in Frameworks */, + E37156B62503ADF200797747 /* RxSwift in Frameworks */, + E37156BA2503ADF200797747 /* RxCocoa in Frameworks */, + E37156B82503ADF200797747 /* RxRelay in Frameworks */, + E37156A72503AC9400797747 /* SnapKit 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 = ( @@ -136,9 +133,9 @@ E9894B411F972CC500688FCB = { isa = PBXGroup; children = ( + E37156BB2503AE2D00797747 /* RIBs */, E9894B4C1F972CC500688FCB /* TicTacToe */, E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, F5205CCF508911BE388D8406 /* Frameworks */, ); sourceTree = ""; @@ -293,7 +290,6 @@ F5205CCF508911BE388D8406 /* Frameworks */ = { isa = PBXGroup; children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, ); name = Frameworks; sourceTree = ""; @@ -305,17 +301,22 @@ 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; + packageProductDependencies = ( + E37156A62503AC9400797747 /* SnapKit */, + E37156B52503ADF200797747 /* RxSwift */, + E37156B72503ADF200797747 /* RxRelay */, + E37156B92503ADF200797747 /* RxCocoa */, + E37156BC2503AE3700797747 /* RIBs */, + ); productName = TicTacToe; productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; productType = "com.apple.product-type.application"; @@ -332,6 +333,7 @@ TargetAttributes = { E9894B491F972CC500688FCB = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; }; }; @@ -345,6 +347,10 @@ Base, ); mainGroup = E9894B411F972CC500688FCB; + packageReferences = ( + E37156A52503AC9400797747 /* XCRemoteSwiftPackageReference "SnapKit" */, + E37156B42503ADF200797747 /* XCRemoteSwiftPackageReference "RxSwift" */, + ); productRefGroup = E9894B4B1F972CC500688FCB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -365,53 +371,6 @@ }; /* 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; @@ -515,7 +474,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -569,10 +528,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; @@ -580,28 +540,32 @@ }; 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -628,6 +592,52 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E37156A52503AC9400797747 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + branch = develop; + kind = branch; + }; + }; + E37156B42503ADF200797747 /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.1.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E37156A62503AC9400797747 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = E37156A52503AC9400797747 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; + E37156B52503ADF200797747 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = E37156B42503ADF200797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + E37156B72503ADF200797747 /* RxRelay */ = { + isa = XCSwiftPackageProductDependency; + package = E37156B42503ADF200797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxRelay; + }; + E37156B92503ADF200797747 /* RxCocoa */ = { + isa = XCSwiftPackageProductDependency; + package = E37156B42503ADF200797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxCocoa; + }; + E37156BC2503AE3700797747 /* RIBs */ = { + isa = XCSwiftPackageProductDependency; + productName = RIBs; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = E9894B421F972CC500688FCB /* Project object */; } diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppDelegate.swift index 77d14e5a5..f72a656e9 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppDelegate.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/AppStart/AppDelegate.swift @@ -32,7 +32,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { /// 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 { + public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let window = UIWindow(frame: UIScreen.main.bounds) self.window = window diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift index b8349272b..ff1439811 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/LoggedOut/LoggedOutViewController.swift @@ -48,7 +48,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line + player1Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player1Field) player1Field.placeholder = "Player 1 name" player1Field.snp.makeConstraints { (maker: ConstraintMaker) in @@ -58,7 +58,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log } let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line + player2Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player2Field) player2Field.placeholder = "Player 2 name" player2Field.snp.makeConstraints { (maker: ConstraintMaker) in diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Models/ScoreStream.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Models/ScoreStream.swift index 66794483d..4b96785c4 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Models/ScoreStream.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/Models/ScoreStream.swift @@ -15,6 +15,7 @@ // import RxSwift +import RxRelay public struct Score { public let player1Score: Int @@ -55,10 +56,10 @@ public class ScoreStreamImpl: MutableScoreStream { return Score(player1Score: currentScore.player1Score, player2Score: currentScore.player2Score + 1) } }() - variable.value = newScore + variable.accept(newScore) } // MARK: - Private - private let variable = Variable(Score(player1Score: 0, player2Score: 0)) + private let variable = BehaviorRelay(value: Score(player1Score: 0, player2Score: 0)) } diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameViewController.swift index 286608d3c..6f5f9aaf0 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameViewController.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/OffGame/OffGameViewController.swift @@ -45,7 +45,7 @@ final class OffGameViewController: UIViewController, OffGamePresentable, OffGame } func show(scoreBoardView: ViewControllable) { - addChildViewController(scoreBoardView.uiviewController) + addChild(scoreBoardView.uiviewController) view.addSubview(scoreBoardView.uiviewController.view) scoreBoardView.uiviewController.view.snp.makeConstraints { (maker: ConstraintMaker) in maker.top.equalTo(self.view).offset(70) diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Promo/LaunchGameWorkflow.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Promo/LaunchGameWorkflow.swift index 986e2f8e0..229fc0acb 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Promo/LaunchGameWorkflow.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/Promo/LaunchGameWorkflow.swift @@ -14,6 +14,7 @@ // limitations under the License. // +import Foundation import RIBs import RxSwift diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinInteractor.swift index 318d0d851..0b1e39cc8 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinInteractor.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinInteractor.swift @@ -14,6 +14,7 @@ // limitations under the License. // +import Foundation import RIBs import RxSwift diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinViewController.swift index edf886fa4..28b2e84c5 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinViewController.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/RandomWin/RandomWinViewController.swift @@ -58,7 +58,7 @@ final class RandomWinViewController: UIViewController, RandomWinPresentable, Ran } }() let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "That was random...", style: UIAlertActionStyle.default) { _ in + let closeAction = UIAlertAction(title: "That was random...", style: UIAlertAction.Style.default) { _ in handler() } alert.addAction(closeAction) diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootInteractor.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootInteractor.swift index 23bab63cd..3800daa25 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootInteractor.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootInteractor.swift @@ -14,6 +14,7 @@ // limitations under the License. // +import Foundation import RIBs import RxSwift diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootViewController.swift index ad6643e7e..62a552194 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootViewController.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/Root/RootViewController.swift @@ -45,6 +45,7 @@ final class RootViewController: UIViewController, RootPresentable, RootViewContr // MARK: - RootViewControllable func replaceModal(viewController: ViewControllable?) { + viewController?.uiviewController.modalPresentationStyle = .fullScreen targetViewController = viewController guard !animationInProgress else { diff --git a/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift index b6bef305d..0b7f8ecda 100644 --- a/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ b/ios/tutorials/tutorial4-completed/TicTacToe/TicTacToe/TicTacToeViewController.swift @@ -66,7 +66,7 @@ final class TicTacToeViewController: UIViewController, TicTacToePresentable, Tic } }() let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { _ in + let closeAction = UIAlertAction(title: "Close Game", style: UIAlertAction.Style.default) { _ in handler() } alert.addAction(closeAction) 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/TicTacToe.xcodeproj/project.pbxproj b/ios/tutorials/tutorial4/TicTacToe.xcodeproj/project.pbxproj index 5de64de2b..5916455aa 100644 --- a/ios/tutorials/tutorial4/TicTacToe.xcodeproj/project.pbxproj +++ b/ios/tutorials/tutorial4/TicTacToe.xcodeproj/project.pbxproj @@ -3,12 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 48; + objectVersion = 52; 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 */; }; + E37156C12503B1A300797747 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E37156C02503B1A300797747 /* RxSwift */; }; + E37156C32503B1A300797747 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = E37156C22503B1A300797747 /* RxCocoa */; }; + E37156C52503B1A300797747 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = E37156C42503B1A300797747 /* RxRelay */; }; + E37156C82503B1DD00797747 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = E37156C72503B1DD00797747 /* SnapKit */; }; + E37156CA2503B1F800797747 /* RIBs in Frameworks */ = {isa = PBXBuildFile; productRef = E37156C92503B1F800797747 /* RIBs */; }; 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 */; }; @@ -54,9 +58,7 @@ /* 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; }; + E37156BE2503B15D00797747 /* RIBs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = RIBs; path = ../../..; 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 = ""; }; @@ -107,22 +109,17 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AEFA38604D7D1E4A08E9A7FA /* Pods_TicTacToe.framework in Frameworks */, + E37156CA2503B1F800797747 /* RIBs in Frameworks */, + E37156C52503B1A300797747 /* RxRelay in Frameworks */, + E37156C82503B1DD00797747 /* SnapKit in Frameworks */, + E37156C32503B1A300797747 /* RxCocoa in Frameworks */, + E37156C12503B1A300797747 /* RxSwift 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 = ( @@ -134,9 +131,9 @@ E9894B411F972CC500688FCB = { isa = PBXGroup; children = ( + E37156BE2503B15D00797747 /* RIBs */, E9894B4C1F972CC500688FCB /* TicTacToe */, E9894B4B1F972CC500688FCB /* Products */, - 59F943336420DE07CA779F6F /* Pods */, F5205CCF508911BE388D8406 /* Frameworks */, ); sourceTree = ""; @@ -290,7 +287,6 @@ F5205CCF508911BE388D8406 /* Frameworks */ = { isa = PBXGroup; children = ( - B99EABB5C8D25341027C05C5 /* Pods_TicTacToe.framework */, ); name = Frameworks; sourceTree = ""; @@ -302,17 +298,22 @@ 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; + packageProductDependencies = ( + E37156C02503B1A300797747 /* RxSwift */, + E37156C22503B1A300797747 /* RxCocoa */, + E37156C42503B1A300797747 /* RxRelay */, + E37156C72503B1DD00797747 /* SnapKit */, + E37156C92503B1F800797747 /* RIBs */, + ); productName = TicTacToe; productReference = E9894B4A1F972CC500688FCB /* TicTacToe.app */; productType = "com.apple.product-type.application"; @@ -329,6 +330,7 @@ TargetAttributes = { E9894B491F972CC500688FCB = { CreatedOnToolsVersion = 9.0; + LastSwiftMigration = 1150; ProvisioningStyle = Automatic; }; }; @@ -342,6 +344,10 @@ Base, ); mainGroup = E9894B411F972CC500688FCB; + packageReferences = ( + E37156BF2503B1A300797747 /* XCRemoteSwiftPackageReference "RxSwift" */, + E37156C62503B1DD00797747 /* XCRemoteSwiftPackageReference "SnapKit" */, + ); productRefGroup = E9894B4B1F972CC500688FCB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -362,53 +368,6 @@ }; /* 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; @@ -511,7 +470,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -565,10 +524,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; @@ -576,28 +536,32 @@ }; 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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.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"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.ubercab.TicTacToe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -624,6 +588,52 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + E37156BF2503B1A300797747 /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.1.0; + }; + }; + E37156C62503B1DD00797747 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + branch = develop; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E37156C02503B1A300797747 /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = E37156BF2503B1A300797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; + E37156C22503B1A300797747 /* RxCocoa */ = { + isa = XCSwiftPackageProductDependency; + package = E37156BF2503B1A300797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxCocoa; + }; + E37156C42503B1A300797747 /* RxRelay */ = { + isa = XCSwiftPackageProductDependency; + package = E37156BF2503B1A300797747 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxRelay; + }; + E37156C72503B1DD00797747 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = E37156C62503B1DD00797747 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; + E37156C92503B1F800797747 /* RIBs */ = { + isa = XCSwiftPackageProductDependency; + productName = RIBs; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = E9894B421F972CC500688FCB /* Project object */; } diff --git a/ios/tutorials/tutorial4/TicTacToe/AppStart/AppDelegate.swift b/ios/tutorials/tutorial4/TicTacToe/AppStart/AppDelegate.swift index d0b07d283..1daf53272 100644 --- a/ios/tutorials/tutorial4/TicTacToe/AppStart/AppDelegate.swift +++ b/ios/tutorials/tutorial4/TicTacToe/AppStart/AppDelegate.swift @@ -32,7 +32,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { /// 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 { + public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { let window = UIWindow(frame: UIScreen.main.bounds) self.window = window diff --git a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutViewController.swift b/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutViewController.swift index b8349272b..ff1439811 100644 --- a/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutViewController.swift +++ b/ios/tutorials/tutorial4/TicTacToe/LoggedOut/LoggedOutViewController.swift @@ -48,7 +48,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log private func buildPlayerFields() -> (player1Field: UITextField, player2Field: UITextField) { let player1Field = UITextField() - player1Field.borderStyle = UITextBorderStyle.line + player1Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player1Field) player1Field.placeholder = "Player 1 name" player1Field.snp.makeConstraints { (maker: ConstraintMaker) in @@ -58,7 +58,7 @@ final class LoggedOutViewController: UIViewController, LoggedOutPresentable, Log } let player2Field = UITextField() - player2Field.borderStyle = UITextBorderStyle.line + player2Field.borderStyle = UITextField.BorderStyle.line view.addSubview(player2Field) player2Field.placeholder = "Player 2 name" player2Field.snp.makeConstraints { (maker: ConstraintMaker) in diff --git a/ios/tutorials/tutorial4/TicTacToe/Models/ScoreStream.swift b/ios/tutorials/tutorial4/TicTacToe/Models/ScoreStream.swift index 66794483d..4b96785c4 100644 --- a/ios/tutorials/tutorial4/TicTacToe/Models/ScoreStream.swift +++ b/ios/tutorials/tutorial4/TicTacToe/Models/ScoreStream.swift @@ -15,6 +15,7 @@ // import RxSwift +import RxRelay public struct Score { public let player1Score: Int @@ -55,10 +56,10 @@ public class ScoreStreamImpl: MutableScoreStream { return Score(player1Score: currentScore.player1Score, player2Score: currentScore.player2Score + 1) } }() - variable.value = newScore + variable.accept(newScore) } // MARK: - Private - private let variable = Variable(Score(player1Score: 0, player2Score: 0)) + private let variable = BehaviorRelay(value: Score(player1Score: 0, player2Score: 0)) } diff --git a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameViewController.swift b/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameViewController.swift index 286608d3c..6f5f9aaf0 100644 --- a/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameViewController.swift +++ b/ios/tutorials/tutorial4/TicTacToe/OffGame/OffGameViewController.swift @@ -45,7 +45,7 @@ final class OffGameViewController: UIViewController, OffGamePresentable, OffGame } func show(scoreBoardView: ViewControllable) { - addChildViewController(scoreBoardView.uiviewController) + addChild(scoreBoardView.uiviewController) view.addSubview(scoreBoardView.uiviewController.view) scoreBoardView.uiviewController.view.snp.makeConstraints { (maker: ConstraintMaker) in maker.top.equalTo(self.view).offset(70) diff --git a/ios/tutorials/tutorial4/TicTacToe/Promo/Stub.swift b/ios/tutorials/tutorial4/TicTacToe/Promo/Stub.swift index f58e104ae..30106250d 100644 --- a/ios/tutorials/tutorial4/TicTacToe/Promo/Stub.swift +++ b/ios/tutorials/tutorial4/TicTacToe/Promo/Stub.swift @@ -14,6 +14,7 @@ // limitations under the License. // +import Foundation import RIBs public class LaunchGameWorkflow: Workflow { diff --git a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinInteractor.swift b/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinInteractor.swift index 318d0d851..0b1e39cc8 100644 --- a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinInteractor.swift +++ b/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinInteractor.swift @@ -14,6 +14,7 @@ // limitations under the License. // +import Foundation import RIBs import RxSwift diff --git a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinViewController.swift b/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinViewController.swift index edf886fa4..28b2e84c5 100644 --- a/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinViewController.swift +++ b/ios/tutorials/tutorial4/TicTacToe/RandomWin/RandomWinViewController.swift @@ -58,7 +58,7 @@ final class RandomWinViewController: UIViewController, RandomWinPresentable, Ran } }() let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "That was random...", style: UIAlertActionStyle.default) { _ in + let closeAction = UIAlertAction(title: "That was random...", style: UIAlertAction.Style.default) { _ in handler() } alert.addAction(closeAction) diff --git a/ios/tutorials/tutorial4/TicTacToe/Root/RootViewController.swift b/ios/tutorials/tutorial4/TicTacToe/Root/RootViewController.swift index ad6643e7e..62a552194 100644 --- a/ios/tutorials/tutorial4/TicTacToe/Root/RootViewController.swift +++ b/ios/tutorials/tutorial4/TicTacToe/Root/RootViewController.swift @@ -45,6 +45,7 @@ final class RootViewController: UIViewController, RootPresentable, RootViewContr // MARK: - RootViewControllable func replaceModal(viewController: ViewControllable?) { + viewController?.uiviewController.modalPresentationStyle = .fullScreen targetViewController = viewController guard !animationInProgress else { diff --git a/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeViewController.swift b/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeViewController.swift index b6bef305d..0b7f8ecda 100644 --- a/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeViewController.swift +++ b/ios/tutorials/tutorial4/TicTacToe/TicTacToe/TicTacToeViewController.swift @@ -66,7 +66,7 @@ final class TicTacToeViewController: UIViewController, TicTacToePresentable, Tic } }() let alert = UIAlertController(title: winnerString, message: nil, preferredStyle: .alert) - let closeAction = UIAlertAction(title: "Close Game", style: UIAlertActionStyle.default) { _ in + let closeAction = UIAlertAction(title: "Close Game", style: UIAlertAction.Style.default) { _ in handler() } alert.addAction(closeAction)