-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7eb8cf
commit 91af532
Showing
66 changed files
with
785 additions
and
79 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ import Foundation | |
@_spi(Domain) | ||
public enum Domain: String, Modulable { | ||
case AppService | ||
case PushService | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...cts/Domain/PushService/Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "ICON_DEMO.png", | ||
"idiom" : "universal", | ||
"platform" : "ios", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Projects/Domain/PushService/Example/Resources/Assets.xcassets/contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+1.58 MB
Projects/Domain/PushService/Example/Resources/Font/Pretendard-Bold.otf
Binary file not shown.
Binary file added
BIN
+1.59 MB
Projects/Domain/PushService/Example/Resources/Font/Pretendard-Medium.otf
Binary file not shown.
Binary file added
BIN
+1.58 MB
Projects/Domain/PushService/Example/Resources/Font/Pretendard-Regular.otf
Binary file not shown.
Binary file added
BIN
+1.59 MB
Projects/Domain/PushService/Example/Resources/Font/Pretendard-SemiBold.otf
Binary file not shown.
48 changes: 48 additions & 0 deletions
48
Projects/Domain/PushService/Example/Resources/LaunchScreen.storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | ||
<device id="retina6_1" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> | ||
<capability name="Named colors" minToolsVersion="9.0"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--View Controller--> | ||
<scene sceneID="EHf-IW-A2E"> | ||
<objects> | ||
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> | ||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | ||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PushService Example" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zuX-Xj-POK"> | ||
<rect key="frame" x="148" y="339" width="118" height="38.5"/> | ||
<fontDescription key="fontDescription" type="system" pointSize="32"/> | ||
<color key="textColor" name="white"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> | ||
<color key="backgroundColor" name="green60"/> | ||
<constraints> | ||
<constraint firstItem="zuX-Xj-POK" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="Dci-bf-BmU"/> | ||
<constraint firstItem="zuX-Xj-POK" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" multiplier="0.8" id="qjt-zk-rv9"/> | ||
</constraints> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="52.173913043478265" y="375"/> | ||
</scene> | ||
</scenes> | ||
<resources> | ||
<namedColor name="green60"> | ||
<color red="0.24699999392032623" green="0.76499998569488525" blue="0.68999999761581421" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
</namedColor> | ||
<namedColor name="white"> | ||
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
</namedColor> | ||
</resources> | ||
</document> |
11 changes: 11 additions & 0 deletions
11
Projects/Domain/PushService/Example/Sources/AppDelegate.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import UIKit | ||
|
||
@main | ||
class AppDelegate: UIResponder, UIApplicationDelegate { | ||
func application( | ||
_ application: UIApplication, | ||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil | ||
) -> Bool { | ||
return true | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Projects/Domain/PushService/Interface/Model/PushNotificationContent.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// PushNotificationContent.swift | ||
// PushService | ||
// | ||
// Created by devMinseok on 7/22/24. | ||
// Copyright © 2024 PomoNyang. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum PushNotificationContent: Decodable { | ||
case test | ||
} |
2 changes: 1 addition & 1 deletion
2
...ature/Interface/AppFeatureInterface.swift → ...vice/Interface/PushServiceInterface.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Foundation | ||
|
||
public struct AppFeatureInterface { | ||
public struct PushServiceInterface { | ||
public init() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import ProjectDescription | ||
import ProjectDescriptionHelpers | ||
|
||
@_spi(Domain) | ||
@_spi(Core) | ||
import DependencyPlugin | ||
|
||
let project: Project = .makeTMABasedProject( | ||
module: Domain.PushService, | ||
scripts: [], | ||
targets: [ | ||
.sources, | ||
.interface, | ||
.tests, | ||
.testing, | ||
.example | ||
], | ||
dependencies: [ | ||
.interface: [ | ||
.dependency(rootModule: Core.self) | ||
] | ||
] | ||
) |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...pFeature/Preview/Sources/AppFeature.swift → ...ain/PushService/Sources/PushService.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Foundation | ||
|
||
public struct AppFeature { | ||
public struct PushService { | ||
public init() {} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ppFeature/Testing/AppFeatureTesting.swift → ...hService/Testing/PushServiceTesting.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Foundation | ||
|
||
public struct AppFeatureTesting { | ||
public struct PushServiceTesting { | ||
public init() {} | ||
} |
2 changes: 1 addition & 1 deletion
2
...re/AppFeature/Tests/AppFeatureTests.swift → .../PushService/Tests/PushServiceTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Foundation | ||
|
||
public struct AppFeatureTests { | ||
public struct PushServiceTests { | ||
public init() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// | ||
// AppCore.swift | ||
// AppServiceInterface | ||
// | ||
// Created by devMinseok on 7/22/24. | ||
// Copyright © 2024 PomoNyang. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
import HomeFeature | ||
import HomeFeatureInterface | ||
import OnboardingFeature | ||
import OnboardingFeatureInterface | ||
import PushServiceInterface | ||
|
||
import ComposableArchitecture | ||
|
||
@Reducer | ||
public struct AppCore { | ||
@ObservableState | ||
public struct State: Equatable { | ||
public var appDelegate: AppDelegateCore.State = .init() | ||
var home: HomeCore.State? | ||
var onboarding: OnboardingCore.State? | ||
|
||
public init() {} | ||
} | ||
|
||
public enum Action { | ||
case onAppear | ||
case appDelegate(AppDelegateCore.Action) | ||
case didChangeScenePhase(ScenePhase) | ||
case home(HomeCore.Action) | ||
case onboarding(OnboardingCore.Action) | ||
} | ||
|
||
public init() {} | ||
|
||
public var body: some ReducerOf<Self> { | ||
Scope(state: \.appDelegate, action: \.appDelegate) { | ||
AppDelegateCore() | ||
} | ||
Reduce(self.core) | ||
.ifLet(\.home, action: \.home) { | ||
HomeCore() | ||
} | ||
.ifLet(\.onboarding, action: \.onboarding) { | ||
OnboardingCore() | ||
} | ||
} | ||
|
||
private func core(_ state: inout State, _ action: Action) -> EffectOf<Self> { | ||
switch action { | ||
case .onAppear: | ||
let isLoggedIn = false | ||
if isLoggedIn { // 로그인 판단 | ||
state.home = HomeCore.State() | ||
} else { | ||
state.onboarding = OnboardingCore.State() | ||
} | ||
return .none | ||
|
||
case let .appDelegate(.userNotifications(.didReceiveResponse(response, completionHandler))): | ||
let userInfo = response.notification.request.content.userInfo | ||
guard let data = try? JSONSerialization.data(withJSONObject: userInfo), | ||
let pushNotiContent = try? JSONDecoder().decode(PushNotificationContent.self, from: data) | ||
else { | ||
completionHandler() | ||
return .none | ||
} | ||
return .run { send in | ||
switch pushNotiContent { | ||
case .test: | ||
break | ||
} | ||
completionHandler() | ||
} | ||
|
||
case .appDelegate: | ||
return .none | ||
|
||
case .didChangeScenePhase: | ||
return .none | ||
|
||
case .home: | ||
return .none | ||
|
||
case .onboarding: | ||
return .none | ||
} | ||
} | ||
} |
Oops, something went wrong.