Skip to content

Commit

Permalink
Merge pull request #4 from Nexters/feature/#2_project_feature
Browse files Browse the repository at this point in the history
프로젝트 구성
  • Loading branch information
2dubu authored Jan 31, 2025
2 parents f9e84b8 + 016c5c7 commit 307e813
Show file tree
Hide file tree
Showing 76 changed files with 2,477 additions and 19 deletions.
42 changes: 42 additions & 0 deletions App/ZiineApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
/* Begin PBXBuildFile section */
1A95D61B2D44CA00008B7DEA /* DesignSystem.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A95D61A2D44CA00008B7DEA /* DesignSystem.framework */; };
1A95D61C2D44CA00008B7DEA /* DesignSystem.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1A95D61A2D44CA00008B7DEA /* DesignSystem.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1A9648F72D47CFFB00268B29 /* ArtworkFeature.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9648F22D47CFFB00268B29 /* ArtworkFeature.framework */; };
1A9648F82D47CFFB00268B29 /* ArtworkFeature.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9648F22D47CFFB00268B29 /* ArtworkFeature.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1A9648F92D47CFFB00268B29 /* ArtworkFeatureInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9648F32D47CFFB00268B29 /* ArtworkFeatureInterface.framework */; };
1A9648FA2D47CFFB00268B29 /* ArtworkFeatureInterface.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9648F32D47CFFB00268B29 /* ArtworkFeatureInterface.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1A9648FB2D47CFFB00268B29 /* DesignSystem.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9648F42D47CFFB00268B29 /* DesignSystem.framework */; };
1A9648FC2D47CFFB00268B29 /* DesignSystem.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9648F42D47CFFB00268B29 /* DesignSystem.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1A9649782D4A539A00268B29 /* PostingFeature.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9649762D4A539A00268B29 /* PostingFeature.framework */; };
1A9649792D4A539A00268B29 /* PostingFeature.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9649762D4A539A00268B29 /* PostingFeature.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1A96497A2D4A539A00268B29 /* PostingFeatureInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9649772D4A539A00268B29 /* PostingFeatureInterface.framework */; };
1A96497B2D4A539A00268B29 /* PostingFeatureInterface.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9649772D4A539A00268B29 /* PostingFeatureInterface.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -18,7 +28,12 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
1A96497B2D4A539A00268B29 /* PostingFeatureInterface.framework in Embed Frameworks */,
1A9648F82D47CFFB00268B29 /* ArtworkFeature.framework in Embed Frameworks */,
1A9648FC2D47CFFB00268B29 /* DesignSystem.framework in Embed Frameworks */,
1A95D61C2D44CA00008B7DEA /* DesignSystem.framework in Embed Frameworks */,
1A9649792D4A539A00268B29 /* PostingFeature.framework in Embed Frameworks */,
1A9648FA2D47CFFB00268B29 /* ArtworkFeatureInterface.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -28,6 +43,17 @@
/* Begin PBXFileReference section */
1A95D5952D44BF16008B7DEA /* ZiineApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZiineApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
1A95D61A2D44CA00008B7DEA /* DesignSystem.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DesignSystem.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9648122D47826200268B29 /* ArtworkFeatureInterface.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ArtworkFeatureInterface.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9648132D47826200268B29 /* libArtworkFeature.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libArtworkFeature.a; sourceTree = BUILT_PRODUCTS_DIR; };
1A9648F22D47CFFB00268B29 /* ArtworkFeature.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ArtworkFeature.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9648F32D47CFFB00268B29 /* ArtworkFeatureInterface.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ArtworkFeatureInterface.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9648F42D47CFFB00268B29 /* DesignSystem.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DesignSystem.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9648F52D47CFFB00268B29 /* PostingFeature.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PostingFeature.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9648F62D47CFFB00268B29 /* PostingFeatureInterface.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PostingFeatureInterface.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9649622D4A52DA00268B29 /* PostingFeature.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PostingFeature.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9649652D4A530400268B29 /* PostingFeature.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PostingFeature.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9649762D4A539A00268B29 /* PostingFeature.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PostingFeature.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1A9649772D4A539A00268B29 /* PostingFeatureInterface.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PostingFeatureInterface.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
Expand Down Expand Up @@ -56,7 +82,12 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1A96497A2D4A539A00268B29 /* PostingFeatureInterface.framework in Frameworks */,
1A9648F72D47CFFB00268B29 /* ArtworkFeature.framework in Frameworks */,
1A9648FB2D47CFFB00268B29 /* DesignSystem.framework in Frameworks */,
1A95D61B2D44CA00008B7DEA /* DesignSystem.framework in Frameworks */,
1A9649782D4A539A00268B29 /* PostingFeature.framework in Frameworks */,
1A9648F92D47CFFB00268B29 /* ArtworkFeatureInterface.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -83,6 +114,17 @@
1A95D6192D44CA00008B7DEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1A9649762D4A539A00268B29 /* PostingFeature.framework */,
1A9649772D4A539A00268B29 /* PostingFeatureInterface.framework */,
1A9649652D4A530400268B29 /* PostingFeature.framework */,
1A9649622D4A52DA00268B29 /* PostingFeature.framework */,
1A9648F22D47CFFB00268B29 /* ArtworkFeature.framework */,
1A9648F32D47CFFB00268B29 /* ArtworkFeatureInterface.framework */,
1A9648F42D47CFFB00268B29 /* DesignSystem.framework */,
1A9648F52D47CFFB00268B29 /* PostingFeature.framework */,
1A9648F62D47CFFB00268B29 /* PostingFeatureInterface.framework */,
1A9648122D47826200268B29 /* ArtworkFeatureInterface.framework */,
1A9648132D47826200268B29 /* libArtworkFeature.a */,
1A95D61A2D44CA00008B7DEA /* DesignSystem.framework */,
);
name = Frameworks;
Expand Down
78 changes: 78 additions & 0 deletions App/ZiineApp.xcodeproj/xcshareddata/xcschemes/ZiineApp.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1A95D5942D44BF16008B7DEA"
BuildableName = "ZiineApp.app"
BlueprintName = "ZiineApp"
ReferencedContainer = "container:ZiineApp.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1A95D5942D44BF16008B7DEA"
BuildableName = "ZiineApp.app"
BlueprintName = "ZiineApp"
ReferencedContainer = "container:ZiineApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1A95D5942D44BF16008B7DEA"
BuildableName = "ZiineApp.app"
BlueprintName = "ZiineApp"
ReferencedContainer = "container:ZiineApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
11 changes: 1 addition & 10 deletions App/ZiineApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,17 @@ import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {}


}
Expand Down
104 changes: 104 additions & 0 deletions App/ZiineApp/AppRoot/AppRootBuilder.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
//
// AppRootBuildable.swift
// ZiineApp
//
// Created by Geon Woo lee on 1/29/25.
//

