Skip to content
This repository was archived by the owner on Jan 30, 2021. It is now read-only.
Closed
1 change: 1 addition & 0 deletions PRODUCTNAME/app/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ excluded:
- Pods
- PRODUCTNAME/Resources/Generated
- Screenshots/Helpers/SnapshotHelper.swift
- Services/Resources/Generated
82 changes: 64 additions & 18 deletions PRODUCTNAME/app/PRODUCTNAME.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
0055142620615F9D00E4CF68 /* Storyboards.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0055142520615F9C00E4CF68 /* Storyboards.swift */; };
006EFEF61F264204004A95DE /* TestClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 006EFEF51F264204004A95DE /* TestClient.swift */; };
209BE2512051C768004CF0FF /* Actionable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209BE2502051C768004CF0FF /* Actionable.swift */; };
209BE2562051C90C004CF0FF /* actionable.swifttemplate in Resources */ = {isa = PBXBuildFile; fileRef = 209BE2552051C90C004CF0FF /* actionable.swifttemplate */; };
209BE2592051CB4B004CF0FF /* Actionable+AutoConformance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209BE2582051CB4B004CF0FF /* Actionable+AutoConformance.swift */; };
2D1D91A520C06930007D7808 /* Actionable.swifttemplate in Resources */ = {isa = PBXBuildFile; fileRef = 2DE7DAAA20B4686000CB51F2 /* Actionable.swifttemplate */; };
2D1D91A620C06932007D7808 /* Actionable+Helpers.swifttemplate in Resources */ = {isa = PBXBuildFile; fileRef = 2DE7DAAC20B4687F00CB51F2 /* Actionable+Helpers.swifttemplate */; };
2D4FA8F51E8574F9006C38ED /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4FA8F41E8574F9006C38ED /* AppCoordinator.swift */; };
2D4FA8F71E85752B006C38ED /* Coordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4FA8F61E85752B006C38ED /* Coordinator.swift */; };
2D75C6C71E8EEAE900F2EB1D /* OnboardingCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DFF1CEC1E8944B900B1AD70 /* OnboardingCoordinator.swift */; };
2D75C6C81E8EEB1900F2EB1D /* AuthCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D4FA8F81E8577B5006C38ED /* AuthCoordinator.swift */; };
2DAB59F81E95336100310ABF /* OnboardingSamplePageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DAB59F71E95336100310ABF /* OnboardingSamplePageViewModel.swift */; };
2DE7DAA920B4684500CB51F2 /* Actionable+AutoConformance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DE7DAA820B4684500CB51F2 /* Actionable+AutoConformance.swift */; };
2DE7DAAB20B4686000CB51F2 /* Actionable.swifttemplate in Resources */ = {isa = PBXBuildFile; fileRef = 2DE7DAAA20B4686000CB51F2 /* Actionable.swifttemplate */; };
2DE7DAAD20B4687F00CB51F2 /* Actionable+Helpers.swifttemplate in Resources */ = {isa = PBXBuildFile; fileRef = 2DE7DAAC20B4687F00CB51F2 /* Actionable+Helpers.swifttemplate */; };
2DE7DAB220B4692300CB51F2 /* Actionable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DE7DAB120B4692300CB51F2 /* Actionable.swift */; };
2DFF1CEF1E89493300B1AD70 /* SignInCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DFF1CEE1E89493300B1AD70 /* SignInCoordinator.swift */; };
2DFF1CF11E8950F000B1AD70 /* ContentCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DFF1CF01E8950F000B1AD70 /* ContentCoordinator.swift */; };
2DFF1D121E8BE27B00B1AD70 /* OnboardingPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DFF1D111E8BE27B00B1AD70 /* OnboardingPageViewController.swift */; };
Expand Down Expand Up @@ -140,12 +145,15 @@
18117B6A27EAD54897E61F7E /* Pods-PRODUCTNAME-PRODUCTNAMETests.develop.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PRODUCTNAME-PRODUCTNAMETests.develop.xcconfig"; path = "Pods/Target Support Files/Pods-PRODUCTNAME-PRODUCTNAMETests/Pods-PRODUCTNAME-PRODUCTNAMETests.develop.xcconfig"; sourceTree = "<group>"; };
1FE712F80AD5930EEAA24325 /* Pods-Services.appstore.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Services.appstore.xcconfig"; path = "Pods/Target Support Files/Pods-Services/Pods-Services.appstore.xcconfig"; sourceTree = "<group>"; };
209BE2502051C768004CF0FF /* Actionable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Actionable.swift; sourceTree = "<group>"; };
209BE2552051C90C004CF0FF /* actionable.swifttemplate */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = actionable.swifttemplate; sourceTree = "<group>"; };
209BE2582051CB4B004CF0FF /* Actionable+AutoConformance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Actionable+AutoConformance.swift"; sourceTree = "<group>"; };
2D4FA8F41E8574F9006C38ED /* AppCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = "<group>"; };
2D4FA8F61E85752B006C38ED /* Coordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Coordinator.swift; sourceTree = "<group>"; };
2D4FA8F81E8577B5006C38ED /* AuthCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthCoordinator.swift; sourceTree = "<group>"; };
2DAB59F71E95336100310ABF /* OnboardingSamplePageViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnboardingSamplePageViewModel.swift; sourceTree = "<group>"; };
2DE7DAA820B4684500CB51F2 /* Actionable+AutoConformance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Actionable+AutoConformance.swift"; sourceTree = "<group>"; };
2DE7DAAA20B4686000CB51F2 /* Actionable.swifttemplate */ = {isa = PBXFileReference; lastKnownFileType = text; path = Actionable.swifttemplate; sourceTree = "<group>"; };
2DE7DAAC20B4687F00CB51F2 /* Actionable+Helpers.swifttemplate */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Actionable+Helpers.swifttemplate"; sourceTree = "<group>"; };
2DE7DAB120B4692300CB51F2 /* Actionable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Actionable.swift; sourceTree = "<group>"; };
2DFF1CEC1E8944B900B1AD70 /* OnboardingCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnboardingCoordinator.swift; sourceTree = "<group>"; };
2DFF1CEE1E89493300B1AD70 /* SignInCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignInCoordinator.swift; sourceTree = "<group>"; };
2DFF1CF01E8950F000B1AD70 /* ContentCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentCoordinator.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -234,7 +242,7 @@
CD09C93B20741945006D3501 /* Screenshots.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Screenshots.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
CD09C93D20741945006D3501 /* Screenshots.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Screenshots.swift; sourceTree = "<group>"; };
CD09C93F20741945006D3501 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CD09C94920741B24006D3501 /* SnapshotHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SnapshotHelper.swift; path = SnapshotHelper.swift; sourceTree = "<group>"; };
CD09C94920741B24006D3501 /* SnapshotHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SnapshotHelper.swift; sourceTree = "<group>"; };
CD09C94C207428AE006D3501 /* StatusBarConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusBarConfiguration.swift; sourceTree = "<group>"; };
D7F90A3B2F8D15AE9564FF78 /* Pods-Services.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Services.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Services/Pods-Services.debug.xcconfig"; sourceTree = "<group>"; };
DCD1E696B5452D855D78934E /* Pods-PRODUCTNAME.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PRODUCTNAME.release.xcconfig"; path = "Pods/Target Support Files/Pods-PRODUCTNAME/Pods-PRODUCTNAME.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -284,14 +292,6 @@
path = Protocols;
sourceTree = "<group>";
};
209BE2522051C7BB004CF0FF /* Sourcery */ = {
isa = PBXGroup;
children = (
209BE2552051C90C004CF0FF /* actionable.swifttemplate */,
);
path = Sourcery;
sourceTree = "<group>";
};
2D4FA8F31E8574D2006C38ED /* Coordinators */ = {
isa = PBXGroup;
children = (
Expand All @@ -305,6 +305,33 @@
path = Coordinators;
sourceTree = "<group>";
};
2DE7DAA620B4682D00CB51F2 /* Resources */ = {
isa = PBXGroup;
children = (
2DE7DAA720B4683200CB51F2 /* Generated */,
2DE7DAB020B468EB00CB51F2 /* Sourcery */,
2DE7DAB120B4692300CB51F2 /* Actionable.swift */,
);
path = Resources;
sourceTree = "<group>";
};
2DE7DAA720B4683200CB51F2 /* Generated */ = {
isa = PBXGroup;
children = (
2DE7DAA820B4684500CB51F2 /* Actionable+AutoConformance.swift */,
);
path = Generated;
sourceTree = "<group>";
};
2DE7DAB020B468EB00CB51F2 /* Sourcery */ = {
isa = PBXGroup;
children = (
2DE7DAAA20B4686000CB51F2 /* Actionable.swifttemplate */,
2DE7DAAC20B4687F00CB51F2 /* Actionable+Helpers.swifttemplate */,
);
path = Sourcery;
sourceTree = "<group>";
};
2DFF1D131E8BE3D400B1AD70 /* Onboarding */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -409,6 +436,7 @@
86A65AEF1FA0EA2400705C14 /* Services */ = {
isa = PBXGroup;
children = (
2DE7DAA620B4682D00CB51F2 /* Resources */,
86A65AFC1FA0EB0600705C14 /* API */,
86A65B131FA0F22B00705C14 /* Utilities */,
86A65B1C1FA0F2C900705C14 /* BuildType.swift */,
Expand Down Expand Up @@ -529,7 +557,6 @@
isa = PBXGroup;
children = (
ABF84F8E1DC99D33002DB24D /* Generated */,
209BE2522051C7BB004CF0FF /* Sourcery */,
ABC778CD1DC92BC200815FB9 /* xcconfig */,
ABC778DC1DC94EE500815FB9 /* Acknowledgements.plist */,
ABC7787F1DC90B7A00815FB9 /* Assets.xcassets */,
Expand Down Expand Up @@ -643,7 +670,6 @@
children = (
CD09C94920741B24006D3501 /* SnapshotHelper.swift */,
);
name = Helpers;
path = Helpers;
sourceTree = "<group>";
};
Expand All @@ -666,6 +692,7 @@
buildConfigurationList = 86A65AFB1FA0EA2400705C14 /* Build configuration list for PBXNativeTarget "Services" */;
buildPhases = (
E170C8E4C57A8FB937004E8C /* [CP] Check Pods Manifest.lock */,
2DE7DAAE20B4689C00CB51F2 /* Sourcery (Actionable) */,
86A65AE91FA0EA2400705C14 /* Sources */,
86A65AEA1FA0EA2400705C14 /* Frameworks */,
86A65AEB1FA0EA2400705C14 /* Headers */,
Expand All @@ -687,7 +714,7 @@
5BD18785D9BC5E2781EBCD52 /* [CP] Check Pods Manifest.lock */,
2DFF1D1F1E8C56C700B1AD70 /* SwiftGen */,
ABC778DB1DC9405700815FB9 /* SwiftLint */,
209BE2572051C936004CF0FF /* Sourcery */,
209BE2572051C936004CF0FF /* Sourcery (Actionable) */,
0052FE8220605B3A0058A4BC /* Generate xcconfig warnings */,
ABC778711DC90B7A00815FB9 /* Sources */,
ABC778721DC90B7A00815FB9 /* Frameworks */,
Expand Down Expand Up @@ -804,6 +831,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2DE7DAAD20B4687F00CB51F2 /* Actionable+Helpers.swifttemplate in Resources */,
2DE7DAAB20B4686000CB51F2 /* Actionable.swifttemplate in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -813,10 +842,11 @@
files = (
ABC778DD1DC94EE500815FB9 /* Acknowledgements.plist in Resources */,
00551422206144E300E4CF68 /* InfoPlist.strings in Resources */,
209BE2562051C90C004CF0FF /* actionable.swifttemplate in Resources */,
ABF84F811DC97653002DB24D /* Localizable.strings in Resources */,
2D1D91A520C06930007D7808 /* Actionable.swifttemplate in Resources */,
ABC778831DC90B7A00815FB9 /* LaunchScreen.storyboard in Resources */,
ABC778801DC90B7A00815FB9 /* Assets.xcassets in Resources */,
2D1D91A620C06932007D7808 /* Actionable+Helpers.swifttemplate in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -865,19 +895,33 @@
shellPath = /bin/sh;
shellScript = "if [ ${FABRIC_API_KEY} != \"xxxxxx\" ]; then\nif [ \"${CONFIGURATION}\" != \"Debug\" ]; then\n\"${PODS_ROOT}/Fabric/run\" ${FABRIC_API_KEY} ${FABRIC_BUILD_SECRET}\nfi\nfi";
};
209BE2572051C936004CF0FF /* Sourcery */ = {
209BE2572051C936004CF0FF /* Sourcery (Actionable) */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Sourcery (Actionable)";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -x \"$PODS_ROOT/Sourcery/bin/sourcery\" ]; then\n\"$PODS_ROOT/Sourcery/bin/sourcery\" --sources \"PRODUCTNAME\" --templates \"Services/Resources/Sourcery/Actionable.swifttemplate\" --output \"PRODUCTNAME/Resources/Generated/Actionable+AutoConformance.swift\"\nfi";
};
2DE7DAAE20B4689C00CB51F2 /* Sourcery (Actionable) */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = Sourcery;
name = "Sourcery (Actionable)";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -x \"$PODS_ROOT/Sourcery/bin/sourcery\" ]; then\n\"$PODS_ROOT/Sourcery/bin/sourcery\" --sources \"PRODUCTNAME\" --templates \"PRODUCTNAME/Resources/Sourcery/actionable.swifttemplate\" --output \"PRODUCTNAME/Resources/Generated/Actionable+AutoConformance.swift\"\nfi";
shellScript = "if [ -x \"$PODS_ROOT/Sourcery/bin/sourcery\" ]; then\n\"$PODS_ROOT/Sourcery/bin/sourcery\" --sources \"Services\" --templates \"Services/Resources/Sourcery/Actionable.swifttemplate\" --output \"Services/Resources/Generated/Actionable+AutoConformance.swift\"\nfi";
};
2DFF1D1F1E8C56C700B1AD70 /* SwiftGen */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -1038,6 +1082,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2DE7DAB220B4692300CB51F2 /* Actionable.swift in Sources */,
86A65B0C1FA0EB0600705C14 /* APIEndpoint+Logging.swift in Sources */,
86A65B191FA0F22B00705C14 /* Formatters.swift in Sources */,
86A65B101FA0EB0600705C14 /* APISerialization.swift in Sources */,
Expand All @@ -1046,6 +1091,7 @@
86A65B0B1FA0EB0600705C14 /* APIConstants.swift in Sources */,
86A65B181FA0F22B00705C14 /* Closures.swift in Sources */,
86A65B1A1FA0F22B00705C14 /* Marshal+Utility.swift in Sources */,
2DE7DAA920B4684500CB51F2 /* Actionable+AutoConformance.swift in Sources */,
86A65B091FA0EB0600705C14 /* APIClient+PRODUCTNAME.swift in Sources */,
86A65B121FA0EB0600705C14 /* OAuth.swift in Sources */,
86A65B0F1FA0EB0600705C14 /* APIError.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@



//swiftlint:disable:previous vertical_whitespace


// MARK: - AuthCoordinator
protocol AuthCoordinatorDelegate: class {
internal protocol AuthCoordinatorDelegate: class {

func authCoordinator(_ coordinator: AuthCoordinator, didNotify action: AuthCoordinator.Action)

}

extension AuthCoordinator {
internal extension AuthCoordinator {

typealias ActionType = Action
typealias Delegate = AuthCoordinatorDelegate
Expand All @@ -22,11 +24,13 @@ extension AuthCoordinator {
}

// MARK: - OnboardingCoordinator
protocol OnboardingCoordinatorDelegate: class {
internal protocol OnboardingCoordinatorDelegate: class {

func onboardingCoordinator(_ coordinator: OnboardingCoordinator, didNotify action: OnboardingCoordinator.Action)

}

extension OnboardingCoordinator {
internal extension OnboardingCoordinator {

typealias ActionType = Action
typealias Delegate = OnboardingCoordinatorDelegate
Expand All @@ -38,11 +42,13 @@ extension OnboardingCoordinator {
}

// MARK: - OnboardingPageViewController
protocol OnboardingPageViewControllerDelegate: class {
internal protocol OnboardingPageViewControllerDelegate: class {

func onboardingPageViewController(_ vc: OnboardingPageViewController, didNotify action: OnboardingPageViewController.Action)

}

extension OnboardingPageViewController {
internal extension OnboardingPageViewController {

typealias ActionType = Action
typealias Delegate = OnboardingPageViewControllerDelegate
Expand All @@ -54,11 +60,13 @@ extension OnboardingPageViewController {
}

// MARK: - SignInCoordinator
protocol SignInCoordinatorDelegate: class {
internal protocol SignInCoordinatorDelegate: class {

func signInCoordinator(_ coordinator: SignInCoordinator, didNotify action: SignInCoordinator.Action)

}

extension SignInCoordinator {
internal extension SignInCoordinator {

typealias ActionType = Action
typealias Delegate = SignInCoordinatorDelegate
Expand All @@ -68,3 +76,4 @@ extension SignInCoordinator {
}

}

This file was deleted.

36 changes: 36 additions & 0 deletions PRODUCTNAME/app/Services/Resources/Actionable.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// Actionable.swift
// PRODUCTNAME
//
// Created by LEADDEVELOPER on 3/8/18.
// Copyright © 2018 ORGANIZATION. All rights reserved.
//

protocol Actionable: class {
associatedtype ActionType
associatedtype Delegate

func notify(_ action: ActionType)
}

extension Actionable {

func notify(_ action: ActionType) -> () -> Void {
return { [weak self] in
self?.notify(action)
}
}

func notify(_ action: ActionType) -> (UIControl) -> Void {
return { [weak self] _ in
self?.notify(action)
}
}

func notify(_ action: ActionType) -> (UIAlertAction) -> Void {
return { [weak self] _ in
self?.notify(action)
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Generated using Sourcery 0.12.0 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
Loading