From 95705495e1fcd04a768eed13c09efae5918d8fe4 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Fri, 22 Sep 2023 22:43:08 +0200 Subject: [PATCH 1/5] Add flavors to macOS --- app/firebase.json | 138 ++++--- app/macos/Podfile.lock | 2 +- app/macos/Runner.xcodeproj/project.pbxproj | 349 ++++++++++++++++-- .../xcshareddata/xcschemes/dev.xcscheme | 77 ++++ .../{Runner.xcscheme => prod.xcscheme} | 10 +- app/macos/Runner/GoogleService-Info.plist | 38 -- app/macos/config/dev/GoogleService-Info.plist | 38 ++ .../config/prod/GoogleService-Info.plist | 38 ++ 8 files changed, 556 insertions(+), 134 deletions(-) create mode 100644 app/macos/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme rename app/macos/Runner.xcodeproj/xcshareddata/xcschemes/{Runner.xcscheme => prod.xcscheme} (93%) delete mode 100644 app/macos/Runner/GoogleService-Info.plist create mode 100644 app/macos/config/dev/GoogleService-Info.plist create mode 100644 app/macos/config/prod/GoogleService-Info.plist diff --git a/app/firebase.json b/app/firebase.json index b49f277c2..2c538f9ae 100644 --- a/app/firebase.json +++ b/app/firebase.json @@ -1,64 +1,90 @@ { - "hosting": [ - { - "target": "alpha-web-app", - "public": "build/web", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], - "rewrites": [ + "hosting": [ { - "source": "**", - "destination": "/index.html" - } - ] - }, - { - "target": "beta-web-app", - "public": "build/web", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], - "rewrites": [ + "target": "alpha-web-app", + "public": "build/web", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + }, { - "source": "**", - "destination": "/index.html" - } - ] - }, - { - "target": "release-web-app", - "public": "build/web", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], - "rewrites": [ + "target": "beta-web-app", + "public": "build/web", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + }, { - "source": "**", - "destination": "/index.html" - } - ] - }, - { - "target": "test-web-app", - "public": "build/web", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], - "rewrites": [ + "target": "release-web-app", + "public": "build/web", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + }, { - "source": "**", - "destination": "/index.html" + "target": "test-web-app", + "public": "build/web", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } + ], + "flutter": { + "platforms": { + "macos": { + "default": { + "projectId": "sharezone-c2bd8", + "appId": "1:730263787697:ios:3ff9b2cb1c2a5a31", + "uploadDebugSymbols": true, + "fileOutput": "macos/config/prod/GoogleService-Info.plist" + } + }, + "dart": { + "lib/firebase_options_prod.g.dart": { + "projectId": "sharezone-c2bd8", + "configurations": { + "macos": "1:730263787697:ios:3ff9b2cb1c2a5a31" + } + }, + "lib/firebase_options_dev.g.dart": { + "projectId": "sharezone-debug", + "configurations": { + "macos": "1:366164701221:ios:785f107df46335d5bfcfcc" + } + } + } } - ] } - ] } \ No newline at end of file diff --git a/app/macos/Podfile.lock b/app/macos/Podfile.lock index 5e199f54c..2d380be61 100644 --- a/app/macos/Podfile.lock +++ b/app/macos/Podfile.lock @@ -431,4 +431,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: cee3e976b5ef1fdce4b963c209e0b23c8eb126dd -COCOAPODS: 1.11.2 +COCOAPODS: 1.12.1 diff --git a/app/macos/Runner.xcodeproj/project.pbxproj b/app/macos/Runner.xcodeproj/project.pbxproj index 63c2f5c46..a083587c4 100644 --- a/app/macos/Runner.xcodeproj/project.pbxproj +++ b/app/macos/Runner.xcodeproj/project.pbxproj @@ -22,12 +22,12 @@ /* Begin PBXBuildFile section */ 050166062FA8422804230514 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F4DE3049D10BB3BEED2E472 /* Pods_Runner.framework */; }; - 2944191F2A802C1A00C3A449 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2944191E2A802C1900C3A449 /* GoogleService-Info.plist */; }; 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + E217827E0DD75CED0083FBAC /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = A7EBDD2B9DD63963B19B7683 /* GoogleService-Info.plist */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -54,7 +54,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 2944191E2A802C1900C3A449 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 088A618CE0EF1204594A1058 /* Pods-Runner.profile-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile-dev.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile-dev.xcconfig"; sourceTree = ""; }; + 197A81E14B36E1523E5EEA9C /* Pods-Runner.release-prod.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release-prod.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release-prod.xcconfig"; sourceTree = ""; }; 2F4DE3049D10BB3BEED2E472 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; @@ -72,8 +73,14 @@ 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; 44E7BFEB61ABE66142FEE44C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 4846699B1BD67D2AE19E2108 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 5345D9913A761A30CBCE99C5 /* Pods-Runner.debug-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-dev.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-dev.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 818F81A061AE423557EB1CDC /* Pods-Runner.release-dev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release-dev.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release-dev.xcconfig"; sourceTree = ""; }; + 83BBA3F9E798B44FE603D49C /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "config/prod/GoogleService-Info.plist"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + A7EBDD2B9DD63963B19B7683 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "config/dev/GoogleService-Info.plist"; sourceTree = ""; }; + CA9F30E64F179193307D45CF /* Pods-Runner.profile-prod.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile-prod.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile-prod.xcconfig"; sourceTree = ""; }; + EBD0E15A302B8C0E9844AC81 /* Pods-Runner.debug-prod.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-prod.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-prod.xcconfig"; sourceTree = ""; }; F7986663C61A143D573629D6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -108,6 +115,8 @@ 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, 3F821B4BD434001DEA6917DA /* Pods */, + 83BBA3F9E798B44FE603D49C /* GoogleService-Info.plist */, + A7EBDD2B9DD63963B19B7683 /* GoogleService-Info.plist */, ); sourceTree = ""; }; @@ -144,7 +153,6 @@ 33FAB671232836740065AC1E /* Runner */ = { isa = PBXGroup; children = ( - 2944191E2A802C1900C3A449 /* GoogleService-Info.plist */, 33CC10F02044A3C60003C045 /* AppDelegate.swift */, 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, 33E51913231747F40026EE4D /* DebugProfile.entitlements */, @@ -161,6 +169,12 @@ 44E7BFEB61ABE66142FEE44C /* Pods-Runner.debug.xcconfig */, 4846699B1BD67D2AE19E2108 /* Pods-Runner.release.xcconfig */, F7986663C61A143D573629D6 /* Pods-Runner.profile.xcconfig */, + EBD0E15A302B8C0E9844AC81 /* Pods-Runner.debug-prod.xcconfig */, + 5345D9913A761A30CBCE99C5 /* Pods-Runner.debug-dev.xcconfig */, + 197A81E14B36E1523E5EEA9C /* Pods-Runner.release-prod.xcconfig */, + 818F81A061AE423557EB1CDC /* Pods-Runner.release-dev.xcconfig */, + CA9F30E64F179193307D45CF /* Pods-Runner.profile-prod.xcconfig */, + 088A618CE0EF1204594A1058 /* Pods-Runner.profile-dev.xcconfig */, ); path = Pods; sourceTree = ""; @@ -188,6 +202,7 @@ 3399D490228B24CF009A79C7 /* ShellScript */, 2C99A494D8F3B9EDEB669A8E /* [CP] Embed Pods Frameworks */, F82A9A5C5200EA7289846B73 /* [CP] Copy Pods Resources */, + 75FE29C878E5D41185F61E95 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, ); buildRules = ( ); @@ -251,7 +266,7 @@ files = ( 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - 2944191F2A802C1A00C3A449 /* GoogleService-Info.plist in Resources */, + E217827E0DD75CED0083FBAC /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -335,6 +350,24 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 75FE29C878E5D41185F61E95 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\""; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --debug-symbols-path=${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME} --info-plist-path=${SRCROOT}/${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH} --platform=macos --apple-project-path=${SRCROOT} --default-config=default\n"; + }; F82A9A5C5200EA7289846B73 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -388,7 +421,246 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 338D0CE9231458BD00FA5F75 /* Profile */ = { + 296712E72ABDF9940039CA7D /* Debug-dev */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = "Debug-dev"; + }; + 296712E82ABDF9940039CA7D /* Debug-dev */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = AJ3PMPVZ7H; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = de.codingbrain.sharezone.app.dev; + PRODUCT_NAME = "dev Sharezone"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = "Debug-dev"; + }; + 296712E92ABDF9940039CA7D /* Debug-dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Debug-dev"; + }; + 296712EA2ABDF99A0039CA7D /* Release-dev */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = "Release-dev"; + }; + 296712EB2ABDF99A0039CA7D /* Release-dev */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = AJ3PMPVZ7H; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = de.codingbrain.sharezone.app.dev; + PRODUCT_NAME = "dev Sharezone"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = "Release-dev"; + }; + 296712EC2ABDF99A0039CA7D /* Release-dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Release-dev"; + }; + 296712ED2ABDF9A00039CA7D /* Profile-dev */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = 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_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = "Profile-dev"; + }; + 296712EE2ABDF9A00039CA7D /* Profile-dev */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = AJ3PMPVZ7H; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = de.codingbrain.sharezone.app.dev; + PRODUCT_NAME = "dev Sharezone"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = "Profile-dev"; + }; + 296712EF2ABDF9A00039CA7D /* Profile-dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Profile-dev"; + }; + 338D0CE9231458BD00FA5F75 /* Profile-prod */ = { isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { @@ -432,9 +704,9 @@ SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; }; - name = Profile; + name = "Profile-prod"; }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { + 338D0CEA231458BD00FA5F75 /* Profile-prod */ = { isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { @@ -455,17 +727,17 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; - name = Profile; + name = "Profile-prod"; }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { + 338D0CEB231458BD00FA5F75 /* Profile-prod */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Manual; PRODUCT_NAME = "$(TARGET_NAME)"; }; - name = Profile; + name = "Profile-prod"; }; - 33CC10F92044A3C60003C045 /* Debug */ = { + 33CC10F92044A3C60003C045 /* Debug-prod */ = { isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { @@ -516,9 +788,9 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; - name = Debug; + name = "Debug-prod"; }; - 33CC10FA2044A3C60003C045 /* Release */ = { + 33CC10FA2044A3C60003C045 /* Release-prod */ = { isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { @@ -562,9 +834,9 @@ SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; }; - name = Release; + name = "Release-prod"; }; - 33CC10FC2044A3C60003C045 /* Debug */ = { + 33CC10FC2044A3C60003C045 /* Debug-prod */ = { isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { @@ -586,9 +858,9 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; - name = Debug; + name = "Debug-prod"; }; - 33CC10FD2044A3C60003C045 /* Release */ = { + 33CC10FD2044A3C60003C045 /* Release-prod */ = { isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { @@ -609,23 +881,23 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; - name = Release; + name = "Release-prod"; }; - 33CC111C2044C6BA0003C045 /* Debug */ = { + 33CC111C2044C6BA0003C045 /* Debug-prod */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Manual; PRODUCT_NAME = "$(TARGET_NAME)"; }; - name = Debug; + name = "Debug-prod"; }; - 33CC111D2044C6BA0003C045 /* Release */ = { + 33CC111D2044C6BA0003C045 /* Release-prod */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; PRODUCT_NAME = "$(TARGET_NAME)"; }; - name = Release; + name = "Release-prod"; }; /* End XCBuildConfiguration section */ @@ -633,32 +905,41 @@ 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, + 33CC10F92044A3C60003C045 /* Debug-prod */, + 296712E72ABDF9940039CA7D /* Debug-dev */, + 33CC10FA2044A3C60003C045 /* Release-prod */, + 296712EA2ABDF99A0039CA7D /* Release-dev */, + 338D0CE9231458BD00FA5F75 /* Profile-prod */, + 296712ED2ABDF9A00039CA7D /* Profile-dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = "Release-prod"; }; 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, + 33CC10FC2044A3C60003C045 /* Debug-prod */, + 296712E82ABDF9940039CA7D /* Debug-dev */, + 33CC10FD2044A3C60003C045 /* Release-prod */, + 296712EB2ABDF99A0039CA7D /* Release-dev */, + 338D0CEA231458BD00FA5F75 /* Profile-prod */, + 296712EE2ABDF9A00039CA7D /* Profile-dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = "Release-prod"; }; 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { isa = XCConfigurationList; buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, + 33CC111C2044C6BA0003C045 /* Debug-prod */, + 296712E92ABDF9940039CA7D /* Debug-dev */, + 33CC111D2044C6BA0003C045 /* Release-prod */, + 296712EC2ABDF99A0039CA7D /* Release-dev */, + 338D0CEB231458BD00FA5F75 /* Profile-prod */, + 296712EF2ABDF9A00039CA7D /* Profile-dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = "Release-prod"; }; /* End XCConfigurationList section */ }; diff --git a/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme b/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme new file mode 100644 index 000000000..ead711551 --- /dev/null +++ b/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/dev.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/prod.xcscheme similarity index 93% rename from app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to app/macos/Runner.xcodeproj/xcshareddata/xcschemes/prod.xcscheme index 12505a4d3..e0f3d3440 100644 --- a/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/app/macos/Runner.xcodeproj/xcshareddata/xcschemes/prod.xcscheme @@ -23,7 +23,7 @@ @@ -40,7 +40,7 @@ + buildConfiguration = "Debug-prod"> diff --git a/app/macos/Runner/GoogleService-Info.plist b/app/macos/Runner/GoogleService-Info.plist deleted file mode 100644 index 74a60671a..000000000 --- a/app/macos/Runner/GoogleService-Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CLIENT_ID - 730263787697-r3ubdsbn4l752elbpnh6nu2tpiqq439p.apps.googleusercontent.com - REVERSED_CLIENT_ID - com.googleusercontent.apps.730263787697-r3ubdsbn4l752elbpnh6nu2tpiqq439p - ANDROID_CLIENT_ID - 730263787697-qesavunds33aem3po0kqunblpn3rgqsn.apps.googleusercontent.com - API_KEY - AIzaSyB2VFGw3_SP11Ovuy3NDx7ZXAHiHtAoGGk - GCM_SENDER_ID - 730263787697 - PLIST_VERSION - 1 - BUNDLE_ID - de.codingbrain.sharezone.app - PROJECT_ID - sharezone-c2bd8 - STORAGE_BUCKET - sharezone-c2bd8.appspot.com - IS_ADS_ENABLED - - IS_ANALYTICS_ENABLED - - IS_APPINVITE_ENABLED - - IS_GCM_ENABLED - - IS_SIGNIN_ENABLED - - GOOGLE_APP_ID - 1:730263787697:ios:3ff9b2cb1c2a5a31 - DATABASE_URL - https://sharezone-c2bd8.firebaseio.com - - diff --git a/app/macos/config/dev/GoogleService-Info.plist b/app/macos/config/dev/GoogleService-Info.plist new file mode 100644 index 000000000..18a9d3fdb --- /dev/null +++ b/app/macos/config/dev/GoogleService-Info.plist @@ -0,0 +1,38 @@ + + + + + CLIENT_ID + 366164701221-fdv476f10fl969nd65dv97tfajqb9jr1.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.366164701221-fdv476f10fl969nd65dv97tfajqb9jr1 + ANDROID_CLIENT_ID + 366164701221-9e41nmj0vhiqhgdpe2qebfdp91pht6ln.apps.googleusercontent.com + API_KEY + AIzaSyBS3rxcFvmskFvgynGhG4hfeOUZwXrZOro + GCM_SENDER_ID + 366164701221 + PLIST_VERSION + 1 + BUNDLE_ID + de.codingbrain.sharezone.app.dev + PROJECT_ID + sharezone-debug + STORAGE_BUCKET + sharezone-debug.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:366164701221:ios:785f107df46335d5bfcfcc + DATABASE_URL + https://sharezone-debug.firebaseio.com + + \ No newline at end of file diff --git a/app/macos/config/prod/GoogleService-Info.plist b/app/macos/config/prod/GoogleService-Info.plist new file mode 100644 index 000000000..b9383b999 --- /dev/null +++ b/app/macos/config/prod/GoogleService-Info.plist @@ -0,0 +1,38 @@ + + + + + CLIENT_ID + 730263787697-r3ubdsbn4l752elbpnh6nu2tpiqq439p.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.730263787697-r3ubdsbn4l752elbpnh6nu2tpiqq439p + ANDROID_CLIENT_ID + 730263787697-3k362gt3s1lu4d2entj682com1a42ud1.apps.googleusercontent.com + API_KEY + AIzaSyB2VFGw3_SP11Ovuy3NDx7ZXAHiHtAoGGk + GCM_SENDER_ID + 730263787697 + PLIST_VERSION + 1 + BUNDLE_ID + de.codingbrain.sharezone.app + PROJECT_ID + sharezone-c2bd8 + STORAGE_BUCKET + sharezone-c2bd8.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:730263787697:ios:3ff9b2cb1c2a5a31 + DATABASE_URL + https://sharezone-c2bd8.firebaseio.com + + \ No newline at end of file From 1d23c889a2e04874a3c7c2868a610ba8d7a89208 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Sat, 9 Dec 2023 14:27:54 +0100 Subject: [PATCH 2/5] Configure flavors for macOS --- .github/workflows/alpha.yml | 6 +++ .github/workflows/beta.yml | 6 +++ .../workflows/integration_tests_app_ci.yml | 9 +++- .github/workflows/stable.yml | 6 +++ app/firebase.json | 54 +++++++++++++++---- app/macos/Runner.xcodeproj/project.pbxproj | 38 ++++++++++--- app/macos/config/dev/GoogleService-Info.plist | 2 +- .../config/prod/GoogleService-Info.plist | 2 +- .../src/commands/src/build_macos_command.dart | 30 +++++++++-- 9 files changed, 128 insertions(+), 25 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index d405e1d7a..20c7aef76 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -303,6 +303,12 @@ jobs: fvm flutter pub global activate --source path "$CI_CD_DART_SCRIPTS_PACKAGE_PATH" echo $(realpath ./bin) >> $GITHUB_PATH + # We need to install the FlutterFire CLI because we have Build Phases in + # XCode configured which are using the FlutterFire CLI. Without the CLI, + # the build would fail. + - name: Install FlutterFire CLI + run: fvm flutter pub global activate flutterfire_cli 0.3.0-dev.18 + - name: Deploy macOS to TestFlight env: # The following secrets are used by the Codemagic CLI tool. It's important diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index d70405fa1..17758e250 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -254,6 +254,12 @@ jobs: fvm flutter pub global activate --source path "$CI_CD_DART_SCRIPTS_PACKAGE_PATH" echo $(pwd)/bin >> $GITHUB_PATH + # We need to install the FlutterFire CLI because we have Build Phases in + # XCode configured which are using the FlutterFire CLI. Without the CLI, + # the build would fail. + - name: Install FlutterFire CLI + run: fvm flutter pub global activate flutterfire_cli 0.3.0-dev.18 + - name: Deploy to TestFlight env: # The following secrets are used by the Codemagic CLI tool. It's important diff --git a/.github/workflows/integration_tests_app_ci.yml b/.github/workflows/integration_tests_app_ci.yml index 20249135b..f6104c540 100644 --- a/.github/workflows/integration_tests_app_ci.yml +++ b/.github/workflows/integration_tests_app_ci.yml @@ -331,7 +331,14 @@ jobs: flutter-version: ${{ env.FLUTTER_VERSION }} channel: ${{ env.FLUTTER_CHANNEL }} + # We need to install the FlutterFire CLI because we have Build Phases in + # XCode configured which are using the FlutterFire CLI. Without the CLI, + # the build would fail. + - name: Install FlutterFire CLI + run: flutter pub global activate flutterfire_cli 0.3.0-dev.18 + - name: Build macOS app run: | flutter build macos \ - -t lib/main_prod.dart + --flavor dev \ + -t lib/main_dev.dart diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index 9a187c5f5..cbf1b6618 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -256,6 +256,12 @@ jobs: fvm flutter pub global activate --source path "$CI_CD_DART_SCRIPTS_PACKAGE_PATH" echo $(pwd)/bin >> $GITHUB_PATH + # We need to install the FlutterFire CLI because we have Build Phases in + # XCode configured which are using the FlutterFire CLI. Without the CLI, + # the build would fail. + - name: Install FlutterFire CLI + run: fvm flutter pub global activate flutterfire_cli 0.3.0-dev.18 + - name: Deploy to TestFlight env: # The following secrets are used by the Codemagic CLI tool. It's important diff --git a/app/firebase.json b/app/firebase.json index 2c538f9ae..8fa098c26 100644 --- a/app/firebase.json +++ b/app/firebase.json @@ -64,25 +64,57 @@ "flutter": { "platforms": { "macos": { - "default": { - "projectId": "sharezone-c2bd8", - "appId": "1:730263787697:ios:3ff9b2cb1c2a5a31", - "uploadDebugSymbols": true, - "fileOutput": "macos/config/prod/GoogleService-Info.plist" + "buildConfigurations": { + "Debug-dev": { + "projectId": "sharezone-debug", + "appId": "1:366164701221:ios:785f107df46335d5bfcfcc", + "uploadDebugSymbols": true, + "fileOutput": "macos/config/dev/GoogleService-Info.plist" + }, + "Profile-dev": { + "projectId": "sharezone-debug", + "appId": "1:366164701221:ios:785f107df46335d5bfcfcc", + "uploadDebugSymbols": true, + "fileOutput": "macos/config/dev/GoogleService-Info.plist" + }, + "Release-dev": { + "projectId": "sharezone-debug", + "appId": "1:366164701221:ios:785f107df46335d5bfcfcc", + "uploadDebugSymbols": true, + "fileOutput": "macos/config/dev/GoogleService-Info.plist" + }, + "Debug-prod": { + "projectId": "sharezone-c2bd8", + "appId": "1:730263787697:ios:3ff9b2cb1c2a5a31", + "uploadDebugSymbols": true, + "fileOutput": "macos/config/prod/GoogleService-Info.plist" + }, + "Profile-prod": { + "projectId": "sharezone-c2bd8", + "appId": "1:730263787697:ios:3ff9b2cb1c2a5a31", + "uploadDebugSymbols": true, + "fileOutput": "macos/config/prod/GoogleService-Info.plist" + }, + "Release-prod": { + "projectId": "sharezone-c2bd8", + "appId": "1:730263787697:ios:3ff9b2cb1c2a5a31", + "uploadDebugSymbols": true, + "fileOutput": "macos/config/prod/GoogleService-Info.plist" + } } }, "dart": { - "lib/firebase_options_prod.g.dart": { - "projectId": "sharezone-c2bd8", - "configurations": { - "macos": "1:730263787697:ios:3ff9b2cb1c2a5a31" - } - }, "lib/firebase_options_dev.g.dart": { "projectId": "sharezone-debug", "configurations": { "macos": "1:366164701221:ios:785f107df46335d5bfcfcc" } + }, + "lib/firebase_options_prod.g.dart": { + "projectId": "sharezone-c2bd8", + "configurations": { + "macos": "1:730263787697:ios:3ff9b2cb1c2a5a31" + } } } } diff --git a/app/macos/Runner.xcodeproj/project.pbxproj b/app/macos/Runner.xcodeproj/project.pbxproj index b04574e0d..ff0058ef1 100644 --- a/app/macos/Runner.xcodeproj/project.pbxproj +++ b/app/macos/Runner.xcodeproj/project.pbxproj @@ -202,7 +202,8 @@ 3399D490228B24CF009A79C7 /* ShellScript */, 2C99A494D8F3B9EDEB669A8E /* [CP] Embed Pods Frameworks */, F82A9A5C5200EA7289846B73 /* [CP] Copy Pods Resources */, - 75FE29C878E5D41185F61E95 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, + E1EE90409DEEBEA4D0F6E83F /* FlutterFire: "flutterfire bundle-service-file" */, + 4BD11FE0A5D762EDFD73BFC1 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, ); buildRules = ( ); @@ -328,6 +329,24 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; + 4BD11FE0A5D762EDFD73BFC1 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\""; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --debug-symbols-path=${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME} --info-plist-path=${SRCROOT}/${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH} --platform=macos --apple-project-path=${SRCROOT} --build-configuration=${CONFIGURATION}\n"; + }; 66D1F3850D87AD3C391F2112 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -350,7 +369,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 75FE29C878E5D41185F61E95 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = { + E1EE90409DEEBEA4D0F6E83F /* FlutterFire: "flutterfire bundle-service-file" */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -359,14 +378,14 @@ ); inputPaths = ( ); - name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\""; + name = "FlutterFire: \"flutterfire bundle-service-file\""; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --debug-symbols-path=${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME} --info-plist-path=${SRCROOT}/${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH} --platform=macos --apple-project-path=${SRCROOT} --default-config=default\n"; + shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire bundle-service-file --plist-destination=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app --build-configuration=${CONFIGURATION} --platform=macos --apple-project-path=${SRCROOT}\n"; }; F82A9A5C5200EA7289846B73 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; @@ -484,14 +503,16 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = AJ3PMPVZ7H; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = de.codingbrain.sharezone.app.dev; - PRODUCT_NAME = "dev Sharezone"; + PRODUCT_NAME = dev_Sharezone; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -568,8 +589,9 @@ "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = de.codingbrain.sharezone.app.dev; - PRODUCT_NAME = "dev Sharezone"; + PRODUCT_NAME = dev_Sharezone; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; @@ -645,8 +667,9 @@ "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = de.codingbrain.sharezone.app.dev; - PRODUCT_NAME = "dev Sharezone"; + PRODUCT_NAME = dev_Sharezone; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 5.0; }; @@ -847,6 +870,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = AJ3PMPVZ7H; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/app/macos/config/dev/GoogleService-Info.plist b/app/macos/config/dev/GoogleService-Info.plist index 18a9d3fdb..d511bd1fd 100644 --- a/app/macos/config/dev/GoogleService-Info.plist +++ b/app/macos/config/dev/GoogleService-Info.plist @@ -23,7 +23,7 @@ IS_ADS_ENABLED IS_ANALYTICS_ENABLED - + IS_APPINVITE_ENABLED IS_GCM_ENABLED diff --git a/app/macos/config/prod/GoogleService-Info.plist b/app/macos/config/prod/GoogleService-Info.plist index b9383b999..ee77fefef 100644 --- a/app/macos/config/prod/GoogleService-Info.plist +++ b/app/macos/config/prod/GoogleService-Info.plist @@ -23,7 +23,7 @@ IS_ADS_ENABLED IS_ANALYTICS_ENABLED - + IS_APPINVITE_ENABLED IS_GCM_ENABLED diff --git a/tools/sz_repo_cli/lib/src/commands/src/build_macos_command.dart b/tools/sz_repo_cli/lib/src/commands/src/build_macos_command.dart index 16e223014..d02d6f61e 100644 --- a/tools/sz_repo_cli/lib/src/commands/src/build_macos_command.dart +++ b/tools/sz_repo_cli/lib/src/commands/src/build_macos_command.dart @@ -9,12 +9,18 @@ import 'dart:io'; import 'package:sz_repo_cli/src/common/common.dart'; +import 'package:sz_repo_cli/src/common/src/throw_if_command_is_not_installed.dart'; final _macOsStages = [ 'stable', 'alpha', ]; +final _macOsFlavors = [ + 'prod', + 'dev', +]; + class BuildMacOsCommand extends CommandBase { BuildMacOsCommand(super.context) { argParser @@ -24,16 +30,21 @@ class BuildMacOsCommand extends CommandBase { allowed: _macOsStages, defaultsTo: 'stable', ) - ..addOption( - buildNumberOptionName, - help: '''An identifier used as an internal version number. + ..addOption(buildNumberOptionName, + help: '''An identifier used as an internal version number. Each build must have a unique identifier to differentiate it from previous builds. It is used to determine whether one build is more recent than another, with higher numbers indicating more recent build. -When none is specified, the value from pubspec.yaml is used.''', +When none is specified, the value from pubspec.yaml is used.''') + ..addOption( + flavorOptionName, + allowed: _macOsFlavors, + help: 'The flavor to build for.', + defaultsTo: 'prod', ); } + static const flavorOptionName = 'flavor'; static const releaseStageOptionName = 'stage'; static const buildNumberOptionName = 'build-number'; @@ -45,6 +56,8 @@ When none is specified, the value from pubspec.yaml is used.''', @override Future run() async { + await throwIfFlutterFireCliIsNotInstalled(); + // Is used so that runProcess commands print the command that was run. Right // now this can't be done via an argument. // @@ -55,6 +68,15 @@ When none is specified, the value from pubspec.yaml is used.''', stdout.writeln('Build finished 🎉 '); } + Future throwIfFlutterFireCliIsNotInstalled() async { + await throwIfCommandIsNotInstalled( + processRunner, + command: 'flutterfire', + instructionsToInstall: + 'Docs to install them: https://pub.dev/packages/flutterfire_cli', + ); + } + Future _buildApp() async { try { const flavor = 'prod'; From b7e5b3a3d77ad03321184f49885f48a408f50ae0 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Sat, 9 Dec 2023 14:33:22 +0100 Subject: [PATCH 3/5] Update CONTRIBUTING.md --- CONTRIBUTING.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7736e03e7..8c13c13e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,6 +92,18 @@ To install & use FVM, follow the following steps: When you are using VS Code, no further steps should be necessary, because we included the `.vscode/setting.json` to git. However, when you are using Android Studio, you need to configure your IDE to use the Flutter version of FVM. Follow the [official documentation](https://fvm.app/docs/getting_started/configuration#android-studio) to configure Android Studio. +### FlutterFire CLI + +If you want to use build the macOS app, you need to install the [FlutterFire CLI](https://pub.dev/packages/flutterfire_cli). This CLI is used during the build process. + +To install the FlutterFire CLI, execute the following command: + +```sh +fvm flutter pub global activate flutterfire_cli 0.3.0-dev.18 +``` + +Make sure, you have the 0.3.0-dev.18 version or higher installed. You can check the version by running `flutterfire --version`. + ## Running the app After you have set up your development environment, you can run the app. @@ -104,13 +116,15 @@ cd app To run the app, you can then execute the following command: -### Android & iOS +### Android, iOS & macOS + +```sh ```sh fvm flutter run --flavor dev --target lib/main_dev.dart ``` -### Web & macOS +### Web ```sh fvm flutter run --target lib/main_dev.dart From 30186f7e1fe7ef631b5d1fcf3acfcdec054e3d90 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Thu, 14 Dec 2023 18:25:16 +0100 Subject: [PATCH 4/5] Fix macos builds --- app/macos/Runner.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/macos/Runner.xcodeproj/project.pbxproj b/app/macos/Runner.xcodeproj/project.pbxproj index ff0058ef1..60dfeea88 100644 --- a/app/macos/Runner.xcodeproj/project.pbxproj +++ b/app/macos/Runner.xcodeproj/project.pbxproj @@ -385,7 +385,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire bundle-service-file --plist-destination=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app --build-configuration=${CONFIGURATION} --platform=macos --apple-project-path=${SRCROOT}\n"; + shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\n# Define the Resources directory path\nRESOURCES_DIR=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources\n\n# Create the Resources directory if it does not exist\n mkdir -p \"$RESOURCES_DIR\"\n\n flutterfire bundle-service-file --plist-destination=\"$RESOURCES_DIR\" --build-configuration=${CONFIGURATION} --platform=macos --apple-project-path=${SRCROOT}\n"; }; F82A9A5C5200EA7289846B73 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; From 577f2fe65deeb65523e2d26da87fa9ed42da31d6 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Thu, 14 Dec 2023 20:26:18 +0100 Subject: [PATCH 5/5] Update bundle ID --- .github/workflows/integration_tests_app_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests_app_ci.yml b/.github/workflows/integration_tests_app_ci.yml index f6104c540..fbce4c00d 100644 --- a/.github/workflows/integration_tests_app_ci.yml +++ b/.github/workflows/integration_tests_app_ci.yml @@ -304,7 +304,7 @@ jobs: APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_KEY_IDENTIFIER }} APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_ISSUER_ID }} APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_PRIVATE_KEY }} - BUNDLE_ID: de.codingbrain.sharezone.app + BUNDLE_ID: de.codingbrain.sharezone.app.dev run: | # Even when are trying to build app, we need to use "--platform IOS". # The reason for this that our production bundle ID was created for