├── .gitignore ├── App ├── App.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── App.xcscheme └── App │ ├── AppComponent.swift │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-20.png │ │ ├── Icon-20@2x.png │ │ ├── Icon-20@3x.png │ │ ├── Icon-29.png │ │ ├── Icon-29@2x.png │ │ ├── Icon-29@3x.png │ │ ├── Icon-40.png │ │ ├── Icon-40@2x.png │ │ ├── Icon-40@3x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-83_5@2x.png │ │ └── ios-marketing.png │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ ├── Info.plist │ └── Preview.swift ├── Cartfile ├── Cartfile.resolved ├── ClockTable └── ClockTable │ ├── ClockTable.h │ └── Info.plist ├── Core └── Core │ ├── Core.h │ └── Info.plist ├── FoundationExtension ├── FoundationExtension.xcodeproj │ └── project.pbxproj └── FoundationExtension │ ├── FoundationExtension.h │ ├── Info.plist │ └── Sources │ └── Array+SafeSubscript.swift ├── HangulClock.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── swiftpm │ └── Package.resolved ├── HangulClockTable ├── HangulClockTable.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── HangulClockTable.xcscheme │ │ └── HangulClockTableTests.xcscheme ├── HangulClockTable │ ├── HangulClockTable.h │ ├── Info.plist │ └── Sources │ │ └── HangulTable.swift └── HangulClockTableTests │ ├── HangulClockTableTests.swift │ └── Info.plist ├── Logger ├── Logger.xcodeproj │ └── project.pbxproj └── Logger │ ├── GoogleService-Info.plist │ ├── Info.plist │ ├── Logger.h │ └── Sources │ └── Logger.swift ├── Main ├── Main.xcodeproj │ └── project.pbxproj └── Main │ ├── Info.plist │ ├── Main.h │ └── Sources │ ├── MainBuilder.swift │ ├── MainInteractor.swift │ ├── MainRouter.swift │ ├── MainViewController.swift │ ├── Service │ ├── DateFormatService.swift │ └── TimeIntervalService.swift │ ├── View │ ├── CornerLineView.swift │ ├── DateTextView.swift │ └── MainView.swift │ └── ViewState.swift ├── OpenSources ├── README.md ├── Resource ├── Resource.xcodeproj │ └── project.pbxproj └── Resource │ ├── Info.plist │ ├── Resource.h │ └── Sources │ ├── Color │ ├── R+Color.swift │ ├── R+ColorStorage.swift │ └── R+ThemeColor.swift │ ├── Extension │ └── Color+Extension.swift │ └── R.swift ├── Romefile ├── Settings ├── SampleApp │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ └── SceneDelegate.swift ├── Settings.xcodeproj │ └── project.pbxproj └── Settings │ ├── Info.plist │ ├── Settings.h │ └── Sources │ ├── SettingsBuilder.swift │ ├── SettingsInteractor.swift │ ├── SettingsRouter.swift │ ├── SettingsViewController.swift │ └── View │ ├── AuthorSectionView.swift │ ├── SettingsView.swift │ └── SettingsViewState.swift ├── Umbrella ├── Umbrella.xcodeproj │ └── project.pbxproj └── Umbrella │ ├── Info.plist │ ├── Umbrella.h │ └── Umbrella.swift └── Vender └── Firebase ├── FIRAnalyticsConnector.framework ├── FIRAnalyticsConnector ├── Info.plist └── Modules │ └── module.modulemap ├── Firebase.framework ├── Firebase ├── Headers │ └── Firebase.h ├── Info.plist └── Modules │ └── module.modulemap ├── FirebaseAnalytics.framework ├── FirebaseAnalytics ├── Headers │ ├── FIRAnalytics+AppDelegate.h │ ├── FIRAnalytics.h │ ├── FIREventNames.h │ ├── FIRParameterNames.h │ ├── FIRUserPropertyNames.h │ └── FirebaseAnalytics.h ├── Info.plist └── Modules │ └── module.modulemap ├── FirebaseCore.framework ├── FirebaseCore ├── Headers │ ├── FIRApp.h │ ├── FIRConfiguration.h │ ├── FIRLoggerLevel.h │ ├── FIROptions.h │ └── FirebaseCore.h ├── Info.plist ├── Modules │ └── module.modulemap └── NOTICES ├── FirebaseCoreDiagnostics.framework ├── FirebaseCoreDiagnostics ├── Headers │ ├── FIRCoreDiagnosticsDateFileStorage.h │ └── firebasecore.nanopb.h └── Modules │ └── module.modulemap ├── FirebaseInstanceID.framework ├── FirebaseInstanceID ├── Headers │ ├── FIRInstanceID.h │ └── FirebaseInstanceID.h ├── Info.plist └── Modules │ └── module.modulemap ├── GoogleAppMeasurement.framework ├── GoogleAppMeasurement ├── Info.plist └── Modules │ └── module.modulemap ├── GoogleDataTransport.framework ├── GoogleDataTransport ├── Headers │ ├── GDTCORAssert.h │ ├── GDTCORClock.h │ ├── GDTCORConsoleLogger.h │ ├── GDTCORDataFuture.h │ ├── GDTCOREvent.h │ ├── GDTCOREventDataObject.h │ ├── GDTCOREventTransformer.h │ ├── GDTCORLifecycle.h │ ├── GDTCORPlatform.h │ ├── GDTCORPrioritizer.h │ ├── GDTCORRegistrar.h │ ├── GDTCORStoredEvent.h │ ├── GDTCORTargets.h │ ├── GDTCORTransport.h │ ├── GDTCORUploadPackage.h │ ├── GDTCORUploader.h │ └── GoogleDataTransport.h ├── Info.plist └── Modules │ └── module.modulemap ├── GoogleDataTransportCCTSupport.framework ├── GoogleDataTransportCCTSupport ├── Headers │ └── cct.nanopb.h ├── Info.plist └── Modules │ └── module.modulemap ├── GoogleUtilities.framework ├── GoogleUtilities ├── Headers │ ├── GULLoggerCodes.h │ ├── GULLoggerLevel.h │ └── GULNSData+zlib.h ├── Info.plist └── Modules │ └── module.modulemap └── nanopb.framework ├── Headers ├── pb.h ├── pb_common.h ├── pb_decode.h └── pb_encode.h ├── Info.plist ├── Modules └── module.modulemap └── nanopb /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io 2 | 3 | ### Swift ### 4 | # Xcode 5 | # 6 | build/ 7 | *.pbxuser 8 | !default.pbxuser 9 | *.mode1v3 10 | !default.mode1v3 11 | *.mode2v3 12 | !default.mode2v3 13 | *.perspectivev3 14 | !default.perspectivev3 15 | xcuserdata 16 | *.xccheckout 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | *.xcuserstate 22 | 23 | *.xcodeproj/* 24 | !*.xcodeproj/project.pbxproj 25 | !*.xcodeproj/xcshareddata/ 26 | !*.xcworkspace/contents.xcworkspacedata 27 | /*.gcno 28 | 29 | # CocoaPods 30 | # 31 | # We recommend against adding the Pods directory to your .gitignore. However 32 | # you should judge for yourself, the pros and cons are mentioned at: 33 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 34 | # 35 | Pods/ 36 | 37 | # Carthage 38 | # 39 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 40 | Carthage/Checkouts 41 | 42 | Carthage/Build 43 | 44 | 45 | ### Xcode ### 46 | build/ 47 | *.pbxuser 48 | !default.pbxuser 49 | *.mode1v3 50 | !default.mode1v3 51 | *.mode2v3 52 | !default.mode2v3 53 | *.perspectivev3 54 | !default.perspectivev3 55 | xcuserdata 56 | *.xccheckout 57 | *.moved-aside 58 | DerivedData 59 | *.xcuserstate 60 | 61 | ### macOS ### 62 | # General 63 | .DS_Store 64 | .AppleDouble 65 | .LSOverride 66 | 67 | -------------------------------------------------------------------------------- /App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /App/App/AppComponent.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017. Uber Technologies 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import RIBs 18 | import Main 19 | import Resource 20 | import UIKit 21 | 22 | class AppComponent: RIBs.Component, MainDependency { 23 | var bgColor: UIColor 24 | 25 | init() { 26 | self.bgColor = R.ThemeColor.savedColor.color 27 | super.init(dependency: RIBs.EmptyComponent()) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /App/App/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // App 4 | // 5 | // Created by minsone on 2020/02/06. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RIBs 11 | import Main 12 | import Resource 13 | import Logger 14 | import MetricKit 15 | 16 | @UIApplicationMain 17 | class AppDelegate: UIResponder, UIApplicationDelegate { 18 | 19 | var window: UIWindow? 20 | 21 | private var launchRouter: LaunchRouting? 22 | 23 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 24 | // Override point for customization after application launch. 25 | 26 | startConfigure(with: application) 27 | 28 | let window = UIWindow(frame: UIScreen.main.bounds) 29 | self.window = window 30 | 31 | let launchRouter = MainBuilder(dependency: AppComponent()).build() 32 | self.launchRouter = launchRouter 33 | launchRouter.launch(from: window) 34 | 35 | return true 36 | } 37 | 38 | private func startConfigure(with application: UIApplication) { 39 | Logger.Firebase.register() 40 | application.isIdleTimerDisabled = true 41 | 42 | if #available(iOS 13.0, *) { 43 | MXMetricManager.shared.add(self) 44 | } 45 | 46 | } 47 | 48 | private func finishConfigure(with application: UIApplication) { 49 | if #available(iOS 13.0, *) { 50 | MXMetricManager.shared.remove(self) 51 | } 52 | } 53 | 54 | } 55 | 56 | extension AppDelegate: MXMetricManagerSubscriber { 57 | @available(iOS 13.0, *) 58 | func didReceive(_ payloads: [MXMetricPayload]) { 59 | 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "filename" : "Icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "idiom" : "iphone", 11 | "size" : "20x20", 12 | "filename" : "Icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-29@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "idiom" : "ipad", 53 | "size" : "20x20", 54 | "filename" : "Icon-20.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "idiom" : "ipad", 59 | "size" : "20x20", 60 | "filename" : "Icon-20@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-29.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-29@2x.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-40.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-40@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-76.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-76@2x.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-83_5@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "idiom" : "ios-marketing", 107 | "size" : "1024x1024", 108 | "filename" : "ios-marketing.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-20.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-20@2x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-20@3x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-29.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/Icon-83_5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/Icon-83_5@2x.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/AppIcon.appiconset/ios-marketing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/App/App/Assets.xcassets/AppIcon.appiconset/ios-marketing.png -------------------------------------------------------------------------------- /App/App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /App/App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /App/App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | 한글시계 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarHidden 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /App/App/Preview.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Preview.swift 3 | // App 4 | // 5 | // Created by minsone on 2020/02/08. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Main 11 | import SwiftUI 12 | import Resource 13 | 14 | #if DEBUG 15 | struct MainView_Previews: PreviewProvider { 16 | static var previews: some View { 17 | return Text("3333") 18 | .font(Font.custom("alarmclock", size: 100)) 19 | } 20 | } 21 | 22 | struct TestFadeNumbers: View { 23 | @State private var textValue: Int = 2 24 | 25 | var body: some View { 26 | VStack (spacing: 50) { 27 | if textValue % 2 == 0 { 28 | Text("\(textValue)") 29 | .font(.system(size: 200)) 30 | .transition(.opacity) 31 | } 32 | if textValue % 3 == 1 { 33 | Text("\(textValue)") 34 | .font(.system(size: 200)) 35 | .transition(.opacity) 36 | } 37 | Button("Next") { 38 | withAnimation(.linear(duration: 0.25), { 39 | self.textValue += 1 40 | }) 41 | } 42 | Button("Reset") { 43 | withAnimation(.easeInOut(duration: 0.25), { 44 | self.textValue = 0 45 | }) 46 | } 47 | } 48 | } 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" 2 | github "ReactiveX/RxSwift" ~> 5.0 3 | github "uber/RIBs" ~> 0.9 4 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" "6.16.0" 2 | github "ReactiveX/RxSwift" "5.0.1" 3 | github "uber/RIBs" "0.9.2" 4 | -------------------------------------------------------------------------------- /ClockTable/ClockTable/ClockTable.h: -------------------------------------------------------------------------------- 1 | // 2 | // ClockTable.h 3 | // ClockTable 4 | // 5 | // Created by minsone on 2020/02/08. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ClockTable. 12 | FOUNDATION_EXPORT double ClockTableVersionNumber; 13 | 14 | //! Project version string for ClockTable. 15 | FOUNDATION_EXPORT const unsigned char ClockTableVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /ClockTable/ClockTable/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Core/Core/Core.h: -------------------------------------------------------------------------------- 1 | // 2 | // Core.h 3 | // Core 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Core. 12 | FOUNDATION_EXPORT double CoreVersionNumber; 13 | 14 | //! Project version string for Core. 15 | FOUNDATION_EXPORT const unsigned char CoreVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Core/Core/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /FoundationExtension/FoundationExtension/FoundationExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // FoundationExtension.h 3 | // FoundationExtension 4 | // 5 | // Created by minsone on 2020/02/09. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for FoundationExtension. 12 | FOUNDATION_EXPORT double FoundationExtensionVersionNumber; 13 | 14 | //! Project version string for FoundationExtension. 15 | FOUNDATION_EXPORT const unsigned char FoundationExtensionVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /FoundationExtension/FoundationExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /FoundationExtension/FoundationExtension/Sources/Array+SafeSubscript.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Array+SafeSubscript.swift 3 | // FoundationExtension 4 | // 5 | // Created by minsone on 2020/02/09. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | /* 10 | Array extension - safely get array value 11 | Platform : iOS / OSX 12 | Language : Swift 13 | Required: iOS 9.0 and later 14 | */ 15 | 16 | public extension Array { 17 | subscript (safe index: Int) -> Element? { 18 | return indices ~= index ? self[index] : nil 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /HangulClock.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 9 | 10 | 12 | 13 | 14 | 17 | 19 | 20 | 22 | 23 | 25 | 26 | 28 | 29 | 30 | 33 | 35 | 36 | 37 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /HangulClock.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /HangulClock.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "PureSwiftUI", 6 | "repositoryURL": "https://github.com/CodeSlicing/pure-swift-ui.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "a4e8b5aba8eedb5fa761d850721b2fe4e5a80bb6", 10 | "version": "1.15.1" 11 | } 12 | }, 13 | { 14 | "package": "PureSwiftUITools", 15 | "repositoryURL": "https://github.com/CodeSlicing/pure-swift-ui-tools.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "e2a5be40fdf18a83c03080af7597ce04439ea1ac", 19 | "version": "1.3.0" 20 | } 21 | }, 22 | { 23 | "package": "RIBs", 24 | "repositoryURL": "https://github.com/uber/RIBs", 25 | "state": { 26 | "branch": "master", 27 | "revision": "ffc489f00db785c8c0051678393f7aba0d52f1a4", 28 | "version": null 29 | } 30 | }, 31 | { 32 | "package": "RxSwift", 33 | "repositoryURL": "https://github.com/ReactiveX/RxSwift", 34 | "state": { 35 | "branch": "master", 36 | "revision": "a580d07ed002217fd91d8446c3a852486e9beefa", 37 | "version": null 38 | } 39 | } 40 | ] 41 | }, 42 | "version": 1 43 | } 44 | -------------------------------------------------------------------------------- /HangulClockTable/HangulClockTable.xcodeproj/xcshareddata/xcschemes/HangulClockTable.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 35 | 41 | 42 | 43 | 44 | 45 | 55 | 56 | 62 | 63 | 69 | 70 | 71 | 72 | 74 | 75 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /HangulClockTable/HangulClockTable.xcodeproj/xcshareddata/xcschemes/HangulClockTableTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 37 | 38 | 44 | 45 | 47 | 48 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /HangulClockTable/HangulClockTable/HangulClockTable.h: -------------------------------------------------------------------------------- 1 | // 2 | // HangulClockTable.h 3 | // HangulClockTable 4 | // 5 | // Created by minsone on 2020/02/08. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for HangulClockTable. 12 | FOUNDATION_EXPORT double HangulClockTableVersionNumber; 13 | 14 | //! Project version string for HangulClockTable. 15 | FOUNDATION_EXPORT const unsigned char HangulClockTableVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /HangulClockTable/HangulClockTable/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /HangulClockTable/HangulClockTable/Sources/HangulTable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HangulTable.swift 3 | // HangulClockTable 4 | // 5 | // Created by minsone on 2020/02/08. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct HangulTable {} 12 | public extension HangulTable { 13 | static let texts = [["한", "두", "세", "네", "다", "섯"], 14 | ["여", "섯", "일", "곱", "여", "덟"], 15 | ["아", "홉", "열", "한", "두", "시"], 16 | ["자", "이", "삼", "사", "오", "십"], 17 | ["정", "일", "이", "삼", "사", "오"], 18 | ["오", "육", "칠", "팔", "구", "분"]] 19 | 20 | static let marks = [[false,false,false,false,false,false], 21 | [false,false,false,false,false,false], 22 | [false,false,false,false,false,false], 23 | [false,false,false,false,false,false], 24 | [false,false,false,false,false,false], 25 | [false,false,false,false,false,false]] 26 | } 27 | 28 | public extension HangulTable { 29 | struct Mark {} 30 | } 31 | 32 | public extension HangulTable.Mark { 33 | static func midDay(hour: Int) -> [(row: Int, col: Int)] { 34 | switch hour { 35 | case 12: return [(4,0),(5,0)] 36 | default: return [] 37 | } 38 | } 39 | 40 | static func midNight(hour: Int) -> [(row: Int, col: Int)] { 41 | switch hour { 42 | case 0: return [(3,0),(4,0)] 43 | default: return [] 44 | } 45 | } 46 | 47 | static func hour(_ hour: Int) -> [(row: Int, col: Int)] { 48 | let mark_시 = [(2,5)] 49 | let mark_시간: [(Int, Int)] 50 | switch hour % 12 { 51 | case 0: mark_시간 = [(2,2),(2,4)] 52 | case 1: mark_시간 = [(0,0)] 53 | case 2: mark_시간 = [(0,1)] 54 | case 3: mark_시간 = [(0,2)] 55 | case 4: mark_시간 = [(0,3)] 56 | case 5: mark_시간 = [(0,4),(0,5)] 57 | case 6: mark_시간 = [(1,0),(1,1)] 58 | case 7: mark_시간 = [(1,2),(1,3)] 59 | case 8: mark_시간 = [(1,4),(1,5)] 60 | case 9: mark_시간 = [(2,0),(2,1)] 61 | case 10: mark_시간 = [(2,2)] 62 | case 11: mark_시간 = [(2,2),(2,3)] 63 | default: return [] 64 | } 65 | return mark_시간 + mark_시 66 | } 67 | 68 | static func minute(_ minute: Int) -> [(row: Int, col: Int)] { 69 | guard minute != 0, minute != 60 else { return [] } 70 | 71 | let mark_분 = [(5,5)] 72 | let mark_일분: [(Int, Int)] 73 | let mark_십분: [(Int, Int)] 74 | 75 | switch minute % 10 { 76 | case 1: mark_일분 = [(4,1)] 77 | case 2: mark_일분 = [(4,2)] 78 | case 3: mark_일분 = [(4,3)] 79 | case 4: mark_일분 = [(4,4)] 80 | case 5: mark_일분 = [(4,5)] 81 | case 6: mark_일분 = [(5,1)] 82 | case 7: mark_일분 = [(5,2)] 83 | case 8: mark_일분 = [(5,3)] 84 | case 9: mark_일분 = [(5,4)] 85 | case 0: mark_일분 = [] 86 | default: mark_일분 = [] 87 | } 88 | 89 | switch minute / 10 { 90 | case 1: mark_십분 = [(3,5)] 91 | case 2: mark_십분 = [(3,1),(3,5)] 92 | case 3: mark_십분 = [(3,2),(3,5)] 93 | case 4: mark_십분 = [(3,3),(3,5)] 94 | case 5: mark_십분 = [(3,4),(3,5)] 95 | default: mark_십분 = [] 96 | } 97 | 98 | return mark_십분 + mark_일분 + mark_분 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /HangulClockTable/HangulClockTableTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Logger/Logger/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 875399153916-j7tgnqj89ahefv88agfo10ouadtnj8bl.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.875399153916-j7tgnqj89ahefv88agfo10ouadtnj8bl 9 | API_KEY 10 | AIzaSyBqJacbcEMpqR4JKszEcUr11EUghFIf7IA 11 | GCM_SENDER_ID 12 | 875399153916 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | kr.minsOne.Labs.Hangul.App 17 | PROJECT_ID 18 | hangulclock-1d302 19 | STORAGE_BUCKET 20 | hangulclock-1d302.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:875399153916:ios:e39f9396df9fc379a9af79 33 | DATABASE_URL 34 | https://hangulclock-1d302.firebaseio.com 35 | 36 | -------------------------------------------------------------------------------- /Logger/Logger/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Logger/Logger/Logger.h: -------------------------------------------------------------------------------- 1 | // 2 | // Logger.h 3 | // Logger 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Logger. 12 | FOUNDATION_EXPORT double LoggerVersionNumber; 13 | 14 | //! Project version string for Logger. 15 | FOUNDATION_EXPORT const unsigned char LoggerVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Logger/Logger/Sources/Logger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Logger.swift 3 | // Logger 4 | // 5 | // Created by minsone on 2020/02/09. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Firebase 11 | 12 | public class Logger {} 13 | public extension Logger { 14 | class Firebase {} 15 | } 16 | 17 | public extension Logger.Firebase { 18 | static func register() { 19 | guard 20 | let filePath = Bundle(for: Logger.Firebase.self).path(forResource: "GoogleService-Info", ofType: "plist"), 21 | let fileopts = FirebaseOptions(contentsOfFile: filePath) 22 | else { return } 23 | 24 | FirebaseApp.configure(options: fileopts) 25 | Analytics.logEvent(AnalyticsEventSelectContent, parameters: [ 26 | AnalyticsParameterItemID: "id-111", 27 | AnalyticsParameterItemName: "title", 28 | AnalyticsParameterContentType: "cont" 29 | ]) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Main/Main/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Main/Main/Main.h: -------------------------------------------------------------------------------- 1 | // 2 | // Main.h 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Main. 12 | FOUNDATION_EXPORT double MainVersionNumber; 13 | 14 | //! Project version string for Main. 15 | FOUNDATION_EXPORT const unsigned char MainVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import
18 | 19 | 20 | -------------------------------------------------------------------------------- /Main/Main/Sources/MainBuilder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainBuilder.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import RIBs 10 | import Settings 11 | import Resource 12 | import UIKit 13 | 14 | public protocol MainDependency: Dependency { 15 | var timeIntervalService: TimeIntervalServicable { get } 16 | var dateFormatService: DateFormatServicable { get } 17 | var bgColor: UIColor { get } 18 | } 19 | 20 | public extension MainDependency { 21 | var timeIntervalService: TimeIntervalServicable { 22 | TimeIntervalService() 23 | } 24 | var dateFormatService: DateFormatServicable { 25 | DateFormatService() 26 | } 27 | } 28 | 29 | final class MainComponent: Component, SettingsDependency { 30 | var colors: [R.Color] { 31 | R.ThemeColor.list 32 | } 33 | 34 | fileprivate let timeIntervalService: TimeIntervalServicable 35 | fileprivate let dateFormatService: DateFormatServicable 36 | fileprivate let bgColor: UIColor 37 | 38 | override init(dependency: MainDependency) { 39 | self.timeIntervalService = dependency.timeIntervalService 40 | self.dateFormatService = dependency.dateFormatService 41 | self.bgColor = dependency.bgColor 42 | super.init(dependency: dependency) 43 | } 44 | } 45 | 46 | // MARK: - Builder 47 | 48 | public protocol MainBuildable: Buildable { 49 | func build() -> LaunchRouting 50 | } 51 | 52 | public final class MainBuilder: Builder, MainBuildable { 53 | 54 | public override init(dependency: MainDependency) { 55 | super.init(dependency: dependency) 56 | } 57 | 58 | public func build() -> LaunchRouting { 59 | let component = MainComponent(dependency: dependency) 60 | let viewController = MainViewController(bgColor: component.bgColor) 61 | let settingsBuilder = SettingsBuilder(dependency: component) 62 | let interactor = MainInteractor(presenter: viewController, 63 | timeIntervalService: component.timeIntervalService, 64 | dateFormatService: component.dateFormatService) 65 | return MainRouter(interactor: interactor, 66 | settingsBuilder: settingsBuilder, 67 | viewController: viewController) 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Main/Main/Sources/MainInteractor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainInteractor.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RIBs 11 | import RxSwift 12 | import RxRelay 13 | import HangulClockTable 14 | 15 | public protocol MainRouting: ViewableRouting { 16 | func routeToSettings() 17 | func detachSettings() 18 | } 19 | 20 | public protocol MainPresentable: Presentable { 21 | var listener: MainPresentableListener? { get set } 22 | var state: BehaviorRelay { get } 23 | func updateBackgroundColor(_ color: UIColor) 24 | } 25 | 26 | public protocol MainListener: class {} 27 | 28 | final class MainInteractor: PresentableInteractor, MainInteractable, MainPresentableListener { 29 | weak var router: MainRouting? 30 | weak var listener: MainListener? 31 | 32 | init(presenter: MainPresentable, 33 | timeIntervalService: TimeIntervalServicable, 34 | dateFormatService: DateFormatServicable) { 35 | self.timeIntervalService = timeIntervalService 36 | self.dateFormatService = dateFormatService 37 | super.init(presenter: presenter) 38 | presenter.listener = self 39 | initialzieViewState() 40 | } 41 | 42 | func initialzieViewState() { 43 | let state = presenter.state.value 44 | state.gridTexts = HangulTable.texts 45 | state.gridMarks = HangulTable.marks 46 | presenter.state.accept(state) 47 | } 48 | 49 | override func didBecomeActive() { 50 | super.didBecomeActive() 51 | 52 | timeIntervalService 53 | .publishTickTime(interval: .seconds(1)) 54 | .withLatestFrom(presenter.state) { ($0, $1) } 55 | .map { (date, state) in 56 | state.updateDate(date: date) 57 | return state 58 | } 59 | .observeOn(MainScheduler.instance) 60 | .bind(to: presenter.state) 61 | .disposeOnDeactivate(interactor: self) 62 | } 63 | 64 | override func willResignActive() { 65 | super.willResignActive() 66 | } 67 | 68 | func request(action: MainPresentableAction) { 69 | switch action { 70 | case .settings: router?.routeToSettings() 71 | } 72 | } 73 | 74 | func finishSettings() { 75 | router?.detachSettings() 76 | } 77 | 78 | func updateBackgroundColor(color: UIColor) { 79 | presenter.updateBackgroundColor(color) 80 | } 81 | 82 | // MARK: Private 83 | private let timeIntervalService: TimeIntervalServicable 84 | private let dateFormatService: DateFormatServicable 85 | } 86 | -------------------------------------------------------------------------------- /Main/Main/Sources/MainRouter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainRouter.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import RIBs 10 | import Settings 11 | 12 | public protocol MainInteractable: Interactable, SettingsListener { 13 | var router: MainRouting? { get set } 14 | var listener: MainListener? { get set } 15 | } 16 | 17 | public protocol MainViewControllable: ViewControllable { 18 | func present(viewController: ViewControllable) 19 | func dismiss(viewController: ViewControllable) 20 | } 21 | 22 | public final class MainRouter: LaunchRouter, MainRouting { 23 | public init(interactor: MainInteractable, 24 | settingsBuilder: SettingsBuildable, 25 | viewController: MainViewControllable) { 26 | self.settingsBuilder = settingsBuilder 27 | super.init(interactor: interactor, 28 | viewController: viewController) 29 | interactor.router = self 30 | } 31 | 32 | private let settingsBuilder: SettingsBuildable 33 | private var currentChild: ViewableRouting? 34 | } 35 | 36 | public extension MainRouter { 37 | func routeToSettings() { 38 | guard currentChild == nil else { return } 39 | let router = settingsBuilder.build(withListener: interactor) 40 | currentChild = router 41 | viewController.present(viewController: router.viewControllable) 42 | } 43 | 44 | func detachSettings() { 45 | guard let currentChild = currentChild as? SettingsRouting else { return } 46 | detachChild(currentChild) 47 | viewController.dismiss(viewController: currentChild.viewControllable) 48 | self.currentChild = nil 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Main/Main/Sources/MainViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import RIBs 10 | import RxSwift 11 | import RxRelay 12 | import RxCocoa 13 | import UIKit 14 | import SwiftUI 15 | import PureSwiftUI 16 | 17 | public enum MainPresentableAction { 18 | case settings 19 | } 20 | 21 | public protocol MainPresentableListener: class { 22 | func request(action: MainPresentableAction) 23 | } 24 | 25 | final class MainViewController: MainPresentable, MainViewControllable, ViewStateListner { 26 | var uiviewController: UIViewController { 27 | return hostingController 28 | } 29 | 30 | weak var listener: MainPresentableListener? 31 | 32 | var state = BehaviorRelay(value: ViewState()) 33 | @ObservedObject private var _state: ViewState 34 | 35 | private let disposeBag = DisposeBag() 36 | private let hostingController: UIHostingController 37 | 38 | init(bgColor: UIColor) { 39 | self._state = state.value 40 | let conf = Configure() 41 | let rootView = MainView(size: conf.rootViewSize, state: __state) 42 | self.hostingController = UIHostingController(rootView: rootView) 43 | _state.listener = self 44 | hostingController.view.backgroundColor = bgColor 45 | addPanGesuture() 46 | } 47 | 48 | @objc required dynamic init?(coder aDecoder: NSCoder) { 49 | fatalError("init(coder:) has not been implemented") 50 | } 51 | 52 | func updateBackgroundColor(_ color: UIColor) { 53 | hostingController.view.backgroundColor = color 54 | } 55 | 56 | private var lastTranslation: CGPoint? 57 | 58 | func addPanGesuture() { 59 | let selector = #selector(displayGestureForPanGestureRecognizer) 60 | let pan = UIPanGestureRecognizer( target: self, action: selector) 61 | hostingController.view.addGestureRecognizer(pan) 62 | } 63 | 64 | @objc func displayGestureForPanGestureRecognizer(sender: UIPanGestureRecognizer) { 65 | let translation = sender.translation(in: hostingController.view) 66 | 67 | switch sender.state { 68 | case .began: 69 | lastTranslation = translation 70 | case .changed: 71 | changeViewAlpha(nowPoint: translation) 72 | case .cancelled, .ended, .failed, .possible: 73 | fallthrough 74 | default: 75 | lastTranslation = nil 76 | } 77 | } 78 | 79 | func changeViewAlpha(nowPoint: CGPoint) { 80 | defer { lastTranslation = nowPoint } 81 | 82 | guard 83 | let lastPoint = lastTranslation, 84 | case let alpha = hostingController.view.alpha 85 | else { return } 86 | 87 | if lastPoint.y > nowPoint.y && alpha < 1.0 { 88 | hostingController.view.alpha = alpha + 0.01 89 | } else if lastPoint.y < nowPoint.y && alpha >= 0.02 { 90 | hostingController.view.alpha = alpha - 0.01 91 | } 92 | } 93 | } 94 | 95 | // MARK: - MainViewControllable 96 | extension MainViewController { 97 | func present(viewController: ViewControllable) { 98 | self.uiviewController.present(viewController.uiviewController, 99 | animated: true, 100 | completion: nil) 101 | } 102 | 103 | func dismiss(viewController: ViewControllable) { 104 | viewController.uiviewController.dismiss(animated: true, completion: nil) 105 | } 106 | } 107 | 108 | // MARK: - ViewStateListner 109 | extension MainViewController { 110 | func tapSettings() { 111 | listener?.request(action: .settings) 112 | print(#function) 113 | } 114 | 115 | func onAppear() { 116 | print(#function) 117 | } 118 | } 119 | 120 | private struct Configure { 121 | var rootViewSize: CGSize { 122 | let size = UIScreen.main.bounds.size 123 | let value = min(size.width - 20, size.height - 20) 124 | return CGSize(value, value) 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /Main/Main/Sources/Service/DateFormatService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateFormatService.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/08. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public protocol DateFormatServicable { 12 | func date(_ date: Date) -> String 13 | } 14 | 15 | struct DateFormatService: DateFormatServicable { 16 | func date(_ date: Date) -> String { 17 | return date.description 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Main/Main/Sources/Service/TimeIntervalService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TimeIntervalService.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/08. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import RxSwift 11 | 12 | public protocol TimeIntervalServicable { 13 | func publishTickTime(interval: DispatchTimeInterval) -> Observable 14 | } 15 | 16 | struct TimeIntervalService: TimeIntervalServicable { 17 | func publishTickTime(interval: DispatchTimeInterval) -> Observable { 18 | let startDateStream = Observable.just(Date()) 19 | let intervalStream = Observable.interval(interval, 20 | scheduler: MainScheduler.instance) 21 | .map { _ in Date() } 22 | return Observable.concat([startDateStream, intervalStream]) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Main/Main/Sources/View/CornerLineView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CornerLineView.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/10. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | 12 | struct CornerLineView { 13 | struct TopLeft: View { 14 | let size: CGSize 15 | 16 | var body: some View { 17 | VStack() { 18 | Spacer() 19 | Path { path in 20 | let width = min(size.width, size.height) 21 | let spacing: CGFloat = 7 22 | let len = width / 5 / 2 23 | path.addLines([ 24 | CGPoint(x: 0, y: 0), 25 | CGPoint(x: 0, y: len), 26 | CGPoint(x: spacing, y: len), 27 | CGPoint(x: spacing, y: spacing), 28 | CGPoint(x: len, y: spacing), 29 | CGPoint(x: len, y: 0), 30 | CGPoint(x: 0, y: 0) 31 | ]) 32 | } 33 | .fillColor(Color.white) 34 | .frame(size) 35 | Spacer() 36 | } 37 | } 38 | } 39 | 40 | struct BottomRight: View { 41 | let size: CGSize 42 | 43 | var body: some View { 44 | VStack() { 45 | Spacer() 46 | Path { path in 47 | let width = min(size.width, size.height) 48 | let spacing: CGFloat = 7 49 | let len = width / 5 / 2 50 | path.addLines([ 51 | CGPoint(x: width, y: width), 52 | CGPoint(x: width, y: width-len), 53 | CGPoint(x: width-spacing, y: width-len), 54 | CGPoint(x: width-spacing, y: width-spacing), 55 | CGPoint(x: width-len, y: width-spacing), 56 | CGPoint(x: width-len, y: width), 57 | CGPoint(x: width, y: width), 58 | ]) 59 | } 60 | .fillColor(Color.white) 61 | .frame(size) 62 | Spacer() 63 | } 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Main/Main/Sources/View/DateTextView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateTextView.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/10. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | import PureSwiftUI 12 | 13 | struct DateTextView { 14 | struct Portrait: View { 15 | @Binding var date: String 16 | 17 | var body: some View { 18 | return HStack { 19 | TitleText("\(date)", .white, .bold) 20 | .padding([.top, .leading], 20) 21 | Spacer() 22 | } 23 | } 24 | } 25 | 26 | struct Landscape: View { 27 | @Binding var year: String 28 | @Binding var month: String 29 | @Binding var day: String 30 | 31 | var body: some View { 32 | return HStack { 33 | TitleText("\(year)\n\(month)\n\(day)", .white, .bold) 34 | .padding(EdgeInsets.init(20, 10, 0, 0)) 35 | Spacer() 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Main/Main/Sources/View/MainView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainView.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/08. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PureSwiftUI 11 | import PureSwiftUITools 12 | 13 | public struct MainView { 14 | private let size: CGSize 15 | @ObservedObject var state: ViewState 16 | 17 | public init(size: CGSize, state: ObservedObject) { 18 | self.size = size 19 | self._state = state 20 | } 21 | } 22 | 23 | extension MainView: View { 24 | public var body: some View { 25 | ZStack { 26 | dateText 27 | hangulClock 28 | 29 | CornerLineView.TopLeft(size: self.size) 30 | CornerLineView.BottomRight(size: self.size) 31 | settingButton 32 | } 33 | .onAppear(perform: state.onAppear) 34 | .onDisappear(perform: state.onDisappear) 35 | .onTapGesture(perform: state.tapView) 36 | } 37 | } 38 | 39 | private extension MainView { 40 | var dateText: some View { 41 | func geometryProxy(_ geometry: GeometryProxy) -> some View { 42 | let size = geometry.size 43 | return Group { 44 | if size.height > size.width { 45 | DateTextView.Portrait(date: $state.date) 46 | } else { 47 | DateTextView.Landscape(year: $state.year, 48 | month: $state.month, 49 | day: $state.day) 50 | } 51 | } 52 | } 53 | return VStack(alignment: .leading) { 54 | GeometryReader { geometry in 55 | geometryProxy(geometry) 56 | Spacer() 57 | } 58 | } 59 | } 60 | } 61 | 62 | private extension MainView { 63 | var hangulClock: some View { 64 | GridView(state.gridTexts.count, spacing: 8) { column, row in 65 | LargeTitleText("\(self.state.gridTexts[row][column])", .white, self.state.gridMarks[row][column] ? .bold : .regular) 66 | .opacity(self.state.gridMarks[row][column] ? 1 : 0.4) 67 | .animation(.easeInOut(duration: 0.5)) 68 | .greedyFrame() 69 | } 70 | .frame(size.width-30, size.height-30) 71 | } 72 | } 73 | 74 | private extension MainView { 75 | var settingButton: some View { 76 | VStack(alignment: .trailing) { 77 | Spacer() 78 | HStack { 79 | Spacer() 80 | } 81 | Image(systemName: "gear") 82 | .foregroundColor(.white) 83 | .font(Font.system(.title).bold()) 84 | .padding(.trailing, 20) 85 | .onTapGesture(perform: state.tapSettings) 86 | .opacity(state.isVisibleSettingsButton ? 1 : 0) 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Main/Main/Sources/ViewState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewState.swift 3 | // Main 4 | // 5 | // Created by minsone on 2020/02/08. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import HangulClockTable 11 | import UIKit 12 | import RxSwift 13 | import RxCocoa 14 | 15 | protocol ViewStateListner: class { 16 | func onAppear() 17 | func tapSettings() 18 | } 19 | 20 | public class ViewState: ObservableObject { 21 | @Published var gridTexts: [[String]] = [] 22 | @Published var gridMarks: [[Bool]] = [] 23 | @Published var date: String = "" 24 | @Published var year: String = "" 25 | @Published var month: String = "" 26 | @Published var day: String = "" 27 | @Published var isVisibleSettingsButton = false { 28 | willSet { 29 | objectWillChange.send() 30 | } 31 | } 32 | 33 | weak var listener: ViewStateListner? 34 | 35 | private var visualSettingButtonTimerDisposeBag = DisposeBag() 36 | 37 | func updateDate(date: Date) { 38 | let dateFormatter = DateFormatter() 39 | dateFormatter.dateFormat = "yyyy" 40 | let year = dateFormatter.string(from: date) 41 | dateFormatter.dateFormat = "MM" 42 | let month = dateFormatter.string(from: date) 43 | dateFormatter.dateFormat = "dd" 44 | let day = dateFormatter.string(from: date) 45 | dateFormatter.dateFormat = "HH:mm:ss" 46 | let time = dateFormatter.string(from: date) 47 | dateFormatter.dateFormat = "HH" 48 | let hour = dateFormatter.string(from: date) 49 | dateFormatter.dateFormat = "mm" 50 | let minute = dateFormatter.string(from: date) 51 | #if DEBUG 52 | print(#function, year, month, day, time, hour, minute) 53 | #endif 54 | 55 | self.date = "\(year)년 \(Int(month) ?? 0)월 \(Int(day) ?? 0)일" 56 | self.year = "\(year)년" 57 | self.month = "\(Int(month) ?? 0)월" 58 | self.day = "\(Int(day) ?? 0)일" 59 | 60 | var mark = HangulTable.marks 61 | let markList = HangulTable.Mark.midDay(str: hour) 62 | + HangulTable.Mark.midNight(str: hour) 63 | + HangulTable.Mark.hour(str: hour) 64 | + HangulTable.Mark.minute(str: minute) 65 | 66 | markList.forEach { 67 | mark[$0.row][$0.col] = true 68 | } 69 | gridMarks = mark 70 | } 71 | 72 | func onAppear() { 73 | listener?.onAppear() 74 | } 75 | 76 | func onDisappear() { 77 | print(#file, #function) 78 | } 79 | 80 | func tapSettings() { 81 | listener?.tapSettings() 82 | } 83 | 84 | func tapView() { 85 | print(#file, #function) 86 | if isVisibleSettingsButton == false { 87 | isVisibleSettingsButton = true 88 | Single.just(1) 89 | .delay(.seconds(4), scheduler: MainScheduler.instance) 90 | .subscribe { [weak self] _ in 91 | self?.isVisibleSettingsButton = false 92 | }.disposed(by: visualSettingButtonTimerDisposeBag) 93 | } else { 94 | isVisibleSettingsButton = false 95 | visualSettingButtonTimerDisposeBag = DisposeBag() 96 | } 97 | } 98 | } 99 | 100 | private extension HangulTable.Mark { 101 | static func midDay(str: String) -> [(row: Int, col: Int)] { 102 | let time = Int(str) ?? 0 103 | return midDay(hour: time) 104 | } 105 | static func midNight(str: String) -> [(row: Int, col: Int)] { 106 | let time = Int(str) ?? 0 107 | return midNight(hour: time) 108 | } 109 | static func hour(str: String) -> [(row: Int, col: Int)] { 110 | let time = Int(str) ?? 0 111 | return hour(time) 112 | } 113 | static func minute(str: String) -> [(row: Int, col: Int)] { 114 | let time = Int(str) ?? 0 115 | return minute(time) 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /OpenSources: -------------------------------------------------------------------------------- 1 | Carthage/Build/iOS -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 한글시계 - 오늘도 수고한 당신에게 for iOS 2 | 3 | 한글시계 for iOS는 한글시계 원 저작자인 이호민님과 현재 디자인으로 만든 이상훈님께 허락을 맡아 개발되었습니다. 4 | 5 | ## 한글시계 사용하기 6 | 7 | ### 실행조건 8 | iOS 13.0+ 9 | 10 | ### 문구 11 | 추후 지원 예정입니다. 12 | 13 | ## 라이선스 14 | CC BY-SA를 따릅니다. 15 | -------------------------------------------------------------------------------- /Resource/Resource/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Resource/Resource/Resource.h: -------------------------------------------------------------------------------- 1 | // 2 | // Resource.h 3 | // Resource 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Resource. 12 | FOUNDATION_EXPORT double ResourceVersionNumber; 13 | 14 | //! Project version string for Resource. 15 | FOUNDATION_EXPORT const unsigned char ResourceVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Resource/Resource/Sources/Color/R+Color.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Color.swift 3 | // Resource 4 | // 5 | // Created by minsone on 2020/02/21. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | 12 | extension R { 13 | public struct Color: Identifiable { 14 | public var id = UUID() 15 | public var key: String 16 | public var color: UIColor 17 | } 18 | } 19 | 20 | public extension R.Color { 21 | static var c0: R.Color { .init(key: "c0", color: #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1)) } 22 | static var c1: R.Color { .init(key: "c1", color: #colorLiteral(red: 0.8509803922, green: 0.6588235294, blue: 0.4941176471, alpha: 1)) } 23 | static var c2: R.Color { .init(key: "c2", color: #colorLiteral(red: 0.5137254902, green: 0.6392156863, blue: 0.7882352941, alpha: 1)) } 24 | static var c3: R.Color { .init(key: "c3", color: #colorLiteral(red: 0.9333333333, green: 0.6235294118, blue: 0.6549019608, alpha: 1)) } 25 | static var c4: R.Color { .init(key: "c4", color: #colorLiteral(red: 0.5333333333, green: 0.6980392157, blue: 0.2901960784, alpha: 1)) } 26 | static var c5: R.Color { .init(key: "c5", color: #colorLiteral(red: 0.9078271985, green: 0.6878789067, blue: 0.9966087937, alpha: 1)) } 27 | static var c6: R.Color { .init(key: "c6", color: #colorLiteral(red: 0.4036020637, green: 0.455978632, blue: 0.9999788404, alpha: 1)) } 28 | } 29 | -------------------------------------------------------------------------------- /Resource/Resource/Sources/Color/R+ColorStorage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // R+ColorStorage.swift 3 | // Resource 4 | // 5 | // Created by minsone on 2020/02/21. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | @propertyWrapper 12 | struct Storage { 13 | private let key: String 14 | private let defaultValue: String 15 | 16 | init(key: String, defaultValue: String) { 17 | self.key = key 18 | self.defaultValue = defaultValue 19 | } 20 | 21 | var wrappedValue: String { 22 | get { 23 | UserDefaults.standard.string(forKey: key) ?? defaultValue 24 | } 25 | set { 26 | UserDefaults.standard.set(newValue, forKey: key) 27 | } 28 | } 29 | } 30 | 31 | struct ColorStorage { 32 | @Storage(key: "defaultColorKey", defaultValue: "") 33 | static var defaultColorKey: String 34 | } 35 | -------------------------------------------------------------------------------- /Resource/Resource/Sources/Color/R+ThemeColor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // R+ThemeColor.swift 3 | // Resource 4 | // 5 | // Created by minsone on 2020/02/21. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension R { 13 | public struct ThemeColor { 14 | // 저장된 색상이 없는 경우, 기본 색상 15 | static var defaultColor: R.Color { 16 | .c0 17 | } 18 | // 현재 테마 색상 19 | public static var list: [R.Color] { 20 | [.c0, .c3, .c5, .c1, .c2, .c6, .c4] 21 | } 22 | /// 저장된 색상 23 | public static var savedColor: R.Color { 24 | let key = ColorStorage.defaultColorKey 25 | return list.first { $0.key == key } ?? defaultColor 26 | } 27 | 28 | public static func saveColor(_ color: R.Color) { 29 | ColorStorage.defaultColorKey = color.key 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Resource/Resource/Sources/Extension/Color+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Color+Extension.swift 3 | // Resource 4 | // 5 | // Created by minsone on 2020/02/21. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | import UIKit 12 | 13 | extension UIColor { 14 | convenience init(red: Int, green: Int, blue: Int, a: Int = 0xFF) { 15 | self.init( 16 | red: CGFloat(red) / 255.0, 17 | green: CGFloat(green) / 255.0, 18 | blue: CGFloat(blue) / 255.0, 19 | alpha: CGFloat(a) / 255.0 20 | ) 21 | } 22 | 23 | // let's suppose alpha is the first component (ARGB) 24 | convenience init(argb: Int) { 25 | self.init( 26 | red: (argb >> 16) & 0xFF, 27 | green: (argb >> 8) & 0xFF, 28 | blue: argb & 0xFF, 29 | a: (argb >> 24) & 0xFF 30 | ) 31 | } 32 | } 33 | 34 | extension Color { 35 | init(hex: Int, alpha: Double = 1) { 36 | let components = ( 37 | R: Double((hex >> 16) & 0xff) / 255, 38 | G: Double((hex >> 08) & 0xff) / 255, 39 | B: Double((hex >> 00) & 0xff) / 255 40 | ) 41 | self.init( 42 | .sRGB, 43 | red: components.R, 44 | green: components.G, 45 | blue: components.B, 46 | opacity: alpha 47 | ) 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /Resource/Resource/Sources/R.swift: -------------------------------------------------------------------------------- 1 | // 2 | // R.swift 3 | // Resource 4 | // 5 | // Created by minsone on 2020/02/21. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public final class R { 12 | static let bundle = Bundle(for: R.self) 13 | } 14 | 15 | public extension R {} 16 | -------------------------------------------------------------------------------- /Romefile: -------------------------------------------------------------------------------- 1 | cache: # required 2 | # at least one of the following is required: 3 | local: ~/Library/Caches/Rome # optional and can be combined with either a `s3Bucket` or `engine` 4 | repositoryMap: # optional 5 | - RxSwift: 6 | - name: RxSwift 7 | - name: RxCocoa 8 | - name: RxBlocking 9 | - name: RxRelay 10 | - name: RxTest -------------------------------------------------------------------------------- /Settings/SampleApp/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SampleApp 4 | // 5 | // Created by minsone on 2020/02/22. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /Settings/SampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Settings/SampleApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Settings/SampleApp/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Settings/SampleApp/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // SampleApp 4 | // 5 | // Created by minsone on 2020/02/22. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import Resource 11 | struct ContentView: View { 12 | var body: some View { 13 | SettingsView(state: ViewState(colors: R.ThemeColor.list)) 14 | // ContentView() 15 | } 16 | } 17 | 18 | struct ContentView_Previews: PreviewProvider { 19 | static var previews: some View { 20 | ContentView() 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Settings/SampleApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Settings/SampleApp/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Settings/SampleApp/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // SampleApp 4 | // 5 | // Created by minsone on 2020/02/22. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Create the SwiftUI view that provides the window contents. 23 | let contentView = ContentView() 24 | 25 | // Use a UIHostingController as window root view controller. 26 | if let windowScene = scene as? UIWindowScene { 27 | let window = UIWindow(windowScene: windowScene) 28 | window.rootViewController = UIHostingController(rootView: contentView) 29 | self.window = window 30 | window.makeKeyAndVisible() 31 | } 32 | } 33 | 34 | func sceneDidDisconnect(_ scene: UIScene) { 35 | // Called as the scene is being released by the system. 36 | // This occurs shortly after the scene enters the background, or when its session is discarded. 37 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 38 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 39 | } 40 | 41 | func sceneDidBecomeActive(_ scene: UIScene) { 42 | // Called when the scene has moved from an inactive state to an active state. 43 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 44 | } 45 | 46 | func sceneWillResignActive(_ scene: UIScene) { 47 | // Called when the scene will move from an active state to an inactive state. 48 | // This may occur due to temporary interruptions (ex. an incoming phone call). 49 | } 50 | 51 | func sceneWillEnterForeground(_ scene: UIScene) { 52 | // Called as the scene transitions from the background to the foreground. 53 | // Use this method to undo the changes made on entering the background. 54 | } 55 | 56 | func sceneDidEnterBackground(_ scene: UIScene) { 57 | // Called as the scene transitions from the foreground to the background. 58 | // Use this method to save data, release shared resources, and store enough scene-specific state information 59 | // to restore the scene back to its current state. 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Settings/Settings/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Settings/Settings/Settings.h: -------------------------------------------------------------------------------- 1 | // 2 | // Settings.h 3 | // Settings 4 | // 5 | // Created by minsone on 2020/02/09. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Settings. 12 | FOUNDATION_EXPORT double SettingsVersionNumber; 13 | 14 | //! Project version string for Settings. 15 | FOUNDATION_EXPORT const unsigned char SettingsVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Settings/Settings/Sources/SettingsBuilder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsBuilder.swift 3 | // Settings 4 | // 5 | // Created by minsone on 2020/02/09. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import RIBs 10 | import Resource 11 | 12 | public protocol SettingsDependency: Dependency { 13 | var colors: [R.Color] { get } 14 | } 15 | 16 | final class SettingsComponent: Component { 17 | fileprivate let colors: [R.Color] 18 | override init(dependency: SettingsDependency) { 19 | self.colors = dependency.colors 20 | super.init(dependency: dependency) 21 | } 22 | } 23 | 24 | // MARK: - Builder 25 | 26 | public protocol SettingsBuildable: Buildable { 27 | func build(withListener listener: SettingsListener) -> SettingsRouting 28 | } 29 | 30 | public final class SettingsBuilder: Builder, SettingsBuildable { 31 | 32 | public override init(dependency: SettingsDependency) { 33 | super.init(dependency: dependency) 34 | } 35 | 36 | public func build(withListener listener: SettingsListener) -> SettingsRouting { 37 | let component = SettingsComponent(dependency: dependency) 38 | let viewState = SettingsViewState(colors: component.colors) 39 | let viewController = SettingsViewController(viewState: viewState) 40 | let interactor = SettingsInteractor(presenter: viewController) 41 | interactor.listener = listener 42 | return SettingsRouter(interactor: interactor, viewController: viewController) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Settings/Settings/Sources/SettingsInteractor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsInteractor.swift 3 | // Settings 4 | // 5 | // Created by minsone on 2020/02/09. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import RIBs 10 | import RxSwift 11 | import Resource 12 | import UIKit 13 | 14 | public protocol SettingsRouting: ViewableRouting {} 15 | 16 | public protocol SettingsPresentable: Presentable { 17 | var listener: SettingsPresentableListener? { get set } 18 | } 19 | 20 | public protocol SettingsListener: class { 21 | func finishSettings() 22 | func updateBackgroundColor(color: UIColor) 23 | } 24 | 25 | final class SettingsInteractor: PresentableInteractor, SettingsInteractable, SettingsPresentableListener { 26 | weak var router: SettingsRouting? 27 | weak var listener: SettingsListener? 28 | 29 | // TODO: Add additional dependencies to constructor. Do not perform any logic 30 | // in constructor. 31 | override init(presenter: SettingsPresentable) { 32 | super.init(presenter: presenter) 33 | presenter.listener = self 34 | } 35 | 36 | override func didBecomeActive() { 37 | super.didBecomeActive() 38 | // TODO: Implement business logic here. 39 | } 40 | 41 | override func willResignActive() { 42 | super.willResignActive() 43 | // TODO: Pause any business logic. 44 | } 45 | 46 | func finishSettings() { 47 | listener?.finishSettings() 48 | } 49 | 50 | func select(themeColor color: R.Color) { 51 | listener?.updateBackgroundColor(color: color.color) 52 | R.ThemeColor.saveColor(color) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Settings/Settings/Sources/SettingsRouter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsRouter.swift 3 | // Settings 4 | // 5 | // Created by minsone on 2020/02/09. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import RIBs 10 | 11 | public protocol SettingsInteractable: Interactable { 12 | var router: SettingsRouting? { get set } 13 | var listener: SettingsListener? { get set } 14 | } 15 | 16 | public protocol SettingsViewControllable: ViewControllable { 17 | // TODO: Declare methods the router invokes to manipulate the view hierarchy. 18 | } 19 | 20 | final class SettingsRouter: ViewableRouter, SettingsRouting { 21 | 22 | // TODO: Constructor inject child builder protocols to allow building children. 23 | override init(interactor: SettingsInteractable, viewController: SettingsViewControllable) { 24 | super.init(interactor: interactor, viewController: viewController) 25 | interactor.router = self 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Settings/Settings/Sources/SettingsViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsViewController.swift 3 | // Settings 4 | // 5 | // Created by minsone on 2020/02/09. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import RIBs 10 | import RxSwift 11 | import UIKit 12 | import SwiftUI 13 | import Resource 14 | 15 | public protocol SettingsPresentableListener: class { 16 | func finishSettings() 17 | func select(themeColor: R.Color) 18 | } 19 | 20 | final class SettingsViewController: SettingsPresentable, SettingsViewControllable, ViewStateListener { 21 | var uiviewController: UIViewController { 22 | return hostingController 23 | } 24 | 25 | weak var listener: SettingsPresentableListener? 26 | 27 | private let hostingController: UIHostingController 28 | 29 | var viewState: SettingsViewState 30 | 31 | init(viewState: SettingsViewState) { 32 | let rootView = SettingsView(state: viewState) 33 | self.viewState = viewState 34 | self.hostingController = UIHostingController(rootView: rootView) 35 | self.viewState.listener = self 36 | } 37 | 38 | func onDisappear() { 39 | listener?.finishSettings() 40 | } 41 | 42 | func select(themeColor: R.Color) { 43 | listener?.select(themeColor: themeColor) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Settings/Settings/Sources/View/AuthorSectionView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AuthorSectionView.swift 3 | // Settings 4 | // 5 | // Created by minsone on 2020/02/22. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | 12 | struct AuthorSectionView: View { 13 | var body: some View { 14 | Section(header: Text("Author").font(.headline)) { 15 | Text("Developer : Ahn Jung Min") 16 | Text("Designer : Lee Do Yeong") 17 | } 18 | } 19 | } 20 | 21 | struct LicenseSectionView: View { 22 | var body: some View { 23 | Section(header: Text("License").font(.headline)) { 24 | Text(""" 25 | 원 저작자인 이호민님께 한글시계 제작을 허락을 받고, 현 디자인으로 만든 이상훈님께 iOS 앱으로 만드는 것을 허락받았습니다. 26 | 27 | 이호민님의 한글시계 CC BY-SA 라이선스를 따르고 있습니다. 28 | 29 | 한글시계 for iOS는 Github 저장소에서 확인할 수 있습니다. 30 | """) 31 | .padding() 32 | Text("Github으로 이동") 33 | .foregroundColor(Color.blue) 34 | .padding() 35 | .onTapGesture { 36 | URL(string: "https://github.com/minsOne/HangulClockApp") 37 | .map { UIApplication.shared.open($0) } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Settings/Settings/Sources/View/SettingsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsView.swift 3 | // Settings 4 | // 5 | // Created by minsone on 2020/02/21. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | import Resource 12 | import PureSwiftUI 13 | 14 | struct SettingsView { 15 | @ObservedObject var state: SettingsViewState 16 | } 17 | 18 | extension SettingsView: View { 19 | var body: some View { 20 | NavigationView { 21 | List { 22 | Section(header: Text("THEME").font(.headline)) { 23 | ColorRow(colors: state.colors, 24 | tapGesture: state.selectThemeColor) 25 | .frame(height: 80) 26 | } 27 | AuthorSectionView() 28 | LicenseSectionView() 29 | } 30 | .listStyle(GroupedListStyle()) 31 | .navigationBarTitle(Text("Settings").font(.largeTitle)) 32 | .navigationBarItems(trailing: 33 | Button("닫기") { 34 | self.state.onDisappear() 35 | } 36 | ) 37 | } 38 | .onAppear(perform: state.onAppear) 39 | .onDisappear(perform: state.onDisappear) 40 | } 41 | } 42 | 43 | struct ColorRow: View { 44 | let colors: [R.Color] 45 | let tapGesture: ((R.Color) -> Void)? 46 | 47 | var body: some View { 48 | HStack(spacing: 10) { 49 | ForEach(colors, id: \.id) { item in 50 | Button("") { 51 | self.tapGesture?(item) 52 | } 53 | .buttonStyle(ColorButtonStyle(color: Color(item.color))) 54 | } 55 | Spacer() 56 | } 57 | } 58 | } 59 | 60 | struct ColorButtonStyle: ButtonStyle { 61 | var color: Color 62 | 63 | public func makeBody(configuration: Self.Configuration) -> some View { 64 | ColorButton(configuration: configuration, color: color) 65 | } 66 | } 67 | 68 | 69 | private struct ColorButton: View { 70 | let configuration: ButtonStyleConfiguration 71 | let color: Color 72 | 73 | var body: some View { 74 | 75 | return configuration.label 76 | .frame(40, 40) 77 | .cornerRadius(8) 78 | .foregroundColor(.white) 79 | .background(RoundedRectangle(cornerRadius: 5).fill(color)) 80 | .compositingGroup() 81 | .opacity(configuration.isPressed ? 0.5 : 1.0) 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Settings/Settings/Sources/View/SettingsViewState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewState.swift 3 | // Settings 4 | // 5 | // Created by minsone on 2020/02/21. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import SwiftUI 11 | import Resource 12 | 13 | protocol ViewStateListener: class { 14 | func onDisappear() 15 | func select(themeColor: R.Color) 16 | } 17 | 18 | class SettingsViewState: ObservableObject { 19 | var colors: [R.Color] 20 | weak var listener: ViewStateListener? 21 | 22 | init(colors: [R.Color]) { 23 | self.colors = colors 24 | } 25 | 26 | func onAppear() {} 27 | 28 | func onDisappear() { 29 | listener?.onDisappear() 30 | } 31 | 32 | func selectThemeColor(_ color: R.Color) { 33 | listener?.select(themeColor: color) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Umbrella/Umbrella/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Umbrella/Umbrella/Umbrella.h: -------------------------------------------------------------------------------- 1 | // 2 | // Umbrella.h 3 | // Umbrella 4 | // 5 | // Created by minsone on 2020/02/07. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Umbrella. 12 | FOUNDATION_EXPORT double UmbrellaVersionNumber; 13 | 14 | //! Project version string for Umbrella. 15 | FOUNDATION_EXPORT const unsigned char UmbrellaVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Umbrella/Umbrella/Umbrella.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Umbrella.swift 3 | // Umbrella 4 | // 5 | // Created by minsone on 2020/05/12. 6 | // Copyright © 2020 minsone. All rights reserved. 7 | // 8 | 9 | @_exported import PureSwiftUI 10 | @_exported import PureSwiftUITools 11 | @_exported import RIBs 12 | @_exported import RxCocoa 13 | @_exported import RxRelay 14 | @_exported import RxSwift 15 | -------------------------------------------------------------------------------- /Vender/Firebase/FIRAnalyticsConnector.framework/FIRAnalyticsConnector: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/FIRAnalyticsConnector.framework/FIRAnalyticsConnector -------------------------------------------------------------------------------- /Vender/Firebase/FIRAnalyticsConnector.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | FIRAnalyticsConnector 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | FIRAnalyticsConnector 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/FIRAnalyticsConnector.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module FIRAnalyticsConnector { 2 | export * 3 | module * { export * } 4 | link "sqlite3" 5 | link "z" 6 | link framework "CoreData" 7 | link framework "Security" 8 | link framework "StoreKit" 9 | link framework "SystemConfiguration" 10 | link framework "UIKit" 11 | } 12 | -------------------------------------------------------------------------------- /Vender/Firebase/Firebase.framework/Firebase: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/Firebase.framework/Firebase -------------------------------------------------------------------------------- /Vender/Firebase/Firebase.framework/Headers/Firebase.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if !defined(__has_include) 4 | #error "Firebase.h won't import anything if your compiler doesn't support __has_include. Please \ 5 | import the headers individually." 6 | #else 7 | #if __has_include() 8 | #import 9 | #endif 10 | 11 | #if __has_include() 12 | #import 13 | #endif 14 | 15 | #if __has_include() 16 | #import 17 | #endif 18 | 19 | #if __has_include() 20 | #import 21 | #if !__has_include() 22 | #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 23 | #warning "FirebaseAnalytics.framework is not included in your target. Please add \ 24 | `Firebase/Analytics` to your Podfile or add FirebaseAnalytics.framework to your project to ensure \ 25 | Firebase Dynamic Links works as intended." 26 | #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 27 | #endif 28 | #endif 29 | 30 | #if __has_include() 31 | #import 32 | #endif 33 | 34 | #if __has_include() 35 | #import 36 | #endif 37 | 38 | #if __has_include() 39 | #import 40 | #if !__has_include() 41 | #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 42 | #warning "FirebaseAnalytics.framework is not included in your target. Please add \ 43 | `Firebase/Analytics` to your Podfile or add FirebaseAnalytics.framework to your project to ensure \ 44 | Firebase In App Messaging works as intended." 45 | #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 46 | #endif 47 | #endif 48 | 49 | #if __has_include() 50 | #import 51 | #endif 52 | 53 | #if __has_include() 54 | #import 55 | #if !__has_include() 56 | #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 57 | #warning "FirebaseAnalytics.framework is not included in your target. Please add \ 58 | `Firebase/Analytics` to your Podfile or add FirebaseAnalytics.framework to your project to ensure \ 59 | Firebase Messaging works as intended." 60 | #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 61 | #endif 62 | #endif 63 | 64 | #if __has_include() 65 | #import 66 | #endif 67 | 68 | #if __has_include() 69 | #import 70 | #endif 71 | 72 | #if __has_include() 73 | #import 74 | #endif 75 | 76 | #if __has_include() 77 | #import 78 | #endif 79 | 80 | #if __has_include() 81 | #import 82 | #endif 83 | 84 | #if __has_include() 85 | #import 86 | #endif 87 | 88 | #if __has_include() 89 | #import 90 | #endif 91 | 92 | #if __has_include() 93 | #import 94 | #endif 95 | 96 | #if __has_include() 97 | #import 98 | #endif 99 | 100 | #if __has_include() 101 | #import 102 | #endif 103 | 104 | #if __has_include() 105 | #import 106 | #endif 107 | 108 | #if __has_include() 109 | #import 110 | #endif 111 | 112 | #if __has_include() 113 | #import 114 | #endif 115 | 116 | #if __has_include() 117 | #import 118 | #if !__has_include() 119 | #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 120 | #warning "FirebaseAnalytics.framework is not included in your target. Please add \ 121 | `Firebase/Analytics` to your Podfile or add FirebaseAnalytics.framework to your project to ensure \ 122 | Firebase Performance works as intended." 123 | #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 124 | #endif 125 | #endif 126 | 127 | #if __has_include() 128 | #import 129 | #if !__has_include() 130 | #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 131 | #warning "FirebaseAnalytics.framework is not included in your target. Please add \ 132 | `Firebase/Analytics` to your Podfile or add FirebaseAnalytics.framework to your project to ensure \ 133 | Firebase Remote Config works as intended." 134 | #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING 135 | #endif 136 | #endif 137 | 138 | #if __has_include() 139 | #import 140 | #endif 141 | 142 | #if __has_include() 143 | #import 144 | #endif 145 | 146 | #if __has_include() 147 | #import 148 | #endif 149 | 150 | #if __has_include() 151 | #import 152 | #endif 153 | 154 | #endif // defined(__has_include) 155 | -------------------------------------------------------------------------------- /Vender/Firebase/Firebase.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | Firebase 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | Firebase 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/Firebase.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Firebase { 2 | header "Firebase.h" 3 | export * 4 | } -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseAnalytics.framework/FirebaseAnalytics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/FirebaseAnalytics.framework/FirebaseAnalytics -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "FIRAnalytics.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | /** 8 | * Provides App Delegate handlers to be used in your App Delegate. 9 | * 10 | * To save time integrating Firebase Analytics in an application, Firebase Analytics does not 11 | * require delegation implementation from the AppDelegate. Instead this is automatically done by 12 | * Firebase Analytics. Should you choose instead to delegate manually, you can turn off the App 13 | * Delegate Proxy by adding FirebaseAppDelegateProxyEnabled into your app's Info.plist and setting 14 | * it to NO, and adding the methods in this category to corresponding delegation handlers. 15 | * 16 | * To handle Universal Links, you must return YES in 17 | * [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. 18 | */ 19 | @interface FIRAnalytics (AppDelegate) 20 | 21 | /** 22 | * Handles events related to a URL session that are waiting to be processed. 23 | * 24 | * For optimal use of Firebase Analytics, call this method from the 25 | * [UIApplicationDelegate application:handleEventsForBackgroundURLSession:completionHandler] 26 | * method of the app delegate in your app. 27 | * 28 | * @param identifier The identifier of the URL session requiring attention. 29 | * @param completionHandler The completion handler to call when you finish processing the events. 30 | * Calling this completion handler lets the system know that your app's user interface is 31 | * updated and a new snapshot can be taken. 32 | */ 33 | + (void)handleEventsForBackgroundURLSession:(NSString *)identifier 34 | completionHandler:(nullable void (^)(void))completionHandler; 35 | 36 | /** 37 | * Handles the event when the app is launched by a URL. 38 | * 39 | * Call this method from [UIApplicationDelegate application:openURL:options:] (on iOS 9.0 and 40 | * above), or [UIApplicationDelegate application:openURL:sourceApplication:annotation:] (on 41 | * iOS 8.x and below) in your app. 42 | * 43 | * @param url The URL resource to open. This resource can be a network resource or a file. 44 | */ 45 | + (void)handleOpenURL:(NSURL *)url; 46 | 47 | /** 48 | * Handles the event when the app receives data associated with user activity that includes a 49 | * Universal Link (on iOS 9.0 and above). 50 | * 51 | * Call this method from [UIApplication continueUserActivity:restorationHandler:] in your app 52 | * delegate (on iOS 9.0 and above). 53 | * 54 | * @param userActivity The activity object containing the data associated with the task the user 55 | * was performing. 56 | */ 57 | + (void)handleUserActivity:(id)userActivity; 58 | 59 | @end 60 | 61 | NS_ASSUME_NONNULL_END 62 | 63 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseAnalytics.framework/Headers/FIRAnalytics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "FIREventNames.h" 4 | #import "FIRParameterNames.h" 5 | #import "FIRUserPropertyNames.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /// The top level Firebase Analytics singleton that provides methods for logging events and setting 10 | /// user properties. See the developer guides for general 11 | /// information on using Firebase Analytics in your apps. 12 | NS_SWIFT_NAME(Analytics) 13 | @interface FIRAnalytics : NSObject 14 | 15 | /// Logs an app event. The event can have up to 25 parameters. Events with the same name must have 16 | /// the same parameters. Up to 500 event names are supported. Using predefined events and/or 17 | /// parameters is recommended for optimal reporting. 18 | /// 19 | /// The following event names are reserved and cannot be used: 20 | ///
    21 | ///
  • ad_activeview
  • 22 | ///
  • ad_click
  • 23 | ///
  • ad_exposure
  • 24 | ///
  • ad_impression
  • 25 | ///
  • ad_query
  • 26 | ///
  • adunit_exposure
  • 27 | ///
  • app_clear_data
  • 28 | ///
  • app_remove
  • 29 | ///
  • app_update
  • 30 | ///
  • error
  • 31 | ///
  • first_open
  • 32 | ///
  • in_app_purchase
  • 33 | ///
  • notification_dismiss
  • 34 | ///
  • notification_foreground
  • 35 | ///
  • notification_open
  • 36 | ///
  • notification_receive
  • 37 | ///
  • os_update
  • 38 | ///
  • screen_view
  • 39 | ///
  • session_start
  • 40 | ///
  • user_engagement
  • 41 | ///