import UIKit
import ArtworkFeature
import ArtworkFeatureInterface
import PostingFeature
import PostingFeatureInterface

protocol AppRootBuildable {
func build() -> AppRootRouting
}

final class AppRootBuilder: AppRootBuildable {

func build() -> AppRootRouting {
let interactor = AppRootInteractor()

let artworkBuilder = ArtworkViewBuilder()
let postingBuilder = PostingViewBuilder()

let router = AppRootRouter(
interactor: interactor,
artworkBuildable: artworkBuilder,
postingBuildable: postingBuilder
)

return router
}
}


protocol AppRootInteractable: ArtworkListener, PostingListener { }

final class AppRootInteractor: AppRootInteractable {}

protocol AppRootRouting {
func configureTabs() -> [UIViewController]
}

final class AppRootRouter: AppRootRouting {

var interactor: AppRootInteractable?

private let artworkBuildable: ArtworkViewBuildable
private var artworkRouting: ArtworkRouting?

private let postingBuildable: PostingViewBuildable
private var postingRouting: PostingRouting?

init(
interactor :AppRootInteractable,
artworkBuildable: ArtworkViewBuildable,
postingBuildable: PostingViewBuildable
) {
self.interactor = interactor

self.artworkBuildable = artworkBuildable
self.postingBuildable = postingBuildable
}

func configureTabs() -> [UIViewController] {
let artworkRouting = artworkBuildable.build(with: interactor)
self.artworkRouting = artworkRouting

let postingRouting = postingBuildable.build(with: interactor)
self.postingRouting = postingRouting

let viewControllers = [
artworkRouting.viewController,
postingRouting.viewController
]

return viewControllers
}
}

protocol AppRootTabBarControllable {
func setViewControllers(_ viewControllers: [UIViewController])
func build() -> UITabBarController
}

final class AppRootTabBarController: UITabBarController, AppRootTabBarControllable {

override func viewDidLoad() {
super.viewDidLoad()

tabBar.isTranslucent = false
tabBar.tintColor = .black
tabBar.backgroundColor = .white
}

func setViewControllers(_ viewControllers: [UIViewController]) {
super.setViewControllers(viewControllers, animated: false)
}

func build() -> UITabBarController {
return self
}
}
14 changes: 12 additions & 2 deletions App/ZiineApp/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,24 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?


func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {

guard let windowScene = (scene as? UIWindowScene) else { return }

window = UIWindow(windowScene: windowScene)
window?.backgroundColor = .systemBackground
window?.rootViewController = UINavigationController(rootViewController: ViewController())

let builder = AppRootBuilder()
let routing = builder.build()
let tabs = routing.configureTabs()

let tabBarViewController: AppRootTabBarControllable = AppRootTabBarController()
tabBarViewController.setViewControllers(tabs)
let rootViewController = tabBarViewController.build()
let navigationController = UINavigationController(rootViewController: rootViewController)

window?.rootViewController = navigationController

window?.makeKeyAndVisible()
}
}
Expand Down
27 changes: 26 additions & 1 deletion App/ZiineApp/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,39 @@
//

import UIKit
import ArtworkFeature
import ArtworkFeatureInterface

class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.

let btn = UIButton()
btn.addTarget(self, action: #selector(didTap), for: .touchUpInside)
btn.setTitle("button", for: .normal)

view.addSubview(btn)
btn.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
btn.centerXAnchor.constraint(equalTo: view.centerXAnchor),
btn.centerYAnchor.constraint(equalTo: view.centerYAnchor),
])

view.backgroundColor = .orange
}

@objc func didTap() {
push()
}


func push() {
// let builder = ArtworkViewBuilder(navigationController: self.navigationController!)
// let routing = builder.build(with: nil)
// let viewContorller = routing
//
// self.present(routing.viewController, animated: true)
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 1600;
TargetAttributes = {
1A95D5FC2D44C6CE008B7DEA = {
Expand Down
Loading

0 comments on commit 307e813

Please sign in to comment.