From 153e19550376eb8502a244471f31097ca936139b Mon Sep 17 00:00:00 2001 From: Saeed Bashir Date: Mon, 4 Dec 2023 19:06:02 +0500 Subject: [PATCH] feat: Open edX app theming capability improvements (Option 2) (#182) * feat: openedX app theming capability improvements * fix: mixup after rebasing with develop * refactor: code refactor * chore: Apply accentColor to tabbar items for theme configureable * fix: fixup after merging the develop branch * feat: openedX app theming capability improvements * chore: remove configureable assets and font parser from Core * chore: address review feedback(linked the Theme framework with Core framework) * fix: fix broken code after conflicts resolve * fix: fix the broken archive process * refactor: remove unused old Environment file --- .../Presentation/Login/SignInView.swift | 7 +- .../Registration/SignUpView.swift | 7 +- .../Reset Password/ResetPasswordView.swift | 9 +- .../Startup/LogistrationBottomView.swift | 3 + .../Presentation/Startup/StartupView.swift | 3 +- Core/Core.xcodeproj/project.pbxproj | 88 +- .../checkEmail.imageset/Contents.json | 0 .../{Auth => }/checkEmail.imageset/_1-2.svg | 0 .../{Auth => }/checkEmail.imageset/_1.svg | 0 Core/Core/Configuration/CSSInjector.swift | 3 +- Core/Core/Extensions/CGColorExtension.swift | 13 +- .../Extensions/UIApplicationExtension.swift | 7 +- Core/Core/Extensions/ViewExtension.swift | 1 + Core/Core/SwiftGen/Assets.swift | 92 +- Core/Core/Theme.swift | 150 -- Core/Core/View/Base/AlertView.swift | 3 +- .../View/Base/AppReview/AppReviewView.swift | 1 + .../AppReview/Elements/AppReviewButton.swift | 1 + .../Elements/SelectMailClientView.swift | 1 + .../AppReview/Elements/StarRatingView.swift | 1 + Core/Core/View/Base/CourseButton.swift | 1 + Core/Core/View/Base/CourseCellView.swift | 1 + Core/Core/View/Base/DownloadView.swift | 1 + .../View/Base/FlexibleKeyboardInputView.swift | 3 +- Core/Core/View/Base/NavigationBar.swift | 1 + Core/Core/View/Base/OfflineSnackBarView.swift | 1 + Core/Core/View/Base/PickerMenu.swift | 1 + Core/Core/View/Base/PickerView.swift | 1 + Core/Core/View/Base/ProgressBar.swift | 1 + .../View/Base/RegistrationTextField.swift | 1 + Core/Core/View/Base/SnackBarView.swift | 3 +- Core/Core/View/Base/StyledButton.swift | 3 +- Core/Core/View/Base/UnitButtonView.swift | 1 + Core/Core/View/Base/WebBrowser.swift | 3 +- Core/Core/View/Base/WebUnitView.swift | 1 + Core/Core/View/Base/WebView.swift | 3 +- .../Container/CourseContainerView.swift | 2 + .../Presentation/Dates/CourseDatesView.swift | 1 + .../Details/CourseDetailsView.swift | 1 + .../Handouts/HandoutsUpdatesDetailView.swift | 1 + .../Presentation/Handouts/HandoutsView.swift | 1 + .../Outline/ContinueWithView.swift | 1 + .../Outline/CourseOutlineView.swift | 157 +- .../Outline/CourseVerticalView.swift | 1 + .../Presentation/Unit/CourseUnitView.swift | 5 +- .../Unit/Subviews/LessonProgressView.swift | 1 + .../Unit/Subviews/UnknownView.swift | 1 + .../Presentation/Unit/Subviews/WebView.swift | 1 + .../Unit/Subviews/YouTubeView.swift | 1 + .../Presentation/Video/SubtittlesView.swift | 1 + .../Presentation/DashboardView.swift | 1 + .../Presentation/DiscoveryView.swift | 1 + .../Discovery/Presentation/SearchView.swift | 1 + .../UpdateViews/UpdateNotificationView.swift | 5 +- .../UpdateViews/UpdateRecommendedView.swift | 1 + .../UpdateViews/UpdateRequiredView.swift | 1 + .../Presentation/CheckBoxView.swift | 1 + .../Comments/Base/CommentCell.swift | 1 + .../Comments/Base/ParentCommentView.swift | 1 + .../Comments/Responses/ResponsesView.swift | 1 + .../Comments/Thread/ThreadView.swift | 3 +- .../CreateNewThread/CreateNewThreadView.swift | 3 +- .../DiscussionSearchTopicsView.swift | 1 + .../DiscussionTopicsView.swift | 1 + .../Presentation/Posts/PostsView.swift | 3 +- OpenEdX.xcodeproj/project.pbxproj | 6 + OpenEdX.xcworkspace/contents.xcworkspacedata | 3 + OpenEdX/AppDelegate.swift | 1 + .../SplachBackground.colorset/Contents.json | 38 - OpenEdX/View/MainScreenView.swift | 2 + Podfile | 9 + Podfile.lock | 4 +- .../DeleteAccount/DeleteAccountView.swift | 1 + .../EditProfile/EditProfileView.swift | 3 +- .../EditProfile/ProfileBottomSheet.swift | 3 +- .../Presentation/Profile/ProfileView.swift | 1 + .../Profile/UserProfile/UserProfileView.swift | 1 + .../Presentation/Settings/SettingsView.swift | 1 + .../Settings/VideoQualityView.swift | 1 + Theme.xctestplan | 25 + Theme/Info.plist | 14 + .../contents.xcworkspacedata | 40 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/swiftpm/Package.resolved | 14 + Theme/Theme.xcodeproj/project.pbxproj | 1420 +++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/swiftpm/Package.resolved | 14 + .../xcshareddata/xcschemes/Theme.xcscheme | 71 + .../Theme}/Assets.xcassets/Auth/Contents.json | 0 .../authBackground.imageset/Contents.json | 0 .../authBackground.imageset/Rectangle-2.png | Bin .../authBackground.imageset/Rectangle.png | Bin .../Colors/AccentColor.colorset/Contents.json | 0 .../Colors/Alert.colorset/Contents.json | 0 .../AvatarStroke.colorset/Contents.json | 0 .../Colors/Background.colorset/Contents.json | 0 .../BackgroundStroke.colorset/Contents.json | 0 .../CardViewBackground.colorset/Contents.json | 0 .../CardViewStroke.colorset/Contents.json | 0 .../Colors/CardView/Contents.json | 0 .../Contents.json | 0 .../Contents.json | 0 .../Assets.xcassets/Colors/Contents.json | 0 .../Colors/ShadowColor.colorset/Contents.json | 0 .../Colors/Snackbar/Contents.json | 0 .../SnackbarErrorColor.colorset/Contents.json | 0 .../Contents.json | 0 .../SnackbarInfoAlert.colorset/Contents.json | 0 .../Colors/StyledButton/Contents.json | 0 .../Contents.json | 0 .../StyledButtonText.colorset/Contents.json | 0 .../Colors/TextColor/Contents.json | 0 .../TextPrimary.colorset/Contents.json | 0 .../TextSecondary.colorset/Contents.json | 12 +- .../Colors/TextInput/Contents.json | 0 .../Contents.json | 0 .../TextInputStroke.colorset/Contents.json | 0 .../Contents.json | 0 .../Contents.json | 0 .../Colors/warning.colorset/Contents.json | 0 .../Colors/white.colorset}/Contents.json | 12 +- Theme/Theme/Assets.xcassets/Contents.json | 6 + .../appLogo.imageset/Contents.json | 0 .../appLogo.imageset/Frame 4 1.svg | 0 Theme/Theme/Fonts/FontParser.swift | 61 + Theme/Theme/Fonts/fonts.json | 6 + .../Theme/Fonts/fonts_file.ttf | Bin .../Theme/Helpers}/RoundedCorners.swift | 0 Theme/Theme/SwiftGen/ThemeAssets.swift | 212 +++ Theme/Theme/Theme.swift | 155 ++ Theme/ThemeTests/FontParserTests.swift | 32 + Theme/swiftgen.yml | 9 + .../Presentation/Elements/PageControl.swift | 1 + .../Elements/WhatsNewNavigationButton.swift | 7 +- .../WhatsNew/Presentation/WhatsNewView.swift | 1 + 136 files changed, 2352 insertions(+), 473 deletions(-) rename Core/Core/Assets.xcassets/{Auth => }/checkEmail.imageset/Contents.json (100%) rename Core/Core/Assets.xcassets/{Auth => }/checkEmail.imageset/_1-2.svg (100%) rename Core/Core/Assets.xcassets/{Auth => }/checkEmail.imageset/_1.svg (100%) delete mode 100644 Core/Core/Theme.swift delete mode 100644 OpenEdX/Assets.xcassets/SplachBackground.colorset/Contents.json create mode 100644 Theme.xctestplan create mode 100644 Theme/Info.plist create mode 100644 Theme/Theme.xcodeproj.xcworkspace/contents.xcworkspacedata create mode 100644 Theme/Theme.xcodeproj.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Theme/Theme.xcodeproj.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 Theme/Theme.xcodeproj/project.pbxproj create mode 100644 Theme/Theme.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Theme/Theme.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Theme/Theme.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 Theme/Theme.xcodeproj/xcshareddata/xcschemes/Theme.xcscheme rename {Core/Core => Theme/Theme}/Assets.xcassets/Auth/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Auth/authBackground.imageset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Auth/authBackground.imageset/Rectangle-2.png (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Auth/authBackground.imageset/Rectangle.png (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/AccentColor.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/Alert.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/AvatarStroke.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/Background.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/BackgroundStroke.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/CardView/CardViewBackground.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/CardView/CardViewStroke.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/CardView/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/CertificateForeground.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/CommentCellBackground.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/ShadowColor.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/Snackbar/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/Snackbar/SnackbarErrorColor.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/Snackbar/SnackbarErrorTextColor.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/Snackbar/SnackbarInfoAlert.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/StyledButton/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/StyledButton/StyledButtonBackground.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/StyledButton/StyledButtonText.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/TextColor/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/TextColor/TextPrimary.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/TextColor/TextSecondary.colorset/Contents.json (76%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/TextInput/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/TextInput/TextInputBackground.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/TextInput/TextInputStroke.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/TextInput/TextInputUnfocusedBackground.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/TextInput/TextInputUnfocusedStroke.colorset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/Colors/warning.colorset/Contents.json (100%) rename {OpenEdX/Assets.xcassets/AccentColor.colorset => Theme/Theme/Assets.xcassets/Colors/white.colorset}/Contents.json (76%) create mode 100644 Theme/Theme/Assets.xcassets/Contents.json rename {Core/Core => Theme/Theme}/Assets.xcassets/appLogo.imageset/Contents.json (100%) rename {Core/Core => Theme/Theme}/Assets.xcassets/appLogo.imageset/Frame 4 1.svg (100%) create mode 100644 Theme/Theme/Fonts/FontParser.swift create mode 100644 Theme/Theme/Fonts/fonts.json rename Core/Core/Fonts/SF-Pro.ttf => Theme/Theme/Fonts/fonts_file.ttf (100%) rename {Core/Core/View/Base => Theme/Theme/Helpers}/RoundedCorners.swift (100%) create mode 100644 Theme/Theme/SwiftGen/ThemeAssets.swift create mode 100644 Theme/Theme/Theme.swift create mode 100644 Theme/ThemeTests/FontParserTests.swift create mode 100644 Theme/swiftgen.yml diff --git a/Authorization/Authorization/Presentation/Login/SignInView.swift b/Authorization/Authorization/Presentation/Login/SignInView.swift index 17be98802..f7dcf262f 100644 --- a/Authorization/Authorization/Presentation/Login/SignInView.swift +++ b/Authorization/Authorization/Presentation/Login/SignInView.swift @@ -7,6 +7,7 @@ import SwiftUI import Core +import Theme import Swinject public struct SignInView: View { @@ -26,7 +27,7 @@ public struct SignInView: View { public var body: some View { ZStack(alignment: .top) { VStack { - CoreAssets.authBackground.swiftUIImage + ThemeAssets.authBackground.swiftUIImage .resizable() .edgesIgnoringSafeArea(.top) }.frame(maxWidth: .infinity, maxHeight: 200) @@ -45,7 +46,7 @@ public struct SignInView: View { } VStack(alignment: .center) { - CoreAssets.appLogo.swiftUIImage + ThemeAssets.appLogo.swiftUIImage .resizable() .frame(maxWidth: 189, maxHeight: 54) .padding(.top, isHorizontal ? 20 : 40) @@ -142,7 +143,7 @@ public struct SignInView: View { VStack { Text(viewModel.alertMessage ?? "") .shadowCardStyle(bgColor: Theme.Colors.accentColor, - textColor: .white) + textColor: Theme.Colors.white) .padding(.top, 80) Spacer() diff --git a/Authorization/Authorization/Presentation/Registration/SignUpView.swift b/Authorization/Authorization/Presentation/Registration/SignUpView.swift index bc4bd7dee..09c484a4c 100644 --- a/Authorization/Authorization/Presentation/Registration/SignUpView.swift +++ b/Authorization/Authorization/Presentation/Registration/SignUpView.swift @@ -7,6 +7,7 @@ import SwiftUI import Core +import Theme public struct SignUpView: View { @@ -28,7 +29,7 @@ public struct SignUpView: View { public var body: some View { ZStack(alignment: .top) { VStack { - CoreAssets.authBackground.swiftUIImage + ThemeAssets.authBackground.swiftUIImage .resizable() .edgesIgnoringSafeArea(.top) }.frame(maxWidth: .infinity, maxHeight: 200) @@ -38,12 +39,12 @@ public struct SignUpView: View { ZStack { HStack { Text(AuthLocalization.SignIn.registerBtn) - .titleSettings(color: .white) + .titleSettings(color: Theme.Colors.white) } VStack { Button(action: { viewModel.router.back() }, label: { CoreAssets.arrowLeft.swiftUIImage.renderingMode(.template) - .backButtonStyle(color: .white) + .backButtonStyle(color: Theme.Colors.white) }) .foregroundColor(Theme.Colors.styledButtonText) .padding(.leading, isHorizontal ? 48 : 0) diff --git a/Authorization/Authorization/Presentation/Reset Password/ResetPasswordView.swift b/Authorization/Authorization/Presentation/Reset Password/ResetPasswordView.swift index ef4d1c7fb..acb2a6df3 100644 --- a/Authorization/Authorization/Presentation/Reset Password/ResetPasswordView.swift +++ b/Authorization/Authorization/Presentation/Reset Password/ResetPasswordView.swift @@ -7,6 +7,7 @@ import SwiftUI import Core +import Theme public struct ResetPasswordView: View { @@ -26,15 +27,15 @@ public struct ResetPasswordView: View { public var body: some View { ZStack(alignment: .top) { VStack { - CoreAssets.authBackground.swiftUIImage + ThemeAssets.authBackground.swiftUIImage .resizable() .edgesIgnoringSafeArea(.top) }.frame(maxWidth: .infinity, maxHeight: 200) VStack(alignment: .center) { NavigationBar(title: AuthLocalization.Forgot.title, - titleColor: .white, - leftButtonColor: .white, + titleColor: Theme.Colors.white, + leftButtonColor: Theme.Colors.white, leftButtonAction: { viewModel.router.back() }).padding(.leading, isHorizontal ? 48 : 0) @@ -125,7 +126,7 @@ public struct ResetPasswordView: View { VStack { Text(viewModel.alertMessage ?? "") .shadowCardStyle(bgColor: Theme.Colors.accentColor, - textColor: .white) + textColor: Theme.Colors.white) .padding(.top, 80) Spacer() diff --git a/Authorization/Authorization/Presentation/Startup/LogistrationBottomView.swift b/Authorization/Authorization/Presentation/Startup/LogistrationBottomView.swift index 2a4b2924c..8bd82e445 100644 --- a/Authorization/Authorization/Presentation/Startup/LogistrationBottomView.swift +++ b/Authorization/Authorization/Presentation/Startup/LogistrationBottomView.swift @@ -8,6 +8,7 @@ import Foundation import SwiftUI import Core +import Theme public struct LogistrationBottomView: View { @ObservedObject @@ -43,6 +44,7 @@ public struct LogistrationBottomView: View { } } +#if DEBUG struct LogistrationBottomView_Previews: PreviewProvider { static var previews: some View { let vm = StartupViewModel( @@ -61,3 +63,4 @@ struct LogistrationBottomView_Previews: PreviewProvider { .loadFonts() } } +#endif diff --git a/Authorization/Authorization/Presentation/Startup/StartupView.swift b/Authorization/Authorization/Presentation/Startup/StartupView.swift index b2c358ca2..8cfc50347 100644 --- a/Authorization/Authorization/Presentation/Startup/StartupView.swift +++ b/Authorization/Authorization/Presentation/Startup/StartupView.swift @@ -8,6 +8,7 @@ import Foundation import SwiftUI import Core +import Theme public struct StartupView: View { @@ -25,7 +26,7 @@ public struct StartupView: View { public var body: some View { ZStack(alignment: .top) { VStack(alignment: .leading) { - CoreAssets.appLogo.swiftUIImage + ThemeAssets.appLogo.swiftUIImage .resizable() .frame(maxWidth: 189, maxHeight: 54) .padding(.top, isHorizontal ? 20 : 40) diff --git a/Core/Core.xcodeproj/project.pbxproj b/Core/Core.xcodeproj/project.pbxproj index 036526d61..a54379167 100644 --- a/Core/Core.xcodeproj/project.pbxproj +++ b/Core/Core.xcodeproj/project.pbxproj @@ -63,7 +63,6 @@ 028CE96929858ECC00B6B1C3 /* FlexibleKeyboardInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 028CE96829858ECC00B6B1C3 /* FlexibleKeyboardInputView.swift */; }; 028F9F37293A44C700DE65D0 /* Data_ResetPassword.swift in Sources */ = {isa = PBXBuildFile; fileRef = 028F9F36293A44C700DE65D0 /* Data_ResetPassword.swift */; }; 028F9F39293A452B00DE65D0 /* ResetPassword.swift in Sources */ = {isa = PBXBuildFile; fileRef = 028F9F38293A452B00DE65D0 /* ResetPassword.swift */; }; - 0295B1DC297FF114003B0C65 /* SF-Pro.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0295B1DA297FF0E9003B0C65 /* SF-Pro.ttf */; }; 0295C885299B99DD00ABE571 /* RefreshableScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0295C884299B99DD00ABE571 /* RefreshableScrollView.swift */; }; 02A463112AEA966C00331037 /* AppReviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A463102AEA966C00331037 /* AppReviewView.swift */; }; 02A4833529B8A73400D33F33 /* CorePersistenceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A4833429B8A73400D33F33 /* CorePersistenceProtocol.swift */; }; @@ -117,15 +116,15 @@ 0770DE5B28D0B209006D8A5D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0770DE5D28D0B209006D8A5D /* Localizable.strings */; }; 0770DE5F28D0B22C006D8A5D /* Strings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0770DE5E28D0B22C006D8A5D /* Strings.swift */; }; 0770DE6128D0B2CB006D8A5D /* Assets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0770DE6028D0B2CB006D8A5D /* Assets.swift */; }; - 0770DE7928D0C4A9006D8A5D /* RoundedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0770DE7828D0C4A9006D8A5D /* RoundedCorners.swift */; }; - 0770DE7B28D0C78C006D8A5D /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0770DE7A28D0C78C006D8A5D /* Theme.swift */; }; 07DDFCBD29A780BB00572595 /* UINavigationController+Animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07DDFCBC29A780BB00572595 /* UINavigationController+Animation.swift */; }; C8C446EF233F81B9FABB77D2 /* Pods_App_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 349B90CD6579F7B8D257E515 /* Pods_App_Core.framework */; }; CFC84952299F8B890055E497 /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFC84951299F8B890055E497 /* Debounce.swift */; }; - DB4EBE9E2B1075E100CB4DC4 /* ConfigTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4EBE9D2B1075E100CB4DC4 /* ConfigTests.swift */; }; DBF6F2412B014ADA0098414B /* FirebaseConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF6F2402B014ADA0098414B /* FirebaseConfig.swift */; }; DBF6F2462B01DAFE0098414B /* AgreementConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF6F2452B01DAFE0098414B /* AgreementConfig.swift */; }; DBF6F24A2B0380E00098414B /* FeaturesConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBF6F2492B0380E00098414B /* FeaturesConfig.swift */; }; + E055A5392B18DC95008D9E5E /* Theme.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E055A5382B18DC95008D9E5E /* Theme.framework */; }; + E055A53A2B18DC95008D9E5E /* Theme.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E055A5382B18DC95008D9E5E /* Theme.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + E09179FD2B0F204E002AB695 /* ConfigTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E09179FC2B0F204D002AB695 /* ConfigTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -138,6 +137,20 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + E055A53B2B18DC95008D9E5E /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + E055A53A2B18DC95008D9E5E /* Theme.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 020306CB2932C0C4000949EA /* PickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickerView.swift; sourceTree = ""; }; 02066B472906F73400F4307E /* PickerMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickerMenu.swift; sourceTree = ""; }; @@ -194,7 +207,6 @@ 028CE96829858ECC00B6B1C3 /* FlexibleKeyboardInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlexibleKeyboardInputView.swift; sourceTree = ""; }; 028F9F36293A44C700DE65D0 /* Data_ResetPassword.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Data_ResetPassword.swift; sourceTree = ""; }; 028F9F38293A452B00DE65D0 /* ResetPassword.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResetPassword.swift; sourceTree = ""; }; - 0295B1DA297FF0E9003B0C65 /* SF-Pro.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-Pro.ttf"; sourceTree = ""; }; 0295C884299B99DD00ABE571 /* RefreshableScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RefreshableScrollView.swift; sourceTree = ""; }; 02A463102AEA966C00331037 /* AppReviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppReviewView.swift; sourceTree = ""; }; 02A4833429B8A73400D33F33 /* CorePersistenceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CorePersistenceProtocol.swift; sourceTree = ""; }; @@ -251,8 +263,6 @@ 0770DE5C28D0B209006D8A5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 0770DE5E28D0B22C006D8A5D /* Strings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Strings.swift; sourceTree = ""; }; 0770DE6028D0B2CB006D8A5D /* Assets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Assets.swift; sourceTree = ""; }; - 0770DE7828D0C4A9006D8A5D /* RoundedCorners.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundedCorners.swift; sourceTree = ""; }; - 0770DE7A28D0C78C006D8A5D /* Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = ""; }; 07DDFCBC29A780BB00572595 /* UINavigationController+Animation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UINavigationController+Animation.swift"; sourceTree = ""; }; 0E13E9173C9C4CFC19F8B6F2 /* Pods-App-Core.debugstage.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Core.debugstage.xcconfig"; path = "Target Support Files/Pods-App-Core/Pods-App-Core.debugstage.xcconfig"; sourceTree = ""; }; 1A154A95AF4EE85A4A1C083B /* Pods-App-Core.releasedev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Core.releasedev.xcconfig"; path = "Target Support Files/Pods-App-Core/Pods-App-Core.releasedev.xcconfig"; sourceTree = ""; }; @@ -263,10 +273,11 @@ 9D5B06CAA99EA5CD49CBE2BB /* Pods-App-Core.debugdev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Core.debugdev.xcconfig"; path = "Target Support Files/Pods-App-Core/Pods-App-Core.debugdev.xcconfig"; sourceTree = ""; }; C7E5BCE79CE297B20777B27A /* Pods-App-Core.debugprod.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Core.debugprod.xcconfig"; path = "Target Support Files/Pods-App-Core/Pods-App-Core.debugprod.xcconfig"; sourceTree = ""; }; CFC84951299F8B890055E497 /* Debounce.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Debounce.swift; sourceTree = ""; }; - DB4EBE9D2B1075E100CB4DC4 /* ConfigTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigTests.swift; sourceTree = ""; }; DBF6F2402B014ADA0098414B /* FirebaseConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebaseConfig.swift; sourceTree = ""; }; DBF6F2452B01DAFE0098414B /* AgreementConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AgreementConfig.swift; sourceTree = ""; }; DBF6F2492B0380E00098414B /* FeaturesConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturesConfig.swift; sourceTree = ""; }; + E055A5382B18DC95008D9E5E /* Theme.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Theme.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E09179FC2B0F204D002AB695 /* ConfigTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -284,6 +295,7 @@ files = ( 025EF2F62971740000B838AB /* YouTubePlayerKit in Frameworks */, C8C446EF233F81B9FABB77D2 /* Pods_App_Core.framework in Frameworks */, + E055A5392B18DC95008D9E5E /* Theme.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -380,14 +392,6 @@ path = Extensions; sourceTree = ""; }; - 0295B1DB297FF0E9003B0C65 /* Fonts */ = { - isa = PBXGroup; - children = ( - 0295B1DA297FF0E9003B0C65 /* SF-Pro.ttf */, - ); - path = Fonts; - sourceTree = ""; - }; 02AFCC162AEFDB0F000360F0 /* ThirdPartyMailer */ = { isa = PBXGroup; children = ( @@ -491,7 +495,7 @@ children = ( 0770DE5328D0B00C006D8A5D /* swiftgen.yml */, 0770DE0A28D07831006D8A5D /* Core */, - DB4EBE9B2B1075E100CB4DC4 /* CoreTests */, + E09179FA2B0F204D002AB695 /* CoreTests */, 0770DE0928D07831006D8A5D /* Products */, C9DFE47E699CFFA85A77AF2C /* Pods */, F1620A3A2C8B0699EAA61B57 /* Frameworks */, @@ -510,7 +514,6 @@ 0770DE0A28D07831006D8A5D /* Core */ = { isa = PBXGroup; children = ( - 0295B1DB297FF0E9003B0C65 /* Fonts */, 027BD3A12909470F00392132 /* AvoidingHelpers */, 0770DE5528D0B142006D8A5D /* SwiftGen */, 0283347E28D4DCC100C828FC /* Extensions */, @@ -519,7 +522,6 @@ 0727876E28D233EC002E9142 /* Configuration */, 0770DE2828D0928B006D8A5D /* Network */, 0770DE7628D0C491006D8A5D /* View */, - 0770DE7A28D0C78C006D8A5D /* Theme.swift */, 0770DE5D28D0B209006D8A5D /* Localizable.strings */, 0770DE5128D0ADFF006D8A5D /* Assets.xcassets */, 071009CF28D1E3A600344290 /* Constants.swift */, @@ -565,7 +567,6 @@ 0770DE7728D0C49E006D8A5D /* Base */ = { isa = PBXGroup; children = ( - 0770DE7828D0C4A9006D8A5D /* RoundedCorners.swift */, 02A4833B29B8C57800D33F33 /* DownloadView.swift */, 02D800CB29348F460099CF16 /* ImagePicker.swift */, 024D723429C8BB1A006D36ED /* NavigationBar.swift */, @@ -597,22 +598,6 @@ path = Base; sourceTree = ""; }; - 078525AC2B0CBFF4007B4521 /* CoreTests */ = { - isa = PBXGroup; - children = ( - 078525AD2B0CC004007B4521 /* Configuration */, - ); - path = CoreTests; - sourceTree = ""; - }; - 078525AD2B0CC004007B4521 /* Configuration */ = { - isa = PBXGroup; - children = ( - DBF6F2472B01E20A0098414B /* ConfigTests.swift */, - ); - path = Configuration; - sourceTree = ""; - }; C9DFE47E699CFFA85A77AF2C /* Pods */ = { isa = PBXGroup; children = ( @@ -637,36 +622,37 @@ path = Combine; sourceTree = ""; }; - DB4EBE9B2B1075E100CB4DC4 /* CoreTests */ = { + DBF6F2422B014AF30098414B /* Config */ = { isa = PBXGroup; children = ( - DB4EBE9C2B1075E100CB4DC4 /* Configuration */, + 0727876F28D23411002E9142 /* Config.swift */, + DBF6F2402B014ADA0098414B /* FirebaseConfig.swift */, + DBF6F2492B0380E00098414B /* FeaturesConfig.swift */, + DBF6F2452B01DAFE0098414B /* AgreementConfig.swift */, ); - path = CoreTests; + path = Config; sourceTree = ""; }; - DB4EBE9C2B1075E100CB4DC4 /* Configuration */ = { + E09179FA2B0F204D002AB695 /* CoreTests */ = { isa = PBXGroup; children = ( - DB4EBE9D2B1075E100CB4DC4 /* ConfigTests.swift */, + E09179FB2B0F204D002AB695 /* Configuration */, ); - path = Configuration; + path = CoreTests; sourceTree = ""; }; - DBF6F2422B014AF30098414B /* Config */ = { + E09179FB2B0F204D002AB695 /* Configuration */ = { isa = PBXGroup; children = ( - 0727876F28D23411002E9142 /* Config.swift */, - DBF6F2402B014ADA0098414B /* FirebaseConfig.swift */, - DBF6F2492B0380E00098414B /* FeaturesConfig.swift */, - DBF6F2452B01DAFE0098414B /* AgreementConfig.swift */, + E09179FC2B0F204D002AB695 /* ConfigTests.swift */, ); - path = Config; + path = Configuration; sourceTree = ""; }; F1620A3A2C8B0699EAA61B57 /* Frameworks */ = { isa = PBXGroup; children = ( + E055A5382B18DC95008D9E5E /* Theme.framework */, 349B90CD6579F7B8D257E515 /* Pods_App_Core.framework */, ); name = Frameworks; @@ -713,6 +699,7 @@ 0770DE0428D07831006D8A5D /* Sources */, 0770DE0528D07831006D8A5D /* Frameworks */, 0770DE0628D07831006D8A5D /* Resources */, + E055A53B2B18DC95008D9E5E /* Embed Frameworks */, ); buildRules = ( ); @@ -782,7 +769,6 @@ buildActionMask = 2147483647; files = ( 0770DE5228D0ADFF006D8A5D /* Assets.xcassets in Resources */, - 0295B1DC297FF114003B0C65 /* SF-Pro.ttf in Resources */, 0770DE5B28D0B209006D8A5D /* Localizable.strings in Resources */, 0770DE5428D0B00C006D8A5D /* swiftgen.yml in Resources */, ); @@ -839,7 +825,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DB4EBE9E2B1075E100CB4DC4 /* ConfigTests.swift in Sources */, + E09179FD2B0F204E002AB695 /* ConfigTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -852,7 +838,6 @@ DBF6F2462B01DAFE0098414B /* AgreementConfig.swift in Sources */, 027BD3AF2909475000392132 /* DismissKeyboardTapHandler.swift in Sources */, 02E225B0291D29EB0067769A /* UrlExtension.swift in Sources */, - 0770DE7928D0C4A9006D8A5D /* RoundedCorners.swift in Sources */, 02CF46C829546AA200A698EE /* NoCachedDataError.swift in Sources */, 0727877728D23847002E9142 /* DataLayer.swift in Sources */, 0241666B28F5A78B00082765 /* HTMLFormattedText.swift in Sources */, @@ -897,7 +882,6 @@ 023A4DD4299E66BD006C0E48 /* OfflineSnackBarView.swift in Sources */, 021D925728DCF12900ACC565 /* AlertView.swift in Sources */, 027BD3A82909474200392132 /* KeyboardAvoidingViewController.swift in Sources */, - 0770DE7B28D0C78C006D8A5D /* Theme.swift in Sources */, 02E93F852AEBAEBC006C4750 /* AppReviewViewModel.swift in Sources */, 0770DE2528D08FBA006D8A5D /* CoreStorage.swift in Sources */, 020306CC2932C0C4000949EA /* PickerView.swift in Sources */, diff --git a/Core/Core/Assets.xcassets/Auth/checkEmail.imageset/Contents.json b/Core/Core/Assets.xcassets/checkEmail.imageset/Contents.json similarity index 100% rename from Core/Core/Assets.xcassets/Auth/checkEmail.imageset/Contents.json rename to Core/Core/Assets.xcassets/checkEmail.imageset/Contents.json diff --git a/Core/Core/Assets.xcassets/Auth/checkEmail.imageset/_1-2.svg b/Core/Core/Assets.xcassets/checkEmail.imageset/_1-2.svg similarity index 100% rename from Core/Core/Assets.xcassets/Auth/checkEmail.imageset/_1-2.svg rename to Core/Core/Assets.xcassets/checkEmail.imageset/_1-2.svg diff --git a/Core/Core/Assets.xcassets/Auth/checkEmail.imageset/_1.svg b/Core/Core/Assets.xcassets/checkEmail.imageset/_1.svg similarity index 100% rename from Core/Core/Assets.xcassets/Auth/checkEmail.imageset/_1.svg rename to Core/Core/Assets.xcassets/checkEmail.imageset/_1.svg diff --git a/Core/Core/Configuration/CSSInjector.swift b/Core/Core/Configuration/CSSInjector.swift index 57a2c88b0..59beef4cd 100644 --- a/Core/Core/Configuration/CSSInjector.swift +++ b/Core/Core/Configuration/CSSInjector.swift @@ -7,6 +7,7 @@ import Foundation import SwiftUI +import Theme public class CSSInjector { @@ -114,7 +115,7 @@ public class CSSInjector {