42 | /// 43 | /// @param name The name of the event. Should contain 1 to 40 alphanumeric characters or 44 | /// underscores. The name must start with an alphabetic character. Some event names are 45 | /// reserved. See FIREventNames.h for the list of reserved event names. The "firebase_", 46 | /// "google_", and "ga_" prefixes are reserved and should not be used. Note that event names are 47 | /// case-sensitive and that logging two events whose names differ only in case will result in 48 | /// two distinct events. 49 | /// @param parameters The dictionary of event parameters. Passing nil indicates that the event has 50 | /// no parameters. Parameter names can be up to 40 characters long and must start with an 51 | /// alphabetic character and contain only alphanumeric characters and underscores. Only NSString 52 | /// and NSNumber (signed 64-bit integer and 64-bit floating-point number) parameter types are 53 | /// supported. NSString parameter values can be up to 100 characters long. The "firebase_", 54 | /// "google_", and "ga_" prefixes are reserved and should not be used for parameter names. 55 | + (void)logEventWithName:(NSString *)name 56 | parameters:(nullable NSDictionary *)parameters 57 | NS_SWIFT_NAME(logEvent(_:parameters:)); 58 | 59 | /// Sets a user property to a given value. Up to 25 user property names are supported. Once set, 60 | /// user property values persist throughout the app lifecycle and across sessions. 61 | /// 62 | /// The following user property names are reserved and cannot be used: 63 | ///
    64 | ///
  • first_open_time
  • 65 | ///
  • last_deep_link_referrer
  • 66 | ///
  • user_id
  • 67 | ///
