From 9da698cdcdc6f95b5f3d97c86edf24917b95c4f3 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Fri, 15 Jun 2018 16:05:27 -0700 Subject: [PATCH 1/2] Move existing Sample into MVC folder This is in preparation to merge in the pluginized version of sample from needle-extension. --- Sample/Cartfile.resolved | 3 --- Sample/{ => MVC}/Cartfile | 0 Sample/{ => MVC}/TicTacToe/Sources/AppDelegate.swift | 0 .../Sources/Assets.xcassets/AppIcon.appiconset/Contents.json | 0 .../{ => MVC}/TicTacToe/Sources/Assets.xcassets/Contents.json | 0 .../TicTacToe/Sources/Base.lproj/LaunchScreen.storyboard | 0 Sample/{ => MVC}/TicTacToe/Sources/Game/GameComponent.swift | 0 .../{ => MVC}/TicTacToe/Sources/Game/GameViewController.swift | 0 Sample/{ => MVC}/TicTacToe/Sources/Info.plist | 0 .../TicTacToe/Sources/LoggedIn/LoggedInComponent.swift | 0 .../TicTacToe/Sources/LoggedIn/LoggedInViewController.swift | 0 Sample/{ => MVC}/TicTacToe/Sources/LoggedIn/ScoreStream.swift | 0 .../TicTacToe/Sources/LoggedOut/LoggedOutComponent.swift | 0 .../TicTacToe/Sources/LoggedOut/LoggedOutViewController.swift | 0 Sample/{ => MVC}/TicTacToe/Sources/NeedleGenerated.swift | 0 Sample/{ => MVC}/TicTacToe/Sources/Root/PlayersStream.swift | 0 Sample/{ => MVC}/TicTacToe/Sources/Root/RootComponent.swift | 0 .../{ => MVC}/TicTacToe/Sources/Root/RootViewController.swift | 0 .../TicTacToe/Sources/ScoreSheet/ScoreSheetComponent.swift | 0 .../Sources/ScoreSheet/ScoreSheetViewController.swift | 0 Sample/{ => MVC}/TicTacToe/Tests/Info.plist | 0 .../{ => MVC}/TicTacToe/Tests/RootViewControllerTests.swift | 0 .../{ => MVC}/TicTacToe/TicTacToe.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 Sample/README.md | 4 +++- 27 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 Sample/Cartfile.resolved rename Sample/{ => MVC}/Cartfile (100%) rename Sample/{ => MVC}/TicTacToe/Sources/AppDelegate.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Assets.xcassets/Contents.json (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Base.lproj/LaunchScreen.storyboard (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Game/GameComponent.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Game/GameViewController.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Info.plist (100%) rename Sample/{ => MVC}/TicTacToe/Sources/LoggedIn/LoggedInComponent.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/LoggedIn/LoggedInViewController.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/LoggedIn/ScoreStream.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/LoggedOut/LoggedOutComponent.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/LoggedOut/LoggedOutViewController.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/NeedleGenerated.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Root/PlayersStream.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Root/RootComponent.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/Root/RootViewController.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/ScoreSheet/ScoreSheetComponent.swift (100%) rename Sample/{ => MVC}/TicTacToe/Sources/ScoreSheet/ScoreSheetViewController.swift (100%) rename Sample/{ => MVC}/TicTacToe/Tests/Info.plist (100%) rename Sample/{ => MVC}/TicTacToe/Tests/RootViewControllerTests.swift (100%) rename Sample/{ => MVC}/TicTacToe/TicTacToe.xcodeproj/project.pbxproj (100%) rename Sample/{ => MVC}/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename Sample/{ => MVC}/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename Sample/{ => MVC}/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) diff --git a/Sample/Cartfile.resolved b/Sample/Cartfile.resolved deleted file mode 100644 index 1eeb7676..00000000 --- a/Sample/Cartfile.resolved +++ /dev/null @@ -1,3 +0,0 @@ -github "ReactiveX/RxSwift" "4.1.2" -github "SnapKit/SnapKit" "4.0.0" -github "uber/needle" "v0.4.0" diff --git a/Sample/Cartfile b/Sample/MVC/Cartfile similarity index 100% rename from Sample/Cartfile rename to Sample/MVC/Cartfile diff --git a/Sample/TicTacToe/Sources/AppDelegate.swift b/Sample/MVC/TicTacToe/Sources/AppDelegate.swift similarity index 100% rename from Sample/TicTacToe/Sources/AppDelegate.swift rename to Sample/MVC/TicTacToe/Sources/AppDelegate.swift diff --git a/Sample/TicTacToe/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sample/MVC/TicTacToe/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Sample/TicTacToe/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Sample/MVC/TicTacToe/Sources/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Sample/TicTacToe/Sources/Assets.xcassets/Contents.json b/Sample/MVC/TicTacToe/Sources/Assets.xcassets/Contents.json similarity index 100% rename from Sample/TicTacToe/Sources/Assets.xcassets/Contents.json rename to Sample/MVC/TicTacToe/Sources/Assets.xcassets/Contents.json diff --git a/Sample/TicTacToe/Sources/Base.lproj/LaunchScreen.storyboard b/Sample/MVC/TicTacToe/Sources/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Sample/TicTacToe/Sources/Base.lproj/LaunchScreen.storyboard rename to Sample/MVC/TicTacToe/Sources/Base.lproj/LaunchScreen.storyboard diff --git a/Sample/TicTacToe/Sources/Game/GameComponent.swift b/Sample/MVC/TicTacToe/Sources/Game/GameComponent.swift similarity index 100% rename from Sample/TicTacToe/Sources/Game/GameComponent.swift rename to Sample/MVC/TicTacToe/Sources/Game/GameComponent.swift diff --git a/Sample/TicTacToe/Sources/Game/GameViewController.swift b/Sample/MVC/TicTacToe/Sources/Game/GameViewController.swift similarity index 100% rename from Sample/TicTacToe/Sources/Game/GameViewController.swift rename to Sample/MVC/TicTacToe/Sources/Game/GameViewController.swift diff --git a/Sample/TicTacToe/Sources/Info.plist b/Sample/MVC/TicTacToe/Sources/Info.plist similarity index 100% rename from Sample/TicTacToe/Sources/Info.plist rename to Sample/MVC/TicTacToe/Sources/Info.plist diff --git a/Sample/TicTacToe/Sources/LoggedIn/LoggedInComponent.swift b/Sample/MVC/TicTacToe/Sources/LoggedIn/LoggedInComponent.swift similarity index 100% rename from Sample/TicTacToe/Sources/LoggedIn/LoggedInComponent.swift rename to Sample/MVC/TicTacToe/Sources/LoggedIn/LoggedInComponent.swift diff --git a/Sample/TicTacToe/Sources/LoggedIn/LoggedInViewController.swift b/Sample/MVC/TicTacToe/Sources/LoggedIn/LoggedInViewController.swift similarity index 100% rename from Sample/TicTacToe/Sources/LoggedIn/LoggedInViewController.swift rename to Sample/MVC/TicTacToe/Sources/LoggedIn/LoggedInViewController.swift diff --git a/Sample/TicTacToe/Sources/LoggedIn/ScoreStream.swift b/Sample/MVC/TicTacToe/Sources/LoggedIn/ScoreStream.swift similarity index 100% rename from Sample/TicTacToe/Sources/LoggedIn/ScoreStream.swift rename to Sample/MVC/TicTacToe/Sources/LoggedIn/ScoreStream.swift diff --git a/Sample/TicTacToe/Sources/LoggedOut/LoggedOutComponent.swift b/Sample/MVC/TicTacToe/Sources/LoggedOut/LoggedOutComponent.swift similarity index 100% rename from Sample/TicTacToe/Sources/LoggedOut/LoggedOutComponent.swift rename to Sample/MVC/TicTacToe/Sources/LoggedOut/LoggedOutComponent.swift diff --git a/Sample/TicTacToe/Sources/LoggedOut/LoggedOutViewController.swift b/Sample/MVC/TicTacToe/Sources/LoggedOut/LoggedOutViewController.swift similarity index 100% rename from Sample/TicTacToe/Sources/LoggedOut/LoggedOutViewController.swift rename to Sample/MVC/TicTacToe/Sources/LoggedOut/LoggedOutViewController.swift diff --git a/Sample/TicTacToe/Sources/NeedleGenerated.swift b/Sample/MVC/TicTacToe/Sources/NeedleGenerated.swift similarity index 100% rename from Sample/TicTacToe/Sources/NeedleGenerated.swift rename to Sample/MVC/TicTacToe/Sources/NeedleGenerated.swift diff --git a/Sample/TicTacToe/Sources/Root/PlayersStream.swift b/Sample/MVC/TicTacToe/Sources/Root/PlayersStream.swift similarity index 100% rename from Sample/TicTacToe/Sources/Root/PlayersStream.swift rename to Sample/MVC/TicTacToe/Sources/Root/PlayersStream.swift diff --git a/Sample/TicTacToe/Sources/Root/RootComponent.swift b/Sample/MVC/TicTacToe/Sources/Root/RootComponent.swift similarity index 100% rename from Sample/TicTacToe/Sources/Root/RootComponent.swift rename to Sample/MVC/TicTacToe/Sources/Root/RootComponent.swift diff --git a/Sample/TicTacToe/Sources/Root/RootViewController.swift b/Sample/MVC/TicTacToe/Sources/Root/RootViewController.swift similarity index 100% rename from Sample/TicTacToe/Sources/Root/RootViewController.swift rename to Sample/MVC/TicTacToe/Sources/Root/RootViewController.swift diff --git a/Sample/TicTacToe/Sources/ScoreSheet/ScoreSheetComponent.swift b/Sample/MVC/TicTacToe/Sources/ScoreSheet/ScoreSheetComponent.swift similarity index 100% rename from Sample/TicTacToe/Sources/ScoreSheet/ScoreSheetComponent.swift rename to Sample/MVC/TicTacToe/Sources/ScoreSheet/ScoreSheetComponent.swift diff --git a/Sample/TicTacToe/Sources/ScoreSheet/ScoreSheetViewController.swift b/Sample/MVC/TicTacToe/Sources/ScoreSheet/ScoreSheetViewController.swift similarity index 100% rename from Sample/TicTacToe/Sources/ScoreSheet/ScoreSheetViewController.swift rename to Sample/MVC/TicTacToe/Sources/ScoreSheet/ScoreSheetViewController.swift diff --git a/Sample/TicTacToe/Tests/Info.plist b/Sample/MVC/TicTacToe/Tests/Info.plist similarity index 100% rename from Sample/TicTacToe/Tests/Info.plist rename to Sample/MVC/TicTacToe/Tests/Info.plist diff --git a/Sample/TicTacToe/Tests/RootViewControllerTests.swift b/Sample/MVC/TicTacToe/Tests/RootViewControllerTests.swift similarity index 100% rename from Sample/TicTacToe/Tests/RootViewControllerTests.swift rename to Sample/MVC/TicTacToe/Tests/RootViewControllerTests.swift diff --git a/Sample/TicTacToe/TicTacToe.xcodeproj/project.pbxproj b/Sample/MVC/TicTacToe/TicTacToe.xcodeproj/project.pbxproj similarity index 100% rename from Sample/TicTacToe/TicTacToe.xcodeproj/project.pbxproj rename to Sample/MVC/TicTacToe/TicTacToe.xcodeproj/project.pbxproj diff --git a/Sample/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sample/MVC/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Sample/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Sample/MVC/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Sample/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sample/MVC/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Sample/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Sample/MVC/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Sample/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Sample/MVC/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from Sample/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to Sample/MVC/TicTacToe/TicTacToe.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/Sample/README.md b/Sample/README.md index 4c2340cb..5b73d09b 100644 --- a/Sample/README.md +++ b/Sample/README.md @@ -1,11 +1,13 @@ # Sample App Using Needle +The folder "MVC" contains the simple MVC architecture based TicTacToe app. The folder "Pluginized" contains the same TicTacToe app but built with a pluginized DI structure where the dependencies are divided into separate core and non-core trees. + ## Build & Run TicTacToe Make sure [Carthage](https://github.com/Carthage/Carthage) is installed. ``` -$ carthage bootstrap --platform ios +$ carthage update --platform ios ``` Open the TicTacToe.xcodeproj to build and run the game. From 6b50ce0d173484404f3df93ba128a7c0c77cbe58 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Fri, 15 Jun 2018 16:12:48 -0700 Subject: [PATCH 2/2] Update Carthage and add gitignore files --- Sample/{ => MVC}/.gitignore | 0 Sample/MVC/Cartfile | 2 +- Sample/MVC/Cartfile.resolved | 3 +++ Sample/Pluginized/.gitignore | 4 ++++ 4 files changed, 8 insertions(+), 1 deletion(-) rename Sample/{ => MVC}/.gitignore (100%) create mode 100644 Sample/MVC/Cartfile.resolved create mode 100644 Sample/Pluginized/.gitignore diff --git a/Sample/.gitignore b/Sample/MVC/.gitignore similarity index 100% rename from Sample/.gitignore rename to Sample/MVC/.gitignore diff --git a/Sample/MVC/Cartfile b/Sample/MVC/Cartfile index 0448e9ad..5ba94d46 100644 --- a/Sample/MVC/Cartfile +++ b/Sample/MVC/Cartfile @@ -1,3 +1,3 @@ -github "https://github.com/uber/needle.git" ~> 0.4 +github "https://github.com/uber/needle.git" ~> 0.5 github "https://github.com/ReactiveX/RxSwift.git" ~> 4.0 github "https://github.com/SnapKit/SnapKit.git" ~> 4.0 diff --git a/Sample/MVC/Cartfile.resolved b/Sample/MVC/Cartfile.resolved new file mode 100644 index 00000000..ca76ff1f --- /dev/null +++ b/Sample/MVC/Cartfile.resolved @@ -0,0 +1,3 @@ +github "ReactiveX/RxSwift" "4.2.0" +github "SnapKit/SnapKit" "4.0.0" +github "uber/needle" "v0.5.2" diff --git a/Sample/Pluginized/.gitignore b/Sample/Pluginized/.gitignore new file mode 100644 index 00000000..f3917ea9 --- /dev/null +++ b/Sample/Pluginized/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +/.build +/Packages +/Carthage