Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOB-2845] BezierColor, BezierTheme 추가 #90

Open
wants to merge 15 commits into
base: feature/color
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/BezierSwift.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BezierSwift"
BuildableName = "BezierSwift"
BlueprintName = "BezierSwift"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BezierSwift"
BuildableName = "BezierSwift"
BlueprintName = "BezierSwift"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
3 changes: 0 additions & 3 deletions BezierSwift.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Examples/SwiftUIExample/SwiftUIExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
E28212362A4B32F800018327 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E28212352A4B32F800018327 /* Assets.xcassets */; };
E28212392A4B32F800018327 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E28212382A4B32F800018327 /* Preview Assets.xcassets */; };
E28212412A4B331E00018327 /* BezierSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E28212402A4B331E00018327 /* BezierSwift */; };
E2CA99082D23777400951926 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA99072D23777400951926 /* AppDelegate.swift */; };
E2CA990A2D23779500951926 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CA99092D23779500951926 /* SceneDelegate.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -22,6 +24,8 @@
E28212332A4B32F700018327 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
E28212352A4B32F800018327 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
E28212382A4B32F800018327 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
E2CA99072D23777400951926 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
E2CA99092D23779500951926 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -69,6 +73,8 @@
E28212332A4B32F700018327 /* ContentView.swift */,
E28212352A4B32F800018327 /* Assets.xcassets */,
E28212372A4B32F800018327 /* Preview Content */,
E2CA99072D23777400951926 /* AppDelegate.swift */,
E2CA99092D23779500951926 /* SceneDelegate.swift */,
);
path = SwiftUIExample;
sourceTree = "<group>";
Expand Down Expand Up @@ -161,6 +167,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E2CA990A2D23779500951926 /* SceneDelegate.swift in Sources */,
E2CA99082D23777400951926 /* AppDelegate.swift in Sources */,
E28212342A4B32F700018327 /* ContentView.swift in Sources */,
E2789E4D2A737BC700B98B8D /* BezierElevationTestView.swift in Sources */,
E28212322A4B32F700018327 /* SwiftUIExampleApp.swift in Sources */,
Expand Down Expand Up @@ -299,7 +307,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -328,7 +336,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BezierSwift 자체에 대한 xcscheme이 없어서 매번 작업할때마다 추가해야할 것 같습니다. 추가되면 좋을 것 같아요(아래 스크린샷의 빨간 동그라미)
스크린샷 2025-01-02 오후 4 34 30

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E282122D2A4B32F700018327"
BuildableName = "SwiftUIExample.app"
BlueprintName = "SwiftUIExample"
ReferencedContainer = "container:SwiftUIExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E282122D2A4B32F700018327"
BuildableName = "SwiftUIExample.app"
BlueprintName = "SwiftUIExample"
ReferencedContainer = "container:SwiftUIExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E282122D2A4B32F700018327"
BuildableName = "SwiftUIExample.app"
BlueprintName = "SwiftUIExample"
ReferencedContainer = "container:SwiftUIExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
30 changes: 30 additions & 0 deletions Examples/SwiftUIExample/SwiftUIExample/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// AppDelegate.swift
// SwiftUIExample
//
// Created by Tom on 7/2/24.
//

import UIKit
import SwiftUI
import BezierSwift

class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
) -> Bool {
return true
}

func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
let sceneConfig : UISceneConfiguration = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role)
sceneConfig.delegateClass = SceneDelegate.self

return sceneConfig
}
}
4 changes: 2 additions & 2 deletions Examples/SwiftUIExample/SwiftUIExample/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import SwiftUI
import BezierSwift

struct ContentView: View, Themeable {
struct ContentView: View {
@Environment(\.colorScheme) var colorScheme

var body: some View {
Rectangle()
.foregroundColor(self.palette(.bgtxtRedDark))
.fill(BezierColor.bgRedDark.color)
}
}

Expand Down
27 changes: 27 additions & 0 deletions Examples/SwiftUIExample/SwiftUIExample/SceneDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// SceneDelegate.swift
// SwiftUIExample
//
// Created by Tom on 7/4/24.
//

import UIKit
import BezierSwift

class SceneDelegate: UIResponder, UIWindowSceneDelegate {
weak var windowScene: UIWindowScene?

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = scene as? UIWindowScene else { return }

self.windowScene = windowScene

BezierSwift.delegate = self
}
}

extension SceneDelegate: BezierSwiftDelegate {
func windowsForThemeUpdate() -> [UIWindow] {
self.windowScene?.windows ?? []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import SwiftUI

@main
struct SwiftUIExampleApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

var body: some Scene {
WindowGroup {
ContentView()
Expand Down
Loading