68 | /// 69 | /// @param value The value of the user property. Values can be up to 36 characters long. Setting the 70 | /// value to nil removes the user property. 71 | /// @param name The name of the user property to set. Should contain 1 to 24 alphanumeric characters 72 | /// or underscores and must start with an alphabetic character. The "firebase_", "google_", and 73 | /// "ga_" prefixes are reserved and should not be used for user property names. 74 | + (void)setUserPropertyString:(nullable NSString *)value forName:(NSString *)name 75 | NS_SWIFT_NAME(setUserProperty(_:forName:)); 76 | 77 | /// Sets the user ID property. This feature must be used in accordance with 78 | /// Google's Privacy Policy 79 | /// 80 | /// @param userID The user ID to ascribe to the user of this app on this device, which must be 81 | /// non-empty and no more than 256 characters long. Setting userID to nil removes the user ID. 82 | + (void)setUserID:(nullable NSString *)userID; 83 | 84 | /// Sets the current screen name, which specifies the current visual context in your app. This helps 85 | /// identify the areas in your app where users spend their time and how they interact with your app. 86 | /// Must be called on the main thread. 87 | /// 88 | /// Note that screen reporting is enabled automatically and records the class name of the current 89 | /// UIViewController for you without requiring you to call this method. If you implement 90 | /// viewDidAppear in your UIViewController but do not call [super viewDidAppear:], that screen class 91 | /// will not be automatically tracked. The class name can optionally be overridden by calling this 92 | /// method in the viewDidAppear callback of your UIViewController and specifying the 93 | /// screenClassOverride parameter. setScreenName:screenClass: must be called after 94 | /// [super viewDidAppear:]. 95 | /// 96 | /// If your app does not use a distinct UIViewController for each screen, you should call this 97 | /// method and specify a distinct screenName each time a new screen is presented to the user. 98 | /// 99 | /// The screen name and screen class remain in effect until the current UIViewController changes or 100 | /// a new call to setScreenName:screenClass: is made. 101 | /// 102 | /// @param screenName The name of the current screen. Should contain 1 to 100 characters. Set to nil 103 | /// to clear the current screen name. 104 | /// @param screenClassOverride The name of the screen class. Should contain 1 to 100 characters. By 105 | /// default this is the class name of the current UIViewController. Set to nil to revert to the 106 | /// default class name. 107 | + (void)setScreenName:(nullable NSString *)screenName 108 | screenClass:(nullable NSString *)screenClassOverride; 109 | 110 | /// Sets whether analytics collection is enabled for this app on this device. This setting is 111 | /// persisted across app sessions. By default it is enabled. 112 | /// 113 | /// @param analyticsCollectionEnabled A flag that enables or disables Analytics collection. 114 | + (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled; 115 | 116 | /// Sets the interval of inactivity in seconds that terminates the current session. The default 117 | /// value is 1800 seconds (30 minutes). 118 | /// 119 | /// @param sessionTimeoutInterval The custom time of inactivity in seconds before the current 120 | /// session terminates. 121 | + (void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval; 122 | 123 | /// The unique ID for this instance of the application. 124 | + (NSString *)appInstanceID; 125 | 126 | /// Clears all analytics data for this instance from the device and resets the app instance ID. 127 | /// FIRAnalyticsConfiguration values will be reset to the default values. 128 | + (void)resetAnalyticsData; 129 | 130 | @end 131 | 132 | NS_ASSUME_NONNULL_END 133 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h: -------------------------------------------------------------------------------- 1 | /// @file FIRUserPropertyNames.h 2 | /// 3 | /// Predefined user property names. 4 | /// 5 | /// A UserProperty is an attribute that describes the app-user. By supplying UserProperties, you can 6 | /// later analyze different behaviors of various segments of your userbase. You may supply up to 25 7 | /// unique UserProperties per app, and you can use the name and value of your choosing for each one. 8 | /// UserProperty names can be up to 24 characters long, may only contain alphanumeric characters and 9 | /// underscores ("_"), and must start with an alphabetic character. UserProperty values can be up to 10 | /// 36 characters long. The "firebase_", "google_", and "ga_" prefixes are reserved and should not 11 | /// be used. 12 | 13 | #import 14 | 15 | /// The method used to sign in. For example, "google", "facebook" or "twitter". 16 | static NSString *const kFIRUserPropertySignUpMethod 17 | NS_SWIFT_NAME(AnalyticsUserPropertySignUpMethod) = @"sign_up_method"; 18 | 19 | /// Indicates whether events logged by Google Analytics can be used to personalize ads for the user. 20 | /// Set to "YES" to enable, or "NO" to disable. Default is enabled. See the 21 | /// documentation for 22 | /// more details and information about related settings. 23 | /// 24 | ///
25 | ///     [FIRAnalytics setUserPropertyString:@"NO"
26 | ///                                 forName:kFIRUserPropertyAllowAdPersonalizationSignals];
27 | /// 
28 | static NSString *const kFIRUserPropertyAllowAdPersonalizationSignals 29 | NS_SWIFT_NAME(AnalyticsUserPropertyAllowAdPersonalizationSignals) = @"allow_personalized_ads"; 30 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h: -------------------------------------------------------------------------------- 1 | #import "FIRAnalytics+AppDelegate.h" 2 | #import "FIRAnalytics.h" 3 | #import "FIREventNames.h" 4 | #import "FIRParameterNames.h" 5 | #import "FIRUserPropertyNames.h" 6 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseAnalytics.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | FirebaseAnalytics 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | FirebaseAnalytics 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseAnalytics.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module FirebaseAnalytics { 2 | umbrella header "FirebaseAnalytics.h" 3 | export * 4 | module * { export * } 5 | link "sqlite3" 6 | link "z" 7 | link framework "CoreData" 8 | link framework "Security" 9 | link framework "StoreKit" 10 | link framework "SystemConfiguration" 11 | link framework "UIKit" 12 | } 13 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCore.framework/FirebaseCore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/FirebaseCore.framework/FirebaseCore -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCore.framework/Headers/FIRApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | @class FIROptions; 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | /** A block that takes a BOOL and has no return value. */ 24 | typedef void (^FIRAppVoidBoolCallback)(BOOL success) NS_SWIFT_NAME(FirebaseAppVoidBoolCallback); 25 | 26 | /** 27 | * The entry point of Firebase SDKs. 28 | * 29 | * Initialize and configure FIRApp using +[FIRApp configure] 30 | * or other customized ways as shown below. 31 | * 32 | * The logging system has two modes: default mode and debug mode. In default mode, only logs with 33 | * log level Notice, Warning and Error will be sent to device. In debug mode, all logs will be sent 34 | * to device. The log levels that Firebase uses are consistent with the ASL log levels. 35 | * 36 | * Enable debug mode by passing the -FIRDebugEnabled argument to the application. You can add this 37 | * argument in the application's Xcode scheme. When debug mode is enabled via -FIRDebugEnabled, 38 | * further executions of the application will also be in debug mode. In order to return to default 39 | * mode, you must explicitly disable the debug mode with the application argument -FIRDebugDisabled. 40 | * 41 | * It is also possible to change the default logging level in code by calling setLoggerLevel: on 42 | * the FIRConfiguration interface. 43 | */ 44 | NS_SWIFT_NAME(FirebaseApp) 45 | @interface FIRApp : NSObject 46 | 47 | /** 48 | * Configures a default Firebase app. Raises an exception if any configuration step fails. The 49 | * default app is named "__FIRAPP_DEFAULT". This method should be called after the app is launched 50 | * and before using Firebase services. This method is thread safe and contains synchronous file I/O 51 | * (reading GoogleService-Info.plist from disk). 52 | */ 53 | + (void)configure; 54 | 55 | /** 56 | * Configures the default Firebase app with the provided options. The default app is named 57 | * "__FIRAPP_DEFAULT". Raises an exception if any configuration step fails. This method is thread 58 | * safe. 59 | * 60 | * @param options The Firebase application options used to configure the service. 61 | */ 62 | + (void)configureWithOptions:(FIROptions *)options NS_SWIFT_NAME(configure(options:)); 63 | 64 | /** 65 | * Configures a Firebase app with the given name and options. Raises an exception if any 66 | * configuration step fails. This method is thread safe. 67 | * 68 | * @param name The application's name given by the developer. The name should should only contain 69 | Letters, Numbers and Underscore. 70 | * @param options The Firebase application options used to configure the services. 71 | */ 72 | // clang-format off 73 | + (void)configureWithName:(NSString *)name 74 | options:(FIROptions *)options NS_SWIFT_NAME(configure(name:options:)); 75 | // clang-format on 76 | 77 | /** 78 | * Returns the default app, or nil if the default app does not exist. 79 | */ 80 | + (nullable FIRApp *)defaultApp NS_SWIFT_NAME(app()); 81 | 82 | /** 83 | * Returns a previously created FIRApp instance with the given name, or nil if no such app exists. 84 | * This method is thread safe. 85 | */ 86 | + (nullable FIRApp *)appNamed:(NSString *)name NS_SWIFT_NAME(app(name:)); 87 | 88 | /** 89 | * Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This 90 | * method is thread safe. 91 | */ 92 | @property(class, readonly, nullable) NSDictionary *allApps; 93 | 94 | /** 95 | * Cleans up the current FIRApp, freeing associated data and returning its name to the pool for 96 | * future use. This method is thread safe. 97 | */ 98 | - (void)deleteApp:(FIRAppVoidBoolCallback)completion; 99 | 100 | /** 101 | * FIRApp instances should not be initialized directly. Call +[FIRApp configure], 102 | * +[FIRApp configureWithOptions:], or +[FIRApp configureWithNames:options:] directly. 103 | */ 104 | - (instancetype)init NS_UNAVAILABLE; 105 | 106 | /** 107 | * Gets the name of this app. 108 | */ 109 | @property(nonatomic, copy, readonly) NSString *name; 110 | 111 | /** 112 | * Gets a copy of the options for this app. These are non-modifiable. 113 | */ 114 | @property(nonatomic, copy, readonly) FIROptions *options; 115 | 116 | /** 117 | * Gets or sets whether automatic data collection is enabled for all products. Defaults to `YES` 118 | * unless `FirebaseDataCollectionDefaultEnabled` is set to `NO` in your app's Info.plist. This value 119 | * is persisted across runs of the app so that it can be set once when users have consented to 120 | * collection. 121 | */ 122 | @property(nonatomic, readwrite, getter=isDataCollectionDefaultEnabled) 123 | BOOL dataCollectionDefaultEnabled; 124 | 125 | @end 126 | 127 | NS_ASSUME_NONNULL_END 128 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCore.framework/Headers/FIRConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | /** 24 | * This interface provides global level properties that the developer can tweak. 25 | */ 26 | NS_SWIFT_NAME(FirebaseConfiguration) 27 | @interface FIRConfiguration : NSObject 28 | 29 | /** Returns the shared configuration object. */ 30 | @property(class, nonatomic, readonly) FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared); 31 | 32 | /** 33 | * Sets the logging level for internal Firebase logging. Firebase will only log messages 34 | * that are logged at or below loggerLevel. The messages are logged both to the Xcode 35 | * console and to the device's log. Note that if an app is running from AppStore, it will 36 | * never log above FIRLoggerLevelNotice even if loggerLevel is set to a higher (more verbose) 37 | * setting. 38 | * 39 | * @param loggerLevel The maximum logging level. The default level is set to FIRLoggerLevelNotice. 40 | */ 41 | - (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCore.framework/Headers/FIRLoggerLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Note that importing GULLoggerLevel.h will lead to a non-modular header 18 | // import error. 19 | 20 | /** 21 | * The log levels used by internal logging. 22 | */ 23 | typedef NS_ENUM(NSInteger, FIRLoggerLevel) { 24 | /** Error level, matches ASL_LEVEL_ERR. */ 25 | FIRLoggerLevelError = 3, 26 | /** Warning level, matches ASL_LEVEL_WARNING. */ 27 | FIRLoggerLevelWarning = 4, 28 | /** Notice level, matches ASL_LEVEL_NOTICE. */ 29 | FIRLoggerLevelNotice = 5, 30 | /** Info level, matches ASL_LEVEL_INFO. */ 31 | FIRLoggerLevelInfo = 6, 32 | /** Debug level, matches ASL_LEVEL_DEBUG. */ 33 | FIRLoggerLevelDebug = 7, 34 | /** Minimum log level. */ 35 | FIRLoggerLevelMin = FIRLoggerLevelError, 36 | /** Maximum log level. */ 37 | FIRLoggerLevelMax = FIRLoggerLevelDebug 38 | } NS_SWIFT_NAME(FirebaseLoggerLevel); 39 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCore.framework/Headers/FIROptions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | /** 22 | * This class provides constant fields of Google APIs. 23 | */ 24 | NS_SWIFT_NAME(FirebaseOptions) 25 | @interface FIROptions : NSObject 26 | 27 | /** 28 | * Returns the default options. The first time this is called it synchronously reads 29 | * GoogleService-Info.plist from disk. 30 | */ 31 | + (nullable FIROptions *)defaultOptions NS_SWIFT_NAME(defaultOptions()); 32 | 33 | /** 34 | * An iOS API key used for authenticating requests from your app, e.g. 35 | * @"AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk", used to identify your app to Google servers. 36 | */ 37 | @property(nonatomic, copy, nullable) NSString *APIKey NS_SWIFT_NAME(apiKey); 38 | 39 | /** 40 | * The bundle ID for the application. Defaults to `[[NSBundle mainBundle] bundleID]` when not set 41 | * manually or in a plist. 42 | */ 43 | @property(nonatomic, copy) NSString *bundleID; 44 | 45 | /** 46 | * The OAuth2 client ID for iOS application used to authenticate Google users, for example 47 | * @"12345.apps.googleusercontent.com", used for signing in with Google. 48 | */ 49 | @property(nonatomic, copy, nullable) NSString *clientID; 50 | 51 | /** 52 | * The tracking ID for Google Analytics, e.g. @"UA-12345678-1", used to configure Google Analytics. 53 | */ 54 | @property(nonatomic, copy, nullable) NSString *trackingID; 55 | 56 | /** 57 | * The Project Number from the Google Developer's console, for example @"012345678901", used to 58 | * configure Google Cloud Messaging. 59 | */ 60 | @property(nonatomic, copy) NSString *GCMSenderID NS_SWIFT_NAME(gcmSenderID); 61 | 62 | /** 63 | * The Project ID from the Firebase console, for example @"abc-xyz-123". 64 | */ 65 | @property(nonatomic, copy, nullable) NSString *projectID; 66 | 67 | /** 68 | * The Android client ID used in Google AppInvite when an iOS app has its Android version, for 69 | * example @"12345.apps.googleusercontent.com". 70 | */ 71 | @property(nonatomic, copy, nullable) NSString *androidClientID; 72 | 73 | /** 74 | * The Google App ID that is used to uniquely identify an instance of an app. 75 | */ 76 | @property(nonatomic, copy) NSString *googleAppID; 77 | 78 | /** 79 | * The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com". 80 | */ 81 | @property(nonatomic, copy, nullable) NSString *databaseURL; 82 | 83 | /** 84 | * The URL scheme used to set up Durable Deep Link service. 85 | */ 86 | @property(nonatomic, copy, nullable) NSString *deepLinkURLScheme; 87 | 88 | /** 89 | * The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com". 90 | */ 91 | @property(nonatomic, copy, nullable) NSString *storageBucket; 92 | 93 | /** 94 | * The App Group identifier to share data between the application and the application extensions. 95 | * The App Group must be configured in the application and on the Apple Developer Portal. Default 96 | * value `nil`. 97 | */ 98 | @property(nonatomic, copy, nullable) NSString *appGroupID; 99 | 100 | /** 101 | * Initializes a customized instance of FIROptions from the file at the given plist file path. This 102 | * will read the file synchronously from disk. 103 | * For example, 104 | * NSString *filePath = 105 | * [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"]; 106 | * FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath]; 107 | * Returns nil if the plist file does not exist or is invalid. 108 | */ 109 | - (nullable instancetype)initWithContentsOfFile:(NSString *)plistPath; 110 | 111 | /** 112 | * Initializes a customized instance of FIROptions with required fields. Use the mutable properties 113 | * to modify fields for configuring specific services. 114 | */ 115 | // clang-format off 116 | - (instancetype)initWithGoogleAppID:(NSString *)googleAppID 117 | GCMSenderID:(NSString *)GCMSenderID 118 | NS_SWIFT_NAME(init(googleAppID:gcmSenderID:)); 119 | // clang-format on 120 | 121 | @end 122 | 123 | NS_ASSUME_NONNULL_END 124 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCore.framework/Headers/FirebaseCore.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "FIRApp.h" 18 | #import "FIRConfiguration.h" 19 | #import "FIRLoggerLevel.h" 20 | #import "FIROptions.h" 21 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCore.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | FirebaseCore 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | FirebaseCore 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCore.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module FirebaseCore { 2 | umbrella header "FirebaseCore.h" 3 | export * 4 | module * { export * } 5 | link framework "Foundation" 6 | link framework "UIKit" 7 | } 8 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCoreDiagnostics.framework/Headers/FIRCoreDiagnosticsDateFileStorage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | /// Stores a date to a specified file. 22 | @interface FIRCoreDiagnosticsDateFileStorage : NSObject 23 | 24 | - (instancetype)init NS_UNAVAILABLE; 25 | 26 | /** 27 | * Default initializer. 28 | * @param fileURL The URL of the file to store the date. The directory must exist, the file may not 29 | * exist, it will be created if needed. 30 | */ 31 | - (instancetype)initWithFileURL:(NSURL *)fileURL; 32 | 33 | /** 34 | * Saves the date to the specified file. 35 | * @return YES on success, NO otherwise. 36 | */ 37 | - (BOOL)setDate:(nullable NSDate *)date error:(NSError **)outError; 38 | 39 | /** 40 | * Reads the date to the specified file. 41 | * @return Returns date if exists, otherwise `nil`. 42 | */ 43 | - (nullable NSDate *)date; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseCoreDiagnostics.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module FirebaseCoreDiagnostics { 2 | umbrella header "FirebaseCoreDiagnostics.h" 3 | export * 4 | module * { export * } 5 | link framework "Foundation" 6 | } 7 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseInstanceID.framework/FirebaseInstanceID: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/FirebaseInstanceID.framework/FirebaseInstanceID -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "FIRInstanceID.h" 18 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseInstanceID.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | FirebaseInstanceID 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | FirebaseInstanceID 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/FirebaseInstanceID.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module FirebaseInstanceID { 2 | umbrella header "FirebaseInstanceID.h" 3 | export * 4 | module * { export * } 5 | link framework "Security" 6 | } 7 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleAppMeasurement.framework/GoogleAppMeasurement: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/GoogleAppMeasurement.framework/GoogleAppMeasurement -------------------------------------------------------------------------------- /Vender/Firebase/GoogleAppMeasurement.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | GoogleAppMeasurement 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | GoogleAppMeasurement 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleAppMeasurement.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module GoogleAppMeasurement { 2 | export * 3 | module * { export * } 4 | link "sqlite3" 5 | link "z" 6 | link framework "CoreData" 7 | link framework "Security" 8 | link framework "StoreKit" 9 | link framework "SystemConfiguration" 10 | link framework "UIKit" 11 | } 12 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/GoogleDataTransport: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/GoogleDataTransport.framework/GoogleDataTransport -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORAssert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | 21 | /** A block type that could be run instead of normal assertion logging. No return type, no params. 22 | */ 23 | typedef void (^GDTCORAssertionBlock)(void); 24 | 25 | /** Returns the result of executing a soft-linked method present in unit tests that allows a block 26 | * to be run instead of normal assertion logging. This helps ameliorate issues with catching 27 | * exceptions that occur on a dispatch_queue. 28 | * 29 | * @return A block that can be run instead of normal assert printing. 30 | */ 31 | FOUNDATION_EXPORT GDTCORAssertionBlock _Nullable GDTCORAssertionBlockToRunInstead(void); 32 | 33 | #if defined(NS_BLOCK_ASSERTIONS) 34 | 35 | #define GDTCORAssert(condition, ...) \ 36 | do { \ 37 | } while (0); 38 | 39 | #define GDTCORFatalAssert(condition, ...) \ 40 | do { \ 41 | } while (0); 42 | 43 | #else // defined(NS_BLOCK_ASSERTIONS) 44 | 45 | /** Asserts using a console log, unless a block was specified to be run instead. 46 | * 47 | * @param condition The condition you'd expect to be YES. 48 | */ 49 | #define GDTCORAssert(condition, ...) \ 50 | do { \ 51 | if (__builtin_expect(!(condition), 0)) { \ 52 | GDTCORAssertionBlock assertionBlock = GDTCORAssertionBlockToRunInstead(); \ 53 | if (assertionBlock) { \ 54 | assertionBlock(); \ 55 | } else { \ 56 | __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS \ 57 | NSString *__assert_file__ = [NSString stringWithUTF8String:__FILE__]; \ 58 | __assert_file__ = __assert_file__ ? __assert_file__ : @""; \ 59 | GDTCORLogError(GDTCORMCEGeneralError, @"Assertion failed (%@:%d): %s,", __assert_file__, \ 60 | __LINE__, ##__VA_ARGS__); \ 61 | __PRAGMA_POP_NO_EXTRA_ARG_WARNINGS \ 62 | } \ 63 | } \ 64 | } while (0); 65 | 66 | /** Asserts by logging to the console and throwing an exception if NS_BLOCK_ASSERTIONS is not 67 | * defined. 68 | * 69 | * @param condition The condition you'd expect to be YES. 70 | */ 71 | #define GDTCORFatalAssert(condition, ...) \ 72 | do { \ 73 | __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS \ 74 | if (__builtin_expect(!(condition), 0)) { \ 75 | NSString *__assert_file__ = [NSString stringWithUTF8String:__FILE__]; \ 76 | __assert_file__ = __assert_file__ ? __assert_file__ : @""; \ 77 | GDTCORLogError(GDTCORMCEFatalAssertion, \ 78 | @"Fatal assertion encountered, please open an issue at " \ 79 | "https://github.com/firebase/firebase-ios-sdk/issues " \ 80 | "(%@:%d): %s,", \ 81 | __assert_file__, __LINE__, ##__VA_ARGS__); \ 82 | [[NSAssertionHandler currentHandler] handleFailureInMethod:_cmd \ 83 | object:self \ 84 | file:__assert_file__ \ 85 | lineNumber:__LINE__ \ 86 | description:@"%@", ##__VA_ARGS__]; \ 87 | } \ 88 | __PRAGMA_POP_NO_EXTRA_ARG_WARNINGS \ 89 | } while (0); 90 | 91 | #endif // defined(NS_BLOCK_ASSERTIONS) 92 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORClock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | /** This class manages the device clock and produces snapshots of the current time. */ 22 | @interface GDTCORClock : NSObject 23 | 24 | /** The wallclock time, UTC, in milliseconds. */ 25 | @property(nonatomic, readonly) int64_t timeMillis; 26 | 27 | /** The offset from UTC in seconds. */ 28 | @property(nonatomic, readonly) int64_t timezoneOffsetSeconds; 29 | 30 | /** The kernel boot time when this clock was created. */ 31 | @property(nonatomic, readonly) int64_t kernelBootTime; 32 | 33 | /** The device uptime when this clock was created. */ 34 | @property(nonatomic, readonly) int64_t uptime; 35 | 36 | /** Creates a GDTCORClock object using the current time and offsets. 37 | * 38 | * @return A new GDTCORClock object representing the current time state. 39 | */ 40 | + (instancetype)snapshot; 41 | 42 | /** Creates a GDTCORClock object representing a time in the future, relative to now. 43 | * 44 | * @param millisInTheFuture The millis in the future from now this clock should represent. 45 | * @return An instance representing a future time. 46 | */ 47 | + (instancetype)clockSnapshotInTheFuture:(uint64_t)millisInTheFuture; 48 | 49 | /** Compares one clock with another, returns YES if the caller is after the parameter. 50 | * 51 | * @return YES if the calling clock's time is after the given clock's time. 52 | */ 53 | - (BOOL)isAfter:(GDTCORClock *)otherClock; 54 | 55 | @end 56 | 57 | NS_ASSUME_NONNULL_END 58 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORConsoleLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | /** A list of message codes to print in the logger that help to correspond printed messages with 20 | * code locations. 21 | * 22 | * Prefixes: 23 | * - MCW => MessageCodeWarning 24 | * - MCE => MessageCodeError 25 | */ 26 | typedef NS_ENUM(NSInteger, GDTCORMessageCode) { 27 | 28 | /** For warning messages concerning transportBytes: not being implemented by a data object. */ 29 | GDTCORMCWDataObjectMissingBytesImpl = 1, 30 | 31 | /** For warning messages concerning a failed event upload. */ 32 | GDTCORMCWUploadFailed = 2, 33 | 34 | /** For warning messages concerning a forced event upload. */ 35 | GDTCORMCWForcedUpload = 3, 36 | 37 | /** For warning messages concerning a failed reachability call. */ 38 | GDTCORMCWReachabilityFailed = 4, 39 | 40 | /** For error messages concerning transform: not being implemented by an event transformer. */ 41 | GDTCORMCETransformerDoesntImplementTransform = 1000, 42 | 43 | /** For error messages concerning the creation of a directory failing. */ 44 | GDTCORMCEDirectoryCreationError = 1001, 45 | 46 | /** For error messages concerning the writing of a event file. */ 47 | GDTCORMCEFileWriteError = 1002, 48 | 49 | /** For error messages concerning the lack of a prioritizer for a given backend. */ 50 | GDTCORMCEPrioritizerError = 1003, 51 | 52 | /** For error messages concerning a package delivery API violation. */ 53 | GDTCORMCEDeliverTwice = 1004, 54 | 55 | /** For error messages concerning an error in an implementation of -transportBytes. */ 56 | GDTCORMCETransportBytesError = 1005, 57 | 58 | /** For general purpose error messages in a dependency. */ 59 | GDTCORMCEGeneralError = 1006, 60 | 61 | /** For fatal errors. Please go to https://github.com/firebase/firebase-ios-sdk/issues and open 62 | * an issue if you encounter an error with this code. 63 | */ 64 | GDTCORMCEFatalAssertion = 1007 65 | }; 66 | 67 | /** */ 68 | FOUNDATION_EXPORT 69 | void GDTCORLog(GDTCORMessageCode code, NSString *_Nonnull format, ...); 70 | 71 | /** Returns the string that represents some message code. 72 | * 73 | * @param code The code to convert to a string. 74 | * @return The string representing the message code. 75 | */ 76 | FOUNDATION_EXPORT NSString *_Nonnull GDTCORMessageCodeEnumToString(GDTCORMessageCode code); 77 | 78 | // A define to wrap GULLogWarning with slightly more convenient usage. 79 | #define GDTCORLogWarning(MESSAGE_CODE, MESSAGE_FORMAT, ...) \ 80 | GDTCORLog(MESSAGE_CODE, MESSAGE_FORMAT, __VA_ARGS__); 81 | 82 | // A define to wrap GULLogError with slightly more convenient usage and a failing assert. 83 | #define GDTCORLogError(MESSAGE_CODE, MESSAGE_FORMAT, ...) \ 84 | GDTCORLog(MESSAGE_CODE, MESSAGE_FORMAT, __VA_ARGS__); 85 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORDataFuture.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | /** This class represents a future data object, determined at instantiation time. */ 22 | @interface GDTCORDataFuture : NSObject 23 | 24 | /** The data, computed on-demand, depending on the initializer. */ 25 | @property(nullable, readonly, nonatomic) NSData *data; 26 | 27 | /** If not nil, this data future was instantiated with this file URL. */ 28 | @property(nullable, readonly, nonatomic) NSURL *fileURL; 29 | 30 | /** If not nil, this data future was instantiated with this NSData instance. */ 31 | @property(nullable, readonly, nonatomic) NSData *originalData; 32 | 33 | /** Initializes an instance with the given the fileURL. 34 | * 35 | * @param fileURL The fileURL containing the data to return in -data. 36 | * @return An instance of this class. 37 | */ 38 | - (instancetype)initWithFileURL:(NSURL *)fileURL; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCOREvent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | 21 | @class GDTCORClock; 22 | @class GDTCORDataFuture; 23 | @class GDTCORStoredEvent; 24 | 25 | NS_ASSUME_NONNULL_BEGIN 26 | 27 | /** The different possible quality of service specifiers. High values indicate high priority. */ 28 | typedef NS_ENUM(NSInteger, GDTCOREventQoS) { 29 | /** The QoS tier wasn't set, and won't ever be sent. */ 30 | GDTCOREventQoSUnknown = 0, 31 | 32 | /** This event is internal telemetry data that should not be sent on its own if possible. */ 33 | GDTCOREventQoSTelemetry = 1, 34 | 35 | /** This event should be sent, but in a batch only roughly once per day. */ 36 | GDTCOREventQoSDaily = 2, 37 | 38 | /** This event should be sent when requested by the uploader. */ 39 | GDTCOREventQosDefault = 3, 40 | 41 | /** This event should be sent immediately along with any other data that can be batched. */ 42 | GDTCOREventQoSFast = 4, 43 | 44 | /** This event should only be uploaded on wifi. */ 45 | GDTCOREventQoSWifiOnly = 5, 46 | }; 47 | 48 | @interface GDTCOREvent : NSObject 49 | 50 | /** The mapping identifier, to allow backends to map the transport bytes to a proto. */ 51 | @property(readonly, nonatomic) NSString *mappingID; 52 | 53 | /** The identifier for the backend this event will eventually be sent to. */ 54 | @property(readonly, nonatomic) NSInteger target; 55 | 56 | /** The data object encapsulated in the transport of your choice, as long as it implements 57 | * the GDTCOREventDataObject protocol. */ 58 | @property(nullable, nonatomic) id dataObject; 59 | 60 | /** The quality of service tier this event belongs to. */ 61 | @property(nonatomic) GDTCOREventQoS qosTier; 62 | 63 | /** The clock snapshot at the time of the event. */ 64 | @property(nonatomic) GDTCORClock *clockSnapshot; 65 | 66 | /** A dictionary provided to aid prioritizers by allowing the passing of arbitrary data. It will be 67 | * retained by a copy in -copy, but not used for -hash. 68 | * 69 | * @note Ensure that classes contained therein implement NSSecureCoding to prevent loss of data. 70 | */ 71 | @property(nullable, nonatomic) NSDictionary *customPrioritizationParams; 72 | 73 | // Please use the designated initializer. 74 | - (instancetype)init NS_UNAVAILABLE; 75 | 76 | /** Initializes an instance using the given mappingID. 77 | * 78 | * @param mappingID The mapping identifier. 79 | * @param target The event's target identifier. 80 | * @return An instance of this class. 81 | */ 82 | - (instancetype)initWithMappingID:(NSString *)mappingID 83 | target:(NSInteger)target NS_DESIGNATED_INITIALIZER; 84 | 85 | /** Returns the GDTCORStoredEvent equivalent of self. 86 | * 87 | * @param dataFuture The data future representing the transport bytes of the original event. 88 | * @return An equivalent GDTCORStoredEvent. 89 | */ 90 | - (GDTCORStoredEvent *)storedEventWithDataFuture:(GDTCORDataFuture *)dataFuture; 91 | 92 | @end 93 | 94 | NS_ASSUME_NONNULL_END 95 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCOREventDataObject.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | /** This protocol defines the common interface that event protos should implement regardless of the 22 | * underlying transport technology (protobuf, nanopb, etc). 23 | */ 24 | @protocol GDTCOREventDataObject 25 | 26 | @required 27 | 28 | /** Returns the serialized proto bytes of the implementing event proto. 29 | * 30 | * @return the serialized proto bytes of the implementing event proto. 31 | */ 32 | - (NSData *)transportBytes; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCOREventTransformer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | @class GDTCOREvent; 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | /** Defines the API that event transformers must adopt. */ 24 | @protocol GDTCOREventTransformer 25 | 26 | @required 27 | 28 | /** Transforms an event by applying some logic to it. Events returned can be nil, for example, in 29 | * instances where the event should be sampled. 30 | * 31 | * @param event The event to transform. 32 | * @return A transformed event, or nil if the transformation dropped the event. 33 | */ 34 | - (GDTCOREvent *)transform:(GDTCOREvent *)event; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORLifecycle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | 21 | @class GDTCOREvent; 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | /** A protocol defining the lifecycle events objects in the library must respond to immediately. */ 26 | @protocol GDTCORLifecycleProtocol 27 | 28 | @optional 29 | 30 | /** Indicates an imminent app termination in the rare occurrence when -applicationWillTerminate: has 31 | * been called. 32 | * 33 | * @param app The GDTCORApplication instance. 34 | */ 35 | - (void)appWillTerminate:(GDTCORApplication *)app; 36 | 37 | /** Indicates that the app is moving to background and eventual suspension or the current UIScene is 38 | * deactivating. 39 | * 40 | * @param app The GDTCORApplication instance. 41 | */ 42 | - (void)appWillBackground:(GDTCORApplication *)app; 43 | 44 | /** Indicates that the app is resuming operation or a UIScene is activating. 45 | * 46 | * @param app The GDTCORApplication instance. 47 | */ 48 | - (void)appWillForeground:(GDTCORApplication *)app; 49 | 50 | @end 51 | 52 | /** This class manages the library's response to app lifecycle events. 53 | * 54 | * When backgrounding, the library doesn't stop processing events, it's just that several background 55 | * tasks will end up being created for every event that's sent, and the stateful objects of the 56 | * library (GDTCORStorage and GDTCORUploadCoordinator singletons) will deserialize themselves from 57 | * and to disk before and after every operation, respectively. 58 | */ 59 | @interface GDTCORLifecycle : NSObject 60 | 61 | @end 62 | 63 | NS_ASSUME_NONNULL_END 64 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORPlatform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | 20 | #if TARGET_OS_IOS || TARGET_OS_TV 21 | #import 22 | #elif TARGET_OS_OSX 23 | #import 24 | #endif // TARGET_OS_IOS || TARGET_OS_TV 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | /** A notification sent out if the app is backgrounding. */ 29 | FOUNDATION_EXPORT NSString *const kGDTCORApplicationDidEnterBackgroundNotification; 30 | 31 | /** A notification sent out if the app is foregrounding. */ 32 | FOUNDATION_EXPORT NSString *const kGDTCORApplicationWillEnterForegroundNotification; 33 | 34 | /** A notification sent out if the app is terminating. */ 35 | FOUNDATION_EXPORT NSString *const kGDTCORApplicationWillTerminateNotification; 36 | 37 | /** Compares flags with the WWAN reachability flag, if available, and returns YES if present. 38 | * 39 | * @param flags The set of reachability flags. 40 | * @return YES if the WWAN flag is set, NO otherwise. 41 | */ 42 | BOOL GDTCORReachabilityFlagsContainWWAN(SCNetworkReachabilityFlags flags); 43 | 44 | /** A typedef identify background identifiers. */ 45 | typedef volatile NSUInteger GDTCORBackgroundIdentifier; 46 | 47 | /** A background task's invalid sentinel value. */ 48 | FOUNDATION_EXPORT const GDTCORBackgroundIdentifier GDTCORBackgroundIdentifierInvalid; 49 | 50 | #if TARGET_OS_IOS || TARGET_OS_TV 51 | /** A protocol that wraps UIApplicationDelegate or NSObject protocol, depending on the platform. */ 52 | @protocol GDTCORApplicationDelegate 53 | #elif TARGET_OS_OSX 54 | @protocol GDTCORApplicationDelegate 55 | #else 56 | @protocol GDTCORApplicationDelegate 57 | #endif // TARGET_OS_IOS || TARGET_OS_TV 58 | 59 | @end 60 | 61 | /** A cross-platform application class. */ 62 | @interface GDTCORApplication : NSObject 63 | 64 | /** Creates and/or returns the shared application instance. 65 | * 66 | * @return The shared application instance. 67 | */ 68 | + (nullable GDTCORApplication *)sharedApplication; 69 | 70 | /** Creates a background task with the returned identifier if on a suitable platform. 71 | * 72 | * @param handler The handler block that is called if the background task expires. 73 | * @return An identifier for the background task, or GDTCORBackgroundIdentifierInvalid if one 74 | * couldn't be created. 75 | */ 76 | - (GDTCORBackgroundIdentifier)beginBackgroundTaskWithExpirationHandler: 77 | (void (^__nullable)(void))handler; 78 | 79 | /** Ends the background task if the identifier is valid. 80 | * 81 | * @param bgID The background task to end. 82 | */ 83 | - (void)endBackgroundTask:(GDTCORBackgroundIdentifier)bgID; 84 | 85 | @end 86 | 87 | NS_ASSUME_NONNULL_END 88 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORPrioritizer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | #import 21 | 22 | @class GDTCORStoredEvent; 23 | 24 | NS_ASSUME_NONNULL_BEGIN 25 | 26 | /** Options that define a set of upload conditions. This is used to help minimize end user data 27 | * consumption impact. 28 | */ 29 | typedef NS_OPTIONS(NSInteger, GDTCORUploadConditions) { 30 | 31 | /** An upload shouldn't be attempted, because there's no network. */ 32 | GDTCORUploadConditionNoNetwork = 1 << 0, 33 | 34 | /** An upload would likely use mobile data. */ 35 | GDTCORUploadConditionMobileData = 1 << 1, 36 | 37 | /** An upload would likely use wifi data. */ 38 | GDTCORUploadConditionWifiData = 1 << 2, 39 | 40 | /** An upload uses some sort of network connection, but it's unclear which. */ 41 | GDTCORUploadConditionUnclearConnection = 1 << 3, 42 | 43 | /** A high priority event has occurred. */ 44 | GDTCORUploadConditionHighPriority = 1 << 4, 45 | }; 46 | 47 | /** This protocol defines the common interface of event prioritization. Prioritizers are 48 | * stateful objects that prioritize events upon insertion into storage and remain prepared to return 49 | * a set of filenames to the storage system. 50 | */ 51 | @protocol GDTCORPrioritizer 52 | 53 | @required 54 | 55 | /** Accepts an event and uses the event metadata to make choices on how to prioritize the event. 56 | * This method exists as a way to help prioritize which events should be sent, which is dependent on 57 | * the request proto structure of your backend. 58 | * 59 | * @param event The event to prioritize. 60 | */ 61 | - (void)prioritizeEvent:(GDTCORStoredEvent *)event; 62 | 63 | /** Returns a set of events to upload given a set of conditions. 64 | * 65 | * @param conditions A bit mask specifying the current upload conditions. 66 | * @return An object to be used by the uploader to determine file URLs to upload with respect to the 67 | * current conditions. 68 | */ 69 | - (GDTCORUploadPackage *)uploadPackageWithConditions:(GDTCORUploadConditions)conditions; 70 | 71 | @end 72 | 73 | NS_ASSUME_NONNULL_END 74 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORRegistrar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | #import 21 | #import 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | /** Manages the registration of targets with the transport SDK. */ 26 | @interface GDTCORRegistrar : NSObject 27 | 28 | /** Creates and/or returns the singleton instance. 29 | * 30 | * @return The singleton instance of this class. 31 | */ 32 | + (instancetype)sharedInstance; 33 | 34 | /** Registers a backend implementation with the GoogleDataTransport infrastructure. 35 | * 36 | * @param backend The backend object to register. 37 | * @param target The target this backend object will be responsible for. 38 | */ 39 | - (void)registerUploader:(id)backend target:(GDTCORTarget)target; 40 | 41 | /** Registers a event prioritizer implementation with the GoogleDataTransport infrastructure. 42 | * 43 | * @param prioritizer The prioritizer object to register. 44 | * @param target The target this prioritizer object will be responsible for. 45 | */ 46 | - (void)registerPrioritizer:(id)prioritizer target:(GDTCORTarget)target; 47 | 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORStoredEvent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #import 17 | 18 | #import 19 | #import 20 | 21 | @class GDTCOREvent; 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface GDTCORStoredEvent : NSObject 26 | 27 | /** The data future representing the original event's transport bytes. */ 28 | @property(readonly, nonatomic) GDTCORDataFuture *dataFuture; 29 | 30 | /** The mapping identifier, to allow backends to map the transport bytes to a proto. */ 31 | @property(readonly, nonatomic) NSString *mappingID; 32 | 33 | /** The identifier for the backend this event will eventually be sent to. */ 34 | @property(readonly, nonatomic) NSNumber *target; 35 | 36 | /** The quality of service tier this event belongs to. */ 37 | @property(readonly, nonatomic) GDTCOREventQoS qosTier; 38 | 39 | /** The clock snapshot at the time of the event. */ 40 | @property(readonly, nonatomic) GDTCORClock *clockSnapshot; 41 | 42 | /** A dictionary provided to aid prioritizers by allowing the passing of arbitrary data. 43 | * 44 | * @note Ensure that custom classes in this dict implement NSSecureCoding to prevent loss of data. 45 | */ 46 | @property(readonly, nullable, nonatomic) NSDictionary *customPrioritizationParams; 47 | 48 | /** Initializes a stored event with the given URL and event. 49 | * 50 | * @param event The event this stored event represents. 51 | * @param dataFuture The dataFuture this event represents. 52 | * @return An instance of this class. 53 | */ 54 | - (instancetype)initWithEvent:(GDTCOREvent *)event dataFuture:(GDTCORDataFuture *)dataFuture; 55 | 56 | @end 57 | 58 | NS_ASSUME_NONNULL_END 59 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORTargets.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | /** The list of targets supported by the shared transport infrastructure. If adding a new target, 20 | * please use the previous value +1. 21 | */ 22 | typedef NS_ENUM(NSInteger, GDTCORTarget) { 23 | 24 | /** A target only used in testing. */ 25 | kGDTCORTargetTest = 999, 26 | 27 | /** The CCT target. */ 28 | kGDTCORTargetCCT = 1000, 29 | }; 30 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORTransport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | 21 | @class GDTCOREvent; 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface GDTCORTransport : NSObject 26 | 27 | // Please use the designated initializer. 28 | - (instancetype)init NS_UNAVAILABLE; 29 | 30 | /** Initializes a new transport that will send events to the given target backend. 31 | * 32 | * @param mappingID The mapping identifier used by the backend to map the data object transport 33 | * bytes to a proto. 34 | * @param transformers A list of transformers to be applied to events that are sent. 35 | * @param target The target backend of this transport. 36 | * @return A transport that will send events. 37 | */ 38 | - (instancetype)initWithMappingID:(NSString *)mappingID 39 | transformers:(nullable NSArray> *)transformers 40 | target:(NSInteger)target NS_DESIGNATED_INITIALIZER; 41 | 42 | /** Copies and sends an internal telemetry event. Events sent using this API are lower in priority, 43 | * and sometimes won't be sent on their own. 44 | * 45 | * @note This will convert the event's data object to data and release the original event. 46 | * 47 | * @param event The event to send. 48 | */ 49 | - (void)sendTelemetryEvent:(GDTCOREvent *)event; 50 | 51 | /** Copies and sends an SDK service data event. Events send using this API are higher in priority, 52 | * and will cause a network request at some point in the relative near future. 53 | * 54 | * @note This will convert the event's data object to data and release the original event. 55 | * 56 | * @param event The event to send. 57 | */ 58 | - (void)sendDataEvent:(GDTCOREvent *)event; 59 | 60 | /** Creates an event for use by this transport. 61 | * 62 | * @return An event that is suited for use by this transport. 63 | */ 64 | - (GDTCOREvent *)eventForTransport; 65 | 66 | @end 67 | 68 | NS_ASSUME_NONNULL_END 69 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORUploadPackage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | 21 | @class GDTCORClock; 22 | @class GDTCORStoredEvent; 23 | @class GDTCORUploadPackage; 24 | 25 | /** A protocol that allows a handler to respond to package lifecycle events. */ 26 | @protocol GDTCORUploadPackageProtocol 27 | 28 | @optional 29 | 30 | /** Indicates that the package has expired. 31 | * 32 | * @note Package expiration will only be checked every 5 seconds. 33 | * 34 | * @param package The package that has expired. 35 | */ 36 | - (void)packageExpired:(GDTCORUploadPackage *)package; 37 | 38 | /** Indicates that the package was successfully delivered. 39 | * 40 | * @param package The package that was delivered. 41 | */ 42 | - (void)packageDelivered:(GDTCORUploadPackage *)package successful:(BOOL)successful; 43 | 44 | @end 45 | 46 | /** This class is a container that's handed off to uploaders. */ 47 | @interface GDTCORUploadPackage : NSObject 48 | 49 | /** The set of stored events in this upload package. */ 50 | @property(nonatomic) NSSet *events; 51 | 52 | /** The expiration time. If [[GDTCORClock snapshot] isAfter:deliverByTime] this package has expired. 53 | * 54 | * @note By default, the expiration time will be 3 minutes from creation. 55 | */ 56 | @property(nonatomic) GDTCORClock *deliverByTime; 57 | 58 | /** The target of this package. */ 59 | @property(nonatomic, readonly) GDTCORTarget target; 60 | 61 | /** Initializes a package instance. 62 | * 63 | * @param target The target/destination of this package. 64 | * @return An instance of this class. 65 | */ 66 | - (instancetype)initWithTarget:(GDTCORTarget)target NS_DESIGNATED_INITIALIZER; 67 | 68 | // Please use the designated initializer. 69 | - (instancetype)init NS_UNAVAILABLE; 70 | 71 | /** Completes delivery of the package. 72 | * 73 | * @note This *needs* to be called by an uploader for the package to not expire. 74 | */ 75 | - (void)completeDelivery; 76 | 77 | /** Sends the package back, indicating that delivery should be attempted again in the future. */ 78 | - (void)retryDeliveryInTheFuture; 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GDTCORUploader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | 25 | NS_ASSUME_NONNULL_BEGIN 26 | 27 | /** This protocol defines the common interface for uploader implementations. */ 28 | @protocol GDTCORUploader 29 | 30 | @required 31 | 32 | /** Returns YES if the uploader can make an upload attempt, NO otherwise. 33 | * 34 | * @param conditions The conditions that the upload attempt is likely to occur under. 35 | * @return YES if the uploader can make an upload attempt, NO otherwise. 36 | */ 37 | - (BOOL)readyToUploadWithConditions:(GDTCORUploadConditions)conditions; 38 | 39 | /** Uploads events to the backend using this specific backend's chosen format. 40 | * 41 | * @param package The event package to upload. Make sure to call -completeDelivery. 42 | */ 43 | - (void)uploadPackage:(GDTCORUploadPackage *)package; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Headers/GoogleDataTransport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "GDTCORClock.h" 18 | #import "GDTCORConsoleLogger.h" 19 | #import "GDTCORDataFuture.h" 20 | #import "GDTCOREvent.h" 21 | #import "GDTCOREventDataObject.h" 22 | #import "GDTCOREventTransformer.h" 23 | #import "GDTCORLifecycle.h" 24 | #import "GDTCORPrioritizer.h" 25 | #import "GDTCORRegistrar.h" 26 | #import "GDTCORStoredEvent.h" 27 | #import "GDTCORTargets.h" 28 | #import "GDTCORTransport.h" 29 | #import "GDTCORUploadPackage.h" 30 | #import "GDTCORUploader.h" 31 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | GoogleDataTransport 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | GoogleDataTransport 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransport.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module GoogleDataTransport { 2 | umbrella header "GoogleDataTransport.h" 3 | export * 4 | module * { export * } 5 | } 6 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransportCCTSupport.framework/GoogleDataTransportCCTSupport: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/GoogleDataTransportCCTSupport.framework/GoogleDataTransportCCTSupport -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransportCCTSupport.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | GoogleDataTransportCCTSupport 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | GoogleDataTransportCCTSupport 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleDataTransportCCTSupport.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module GoogleDataTransportCCTSupport { 2 | umbrella header "GoogleDataTransportCCTSupport.h" 3 | export * 4 | module * { export * } 5 | } 6 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleUtilities.framework/GoogleUtilities: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/GoogleUtilities.framework/GoogleUtilities -------------------------------------------------------------------------------- /Vender/Firebase/GoogleUtilities.framework/Headers/GULLoggerCodes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | typedef NS_ENUM(NSInteger, GULSwizzlerMessageCode) { 20 | // App Delegate Swizzling. 21 | kGULSwizzlerMessageCodeAppDelegateSwizzling000 = 1000, // I-SWZ001000 22 | kGULSwizzlerMessageCodeAppDelegateSwizzling001 = 1001, // I-SWZ001001 23 | kGULSwizzlerMessageCodeAppDelegateSwizzling002 = 1002, // I-SWZ001002 24 | kGULSwizzlerMessageCodeAppDelegateSwizzling003 = 1003, // I-SWZ001003 25 | kGULSwizzlerMessageCodeAppDelegateSwizzling004 = 1004, // I-SWZ001004 26 | kGULSwizzlerMessageCodeAppDelegateSwizzling005 = 1005, // I-SWZ001005 27 | kGULSwizzlerMessageCodeAppDelegateSwizzling006 = 1006, // I-SWZ001006 28 | kGULSwizzlerMessageCodeAppDelegateSwizzling007 = 1007, // I-SWZ001007 29 | kGULSwizzlerMessageCodeAppDelegateSwizzling008 = 1008, // I-SWZ001008 30 | kGULSwizzlerMessageCodeAppDelegateSwizzling009 = 1009, // I-SWZ001009 31 | kGULSwizzlerMessageCodeAppDelegateSwizzling010 = 1010, // I-SWZ001010 32 | kGULSwizzlerMessageCodeAppDelegateSwizzling011 = 1011, // I-SWZ001011 33 | kGULSwizzlerMessageCodeAppDelegateSwizzling012 = 1012, // I-SWZ001012 34 | kGULSwizzlerMessageCodeAppDelegateSwizzling013 = 1013, // I-SWZ001013 35 | kGULSwizzlerMessageCodeAppDelegateSwizzlingInvalidAppDelegate = 1014, // I-SWZ001014 36 | 37 | // Method Swizzling. 38 | kGULSwizzlerMessageCodeMethodSwizzling000 = 2000, // I-SWZ002000 39 | }; 40 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleUtilities.framework/Headers/GULLoggerLevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Google 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | 19 | /** 20 | * The log levels used by internal logging. 21 | */ 22 | typedef NS_ENUM(NSInteger, GULLoggerLevel) { 23 | /** Error level, matches ASL_LEVEL_ERR. */ 24 | GULLoggerLevelError = 3, 25 | /** Warning level, matches ASL_LEVEL_WARNING. */ 26 | GULLoggerLevelWarning = 4, 27 | /** Notice level, matches ASL_LEVEL_NOTICE. */ 28 | GULLoggerLevelNotice = 5, 29 | /** Info level, matches ASL_LEVEL_INFO. */ 30 | GULLoggerLevelInfo = 6, 31 | /** Debug level, matches ASL_LEVEL_DEBUG. */ 32 | GULLoggerLevelDebug = 7, 33 | /** Minimum log level. */ 34 | GULLoggerLevelMin = GULLoggerLevelError, 35 | /** Maximum log level. */ 36 | GULLoggerLevelMax = GULLoggerLevelDebug 37 | } NS_SWIFT_NAME(GoogleLoggerLevel); 38 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleUtilities.framework/Headers/GULNSData+zlib.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #import 16 | 17 | /// This is a copy of Google Toolbox for Mac library to avoid creating an extra framework. 18 | 19 | // NOTE: For 64bit, none of these apis handle input sizes >32bits, they will return nil when given 20 | // such data. To handle data of that size you really should be streaming it rather then doing it all 21 | // in memory. 22 | 23 | @interface NSData (GULGzip) 24 | 25 | /// Returns an data as the result of decompressing the payload of |data|.The data to decompress must 26 | /// be a gzipped payloads. 27 | + (NSData *)gul_dataByInflatingGzippedData:(NSData *)data error:(NSError **)error; 28 | 29 | /// Returns an compressed data with the result of gzipping the payload of |data|. Uses the default 30 | /// compression level. 31 | + (NSData *)gul_dataByGzippingData:(NSData *)data error:(NSError **)error; 32 | 33 | FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorDomain; 34 | FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorKey; // NSNumber 35 | FOUNDATION_EXPORT NSString *const GULNSDataZlibRemainingBytesKey; // NSNumber 36 | 37 | typedef NS_ENUM(NSInteger, GULNSDataZlibError) { 38 | GULNSDataZlibErrorGreaterThan32BitsToCompress = 1024, 39 | // An internal zlib error. 40 | // GULNSDataZlibErrorKey will contain the error value. 41 | // NSLocalizedDescriptionKey may contain an error string from zlib. 42 | // Look in zlib.h for list of errors. 43 | GULNSDataZlibErrorInternal, 44 | // There was left over data in the buffer that was not used. 45 | // GULNSDataZlibRemainingBytesKey will contain number of remaining bytes. 46 | GULNSDataZlibErrorDataRemaining 47 | }; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleUtilities.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | GoogleUtilities 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | GoogleUtilities 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/GoogleUtilities.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module GoogleUtilities { 2 | umbrella header "GoogleUtilities.h" 3 | export * 4 | module * { export * } 5 | link framework "Security" 6 | link framework "SystemConfiguration" 7 | link "z" 8 | } 9 | -------------------------------------------------------------------------------- /Vender/Firebase/nanopb.framework/Headers/pb_common.h: -------------------------------------------------------------------------------- 1 | /* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. 2 | * These functions are rarely needed by applications directly. 3 | */ 4 | 5 | #ifndef PB_COMMON_H_INCLUDED 6 | #define PB_COMMON_H_INCLUDED 7 | 8 | #include "pb.h" 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | /* Iterator for pb_field_t list */ 15 | struct pb_field_iter_s { 16 | const pb_field_t *start; /* Start of the pb_field_t array */ 17 | const pb_field_t *pos; /* Current position of the iterator */ 18 | unsigned required_field_index; /* Zero-based index that counts only the required fields */ 19 | void *dest_struct; /* Pointer to start of the structure */ 20 | void *pData; /* Pointer to current field value */ 21 | void *pSize; /* Pointer to count/has field */ 22 | }; 23 | typedef struct pb_field_iter_s pb_field_iter_t; 24 | 25 | /* Initialize the field iterator structure to beginning. 26 | * Returns false if the message type is empty. */ 27 | bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct); 28 | 29 | /* Advance the iterator to the next field. 30 | * Returns false when the iterator wraps back to the first field. */ 31 | bool pb_field_iter_next(pb_field_iter_t *iter); 32 | 33 | /* Advance the iterator until it points at a field with the given tag. 34 | * Returns false if no such field exists. */ 35 | bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); 36 | 37 | #ifdef __cplusplus 38 | } /* extern "C" */ 39 | #endif 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /Vender/Firebase/nanopb.framework/Headers/pb_decode.h: -------------------------------------------------------------------------------- 1 | /* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. 2 | * The main function is pb_decode. You also need an input stream, and the 3 | * field descriptions created by nanopb_generator.py. 4 | */ 5 | 6 | #ifndef PB_DECODE_H_INCLUDED 7 | #define PB_DECODE_H_INCLUDED 8 | 9 | #include "pb.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* Structure for defining custom input streams. You will need to provide 16 | * a callback function to read the bytes from your storage, which can be 17 | * for example a file or a network socket. 18 | * 19 | * The callback must conform to these rules: 20 | * 21 | * 1) Return false on IO errors. This will cause decoding to abort. 22 | * 2) You can use state to store your own data (e.g. buffer pointer), 23 | * and rely on pb_read to verify that no-body reads past bytes_left. 24 | * 3) Your callback may be used with substreams, in which case bytes_left 25 | * is different than from the main stream. Don't use bytes_left to compute 26 | * any pointers. 27 | */ 28 | struct pb_istream_s 29 | { 30 | #ifdef PB_BUFFER_ONLY 31 | /* Callback pointer is not used in buffer-only configuration. 32 | * Having an int pointer here allows binary compatibility but 33 | * gives an error if someone tries to assign callback function. 34 | */ 35 | int *callback; 36 | #else 37 | bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); 38 | #endif 39 | 40 | void *state; /* Free field for use by callback implementation */ 41 | size_t bytes_left; 42 | 43 | #ifndef PB_NO_ERRMSG 44 | const char *errmsg; 45 | #endif 46 | }; 47 | 48 | /*************************** 49 | * Main decoding functions * 50 | ***************************/ 51 | 52 | /* Decode a single protocol buffers message from input stream into a C structure. 53 | * Returns true on success, false on any failure. 54 | * The actual struct pointed to by dest must match the description in fields. 55 | * Callback fields of the destination structure must be initialized by caller. 56 | * All other fields will be initialized by this function. 57 | * 58 | * Example usage: 59 | * MyMessage msg = {}; 60 | * uint8_t buffer[64]; 61 | * pb_istream_t stream; 62 | * 63 | * // ... read some data into buffer ... 64 | * 65 | * stream = pb_istream_from_buffer(buffer, count); 66 | * pb_decode(&stream, MyMessage_fields, &msg); 67 | */ 68 | bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); 69 | 70 | /* Same as pb_decode, except does not initialize the destination structure 71 | * to default values. This is slightly faster if you need no default values 72 | * and just do memset(struct, 0, sizeof(struct)) yourself. 73 | * 74 | * This can also be used for 'merging' two messages, i.e. update only the 75 | * fields that exist in the new message. 76 | * 77 | * Note: If this function returns with an error, it will not release any 78 | * dynamically allocated fields. You will need to call pb_release() yourself. 79 | */ 80 | bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); 81 | 82 | /* Same as pb_decode, except expects the stream to start with the message size 83 | * encoded as varint. Corresponds to parseDelimitedFrom() in Google's 84 | * protobuf API. 85 | */ 86 | bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); 87 | 88 | /* Same as pb_decode_delimited, except that it does not initialize the destination structure. 89 | * See pb_decode_noinit 90 | */ 91 | bool pb_decode_delimited_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); 92 | 93 | /* Same as pb_decode, except allows the message to be terminated with a null byte. 94 | * NOTE: Until nanopb-0.4.0, pb_decode() also allows null-termination. This behaviour 95 | * is not supported in most other protobuf implementations, so pb_decode_delimited() 96 | * is a better option for compatibility. 97 | */ 98 | bool pb_decode_nullterminated(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); 99 | 100 | #ifdef PB_ENABLE_MALLOC 101 | /* Release any allocated pointer fields. If you use dynamic allocation, you should 102 | * call this for any successfully decoded message when you are done with it. If 103 | * pb_decode() returns with an error, the message is already released. 104 | */ 105 | void pb_release(const pb_field_t fields[], void *dest_struct); 106 | #endif 107 | 108 | 109 | /************************************** 110 | * Functions for manipulating streams * 111 | **************************************/ 112 | 113 | /* Create an input stream for reading from a memory buffer. 114 | * 115 | * Alternatively, you can use a custom stream that reads directly from e.g. 116 | * a file or a network socket. 117 | */ 118 | pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); 119 | 120 | /* Function to read from a pb_istream_t. You can use this if you need to 121 | * read some custom header data, or to read data in field callbacks. 122 | */ 123 | bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); 124 | 125 | 126 | /************************************************ 127 | * Helper functions for writing field callbacks * 128 | ************************************************/ 129 | 130 | /* Decode the tag for the next field in the stream. Gives the wire type and 131 | * field tag. At end of the message, returns false and sets eof to true. */ 132 | bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); 133 | 134 | /* Skip the field payload data, given the wire type. */ 135 | bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); 136 | 137 | /* Decode an integer in the varint format. This works for bool, enum, int32, 138 | * int64, uint32 and uint64 field types. */ 139 | #ifndef PB_WITHOUT_64BIT 140 | bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); 141 | #else 142 | #define pb_decode_varint pb_decode_varint32 143 | #endif 144 | 145 | /* Decode an integer in the varint format. This works for bool, enum, int32, 146 | * and uint32 field types. */ 147 | bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); 148 | 149 | /* Decode an integer in the zig-zagged svarint format. This works for sint32 150 | * and sint64. */ 151 | #ifndef PB_WITHOUT_64BIT 152 | bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); 153 | #else 154 | bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); 155 | #endif 156 | 157 | /* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to 158 | * a 4-byte wide C variable. */ 159 | bool pb_decode_fixed32(pb_istream_t *stream, void *dest); 160 | 161 | #ifndef PB_WITHOUT_64BIT 162 | /* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to 163 | * a 8-byte wide C variable. */ 164 | bool pb_decode_fixed64(pb_istream_t *stream, void *dest); 165 | #endif 166 | 167 | /* Make a limited-length substream for reading a PB_WT_STRING field. */ 168 | bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); 169 | bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); 170 | 171 | #ifdef __cplusplus 172 | } /* extern "C" */ 173 | #endif 174 | 175 | #endif 176 | -------------------------------------------------------------------------------- /Vender/Firebase/nanopb.framework/Headers/pb_encode.h: -------------------------------------------------------------------------------- 1 | /* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. 2 | * The main function is pb_encode. You also need an output stream, and the 3 | * field descriptions created by nanopb_generator.py. 4 | */ 5 | 6 | #ifndef PB_ENCODE_H_INCLUDED 7 | #define PB_ENCODE_H_INCLUDED 8 | 9 | #include "pb.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /* Structure for defining custom output streams. You will need to provide 16 | * a callback function to write the bytes to your storage, which can be 17 | * for example a file or a network socket. 18 | * 19 | * The callback must conform to these rules: 20 | * 21 | * 1) Return false on IO errors. This will cause encoding to abort. 22 | * 2) You can use state to store your own data (e.g. buffer pointer). 23 | * 3) pb_write will update bytes_written after your callback runs. 24 | * 4) Substreams will modify max_size and bytes_written. Don't use them 25 | * to calculate any pointers. 26 | */ 27 | struct pb_ostream_s 28 | { 29 | #ifdef PB_BUFFER_ONLY 30 | /* Callback pointer is not used in buffer-only configuration. 31 | * Having an int pointer here allows binary compatibility but 32 | * gives an error if someone tries to assign callback function. 33 | * Also, NULL pointer marks a 'sizing stream' that does not 34 | * write anything. 35 | */ 36 | int *callback; 37 | #else 38 | bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 39 | #endif 40 | void *state; /* Free field for use by callback implementation. */ 41 | size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ 42 | size_t bytes_written; /* Number of bytes written so far. */ 43 | 44 | #ifndef PB_NO_ERRMSG 45 | const char *errmsg; 46 | #endif 47 | }; 48 | 49 | /*************************** 50 | * Main encoding functions * 51 | ***************************/ 52 | 53 | /* Encode a single protocol buffers message from C structure into a stream. 54 | * Returns true on success, false on any failure. 55 | * The actual struct pointed to by src_struct must match the description in fields. 56 | * All required fields in the struct are assumed to have been filled in. 57 | * 58 | * Example usage: 59 | * MyMessage msg = {}; 60 | * uint8_t buffer[64]; 61 | * pb_ostream_t stream; 62 | * 63 | * msg.field1 = 42; 64 | * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); 65 | * pb_encode(&stream, MyMessage_fields, &msg); 66 | */ 67 | bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); 68 | 69 | /* Same as pb_encode, but prepends the length of the message as a varint. 70 | * Corresponds to writeDelimitedTo() in Google's protobuf API. 71 | */ 72 | bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); 73 | 74 | /* Same as pb_encode, but appends a null byte to the message for termination. 75 | * NOTE: This behaviour is not supported in most other protobuf implementations, so pb_encode_delimited() 76 | * is a better option for compatibility. 77 | */ 78 | bool pb_encode_nullterminated(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); 79 | 80 | /* Encode the message to get the size of the encoded data, but do not store 81 | * the data. */ 82 | bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct); 83 | 84 | /************************************** 85 | * Functions for manipulating streams * 86 | **************************************/ 87 | 88 | /* Create an output stream for writing into a memory buffer. 89 | * The number of bytes written can be found in stream.bytes_written after 90 | * encoding the message. 91 | * 92 | * Alternatively, you can use a custom stream that writes directly to e.g. 93 | * a file or a network socket. 94 | */ 95 | pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); 96 | 97 | /* Pseudo-stream for measuring the size of a message without actually storing 98 | * the encoded data. 99 | * 100 | * Example usage: 101 | * MyMessage msg = {}; 102 | * pb_ostream_t stream = PB_OSTREAM_SIZING; 103 | * pb_encode(&stream, MyMessage_fields, &msg); 104 | * printf("Message size is %d\n", stream.bytes_written); 105 | */ 106 | #ifndef PB_NO_ERRMSG 107 | #define PB_OSTREAM_SIZING {0,0,0,0,0} 108 | #else 109 | #define PB_OSTREAM_SIZING {0,0,0,0} 110 | #endif 111 | 112 | /* Function to write into a pb_ostream_t stream. You can use this if you need 113 | * to append or prepend some custom headers to the message. 114 | */ 115 | bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); 116 | 117 | 118 | /************************************************ 119 | * Helper functions for writing field callbacks * 120 | ************************************************/ 121 | 122 | /* Encode field header based on type and field number defined in the field 123 | * structure. Call this from the callback before writing out field contents. */ 124 | bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field); 125 | 126 | /* Encode field header by manually specifing wire type. You need to use this 127 | * if you want to write out packed arrays from a callback field. */ 128 | bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); 129 | 130 | /* Encode an integer in the varint format. 131 | * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ 132 | #ifndef PB_WITHOUT_64BIT 133 | bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); 134 | #else 135 | bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); 136 | #endif 137 | 138 | /* Encode an integer in the zig-zagged svarint format. 139 | * This works for sint32 and sint64. */ 140 | #ifndef PB_WITHOUT_64BIT 141 | bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); 142 | #else 143 | bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); 144 | #endif 145 | 146 | /* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ 147 | bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); 148 | 149 | /* Encode a fixed32, sfixed32 or float value. 150 | * You need to pass a pointer to a 4-byte wide C variable. */ 151 | bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); 152 | 153 | #ifndef PB_WITHOUT_64BIT 154 | /* Encode a fixed64, sfixed64 or double value. 155 | * You need to pass a pointer to a 8-byte wide C variable. */ 156 | bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); 157 | #endif 158 | 159 | /* Encode a submessage field. 160 | * You need to pass the pb_field_t array and pointer to struct, just like 161 | * with pb_encode(). This internally encodes the submessage twice, first to 162 | * calculate message size and then to actually write it out. 163 | */ 164 | bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); 165 | 166 | #ifdef __cplusplus 167 | } /* extern "C" */ 168 | #endif 169 | 170 | #endif 171 | -------------------------------------------------------------------------------- /Vender/Firebase/nanopb.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | nanopb 7 | CFBundleIdentifier 8 | com.firebase.Firebase 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | nanopb 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleVersion 16 | 1 17 | DTSDKName 18 | iphonesimulator11.2 19 | 20 | 21 | -------------------------------------------------------------------------------- /Vender/Firebase/nanopb.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module nanopb { 2 | umbrella header "nanopb.h" 3 | export * 4 | module * { export * } 5 | } 6 | -------------------------------------------------------------------------------- /Vender/Firebase/nanopb.framework/nanopb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsOne/HangulClockApp/6519bfb84e4d2c9596caad29755f7adc2a58148f/Vender/Firebase/nanopb.framework/nanopb --------------------------------------------------------------------------------