From 9a38325e0c19634b2d9bf203c872b0dc2fdcb645 Mon Sep 17 00:00:00 2001 From: N3v1 Date: Sun, 27 Oct 2024 16:21:52 +0100 Subject: [PATCH] (chore): Remove CI_ENV Preprocessor Flag --- ScribbleLab.xcodeproj/project.pbxproj | 158 -------------------------- ScribbleLab/App/AppDelegate.swift | 57 +++++----- 2 files changed, 29 insertions(+), 186 deletions(-) diff --git a/ScribbleLab.xcodeproj/project.pbxproj b/ScribbleLab.xcodeproj/project.pbxproj index 11da9cf6c..b23be5988 100644 --- a/ScribbleLab.xcodeproj/project.pbxproj +++ b/ScribbleLab.xcodeproj/project.pbxproj @@ -421,160 +421,6 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 387BC5382CCE892F00B3D2A4 /* CI_ENV */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3880387E2CCBE76E002494B7 /* Development.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "CI_ENV=1", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = CI_ENV; - }; - 387BC5392CCE892F00B3D2A4 /* CI_ENV */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3880387E2CCBE76E002494B7 /* Development.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = ScribbleLab/ScribbleLab.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"ScribbleLab/Preview Content\""; - DEVELOPMENT_TEAM = W93RMB5CDG; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ScribbleLab/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ScribbleLab; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; - INFOPLIST_KEY_UIStatusBarHidden = YES; - INFOPLIST_KEY_UIStatusBarStyle = ""; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; - IPHONEOS_DEPLOYMENT_TARGET = 18.0; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 14.5; - MARKETING_VERSION = "0.1-dev"; - PRODUCT_BUNDLE_IDENTIFIER = com.nhsystems.ScribbleLab; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; - XROS_DEPLOYMENT_TARGET = 2.0; - }; - name = CI_ENV; - }; - 387BC53A2CCE892F00B3D2A4 /* CI_ENV */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3880387E2CCBE76E002494B7 /* Development.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = W93RMB5CDG; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.0; - MACOSX_DEPLOYMENT_TARGET = 14.5; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.nhsystems.ScribbleLabTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScribbleLab.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/ScribbleLab"; - XROS_DEPLOYMENT_TARGET = 2.0; - }; - name = CI_ENV; - }; - 387BC53B2CCE892F00B3D2A4 /* CI_ENV */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3880387E2CCBE76E002494B7 /* Development.xcconfig */; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = W93RMB5CDG; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.0; - MACOSX_DEPLOYMENT_TARGET = 14.5; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.nhsystems.ScribbleLabUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; - TEST_TARGET_NAME = ScribbleLab; - XROS_DEPLOYMENT_TARGET = 2.0; - }; - name = CI_ENV; - }; 388038802CCBE829002494B7 /* Alpha */ = { isa = XCBuildConfiguration; baseConfigurationReference = 3880387A2CCBE695002494B7 /* Alpha.xcconfig */; @@ -1190,7 +1036,6 @@ isa = XCConfigurationList; buildConfigurations = ( 388DC8272CCBE37200C80FF9 /* Debug */, - 387BC5382CCE892F00B3D2A4 /* CI_ENV */, 388038802CCBE829002494B7 /* Alpha */, 388038842CCBE86D002494B7 /* Beta */, 388DC8282CCBE37200C80FF9 /* Release */, @@ -1202,7 +1047,6 @@ isa = XCConfigurationList; buildConfigurations = ( 388DC82A2CCBE37200C80FF9 /* Debug */, - 387BC5392CCE892F00B3D2A4 /* CI_ENV */, 388038812CCBE829002494B7 /* Alpha */, 388038852CCBE86D002494B7 /* Beta */, 388DC82B2CCBE37200C80FF9 /* Release */, @@ -1214,7 +1058,6 @@ isa = XCConfigurationList; buildConfigurations = ( 388DC82D2CCBE37200C80FF9 /* Debug */, - 387BC53A2CCE892F00B3D2A4 /* CI_ENV */, 388038822CCBE829002494B7 /* Alpha */, 388038862CCBE86D002494B7 /* Beta */, 388DC82E2CCBE37200C80FF9 /* Release */, @@ -1226,7 +1069,6 @@ isa = XCConfigurationList; buildConfigurations = ( 388DC8302CCBE37200C80FF9 /* Debug */, - 387BC53B2CCE892F00B3D2A4 /* CI_ENV */, 388038832CCBE829002494B7 /* Alpha */, 388038872CCBE86D002494B7 /* Beta */, 388DC8312CCBE37200C80FF9 /* Release */, diff --git a/ScribbleLab/App/AppDelegate.swift b/ScribbleLab/App/AppDelegate.swift index f8bee4d32..c6e437e09 100644 --- a/ScribbleLab/App/AppDelegate.swift +++ b/ScribbleLab/App/AppDelegate.swift @@ -43,36 +43,37 @@ class AppDelegate: NSObject, UIApplicationDelegate { didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil ) -> Bool { - // MARK: - GoogleService-Info.plist Selection - let gPlistFilePath: String - - #if CI_ENV - guard let mockPlistPath = Bundle.main.path( - forResource: "GoogleService-Info-Mock", - ofType: "plist" - ) else { - fatalError("CI Mock GoogleService-Info plist not found") - } - - gPlistFilePath = mockPlistPath - #else - guard let localPlistPath = Bundle.main.path( - forResource: "GoogleService-Info", - ofType: "plist" - ) else { - fatalError("Local GoogleService-Info plist not found") - } - - gPlistFilePath = localPlistPath - #endif - - // swiftlint:disable:next identifier_name - guard let opts_file = FirebaseOptions(contentsOfFile: gPlistFilePath) else { - fatalError("Couldn't load options from file: \(gPlistFilePath)") - } +// // MARK: - GoogleService-Info.plist Selection +// let gPlistFilePath: String +// +// #if CI_ENV +// guard let mockPlistPath = Bundle.main.path( +// forResource: "GoogleService-Info-Mock", +// ofType: "plist" +// ) else { +// fatalError("CI Mock GoogleService-Info plist not found") +// } +// +// gPlistFilePath = mockPlistPath +// #else +// guard let localPlistPath = Bundle.main.path( +// forResource: "GoogleService-Info", +// ofType: "plist" +// ) else { +// fatalError("Local GoogleService-Info plist not found") +// } +// +// gPlistFilePath = localPlistPath +// #endif +// +// // swiftlint:disable:next identifier_name +// guard let opts_file = FirebaseOptions(contentsOfFile: gPlistFilePath) else { +// fatalError("Couldn't load options from file: \(gPlistFilePath)") +// } // MARK: - Firebase Configuration - FirebaseApp.configure(options: opts_file) +// FirebaseApp.configure(options: opts_file) + FirebaseApp.configure() // MARK: - User Notification Configuration application.registerForRemoteNotifications()