From 2a9a1c8ba4fe2234a031980891bdb3ebc5c65c02 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 18 Jan 2022 09:41:12 -0800 Subject: [PATCH 01/28] Update Functions to SwiftUI. --- .../project.pbxproj | 421 ++++++++++++++++++ .../AccentColor.colorset/Contents.json | 11 + .../Amber400.colorset/Contents.json | 38 ++ .../AppIcon.appiconset/Contents.json | 98 ++++ .../Assets.xcassets/Contents.json | 6 + .../FunctionsExampleApp.swift | 22 + .../Preview Assets.xcassets/Contents.json | 6 + .../FunctionsExample/Screen/ContentView.swift | 21 + .../FunctionsExample/Screen/HomeView.swift | 26 ++ .../FunctionsExample/View/AddMessage.swift | 72 +++ .../FunctionsExample/View/AddNumbers.swift | 98 ++++ .../View/BackgroundFrame.swift | 28 ++ functions/GoogleService-Info.plist | 40 -- .../project.pbxproj | 0 .../xcschemes/FunctionsExample.xcscheme | 0 .../xcschemes/FunctionsExampleSwift.xcscheme | 0 .../FunctionsExample/.clang-format | 0 .../FunctionsExample/AppDelegate.h | 0 .../FunctionsExample/AppDelegate.m | 0 .../Base.lproj/Main.storyboard | 0 .../FunctionsExample/CloudAddCell.h | 0 .../FunctionsExample/CloudAddCell.m | 0 .../FunctionsExample/CommentCell.h | 0 .../FunctionsExample/CommentCell.m | 0 .../FAuthPickerViewController.h | 0 .../FAuthPickerViewController.m | 0 .../FAuthPickerViewController.xib | 0 .../FunctionsExample/Info.plist | 0 .../FunctionsExample/MainViewController.h | 0 .../FunctionsExample/MainViewController.m | 0 .../FunctionsExample/SignInViewController.h | 0 .../FunctionsExample/SignInViewController.m | 0 .../FunctionsExample/main.m | 0 .../FunctionsExampleSwift/AppDelegate.swift | 0 .../FunctionsExampleSwift/CloudAddCell.swift | 0 .../FunctionsExampleSwift/CommentCell.swift | 0 .../FAuthPickerViewController.swift | 0 .../MainViewController.swift | 0 .../SignInViewController.swift | 0 .../FunctionsExampleSwiftUITests.swift | 0 .../FunctionsExampleSwiftUITests/Info.plist | 0 .../FunctionsExampleTests.m | 0 .../FunctionsExampleTests/Info.plist | 0 .../FunctionsExampleUITests.m | 0 .../FunctionsExampleUITests/Info.plist | 0 .../{ => LegacyFunctionsQuickstart}/Podfile | 0 .../Podfile.lock | 0 .../{ => LegacyFunctionsQuickstart}/README.md | 0 shared/Amber400.colorset/Contents.json | 38 ++ 49 files changed, 885 insertions(+), 40 deletions(-) create mode 100644 functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj create mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/Amber400.colorset/Contents.json create mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/Contents.json create mode 100644 functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift create mode 100644 functions/FunctionsExample/FunctionsExample/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift create mode 100644 functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift create mode 100644 functions/FunctionsExample/FunctionsExample/View/AddMessage.swift create mode 100644 functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift create mode 100644 functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift delete mode 100644 functions/GoogleService-Info.plist rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample.xcodeproj/project.pbxproj (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExampleSwift.xcscheme (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/.clang-format (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/AppDelegate.h (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/AppDelegate.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/Base.lproj/Main.storyboard (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/CloudAddCell.h (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/CloudAddCell.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/CommentCell.h (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/CommentCell.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/FAuthPickerViewController.h (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/FAuthPickerViewController.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/FAuthPickerViewController.xib (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/Info.plist (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/MainViewController.h (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/MainViewController.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/SignInViewController.h (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/SignInViewController.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExample/main.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleSwift/AppDelegate.swift (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleSwift/CloudAddCell.swift (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleSwift/CommentCell.swift (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleSwift/FAuthPickerViewController.swift (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleSwift/MainViewController.swift (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleSwift/SignInViewController.swift (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleSwiftUITests/FunctionsExampleSwiftUITests.swift (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleSwiftUITests/Info.plist (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleTests/FunctionsExampleTests.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleTests/Info.plist (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleUITests/FunctionsExampleUITests.m (100%) rename functions/{ => LegacyFunctionsQuickstart}/FunctionsExampleUITests/Info.plist (100%) rename functions/{ => LegacyFunctionsQuickstart}/Podfile (100%) rename functions/{ => LegacyFunctionsQuickstart}/Podfile.lock (100%) rename functions/{ => LegacyFunctionsQuickstart}/README.md (100%) create mode 100644 shared/Amber400.colorset/Contents.json diff --git a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj new file mode 100644 index 000000000..0da86718f --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj @@ -0,0 +1,421 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + B9260233278F8F08006F123B /* FunctionsExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9260232278F8F08006F123B /* FunctionsExampleApp.swift */; }; + B9260235278F8F08006F123B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9260234278F8F08006F123B /* ContentView.swift */; }; + B9260237278F8F0A006F123B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9260236278F8F0A006F123B /* Assets.xcassets */; }; + B926023A278F8F0A006F123B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9260239278F8F0A006F123B /* Preview Assets.xcassets */; }; + B9260244278F94D1006F123B /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = B9260243278F94D1006F123B /* FirebaseAnalytics */; }; + B9260246278F94D1006F123B /* FirebaseFunctions in Frameworks */ = {isa = PBXBuildFile; productRef = B9260245278F94D1006F123B /* FirebaseFunctions */; }; + B9260248278F95B6006F123B /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9260247278F95B6006F123B /* HomeView.swift */; }; + B926024B278F963C006F123B /* AddMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024A278F963C006F123B /* AddMessage.swift */; }; + B926024D278F96B3006F123B /* AddNumbers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024C278F96B3006F123B /* AddNumbers.swift */; }; + B926024F278F9756006F123B /* BackgroundFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024E278F9756006F123B /* BackgroundFrame.swift */; }; + B9260251278F98B3006F123B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B9260250278F98B3006F123B /* GoogleService-Info.plist */; }; + B9260253278F9D24006F123B /* shared in Resources */ = {isa = PBXBuildFile; fileRef = B9260252278F9D23006F123B /* shared */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + B926022F278F8F08006F123B /* FunctionsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FunctionsExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B9260232278F8F08006F123B /* FunctionsExampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FunctionsExampleApp.swift; sourceTree = ""; }; + B9260234278F8F08006F123B /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + B9260236278F8F0A006F123B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B9260239278F8F0A006F123B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + B9260247278F95B6006F123B /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; + B926024A278F963C006F123B /* AddMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMessage.swift; sourceTree = ""; }; + B926024C278F96B3006F123B /* AddNumbers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddNumbers.swift; sourceTree = ""; }; + B926024E278F9756006F123B /* BackgroundFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundFrame.swift; sourceTree = ""; }; + B9260250278F98B3006F123B /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + B9260252278F9D23006F123B /* shared */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shared; path = ../../../shared; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B926022C278F8F08006F123B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B9260244278F94D1006F123B /* FirebaseAnalytics in Frameworks */, + B9260246278F94D1006F123B /* FirebaseFunctions in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B9260226278F8F08006F123B = { + isa = PBXGroup; + children = ( + B9260250278F98B3006F123B /* GoogleService-Info.plist */, + B9260231278F8F08006F123B /* FunctionsExample */, + B9260230278F8F08006F123B /* Products */, + ); + sourceTree = ""; + }; + B9260230278F8F08006F123B /* Products */ = { + isa = PBXGroup; + children = ( + B926022F278F8F08006F123B /* FunctionsExample.app */, + ); + name = Products; + sourceTree = ""; + }; + B9260231278F8F08006F123B /* FunctionsExample */ = { + isa = PBXGroup; + children = ( + B9260232278F8F08006F123B /* FunctionsExampleApp.swift */, + B9260241278F9002006F123B /* Screen */, + B9260240278F8FC8006F123B /* View */, + B9260236278F8F0A006F123B /* Assets.xcassets */, + B9260252278F9D23006F123B /* shared */, + B9260238278F8F0A006F123B /* Preview Content */, + ); + path = FunctionsExample; + sourceTree = ""; + }; + B9260238278F8F0A006F123B /* Preview Content */ = { + isa = PBXGroup; + children = ( + B9260239278F8F0A006F123B /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + B9260240278F8FC8006F123B /* View */ = { + isa = PBXGroup; + children = ( + B926024A278F963C006F123B /* AddMessage.swift */, + B926024C278F96B3006F123B /* AddNumbers.swift */, + B926024E278F9756006F123B /* BackgroundFrame.swift */, + ); + path = View; + sourceTree = ""; + }; + B9260241278F9002006F123B /* Screen */ = { + isa = PBXGroup; + children = ( + B9260234278F8F08006F123B /* ContentView.swift */, + B9260247278F95B6006F123B /* HomeView.swift */, + ); + path = Screen; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B926022E278F8F08006F123B /* FunctionsExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = B926023D278F8F0A006F123B /* Build configuration list for PBXNativeTarget "FunctionsExample" */; + buildPhases = ( + B926022B278F8F08006F123B /* Sources */, + B926022C278F8F08006F123B /* Frameworks */, + B926022D278F8F08006F123B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FunctionsExample; + packageProductDependencies = ( + B9260243278F94D1006F123B /* FirebaseAnalytics */, + B9260245278F94D1006F123B /* FirebaseFunctions */, + ); + productName = FunctionsExample; + productReference = B926022F278F8F08006F123B /* FunctionsExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B9260227278F8F08006F123B /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1310; + LastUpgradeCheck = 1310; + TargetAttributes = { + B926022E278F8F08006F123B = { + CreatedOnToolsVersion = 13.1; + }; + }; + }; + buildConfigurationList = B926022A278F8F08006F123B /* Build configuration list for PBXProject "FunctionsExample" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B9260226278F8F08006F123B; + packageReferences = ( + B9260242278F94D1006F123B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + ); + productRefGroup = B9260230278F8F08006F123B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B926022E278F8F08006F123B /* FunctionsExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B926022D278F8F08006F123B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B926023A278F8F0A006F123B /* Preview Assets.xcassets in Resources */, + B9260253278F9D24006F123B /* shared in Resources */, + B9260237278F8F0A006F123B /* Assets.xcassets in Resources */, + B9260251278F98B3006F123B /* GoogleService-Info.plist in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B926022B278F8F08006F123B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B9260248278F95B6006F123B /* HomeView.swift in Sources */, + B926024D278F96B3006F123B /* AddNumbers.swift in Sources */, + B926024B278F963C006F123B /* AddMessage.swift in Sources */, + B926024F278F9756006F123B /* BackgroundFrame.swift in Sources */, + B9260235278F8F08006F123B /* ContentView.swift in Sources */, + B9260233278F8F08006F123B /* FunctionsExampleApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + B926023B278F8F0A006F123B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + 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; + 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_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + B926023C278F8F0A006F123B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_CXX_LIBRARY = "libc++"; + 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-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_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + B926023E278F8F0A006F123B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"FunctionsExample/Preview Content\""; + DEVELOPMENT_TEAM = UBV32XXYKC; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample.FunctionsExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + B926023F278F8F0A006F123B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"FunctionsExample/Preview Content\""; + DEVELOPMENT_TEAM = UBV32XXYKC; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample.FunctionsExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B926022A278F8F08006F123B /* Build configuration list for PBXProject "FunctionsExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B926023B278F8F0A006F123B /* Debug */, + B926023C278F8F0A006F123B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B926023D278F8F0A006F123B /* Build configuration list for PBXNativeTarget "FunctionsExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B926023E278F8F0A006F123B /* Debug */, + B926023F278F8F0A006F123B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + B9260242278F94D1006F123B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk"; + requirement = { + branch = master; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + B9260243278F94D1006F123B /* FirebaseAnalytics */ = { + isa = XCSwiftPackageProductDependency; + package = B9260242278F94D1006F123B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAnalytics; + }; + B9260245278F94D1006F123B /* FirebaseFunctions */ = { + isa = XCSwiftPackageProductDependency; + package = B9260242278F94D1006F123B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseFunctions; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = B9260227278F8F08006F123B /* Project object */; +} diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/AccentColor.colorset/Contents.json b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Amber400.colorset/Contents.json b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Amber400.colorset/Contents.json new file mode 100644 index 000000000..9cf9b41a8 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Amber400.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.157", + "green" : "0.792", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.157", + "green" : "0.792", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..9221b9bb1 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Contents.json b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift new file mode 100644 index 000000000..91cbd72eb --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift @@ -0,0 +1,22 @@ +// +// FunctionsExampleApp.swift +// FunctionsExample +// +// Created by Gran Luo on 1/12/22. +// + +import SwiftUI +import Firebase + +@main +struct FunctionsExampleApp: App { + init() { + FirebaseApp.configure() + } + var body: some Scene { + WindowGroup { + ContentView() + } + } +} + diff --git a/functions/FunctionsExample/FunctionsExample/Preview Content/Preview Assets.xcassets/Contents.json b/functions/FunctionsExample/FunctionsExample/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift new file mode 100644 index 000000000..92e637b80 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -0,0 +1,21 @@ +// +// ContentView.swift +// FunctionsExample +// +// Created by Gran Luo on 1/12/22. +// + +import SwiftUI +import Firebase + +struct ContentView: View { + var body: some View { + HomeView() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift b/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift new file mode 100644 index 000000000..81fdb341c --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift @@ -0,0 +1,26 @@ +// +// HomeView.swift +// FunctionsExample +// +// Created by Gran Luo on 1/12/22. +// + +import SwiftUI + +struct HomeView: View { + + var body: some View { + + VStack{ + AddNumbers() + AddMessage() + Spacer() + } + } +} + +struct HomeView_Previews: PreviewProvider { + static var previews: some View { + HomeView() + } +} diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift new file mode 100644 index 000000000..c4deef767 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -0,0 +1,72 @@ +// +// AddMessage.swift +// FunctionsExample +// +// Created by Gran Luo on 1/12/22. +// + +import SwiftUI +import Firebase + +struct AddMessage: View { + @State private var comment: String = "" + @State private var outcome: String = "" + private var functions = Functions.functions() + var body: some View { + + ZStack{ + BackgroundFrame() + VStack{ + VStack{ + Text("Add your message") + TextField("", text: $comment) + .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.8) + Text(outcome) + } + Button(action: {didTapAddMessage()} ){ + Text("Add Message") + .padding() + .foregroundColor(.white) + .background(Color("Amber400")) + } + + } + } + } + + func didTapAddMessage(){ + + // [START function_add_message] + functions.httpsCallable("addMessage").call(["text": $comment.wrappedValue]) { result, error in + // [START function_error] + if let error = error as NSError? { + if error.domain == FunctionsErrorDomain { + let code = FunctionsErrorCode(rawValue: error.code) + let message = error.localizedDescription + let details = error.userInfo[FunctionsErrorDetailsKey] + } + // [START_EXCLUDE] + print(error) + return + // [END_EXCLUDE] + } + // [END function_error] + if let data = result?.data as? [String: Any], let text = data["text"] as? String { + + print( text) + self.outcome = text + } + } + } +} + +struct AddMessage_Previews: PreviewProvider { + static var previews: some View { + AddMessage() + } +} + +struct CommentCell { + +} diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift new file mode 100644 index 000000000..43a0dfc21 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -0,0 +1,98 @@ +// +// AddNumbers.swift +// FunctionsExample +// +// Created by Gran Luo on 1/12/22. +// + +import SwiftUI +import Firebase + +struct AddNumbers: View { + @State private var num1: String = "" + @State private var num2: String = "" + @State private var outcome: String = "" + private var functions = Functions.functions() + var body: some View { + ZStack{ + BackgroundFrame() + VStack{ + HStack{ + Spacer() + VStack{ + Text("Num1") + #if os(macOS) + TextField("", text: $num1).multilineTextAlignment(.center) + #else + TextField("", text: $num1).multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.decimalPad) + #endif + } + Spacer() + Text("+") + Spacer() + VStack{ + Text("Num2") + TextField("", text: $num2).multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.decimalPad) + } + Spacer() + } + HStack{ + Button(action: { + didTapCalculate() + } ){ + Text("Calculate") + .padding() + .foregroundColor(.white) + .background(Color("Amber400")) + } + Text("\(outcome)") + } + } + } + } + func didTapCalculate(){ + + // [START function_add_message] + functions.httpsCallable("addNumbers").call(["firstNumber": $num1.wrappedValue, "secondNumber": $num2.wrappedValue]) { result, error in + + // [START function_error] + if let error = error as NSError? { + if error.domain == FunctionsErrorDomain { + let code = FunctionsErrorCode(rawValue: error.code) + let message = error.localizedDescription + let details = error.userInfo[FunctionsErrorDetailsKey] + print ("Error Code: \(code!)") + print ("Error Message: \(message)") + print ("Error Details: \(details!)") + } + // [START_EXCLUDE] + print(error) + + return + // [END_EXCLUDE] + } + + // [END function_error] + print ("The result is \(result?.data ?? "null")...") + + if let operationResult = (result?.data as? [String: Any])?["operationResult"] as? Int { + + self.outcome = String(operationResult) + } + + } + + } +} + +struct AddNumbers_Previews: PreviewProvider { + static var previews: some View { + AddNumbers() + } +} diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift new file mode 100644 index 000000000..7a45fe4b4 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -0,0 +1,28 @@ +// +// BackgroundFrame.swift +// FunctionsExample +// +// Created by Gran Luo on 1/12/22. +// + +import SwiftUI + +struct BackgroundFrame: View { + var body: some View { + RoundedRectangle(cornerRadius: 25) + .fill(Color.white) + .frame(width: ScreenDimensions.width * 0.95, height: 200) + .shadow(color: Color(.black), radius: 5, x: 3, y: 1) + } +} + +struct BackgroundFrame_Previews: PreviewProvider { + static var previews: some View { + BackgroundFrame() + } +} + +class ScreenDimensions { + static var width: CGFloat = UIScreen.main.bounds.size.width + static var height: CGFloat = UIScreen.main.bounds.size.height +} diff --git a/functions/GoogleService-Info.plist b/functions/GoogleService-Info.plist deleted file mode 100644 index 76366d433..000000000 --- a/functions/GoogleService-Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - AD_UNIT_ID_FOR_BANNER_TEST - ca-app-pub-3940256099942544/2934735716 - AD_UNIT_ID_FOR_INTERSTITIAL_TEST - ca-app-pub-3940256099942544/4411468910 - API_KEY - AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY - BUNDLE_ID - com.google.firebase.quickstart.FunctionsExample - CLIENT_ID - 123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com - DATABASE_URL - https://mockproject-1234.firebaseio.com - GCM_SENDER_ID - 123456789000 - GOOGLE_APP_ID - 1:123456789000:ios:f1bf012572b04063 - IS_ADS_ENABLED - - IS_ANALYTICS_ENABLED - - IS_APPINVITE_ENABLED - - IS_GCM_ENABLED - - IS_SIGNIN_ENABLED - - PLIST_VERSION - 1 - PROJECT_ID - mockproject-1234 - REVERSED_CLIENT_ID - com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar - STORAGE_BUCKET - mockproject-1234.appspot.com - - diff --git a/functions/FunctionsExample.xcodeproj/project.pbxproj b/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj similarity index 100% rename from functions/FunctionsExample.xcodeproj/project.pbxproj rename to functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj diff --git a/functions/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme b/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme similarity index 100% rename from functions/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme rename to functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme diff --git a/functions/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExampleSwift.xcscheme b/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExampleSwift.xcscheme similarity index 100% rename from functions/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExampleSwift.xcscheme rename to functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExampleSwift.xcscheme diff --git a/functions/FunctionsExample/.clang-format b/functions/LegacyFunctionsQuickstart/FunctionsExample/.clang-format similarity index 100% rename from functions/FunctionsExample/.clang-format rename to functions/LegacyFunctionsQuickstart/FunctionsExample/.clang-format diff --git a/functions/FunctionsExample/AppDelegate.h b/functions/LegacyFunctionsQuickstart/FunctionsExample/AppDelegate.h similarity index 100% rename from functions/FunctionsExample/AppDelegate.h rename to functions/LegacyFunctionsQuickstart/FunctionsExample/AppDelegate.h diff --git a/functions/FunctionsExample/AppDelegate.m b/functions/LegacyFunctionsQuickstart/FunctionsExample/AppDelegate.m similarity index 100% rename from functions/FunctionsExample/AppDelegate.m rename to functions/LegacyFunctionsQuickstart/FunctionsExample/AppDelegate.m diff --git a/functions/FunctionsExample/Base.lproj/Main.storyboard b/functions/LegacyFunctionsQuickstart/FunctionsExample/Base.lproj/Main.storyboard similarity index 100% rename from functions/FunctionsExample/Base.lproj/Main.storyboard rename to functions/LegacyFunctionsQuickstart/FunctionsExample/Base.lproj/Main.storyboard diff --git a/functions/FunctionsExample/CloudAddCell.h b/functions/LegacyFunctionsQuickstart/FunctionsExample/CloudAddCell.h similarity index 100% rename from functions/FunctionsExample/CloudAddCell.h rename to functions/LegacyFunctionsQuickstart/FunctionsExample/CloudAddCell.h diff --git a/functions/FunctionsExample/CloudAddCell.m b/functions/LegacyFunctionsQuickstart/FunctionsExample/CloudAddCell.m similarity index 100% rename from functions/FunctionsExample/CloudAddCell.m rename to functions/LegacyFunctionsQuickstart/FunctionsExample/CloudAddCell.m diff --git a/functions/FunctionsExample/CommentCell.h b/functions/LegacyFunctionsQuickstart/FunctionsExample/CommentCell.h similarity index 100% rename from functions/FunctionsExample/CommentCell.h rename to functions/LegacyFunctionsQuickstart/FunctionsExample/CommentCell.h diff --git a/functions/FunctionsExample/CommentCell.m b/functions/LegacyFunctionsQuickstart/FunctionsExample/CommentCell.m similarity index 100% rename from functions/FunctionsExample/CommentCell.m rename to functions/LegacyFunctionsQuickstart/FunctionsExample/CommentCell.m diff --git a/functions/FunctionsExample/FAuthPickerViewController.h b/functions/LegacyFunctionsQuickstart/FunctionsExample/FAuthPickerViewController.h similarity index 100% rename from functions/FunctionsExample/FAuthPickerViewController.h rename to functions/LegacyFunctionsQuickstart/FunctionsExample/FAuthPickerViewController.h diff --git a/functions/FunctionsExample/FAuthPickerViewController.m b/functions/LegacyFunctionsQuickstart/FunctionsExample/FAuthPickerViewController.m similarity index 100% rename from functions/FunctionsExample/FAuthPickerViewController.m rename to functions/LegacyFunctionsQuickstart/FunctionsExample/FAuthPickerViewController.m diff --git a/functions/FunctionsExample/FAuthPickerViewController.xib b/functions/LegacyFunctionsQuickstart/FunctionsExample/FAuthPickerViewController.xib similarity index 100% rename from functions/FunctionsExample/FAuthPickerViewController.xib rename to functions/LegacyFunctionsQuickstart/FunctionsExample/FAuthPickerViewController.xib diff --git a/functions/FunctionsExample/Info.plist b/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist similarity index 100% rename from functions/FunctionsExample/Info.plist rename to functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist diff --git a/functions/FunctionsExample/MainViewController.h b/functions/LegacyFunctionsQuickstart/FunctionsExample/MainViewController.h similarity index 100% rename from functions/FunctionsExample/MainViewController.h rename to functions/LegacyFunctionsQuickstart/FunctionsExample/MainViewController.h diff --git a/functions/FunctionsExample/MainViewController.m b/functions/LegacyFunctionsQuickstart/FunctionsExample/MainViewController.m similarity index 100% rename from functions/FunctionsExample/MainViewController.m rename to functions/LegacyFunctionsQuickstart/FunctionsExample/MainViewController.m diff --git a/functions/FunctionsExample/SignInViewController.h b/functions/LegacyFunctionsQuickstart/FunctionsExample/SignInViewController.h similarity index 100% rename from functions/FunctionsExample/SignInViewController.h rename to functions/LegacyFunctionsQuickstart/FunctionsExample/SignInViewController.h diff --git a/functions/FunctionsExample/SignInViewController.m b/functions/LegacyFunctionsQuickstart/FunctionsExample/SignInViewController.m similarity index 100% rename from functions/FunctionsExample/SignInViewController.m rename to functions/LegacyFunctionsQuickstart/FunctionsExample/SignInViewController.m diff --git a/functions/FunctionsExample/main.m b/functions/LegacyFunctionsQuickstart/FunctionsExample/main.m similarity index 100% rename from functions/FunctionsExample/main.m rename to functions/LegacyFunctionsQuickstart/FunctionsExample/main.m diff --git a/functions/FunctionsExampleSwift/AppDelegate.swift b/functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/AppDelegate.swift similarity index 100% rename from functions/FunctionsExampleSwift/AppDelegate.swift rename to functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/AppDelegate.swift diff --git a/functions/FunctionsExampleSwift/CloudAddCell.swift b/functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/CloudAddCell.swift similarity index 100% rename from functions/FunctionsExampleSwift/CloudAddCell.swift rename to functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/CloudAddCell.swift diff --git a/functions/FunctionsExampleSwift/CommentCell.swift b/functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/CommentCell.swift similarity index 100% rename from functions/FunctionsExampleSwift/CommentCell.swift rename to functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/CommentCell.swift diff --git a/functions/FunctionsExampleSwift/FAuthPickerViewController.swift b/functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/FAuthPickerViewController.swift similarity index 100% rename from functions/FunctionsExampleSwift/FAuthPickerViewController.swift rename to functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/FAuthPickerViewController.swift diff --git a/functions/FunctionsExampleSwift/MainViewController.swift b/functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/MainViewController.swift similarity index 100% rename from functions/FunctionsExampleSwift/MainViewController.swift rename to functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/MainViewController.swift diff --git a/functions/FunctionsExampleSwift/SignInViewController.swift b/functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/SignInViewController.swift similarity index 100% rename from functions/FunctionsExampleSwift/SignInViewController.swift rename to functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/SignInViewController.swift diff --git a/functions/FunctionsExampleSwiftUITests/FunctionsExampleSwiftUITests.swift b/functions/LegacyFunctionsQuickstart/FunctionsExampleSwiftUITests/FunctionsExampleSwiftUITests.swift similarity index 100% rename from functions/FunctionsExampleSwiftUITests/FunctionsExampleSwiftUITests.swift rename to functions/LegacyFunctionsQuickstart/FunctionsExampleSwiftUITests/FunctionsExampleSwiftUITests.swift diff --git a/functions/FunctionsExampleSwiftUITests/Info.plist b/functions/LegacyFunctionsQuickstart/FunctionsExampleSwiftUITests/Info.plist similarity index 100% rename from functions/FunctionsExampleSwiftUITests/Info.plist rename to functions/LegacyFunctionsQuickstart/FunctionsExampleSwiftUITests/Info.plist diff --git a/functions/FunctionsExampleTests/FunctionsExampleTests.m b/functions/LegacyFunctionsQuickstart/FunctionsExampleTests/FunctionsExampleTests.m similarity index 100% rename from functions/FunctionsExampleTests/FunctionsExampleTests.m rename to functions/LegacyFunctionsQuickstart/FunctionsExampleTests/FunctionsExampleTests.m diff --git a/functions/FunctionsExampleTests/Info.plist b/functions/LegacyFunctionsQuickstart/FunctionsExampleTests/Info.plist similarity index 100% rename from functions/FunctionsExampleTests/Info.plist rename to functions/LegacyFunctionsQuickstart/FunctionsExampleTests/Info.plist diff --git a/functions/FunctionsExampleUITests/FunctionsExampleUITests.m b/functions/LegacyFunctionsQuickstart/FunctionsExampleUITests/FunctionsExampleUITests.m similarity index 100% rename from functions/FunctionsExampleUITests/FunctionsExampleUITests.m rename to functions/LegacyFunctionsQuickstart/FunctionsExampleUITests/FunctionsExampleUITests.m diff --git a/functions/FunctionsExampleUITests/Info.plist b/functions/LegacyFunctionsQuickstart/FunctionsExampleUITests/Info.plist similarity index 100% rename from functions/FunctionsExampleUITests/Info.plist rename to functions/LegacyFunctionsQuickstart/FunctionsExampleUITests/Info.plist diff --git a/functions/Podfile b/functions/LegacyFunctionsQuickstart/Podfile similarity index 100% rename from functions/Podfile rename to functions/LegacyFunctionsQuickstart/Podfile diff --git a/functions/Podfile.lock b/functions/LegacyFunctionsQuickstart/Podfile.lock similarity index 100% rename from functions/Podfile.lock rename to functions/LegacyFunctionsQuickstart/Podfile.lock diff --git a/functions/README.md b/functions/LegacyFunctionsQuickstart/README.md similarity index 100% rename from functions/README.md rename to functions/LegacyFunctionsQuickstart/README.md diff --git a/shared/Amber400.colorset/Contents.json b/shared/Amber400.colorset/Contents.json new file mode 100644 index 000000000..9cf9b41a8 --- /dev/null +++ b/shared/Amber400.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.157", + "green" : "0.792", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.157", + "green" : "0.792", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} From 4c122addb6ab7eda0ad94d875f844459f9f2a91e Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 18 Jan 2022 09:45:05 -0800 Subject: [PATCH 02/28] Add mock GoogleService-Info. --- functions/GoogleService-Info.plist | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 functions/GoogleService-Info.plist diff --git a/functions/GoogleService-Info.plist b/functions/GoogleService-Info.plist new file mode 100644 index 000000000..76366d433 --- /dev/null +++ b/functions/GoogleService-Info.plist @@ -0,0 +1,40 @@ + + + + + AD_UNIT_ID_FOR_BANNER_TEST + ca-app-pub-3940256099942544/2934735716 + AD_UNIT_ID_FOR_INTERSTITIAL_TEST + ca-app-pub-3940256099942544/4411468910 + API_KEY + AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY + BUNDLE_ID + com.google.firebase.quickstart.FunctionsExample + CLIENT_ID + 123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com + DATABASE_URL + https://mockproject-1234.firebaseio.com + GCM_SENDER_ID + 123456789000 + GOOGLE_APP_ID + 1:123456789000:ios:f1bf012572b04063 + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + PLIST_VERSION + 1 + PROJECT_ID + mockproject-1234 + REVERSED_CLIENT_ID + com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar + STORAGE_BUCKET + mockproject-1234.appspot.com + + From d81bd1d1fb5505a8b8e41380fce71fcbd9c76310 Mon Sep 17 00:00:00 2001 From: granluo Date: Wed, 19 Jan 2022 17:37:36 -0800 Subject: [PATCH 03/28] Update format. --- .../project.pbxproj | 8 +- .../FunctionsExampleApp.swift | 3 +- .../FunctionsExample/Screen/ContentView.swift | 12 +-- .../FunctionsExample/Screen/HomeView.swift | 20 ++--- .../FunctionsExample/View/AddMessage.swift | 20 ++--- .../FunctionsExample/View/AddNumbers.swift | 87 +++++++++---------- .../View/BackgroundFrame.swift | 22 ++--- 7 files changed, 82 insertions(+), 90 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj index 0da86718f..c44f29499 100644 --- a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj +++ b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj @@ -17,8 +17,8 @@ B926024B278F963C006F123B /* AddMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024A278F963C006F123B /* AddMessage.swift */; }; B926024D278F96B3006F123B /* AddNumbers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024C278F96B3006F123B /* AddNumbers.swift */; }; B926024F278F9756006F123B /* BackgroundFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024E278F9756006F123B /* BackgroundFrame.swift */; }; - B9260251278F98B3006F123B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B9260250278F98B3006F123B /* GoogleService-Info.plist */; }; B9260253278F9D24006F123B /* shared in Resources */ = {isa = PBXBuildFile; fileRef = B9260252278F9D23006F123B /* shared */; }; + B9F406362798F3B700B84D2B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B9F406352798F3B700B84D2B /* GoogleService-Info.plist */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -31,8 +31,8 @@ B926024A278F963C006F123B /* AddMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMessage.swift; sourceTree = ""; }; B926024C278F96B3006F123B /* AddNumbers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddNumbers.swift; sourceTree = ""; }; B926024E278F9756006F123B /* BackgroundFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundFrame.swift; sourceTree = ""; }; - B9260250278F98B3006F123B /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; B9260252278F9D23006F123B /* shared */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shared; path = ../../../shared; sourceTree = ""; }; + B9F406352798F3B700B84D2B /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../GoogleService-Info.plist"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -51,7 +51,7 @@ B9260226278F8F08006F123B = { isa = PBXGroup; children = ( - B9260250278F98B3006F123B /* GoogleService-Info.plist */, + B9F406352798F3B700B84D2B /* GoogleService-Info.plist */, B9260231278F8F08006F123B /* FunctionsExample */, B9260230278F8F08006F123B /* Products */, ); @@ -171,9 +171,9 @@ buildActionMask = 2147483647; files = ( B926023A278F8F0A006F123B /* Preview Assets.xcassets in Resources */, + B9F406362798F3B700B84D2B /* GoogleService-Info.plist in Resources */, B9260253278F9D24006F123B /* shared in Resources */, B9260237278F8F0A006F123B /* Assets.xcassets in Resources */, - B9260251278F98B3006F123B /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift index 91cbd72eb..c5f08afb8 100644 --- a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift +++ b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift @@ -12,11 +12,12 @@ import Firebase struct FunctionsExampleApp: App { init() { FirebaseApp.configure() + Functions.functions().useEmulator(withHost: "localhost", port: 5001) } + var body: some Scene { WindowGroup { ContentView() } } } - diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index 92e637b80..a4d2d3f83 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -9,13 +9,13 @@ import SwiftUI import Firebase struct ContentView: View { - var body: some View { - HomeView() - } + var body: some View { + HomeView() + } } struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } + static var previews: some View { + ContentView() + } } diff --git a/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift b/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift index 81fdb341c..653e37a74 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift @@ -8,19 +8,17 @@ import SwiftUI struct HomeView: View { - - var body: some View { - - VStack{ - AddNumbers() - AddMessage() - Spacer() - } + var body: some View { + VStack { + AddNumbers() + AddMessage() + Spacer() } + } } struct HomeView_Previews: PreviewProvider { - static var previews: some View { - HomeView() - } + static var previews: some View { + HomeView() + } } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift index c4deef767..0a42a22aa 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -13,30 +13,27 @@ struct AddMessage: View { @State private var outcome: String = "" private var functions = Functions.functions() var body: some View { - - ZStack{ + ZStack { BackgroundFrame() - VStack{ - VStack{ + VStack { + VStack { Text("Add your message") TextField("", text: $comment) .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) .frame(width: ScreenDimensions.width * 0.8) Text(outcome) } - Button(action: {didTapAddMessage()} ){ + Button(action: { didTapAddMessage() }) { Text("Add Message") .padding() .foregroundColor(.white) .background(Color("Amber400")) } - } } } - func didTapAddMessage(){ - + func didTapAddMessage() { // [START function_add_message] functions.httpsCallable("addMessage").call(["text": $comment.wrappedValue]) { result, error in // [START function_error] @@ -53,8 +50,7 @@ struct AddMessage: View { } // [END function_error] if let data = result?.data as? [String: Any], let text = data["text"] as? String { - - print( text) + print(text) self.outcome = text } } @@ -67,6 +63,4 @@ struct AddMessage_Previews: PreviewProvider { } } -struct CommentCell { - -} +struct CommentCell {} diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index 43a0dfc21..3cf71ac40 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -14,26 +14,26 @@ struct AddNumbers: View { @State private var outcome: String = "" private var functions = Functions.functions() var body: some View { - ZStack{ + ZStack { BackgroundFrame() - VStack{ - HStack{ + VStack { + HStack { Spacer() - VStack{ + VStack { Text("Num1") #if os(macOS) - TextField("", text: $num1).multilineTextAlignment(.center) + TextField("", text: $num1).multilineTextAlignment(.center) #else - TextField("", text: $num1).multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) - .keyboardType(.decimalPad) + TextField("", text: $num1).multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.decimalPad) #endif } Spacer() Text("+") Spacer() - VStack{ + VStack { Text("Num2") TextField("", text: $num2).multilineTextAlignment(.center) .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) @@ -42,52 +42,51 @@ struct AddNumbers: View { } Spacer() } - HStack{ - Button(action: { - didTapCalculate() - } ){ - Text("Calculate") - .padding() - .foregroundColor(.white) - .background(Color("Amber400")) - } + HStack { + Button(action: { + didTapCalculate() + }) { + Text("Calculate") + .padding() + .foregroundColor(.white) + .background(Color("Amber400")) + } Text("\(outcome)") } } } } - func didTapCalculate(){ + func didTapCalculate() { // [START function_add_message] - functions.httpsCallable("addNumbers").call(["firstNumber": $num1.wrappedValue, "secondNumber": $num2.wrappedValue]) { result, error in - - // [START function_error] - if let error = error as NSError? { - if error.domain == FunctionsErrorDomain { - let code = FunctionsErrorCode(rawValue: error.code) - let message = error.localizedDescription - let details = error.userInfo[FunctionsErrorDetailsKey] - print ("Error Code: \(code!)") - print ("Error Message: \(message)") - print ("Error Details: \(details!)") - } - // [START_EXCLUDE] - print(error) + functions.httpsCallable("addNumbers") + .call(["firstNumber": $num1.wrappedValue, + "secondNumber": $num2.wrappedValue]) { result, error in - return - // [END_EXCLUDE] - } + // [START function_error] + if let error = error as NSError? { + if error.domain == FunctionsErrorDomain { + let code = FunctionsErrorCode(rawValue: error.code) + let message = error.localizedDescription + let details = error.userInfo[FunctionsErrorDetailsKey] + print("Error Code: \(code!)") + print("Error Message: \(message)") + print("Error Details: \(details!)") + } + // [START_EXCLUDE] + print(error) - // [END function_error] - print ("The result is \(result?.data ?? "null")...") + return + // [END_EXCLUDE] + } - if let operationResult = (result?.data as? [String: Any])?["operationResult"] as? Int { + // [END function_error] + print("The result is \(result?.data ?? "null")...") - self.outcome = String(operationResult) + if let operationResult = (result?.data as? [String: Any])?["operationResult"] as? Int { + self.outcome = String(operationResult) + } } - - } - } } diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index 7a45fe4b4..786766a2c 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -8,21 +8,21 @@ import SwiftUI struct BackgroundFrame: View { - var body: some View { - RoundedRectangle(cornerRadius: 25) - .fill(Color.white) - .frame(width: ScreenDimensions.width * 0.95, height: 200) - .shadow(color: Color(.black), radius: 5, x: 3, y: 1) - } + var body: some View { + RoundedRectangle(cornerRadius: 25) + .fill(Color.white) + .frame(width: ScreenDimensions.width * 0.95, height: 200) + .shadow(color: Color(.black), radius: 5, x: 3, y: 1) + } } struct BackgroundFrame_Previews: PreviewProvider { - static var previews: some View { - BackgroundFrame() - } + static var previews: some View { + BackgroundFrame() + } } class ScreenDimensions { - static var width: CGFloat = UIScreen.main.bounds.size.width - static var height: CGFloat = UIScreen.main.bounds.size.height + static var width: CGFloat = UIScreen.main.bounds.size.width + static var height: CGFloat = UIScreen.main.bounds.size.height } From e9c34ed98f992eae2911cd7278ca915a00649b7d Mon Sep 17 00:00:00 2001 From: granluo Date: Wed, 19 Jan 2022 17:49:02 -0800 Subject: [PATCH 04/28] Update legacy workflow. --- .github/workflows/functions.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index 1b262af43..d09439e8a 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -28,7 +28,7 @@ jobs: runs-on: macOS-latest env: SPM: false - LEGACY: false + LEGACY: true OS: iOS DEVICE: iPhone 11 TEST: true @@ -37,11 +37,12 @@ jobs: uses: actions/checkout@master - name: Setup run: | - cd functions + cd functions/LegacyFunctionsQuickstart gem install bundler bundle install gem install xcpretty bundle exec pod install --repo-update + cd .. ../scripts/install_prereqs/functions.sh - name: Build ObjC run: ./scripts/test.sh From b80e9afda767d1701578edf76fd19e8c1c471299 Mon Sep 17 00:00:00 2001 From: granluo Date: Wed, 19 Jan 2022 18:10:38 -0800 Subject: [PATCH 05/28] Update script for testing. --- scripts/install_prereqs/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_prereqs/functions.sh b/scripts/install_prereqs/functions.sh index 4336a2098..ced5e903b 100755 --- a/scripts/install_prereqs/functions.sh +++ b/scripts/install_prereqs/functions.sh @@ -16,4 +16,4 @@ DIRECTORY=functions \ PROJECT=Functions \ . ../scripts/prereq_core.sh -sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' FunctionsExample/Info.plist +sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' LegacyFunctionsQuickstart/FunctionsExample/Info.plist From 7727104cdae7d81af6618c9f1cfeeb0070ec9d62 Mon Sep 17 00:00:00 2001 From: granluo Date: Wed, 19 Jan 2022 18:33:19 -0800 Subject: [PATCH 06/28] Add mock GoogleService-Info. --- .../GoogleService-Info.plist | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 functions/LegacyFunctionsQuickstart/GoogleService-Info.plist diff --git a/functions/LegacyFunctionsQuickstart/GoogleService-Info.plist b/functions/LegacyFunctionsQuickstart/GoogleService-Info.plist new file mode 100644 index 000000000..76366d433 --- /dev/null +++ b/functions/LegacyFunctionsQuickstart/GoogleService-Info.plist @@ -0,0 +1,40 @@ + + + + + AD_UNIT_ID_FOR_BANNER_TEST + ca-app-pub-3940256099942544/2934735716 + AD_UNIT_ID_FOR_INTERSTITIAL_TEST + ca-app-pub-3940256099942544/4411468910 + API_KEY + AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY + BUNDLE_ID + com.google.firebase.quickstart.FunctionsExample + CLIENT_ID + 123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com + DATABASE_URL + https://mockproject-1234.firebaseio.com + GCM_SENDER_ID + 123456789000 + GOOGLE_APP_ID + 1:123456789000:ios:f1bf012572b04063 + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + PLIST_VERSION + 1 + PROJECT_ID + mockproject-1234 + REVERSED_CLIENT_ID + com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar + STORAGE_BUCKET + mockproject-1234.appspot.com + + From b48a4b55161b14b97292a3abd82700a0d7f9b624 Mon Sep 17 00:00:00 2001 From: granluo Date: Wed, 19 Jan 2022 18:48:05 -0800 Subject: [PATCH 07/28] Update path of config. --- .../FunctionsExample.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj b/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj index 43d73ba5b..fdf578ce0 100644 --- a/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj +++ b/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj @@ -253,7 +253,7 @@ 5F9961071AE0CF4F0034F503 /* LaunchScreen.xib */, ); name = Shared; - path = ../shared; + path = ../../shared; sourceTree = ""; }; DE43B5CB23AEC6980056B15F /* TestUtils */ = { @@ -266,7 +266,7 @@ DED65CF723E9DE6400461312 /* FIREGSignInInfo.h */, ); name = TestUtils; - path = ../TestUtils; + path = ../../TestUtils; sourceTree = ""; }; /* End PBXGroup section */ From 28fb38bb34a22e46933be33bf3d0bc793f0ff9da Mon Sep 17 00:00:00 2001 From: granluo Date: Wed, 19 Jan 2022 23:14:00 -0800 Subject: [PATCH 08/28] Update GoogleService-Info --- .../project.pbxproj | 2 +- .../GoogleService-Info.plist | 40 ------------------- 2 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 functions/LegacyFunctionsQuickstart/GoogleService-Info.plist diff --git a/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj b/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj index fdf578ce0..02486cc19 100644 --- a/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj +++ b/functions/LegacyFunctionsQuickstart/FunctionsExample.xcodeproj/project.pbxproj @@ -84,7 +84,7 @@ 10B1CCBE205C51F90067EDB4 /* SignInViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignInViewController.swift; sourceTree = ""; }; 10B1CCC0205C60890067EDB4 /* CloudAddCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudAddCell.swift; sourceTree = ""; }; 10B1CCC2205C63370067EDB4 /* CommentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommentCell.swift; sourceTree = ""; }; - 43ED466C2F109A2272796CB6 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 43ED466C2F109A2272796CB6 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../GoogleService-Info.plist"; sourceTree = ""; }; 5F5A534C1ADE670C00F81DF0 /* FunctionsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FunctionsExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5F5A53501ADE670C00F81DF0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5F5A53511ADE670C00F81DF0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; diff --git a/functions/LegacyFunctionsQuickstart/GoogleService-Info.plist b/functions/LegacyFunctionsQuickstart/GoogleService-Info.plist deleted file mode 100644 index 76366d433..000000000 --- a/functions/LegacyFunctionsQuickstart/GoogleService-Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - AD_UNIT_ID_FOR_BANNER_TEST - ca-app-pub-3940256099942544/2934735716 - AD_UNIT_ID_FOR_INTERSTITIAL_TEST - ca-app-pub-3940256099942544/4411468910 - API_KEY - AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY - BUNDLE_ID - com.google.firebase.quickstart.FunctionsExample - CLIENT_ID - 123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com - DATABASE_URL - https://mockproject-1234.firebaseio.com - GCM_SENDER_ID - 123456789000 - GOOGLE_APP_ID - 1:123456789000:ios:f1bf012572b04063 - IS_ADS_ENABLED - - IS_ANALYTICS_ENABLED - - IS_APPINVITE_ENABLED - - IS_GCM_ENABLED - - IS_SIGNIN_ENABLED - - PLIST_VERSION - 1 - PROJECT_ID - mockproject-1234 - REVERSED_CLIENT_ID - com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar - STORAGE_BUCKET - mockproject-1234.appspot.com - - From 887b4aa81ff429c321578f7cab704b6fa2741c35 Mon Sep 17 00:00:00 2001 From: granluo Date: Thu, 20 Jan 2022 17:01:34 -0800 Subject: [PATCH 09/28] Add a logo and update conditional emulator setup. --- .../project.pbxproj | 12 ++---- .../logo.imageset/Contents.json | 21 ++++++++++ .../Assets.xcassets/logo.imageset/logo.png | Bin 0 -> 29051 bytes .../FunctionsExampleApp.swift | 2 + .../FunctionsExample/Info.plist | 11 ++++++ .../FunctionsExample/Screen/ContentView.swift | 19 ++++++++- .../FunctionsExample/Screen/HomeView.swift | 24 ------------ .../FunctionsExample/View/AddMessage.swift | 1 + .../FunctionsExample/View/AddNumbers.swift | 36 +++++++----------- 9 files changed, 69 insertions(+), 57 deletions(-) create mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/Contents.json create mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/logo.png create mode 100644 functions/FunctionsExample/FunctionsExample/Info.plist delete mode 100644 functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift diff --git a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj index c44f29499..118f6b298 100644 --- a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj +++ b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj @@ -13,11 +13,9 @@ B926023A278F8F0A006F123B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9260239278F8F0A006F123B /* Preview Assets.xcassets */; }; B9260244278F94D1006F123B /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = B9260243278F94D1006F123B /* FirebaseAnalytics */; }; B9260246278F94D1006F123B /* FirebaseFunctions in Frameworks */ = {isa = PBXBuildFile; productRef = B9260245278F94D1006F123B /* FirebaseFunctions */; }; - B9260248278F95B6006F123B /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9260247278F95B6006F123B /* HomeView.swift */; }; B926024B278F963C006F123B /* AddMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024A278F963C006F123B /* AddMessage.swift */; }; B926024D278F96B3006F123B /* AddNumbers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024C278F96B3006F123B /* AddNumbers.swift */; }; B926024F278F9756006F123B /* BackgroundFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024E278F9756006F123B /* BackgroundFrame.swift */; }; - B9260253278F9D24006F123B /* shared in Resources */ = {isa = PBXBuildFile; fileRef = B9260252278F9D23006F123B /* shared */; }; B9F406362798F3B700B84D2B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B9F406352798F3B700B84D2B /* GoogleService-Info.plist */; }; /* End PBXBuildFile section */ @@ -27,11 +25,9 @@ B9260234278F8F08006F123B /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; B9260236278F8F0A006F123B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; B9260239278F8F0A006F123B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - B9260247278F95B6006F123B /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; B926024A278F963C006F123B /* AddMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMessage.swift; sourceTree = ""; }; B926024C278F96B3006F123B /* AddNumbers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddNumbers.swift; sourceTree = ""; }; B926024E278F9756006F123B /* BackgroundFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundFrame.swift; sourceTree = ""; }; - B9260252278F9D23006F123B /* shared */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shared; path = ../../../shared; sourceTree = ""; }; B9F406352798F3B700B84D2B /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../GoogleService-Info.plist"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -72,7 +68,6 @@ B9260241278F9002006F123B /* Screen */, B9260240278F8FC8006F123B /* View */, B9260236278F8F0A006F123B /* Assets.xcassets */, - B9260252278F9D23006F123B /* shared */, B9260238278F8F0A006F123B /* Preview Content */, ); path = FunctionsExample; @@ -100,7 +95,6 @@ isa = PBXGroup; children = ( B9260234278F8F08006F123B /* ContentView.swift */, - B9260247278F95B6006F123B /* HomeView.swift */, ); path = Screen; sourceTree = ""; @@ -172,7 +166,6 @@ files = ( B926023A278F8F0A006F123B /* Preview Assets.xcassets in Resources */, B9F406362798F3B700B84D2B /* GoogleService-Info.plist in Resources */, - B9260253278F9D24006F123B /* shared in Resources */, B9260237278F8F0A006F123B /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -184,7 +177,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B9260248278F95B6006F123B /* HomeView.swift in Sources */, B926024D278F96B3006F123B /* AddNumbers.swift in Sources */, B926024B278F963C006F123B /* AddMessage.swift in Sources */, B926024F278F9756006F123B /* BackgroundFrame.swift in Sources */, @@ -317,6 +309,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"FunctionsExample/Preview Content\""; @@ -333,6 +326,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; + OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample.FunctionsExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -346,6 +340,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"FunctionsExample/Preview Content\""; @@ -362,6 +357,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; + OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample.FunctionsExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/Contents.json b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/Contents.json new file mode 100644 index 000000000..5f670ca87 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "logo.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/logo.png b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..bfd4d943f05909618b32b95d9f755188448f8cb7 GIT binary patch literal 29051 zcmZs?2{e@9+dp2(k}bQkW=%s>8oTVvV8ocAtffVbeG6fPDA}_U#x~82P)YWg>{6C6 zWF1SkiIH_MmfxuF`+d**KYxdFoOz!6xv%?kUDxOO+}Hg~jD@)o8?ylOi4!N-K*suz z6DR1fCr+GXVq&0uVy%3p|HKJzU68&GH1Oo|1ihD#(RRmLddvNXv>((JMNvgXkHhb* z9d3LAt!hy}{5a5R4K|5^0Hsm>k}<4v3Q#4}v!d&k8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@Dd+SrEw&cxs45{W>vkGb~=}M%d;8r zOisvg{>^T3lO*k8KNb=%PujL@2WXgX?8`A)q}`sv#bD_uCV6VxPmH4~CH?AQOY;|JEEw+^&7uH?L!ABB6zUBHEkIZw?5<&wGv4)B8O&mLWX6o` zmZLY)fzeq90{Z4$*1z9;T>sK=IiHAM9eYy7?9ZDf9L3ZR-Ub0H_q8{OdSIiWcfN9i z)ZkaU;&F#F%vwr<+mzYh66L*bQ;-NqLGs0Lf_+e-CFH3XW~kc&SO!4Vu3Y|YqHKv} zH2MahZ%$7wb?L)rKWSi8l;^ZJlZK@UQGIr$$%+@za%_mvoSXu{3*f(Z`!Do&Haib6 z-1~Bmuv>nQofOIk1iF~7r~ri`yuE1>pM70$A-iiJ%RPuJz3w@ExTQNHBV78>fwII(YxRc(KQ|{Rn3<=HAbJ=0du(#_d>kg&$%{8ht s6g@JIQhUtYT1)%&&Z0Q&CHro`v7k@CRn5~FUeNy5R@c8*tY#hZUv$%RQUCw| literal 0 HcmV?d00001 diff --git a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift index c5f08afb8..c0ac870fe 100644 --- a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift +++ b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift @@ -12,7 +12,9 @@ import Firebase struct FunctionsExampleApp: App { init() { FirebaseApp.configure() + #if EMULATOR Functions.functions().useEmulator(withHost: "localhost", port: 5001) + #endif } var body: some Scene { diff --git a/functions/FunctionsExample/FunctionsExample/Info.plist b/functions/FunctionsExample/FunctionsExample/Info.plist new file mode 100644 index 000000000..0427f524a --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample/Info.plist @@ -0,0 +1,11 @@ + + + + + UILaunchScreen + + UIImageName + LaunchScreen + + + diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index a4d2d3f83..db6160a51 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -10,12 +10,27 @@ import Firebase struct ContentView: View { var body: some View { - HomeView() + VStack(alignment: .leading){ + Image("logo") + .resizable() + .scaledToFit() + .frame(width: ScreenDimensions.width * 0.5) + .offset(x: 20, y: 0) + VStack { + AddNumbers() + AddMessage() + Spacer() + } + } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { - ContentView() + ForEach(["iPhone SE (2nd generation)", "iPhone 13 Pro Max", "iPad Pro (12.9-inch) (5th generation)"], id: \.self) { deviceName in + ContentView() + .previewDevice(PreviewDevice(rawValue: deviceName)) + .previewDisplayName(deviceName) + } } } diff --git a/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift b/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift deleted file mode 100644 index 653e37a74..000000000 --- a/functions/FunctionsExample/FunctionsExample/Screen/HomeView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// HomeView.swift -// FunctionsExample -// -// Created by Gran Luo on 1/12/22. -// - -import SwiftUI - -struct HomeView: View { - var body: some View { - VStack { - AddNumbers() - AddMessage() - Spacer() - } - } -} - -struct HomeView_Previews: PreviewProvider { - static var previews: some View { - HomeView() - } -} diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift index 0a42a22aa..ff7f4e7c1 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -30,6 +30,7 @@ struct AddMessage: View { .background(Color("Amber400")) } } + .padding() } } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index 3cf71ac40..634b80769 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -17,32 +17,22 @@ struct AddNumbers: View { ZStack { BackgroundFrame() VStack { + Text("Add two numbers") HStack { Spacer() - VStack { - Text("Num1") - #if os(macOS) - TextField("", text: $num1).multilineTextAlignment(.center) - #else - TextField("", text: $num1).multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) - .keyboardType(.decimalPad) - #endif - } - Spacer() + TextField("", text: $num1).multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.decimalPad) Text("+") - Spacer() - VStack { - Text("Num2") - TextField("", text: $num2).multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) - .keyboardType(.decimalPad) - } - Spacer() + TextField("", text: $num2).multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.decimalPad) + Spacer() } - HStack { + VStack { + Text("\(outcome)") Button(action: { didTapCalculate() }) { @@ -51,10 +41,10 @@ struct AddNumbers: View { .foregroundColor(.white) .background(Color("Amber400")) } - Text("\(outcome)") } } } + .padding() } func didTapCalculate() { From e9b26f6cc430df23338cec8aa6ced05533ed3ca1 Mon Sep 17 00:00:00 2001 From: granluo Date: Thu, 20 Jan 2022 17:11:29 -0800 Subject: [PATCH 10/28] Update format. --- .../FunctionsExampleApp.swift | 2 +- .../FunctionsExample/Screen/ContentView.swift | 23 +++++++++++-------- .../FunctionsExample/View/AddNumbers.swift | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift index c0ac870fe..67e96b6d5 100644 --- a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift +++ b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift @@ -13,7 +13,7 @@ struct FunctionsExampleApp: App { init() { FirebaseApp.configure() #if EMULATOR - Functions.functions().useEmulator(withHost: "localhost", port: 5001) + Functions.functions().useEmulator(withHost: "localhost", port: 5001) #endif } diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index db6160a51..306c8ea87 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -10,27 +10,30 @@ import Firebase struct ContentView: View { var body: some View { - VStack(alignment: .leading){ + VStack(alignment: .leading) { Image("logo") .resizable() .scaledToFit() .frame(width: ScreenDimensions.width * 0.5) .offset(x: 20, y: 0) - VStack { - AddNumbers() - AddMessage() - Spacer() - } + VStack { + AddNumbers() + AddMessage() + Spacer() + } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { - ForEach(["iPhone SE (2nd generation)", "iPhone 13 Pro Max", "iPad Pro (12.9-inch) (5th generation)"], id: \.self) { deviceName in - ContentView() - .previewDevice(PreviewDevice(rawValue: deviceName)) - .previewDisplayName(deviceName) + ForEach( + ["iPhone SE (2nd generation)", "iPhone 13 Pro Max", "iPad Pro (12.9-inch) (5th generation)"], + id: \.self + ) { deviceName in + ContentView() + .previewDevice(PreviewDevice(rawValue: deviceName)) + .previewDisplayName(deviceName) } } } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index 634b80769..49672984c 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -29,7 +29,7 @@ struct AddNumbers: View { .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) .frame(width: ScreenDimensions.width * 0.2) .keyboardType(.decimalPad) - Spacer() + Spacer() } VStack { Text("\(outcome)") From cbf29dfa9996eb7de7e1cc7ff0df83ac3ba251b6 Mon Sep 17 00:00:00 2001 From: granluo Date: Mon, 24 Jan 2022 07:36:08 -0800 Subject: [PATCH 11/28] Update copyright. --- .../FunctionsExample/FunctionsExampleApp.swift | 16 +++++++++++++--- .../FunctionsExample/Screen/ContentView.swift | 16 +++++++++++++--- .../FunctionsExample/View/AddMessage.swift | 16 +++++++++++++--- .../FunctionsExample/View/AddNumbers.swift | 16 +++++++++++++--- .../FunctionsExample/View/BackgroundFrame.swift | 16 +++++++++++++--- 5 files changed, 65 insertions(+), 15 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift index 67e96b6d5..478b0a54b 100644 --- a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift +++ b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift @@ -1,9 +1,19 @@ // -// FunctionsExampleApp.swift -// FunctionsExample +// Copyright 2021 Google LLC // -// Created by Gran Luo on 1/12/22. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import SwiftUI import Firebase diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index 306c8ea87..562a25de5 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -1,9 +1,19 @@ // -// ContentView.swift -// FunctionsExample +// Copyright 2021 Google LLC // -// Created by Gran Luo on 1/12/22. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import SwiftUI import Firebase diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift index ff7f4e7c1..31808a3bf 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -1,9 +1,19 @@ // -// AddMessage.swift -// FunctionsExample +// Copyright 2021 Google LLC // -// Created by Gran Luo on 1/12/22. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import SwiftUI import Firebase diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index 49672984c..e99d77104 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -1,9 +1,19 @@ // -// AddNumbers.swift -// FunctionsExample +// Copyright 2021 Google LLC // -// Created by Gran Luo on 1/12/22. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import SwiftUI import Firebase diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index 786766a2c..3444d821c 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -1,9 +1,19 @@ // -// BackgroundFrame.swift -// FunctionsExample +// Copyright 2021 Google LLC // -// Created by Gran Luo on 1/12/22. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + import SwiftUI From 3c410935db179f905ab51eec0139c2a26387c5d0 Mon Sep 17 00:00:00 2001 From: granluo Date: Mon, 24 Jan 2022 07:38:19 -0800 Subject: [PATCH 12/28] update year to 2022. --- .../FunctionsExample/FunctionsExample/FunctionsExampleApp.swift | 2 +- .../FunctionsExample/FunctionsExample/Screen/ContentView.swift | 2 +- .../FunctionsExample/FunctionsExample/View/AddMessage.swift | 2 +- .../FunctionsExample/FunctionsExample/View/AddNumbers.swift | 2 +- .../FunctionsExample/View/BackgroundFrame.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift index 478b0a54b..450c1e75e 100644 --- a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift +++ b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift @@ -1,5 +1,5 @@ // -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index 562a25de5..8ec872ddf 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -1,5 +1,5 @@ // -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift index 31808a3bf..cbf72bd41 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -1,5 +1,5 @@ // -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index e99d77104..ebfc91e07 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -1,5 +1,5 @@ // -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index 3444d821c..daeb073a3 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -1,5 +1,5 @@ // -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 1edbbc11442f8e4ff8980c6ee02b1051a10fa2ac Mon Sep 17 00:00:00 2001 From: granluo Date: Mon, 24 Jan 2022 09:59:37 -0800 Subject: [PATCH 13/28] Update corner radius to 16 and numberpad. --- .../FunctionsExample/View/AddMessage.swift | 3 ++- .../FunctionsExample/View/AddNumbers.swift | 7 ++++--- .../FunctionsExample/View/BackgroundFrame.swift | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift index cbf72bd41..9b760abd1 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -29,7 +29,7 @@ struct AddMessage: View { VStack { Text("Add your message") TextField("", text: $comment) - .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) .frame(width: ScreenDimensions.width * 0.8) Text(outcome) } @@ -39,6 +39,7 @@ struct AddMessage: View { .foregroundColor(.white) .background(Color("Amber400")) } + .cornerRadius(16) } .padding() } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index ebfc91e07..c11235fdc 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -31,14 +31,14 @@ struct AddNumbers: View { HStack { Spacer() TextField("", text: $num1).multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) .frame(width: ScreenDimensions.width * 0.2) .keyboardType(.decimalPad) Text("+") TextField("", text: $num2).multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 10).fill(Color(.systemGray5))) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) .frame(width: ScreenDimensions.width * 0.2) - .keyboardType(.decimalPad) + .keyboardType(.numberPad) Spacer() } VStack { @@ -51,6 +51,7 @@ struct AddNumbers: View { .foregroundColor(.white) .background(Color("Amber400")) } + .cornerRadius(16) } } } diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index daeb073a3..fb7d32f34 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -19,7 +19,7 @@ import SwiftUI struct BackgroundFrame: View { var body: some View { - RoundedRectangle(cornerRadius: 25) + RoundedRectangle(cornerRadius: 16) .fill(Color.white) .frame(width: ScreenDimensions.width * 0.95, height: 200) .shadow(color: Color(.black), radius: 5, x: 3, y: 1) From f9a16f71afbb2e317f0401f71b17463f8cb0f2c7 Mon Sep 17 00:00:00 2001 From: granluo Date: Mon, 24 Jan 2022 23:14:11 -0800 Subject: [PATCH 14/28] Update format and add viewbuilder to feature block. --- .../FunctionsExampleApp.swift | 1 - .../FunctionsExample/Screen/ContentView.swift | 1 - .../FunctionsExample/View/AddMessage.swift | 34 +++++++------ .../FunctionsExample/View/AddNumbers.swift | 51 +++++++++---------- .../View/BackgroundFrame.swift | 35 ++++++++++--- 5 files changed, 71 insertions(+), 51 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift index 450c1e75e..24c16f9ca 100644 --- a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift +++ b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift @@ -14,7 +14,6 @@ // limitations under the License. // - import SwiftUI import Firebase diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index 8ec872ddf..151e2e6c9 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -14,7 +14,6 @@ // limitations under the License. // - import SwiftUI import Firebase diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift index 9b760abd1..caf05cc4d 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -14,7 +14,6 @@ // limitations under the License. // - import SwiftUI import Firebase @@ -24,24 +23,27 @@ struct AddMessage: View { private var functions = Functions.functions() var body: some View { ZStack { - BackgroundFrame() - VStack { + BackgroundFrame( + title: "AddMessage", + description: "Capitalize the input message and return it." + ) { VStack { - Text("Add your message") - TextField("", text: $comment) - .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.8) - Text(outcome) - } - Button(action: { didTapAddMessage() }) { - Text("Add Message") - .padding() - .foregroundColor(.white) - .background(Color("Amber400")) + VStack { + TextField("", text: $comment) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.8) + Text(outcome) + } + Button(action: { didTapAddMessage() }) { + Text("Add Message") + .padding() + .foregroundColor(.white) + .background(Color("Amber400")) + } + .cornerRadius(16) } - .cornerRadius(16) + .padding() } - .padding() } } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index c11235fdc..275581f3f 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -14,7 +14,6 @@ // limitations under the License. // - import SwiftUI import Firebase @@ -25,33 +24,33 @@ struct AddNumbers: View { private var functions = Functions.functions() var body: some View { ZStack { - BackgroundFrame() - VStack { - Text("Add two numbers") - HStack { - Spacer() - TextField("", text: $num1).multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) - .keyboardType(.decimalPad) - Text("+") - TextField("", text: $num2).multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) - .keyboardType(.numberPad) - Spacer() - } + BackgroundFrame(title: "AddNumbers", description: "Add two integers and output the sum.") { VStack { - Text("\(outcome)") - Button(action: { - didTapCalculate() - }) { - Text("Calculate") - .padding() - .foregroundColor(.white) - .background(Color("Amber400")) + HStack { + Spacer() + TextField("", text: $num1).multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.numberPad) + Text("+") + TextField("", text: $num2).multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.numberPad) + Spacer() + } + VStack { + Text("\(outcome)") + Button(action: { + didTapCalculate() + }) { + Text("Calculate") + .padding() + .foregroundColor(.white) + .background(Color("Amber400")) + } + .cornerRadius(16) } - .cornerRadius(16) } } } diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index fb7d32f34..47ddc7848 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -14,21 +14,42 @@ // limitations under the License. // - import SwiftUI -struct BackgroundFrame: View { +struct BackgroundFrame: View { + var title: String + var description: String + let content: Content + init(title: String, description: String, @ViewBuilder content: () -> Content) { + self.title = title + self.description = description + self.content = content() + } + var body: some View { - RoundedRectangle(cornerRadius: 16) - .fill(Color.white) - .frame(width: ScreenDimensions.width * 0.95, height: 200) - .shadow(color: Color(.black), radius: 5, x: 3, y: 1) + VStack(alignment: .leading) { + Text(title) + .fontWeight(.bold) + .font(.title3) + Text(description) + .font(.subheadline) + ZStack { + RoundedRectangle(cornerRadius: 16) + .fill(Color(.secondarySystemBackground)) + .frame(height: 150) + content + } + } + .padding() + .frame(width: ScreenDimensions.width * 0.95) } } struct BackgroundFrame_Previews: PreviewProvider { static var previews: some View { - BackgroundFrame() + BackgroundFrame(title: "Function", description: "Function description") { + Text("Testing View") + } } } From 0e3f5a2993420d693babec98300fa263825bbd50 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 25 Jan 2022 00:32:35 -0800 Subject: [PATCH 15/28] Remove tag comments --- .../FunctionsExample/FunctionsExample/View/AddMessage.swift | 5 ----- .../FunctionsExample/FunctionsExample/View/AddNumbers.swift | 5 ----- 2 files changed, 10 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift index caf05cc4d..dcff0c202 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -48,21 +48,16 @@ struct AddMessage: View { } func didTapAddMessage() { - // [START function_add_message] functions.httpsCallable("addMessage").call(["text": $comment.wrappedValue]) { result, error in - // [START function_error] if let error = error as NSError? { if error.domain == FunctionsErrorDomain { let code = FunctionsErrorCode(rawValue: error.code) let message = error.localizedDescription let details = error.userInfo[FunctionsErrorDetailsKey] } - // [START_EXCLUDE] print(error) return - // [END_EXCLUDE] } - // [END function_error] if let data = result?.data as? [String: Any], let text = data["text"] as? String { print(text) self.outcome = text diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index 275581f3f..f1b202753 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -58,12 +58,10 @@ struct AddNumbers: View { } func didTapCalculate() { - // [START function_add_message] functions.httpsCallable("addNumbers") .call(["firstNumber": $num1.wrappedValue, "secondNumber": $num2.wrappedValue]) { result, error in - // [START function_error] if let error = error as NSError? { if error.domain == FunctionsErrorDomain { let code = FunctionsErrorCode(rawValue: error.code) @@ -73,14 +71,11 @@ struct AddNumbers: View { print("Error Message: \(message)") print("Error Details: \(details!)") } - // [START_EXCLUDE] print(error) return - // [END_EXCLUDE] } - // [END function_error] print("The result is \(result?.data ?? "null")...") if let operationResult = (result?.data as? [String: Any])?["operationResult"] as? Int { From ea0dff6fa9634475afe0727395e7d8022751b148 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 25 Jan 2022 15:44:00 -0800 Subject: [PATCH 16/28] Update UI --- .../Amber400.colorset/Contents.json | 38 ------------------ .../logo.imageset/Contents.json | 21 ---------- .../Assets.xcassets/logo.imageset/logo.png | Bin 29051 -> 0 bytes .../FunctionsExample/Screen/ContentView.swift | 20 ++++----- .../FunctionsExample/View/AddMessage.swift | 16 +++----- .../FunctionsExample/View/AddNumbers.swift | 28 ++++++------- .../View/BackgroundFrame.swift | 32 ++++++++++++++- 7 files changed, 58 insertions(+), 97 deletions(-) delete mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/Amber400.colorset/Contents.json delete mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/Contents.json delete mode 100644 functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/logo.png diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Amber400.colorset/Contents.json b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Amber400.colorset/Contents.json deleted file mode 100644 index 9cf9b41a8..000000000 --- a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/Amber400.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0.157", - "green" : "0.792", - "red" : "1.000" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0.157", - "green" : "0.792", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/Contents.json b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/Contents.json deleted file mode 100644 index 5f670ca87..000000000 --- a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "logo.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/logo.png b/functions/FunctionsExample/FunctionsExample/Assets.xcassets/logo.imageset/logo.png deleted file mode 100644 index bfd4d943f05909618b32b95d9f755188448f8cb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 29051 zcmZs?2{e@9+dp2(k}bQkW=%s>8oTVvV8ocAtffVbeG6fPDA}_U#x~82P)YWg>{6C6 zWF1SkiIH_MmfxuF`+d**KYxdFoOz!6xv%?kUDxOO+}Hg~jD@)o8?ylOi4!N-K*suz z6DR1fCr+GXVq&0uVy%3p|HKJzU68&GH1Oo|1ihD#(RRmLddvNXv>((JMNvgXkHhb* z9d3LAt!hy}{5a5R4K|5^0Hsm>k}<4v3Q#4}v!d&k8B8#bGR?F#ghO20=KsOs?d z4EBm7(r43dn=oVejRBS8JGF^W6@`ua^KJysT@+veL^bq37m6i|UKGA91)NAKs61ZT z2|sACie|97sp@Fx$P zF9IFa)4*xu`dP#O4ADDu(gj#9wTj-aS{W9#so0I#jQ5SFJAT|IVmBKGgIgh(g>^`!}}H>CkEBM@BqYBSV02TB2A&7V*{vD}U|Z0_x|Eqyz%q#nKP@ zO%GO3J50NW@5lXn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zYh66L*bQ;-NqLGs0Lf_+e-CFH3XW~kc&SO!4Vu3Y|YqHKv} zH2MahZ%$7wb?L)rKWSi8l;^ZJlZK@UQGIr$$%+@za%_mvoSXu{3*f(Z`!Do&Haib6 z-1~Bmuv>nQofOIk1iF~7r~ri`yuE1>pM70$A-iiJ%RPuJz3w@ExTQNHBV78>fwII(YxRc(KQ|{Rn3<=HAbJ=0du(#_d>kg&$%{8ht s6g@JIQhUtYT1)%&&Z0Q&CHro`v7k@CRn5~FUeNy5R@c8*tY#hZUv$%RQUCw| diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index 151e2e6c9..8140b3b50 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -19,17 +19,17 @@ import Firebase struct ContentView: View { var body: some View { - VStack(alignment: .leading) { - Image("logo") - .resizable() - .scaledToFit() - .frame(width: ScreenDimensions.width * 0.5) - .offset(x: 20, y: 0) - VStack { - AddNumbers() - AddMessage() - Spacer() + NavigationView { + ScrollView { + VStack { + AddNumbers() + AddMessage() + Spacer() + } } + .navigationTitle("Firebase Functions") + .navigationBarBackButtonHidden(true) + .navigationBarTitleDisplayMode(.large) } } } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift index dcff0c202..42f3fb4ff 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift @@ -25,22 +25,16 @@ struct AddMessage: View { ZStack { BackgroundFrame( title: "AddMessage", - description: "Capitalize the input message and return it." + description: "Capitalize the input message and return it.", + hitButton: didTapAddMessage ) { VStack { VStack { - TextField("", text: $comment) + TextField("", text: $comment, prompt: Text("Type message")) .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) .frame(width: ScreenDimensions.width * 0.8) Text(outcome) } - Button(action: { didTapAddMessage() }) { - Text("Add Message") - .padding() - .foregroundColor(.white) - .background(Color("Amber400")) - } - .cornerRadius(16) } .padding() } @@ -54,12 +48,14 @@ struct AddMessage: View { let code = FunctionsErrorCode(rawValue: error.code) let message = error.localizedDescription let details = error.userInfo[FunctionsErrorDetailsKey] + self + .outcome = + "Error Code: \(code!)\nError Message: \(message)\nError Details: \(details ?? "null")" } print(error) return } if let data = result?.data as? [String: Any], let text = data["text"] as? String { - print(text) self.outcome = text } } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift index f1b202753..bcf815cb6 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift @@ -24,16 +24,22 @@ struct AddNumbers: View { private var functions = Functions.functions() var body: some View { ZStack { - BackgroundFrame(title: "AddNumbers", description: "Add two integers and output the sum.") { + BackgroundFrame( + title: "AddNumbers", + description: "Add two integers and output the sum.", + hitButton: didTapCalculate + ) { VStack { HStack { Spacer() - TextField("", text: $num1).multilineTextAlignment(.center) + TextField("", text: $num1, prompt: Text("Num1")) + .multilineTextAlignment(.center) .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) .frame(width: ScreenDimensions.width * 0.2) .keyboardType(.numberPad) Text("+") - TextField("", text: $num2).multilineTextAlignment(.center) + TextField("", text: $num2, prompt: Text("Num2")) + .multilineTextAlignment(.center) .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) .frame(width: ScreenDimensions.width * 0.2) .keyboardType(.numberPad) @@ -41,15 +47,6 @@ struct AddNumbers: View { } VStack { Text("\(outcome)") - Button(action: { - didTapCalculate() - }) { - Text("Calculate") - .padding() - .foregroundColor(.white) - .background(Color("Amber400")) - } - .cornerRadius(16) } } } @@ -67,12 +64,11 @@ struct AddNumbers: View { let code = FunctionsErrorCode(rawValue: error.code) let message = error.localizedDescription let details = error.userInfo[FunctionsErrorDetailsKey] - print("Error Code: \(code!)") - print("Error Message: \(message)") - print("Error Details: \(details!)") + self + .outcome = + "Error Code: \(code!)\nError Message: \(message)\nError Details: \(details ?? "null")" } print(error) - return } diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index 47ddc7848..47e54fd58 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -20,10 +20,13 @@ struct BackgroundFrame: View { var title: String var description: String let content: Content - init(title: String, description: String, @ViewBuilder content: () -> Content) { + let hitButton: () -> Void + init(title: String, description: String, hitButton: @escaping () -> Void, + @ViewBuilder content: () -> Content) { self.title = title self.description = description self.content = content() + self.hitButton = hitButton } var body: some View { @@ -39,6 +42,7 @@ struct BackgroundFrame: View { .frame(height: 150) content } + CustomStyledButton(title: "Run", action: hitButton) } .padding() .frame(width: ScreenDimensions.width * 0.95) @@ -47,7 +51,11 @@ struct BackgroundFrame: View { struct BackgroundFrame_Previews: PreviewProvider { static var previews: some View { - BackgroundFrame(title: "Function", description: "Function description") { + BackgroundFrame( + title: "Function", + description: "Function description", + hitButton: { print("button") } + ) { Text("Testing View") } } @@ -57,3 +65,23 @@ class ScreenDimensions { static var width: CGFloat = UIScreen.main.bounds.size.width static var height: CGFloat = UIScreen.main.bounds.size.height } + +struct CustomStyledButton: View { + let title: String + let action: () -> Void + + var body: some View { + Button(action: action) { + /// Embed in an HStack to display a wide button with centered text. + HStack { + Spacer() + Text(title) + .padding() + .accentColor(.white) + Spacer() + } + } + .background(Color.orange) + .cornerRadius(16.0) + } +} From db824f36afac6db1de0273965d23fe8f9b93a173 Mon Sep 17 00:00:00 2001 From: granluo Date: Fri, 28 Jan 2022 04:35:25 -0800 Subject: [PATCH 17/28] Update names. --- .../project.pbxproj | 20 +++++++++---------- .../FunctionsExample/Screen/ContentView.swift | 4 ++-- ...{AddNumbers.swift => AddNumbersView.swift} | 8 ++++---- .../View/BackgroundFrame.swift | 6 +++--- ...sage.swift => CapitalizeMessageView.swift} | 16 ++++++--------- 5 files changed, 25 insertions(+), 29 deletions(-) rename functions/FunctionsExample/FunctionsExample/View/{AddNumbers.swift => AddNumbersView.swift} (95%) rename functions/FunctionsExample/FunctionsExample/View/{AddMessage.swift => CapitalizeMessageView.swift} (84%) diff --git a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj index 118f6b298..a877dc022 100644 --- a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj +++ b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj @@ -13,8 +13,8 @@ B926023A278F8F0A006F123B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B9260239278F8F0A006F123B /* Preview Assets.xcassets */; }; B9260244278F94D1006F123B /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = B9260243278F94D1006F123B /* FirebaseAnalytics */; }; B9260246278F94D1006F123B /* FirebaseFunctions in Frameworks */ = {isa = PBXBuildFile; productRef = B9260245278F94D1006F123B /* FirebaseFunctions */; }; - B926024B278F963C006F123B /* AddMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024A278F963C006F123B /* AddMessage.swift */; }; - B926024D278F96B3006F123B /* AddNumbers.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024C278F96B3006F123B /* AddNumbers.swift */; }; + B926024B278F963C006F123B /* CapitalizeMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024A278F963C006F123B /* CapitalizeMessageView.swift */; }; + B926024D278F96B3006F123B /* AddNumbersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024C278F96B3006F123B /* AddNumbersView.swift */; }; B926024F278F9756006F123B /* BackgroundFrame.swift in Sources */ = {isa = PBXBuildFile; fileRef = B926024E278F9756006F123B /* BackgroundFrame.swift */; }; B9F406362798F3B700B84D2B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B9F406352798F3B700B84D2B /* GoogleService-Info.plist */; }; /* End PBXBuildFile section */ @@ -25,8 +25,8 @@ B9260234278F8F08006F123B /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; B9260236278F8F0A006F123B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; B9260239278F8F0A006F123B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - B926024A278F963C006F123B /* AddMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMessage.swift; sourceTree = ""; }; - B926024C278F96B3006F123B /* AddNumbers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddNumbers.swift; sourceTree = ""; }; + B926024A278F963C006F123B /* CapitalizeMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapitalizeMessageView.swift; sourceTree = ""; }; + B926024C278F96B3006F123B /* AddNumbersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddNumbersView.swift; sourceTree = ""; }; B926024E278F9756006F123B /* BackgroundFrame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundFrame.swift; sourceTree = ""; }; B9F406352798F3B700B84D2B /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../GoogleService-Info.plist"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -84,8 +84,8 @@ B9260240278F8FC8006F123B /* View */ = { isa = PBXGroup; children = ( - B926024A278F963C006F123B /* AddMessage.swift */, - B926024C278F96B3006F123B /* AddNumbers.swift */, + B926024A278F963C006F123B /* CapitalizeMessageView.swift */, + B926024C278F96B3006F123B /* AddNumbersView.swift */, B926024E278F9756006F123B /* BackgroundFrame.swift */, ); path = View; @@ -177,8 +177,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B926024D278F96B3006F123B /* AddNumbers.swift in Sources */, - B926024B278F963C006F123B /* AddMessage.swift in Sources */, + B926024D278F96B3006F123B /* AddNumbersView.swift in Sources */, + B926024B278F963C006F123B /* CapitalizeMessageView.swift in Sources */, B926024F278F9756006F123B /* BackgroundFrame.swift in Sources */, B9260235278F8F08006F123B /* ContentView.swift in Sources */, B9260233278F8F08006F123B /* FunctionsExampleApp.swift in Sources */, @@ -326,7 +326,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_SWIFT_FLAGS = ""; + OTHER_SWIFT_FLAGS = "-D EMULATOR"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample.FunctionsExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -357,7 +357,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_SWIFT_FLAGS = ""; + OTHER_SWIFT_FLAGS = "-D EMULATOR"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample.FunctionsExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index 8140b3b50..5469316fd 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -22,8 +22,8 @@ struct ContentView: View { NavigationView { ScrollView { VStack { - AddNumbers() - AddMessage() + AddNumbersView() + CapitalizeMessageView() Spacer() } } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift similarity index 95% rename from functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift rename to functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift index bcf815cb6..0c4767071 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbers.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift @@ -17,7 +17,7 @@ import SwiftUI import Firebase -struct AddNumbers: View { +struct AddNumbersView: View { @State private var num1: String = "" @State private var num2: String = "" @State private var outcome: String = "" @@ -72,10 +72,10 @@ struct AddNumbers: View { return } - print("The result is \(result?.data ?? "null")...") - if let operationResult = (result?.data as? [String: Any])?["operationResult"] as? Int { self.outcome = String(operationResult) + } else { + self.outcome = "The return result is invalid." } } } @@ -83,6 +83,6 @@ struct AddNumbers: View { struct AddNumbers_Previews: PreviewProvider { static var previews: some View { - AddNumbers() + AddNumbersView() } } diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index 47e54fd58..d60a5fe51 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -20,13 +20,13 @@ struct BackgroundFrame: View { var title: String var description: String let content: Content - let hitButton: () -> Void + let buttonAction: () -> Void init(title: String, description: String, hitButton: @escaping () -> Void, @ViewBuilder content: () -> Content) { self.title = title self.description = description self.content = content() - self.hitButton = hitButton + self.buttonAction = hitButton } var body: some View { @@ -42,7 +42,7 @@ struct BackgroundFrame: View { .frame(height: 150) content } - CustomStyledButton(title: "Run", action: hitButton) + CustomStyledButton(title: "Run", action: buttonAction) } .padding() .frame(width: ScreenDimensions.width * 0.95) diff --git a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift b/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift similarity index 84% rename from functions/FunctionsExample/FunctionsExample/View/AddMessage.swift rename to functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift index 42f3fb4ff..5e6e80be5 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddMessage.swift +++ b/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift @@ -17,7 +17,7 @@ import SwiftUI import Firebase -struct AddMessage: View { +struct CapitalizeMessageView: View { @State private var comment: String = "" @State private var outcome: String = "" private var functions = Functions.functions() @@ -29,12 +29,10 @@ struct AddMessage: View { hitButton: didTapAddMessage ) { VStack { - VStack { - TextField("", text: $comment, prompt: Text("Type message")) - .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.8) - Text(outcome) - } + TextField("", text: $comment, prompt: Text("Type message")) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.8) + Text(outcome) } .padding() } @@ -64,8 +62,6 @@ struct AddMessage: View { struct AddMessage_Previews: PreviewProvider { static var previews: some View { - AddMessage() + CapitalizeMessageView() } } - -struct CommentCell {} From b08f2baf57e6b5aa90d1136b5d4745937dd5bb1d Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 08:24:38 -0800 Subject: [PATCH 18/28] Add async/await and readme. --- .../project.pbxproj | 8 +- .../FunctionsExampleApp.swift | 3 + .../FunctionsExample/Screen/ContentView.swift | 1 + .../View/AddNumbersView.swift | 73 ++++++++----------- .../View/BackgroundFrame.swift | 2 +- .../View/CapitalizeMessageView.swift | 44 +++++------ 6 files changed, 58 insertions(+), 73 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj index a877dc022..c5c2e98b1 100644 --- a/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj +++ b/functions/FunctionsExample/FunctionsExample.xcodeproj/project.pbxproj @@ -326,8 +326,8 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_SWIFT_FLAGS = "-D EMULATOR"; - PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample.FunctionsExample; + OTHER_SWIFT_FLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -357,8 +357,8 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_SWIFT_FLAGS = "-D EMULATOR"; - PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample.FunctionsExample; + OTHER_SWIFT_FLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.quickstart.FunctionsExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; diff --git a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift index 24c16f9ca..af788a22a 100644 --- a/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift +++ b/functions/FunctionsExample/FunctionsExample/FunctionsExampleApp.swift @@ -21,6 +21,9 @@ import Firebase struct FunctionsExampleApp: App { init() { FirebaseApp.configure() + // Add `-D EMULATOR` to the `Other Swift Flags` under the `Build Settings` + // to run on an emulator. Learn more from the README.md under the + // `functions` dir of the Quickstart repo. #if EMULATOR Functions.functions().useEmulator(withHost: "localhost", port: 5001) #endif diff --git a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift index 5469316fd..af8966964 100644 --- a/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift +++ b/functions/FunctionsExample/FunctionsExample/Screen/ContentView.swift @@ -31,6 +31,7 @@ struct ContentView: View { .navigationBarBackButtonHidden(true) .navigationBarTitleDisplayMode(.large) } + .navigationViewStyle(StackNavigationViewStyle()) } } diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift index 0c4767071..50f8a72ad 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift @@ -23,31 +23,29 @@ struct AddNumbersView: View { @State private var outcome: String = "" private var functions = Functions.functions() var body: some View { - ZStack { - BackgroundFrame( - title: "AddNumbers", - description: "Add two integers and output the sum.", - hitButton: didTapCalculate - ) { + BackgroundFrame( + title: "AddNumbers", + description: "Add two integers and output the sum.", + hitButton: didTapCalculate + ) { + VStack { + HStack { + Spacer() + TextField("", text: $num1, prompt: Text("Num1")) + .multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.numberPad) + Text("+") + TextField("", text: $num2, prompt: Text("Num2")) + .multilineTextAlignment(.center) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.2) + .keyboardType(.numberPad) + Spacer() + } VStack { - HStack { - Spacer() - TextField("", text: $num1, prompt: Text("Num1")) - .multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) - .keyboardType(.numberPad) - Text("+") - TextField("", text: $num2, prompt: Text("Num2")) - .multilineTextAlignment(.center) - .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) - .keyboardType(.numberPad) - Spacer() - } - VStack { - Text("\(outcome)") - } + Text("\(outcome)") } } } @@ -55,29 +53,20 @@ struct AddNumbersView: View { } func didTapCalculate() { - functions.httpsCallable("addNumbers") - .call(["firstNumber": $num1.wrappedValue, - "secondNumber": $num2.wrappedValue]) { result, error in - - if let error = error as NSError? { - if error.domain == FunctionsErrorDomain { - let code = FunctionsErrorCode(rawValue: error.code) - let message = error.localizedDescription - let details = error.userInfo[FunctionsErrorDetailsKey] - self - .outcome = - "Error Code: \(code!)\nError Message: \(message)\nError Details: \(details ?? "null")" - } - print(error) - return - } - - if let operationResult = (result?.data as? [String: Any])?["operationResult"] as? Int { + Task { + do { + let result = try await functions.httpsCallable("addNumbers") + .call(["firstNumber": $num1.wrappedValue, + "secondNumber": $num2.wrappedValue]) + if let operationResult = (result.data as? [String: Any])?["operationResult"] as? Int { self.outcome = String(operationResult) } else { self.outcome = "The return result is invalid." } + } catch { + print(error) } + } } } diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index d60a5fe51..f05aec90c 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -26,7 +26,7 @@ struct BackgroundFrame: View { self.title = title self.description = description self.content = content() - self.buttonAction = hitButton + buttonAction = hitButton } var body: some View { diff --git a/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift b/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift index 5e6e80be5..89a7e6b05 100644 --- a/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift +++ b/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift @@ -22,39 +22,31 @@ struct CapitalizeMessageView: View { @State private var outcome: String = "" private var functions = Functions.functions() var body: some View { - ZStack { - BackgroundFrame( - title: "AddMessage", - description: "Capitalize the input message and return it.", - hitButton: didTapAddMessage - ) { - VStack { - TextField("", text: $comment, prompt: Text("Type message")) - .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.8) - Text(outcome) - } - .padding() + BackgroundFrame( + title: "CapitalizeMessage", + description: "Capitalize the input message and return it.", + hitButton: didTapAddMessage + ) { + VStack { + TextField("", text: $comment, prompt: Text("Type message")) + .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) + .frame(width: ScreenDimensions.width * 0.8) + Text(outcome) } + .padding() } } func didTapAddMessage() { - functions.httpsCallable("addMessage").call(["text": $comment.wrappedValue]) { result, error in - if let error = error as NSError? { - if error.domain == FunctionsErrorDomain { - let code = FunctionsErrorCode(rawValue: error.code) - let message = error.localizedDescription - let details = error.userInfo[FunctionsErrorDetailsKey] - self - .outcome = - "Error Code: \(code!)\nError Message: \(message)\nError Details: \(details ?? "null")" + Task { + do { + let result = try await functions.httpsCallable("capitalizeMessage") + .call(["text": $comment.wrappedValue]) + if let data = result.data as? [String: Any], let text = data["text"] as? String { + self.outcome = text } + } catch { print(error) - return - } - if let data = result?.data as? [String: Any], let text = data["text"] as? String { - self.outcome = text } } } From 7acd2baa6823edd3985b1ce1a6ade6598da54388 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 08:34:38 -0800 Subject: [PATCH 19/28] Add readme. --- functions/README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 functions/README.md diff --git a/functions/README.md b/functions/README.md new file mode 100644 index 000000000..8f7120274 --- /dev/null +++ b/functions/README.md @@ -0,0 +1,70 @@ +Firebase Functions Quickstart +============================= + +Introduction +------------ + +This quickstart demonstrates **Callable Functions** which are HTTPS Cloud Functions +that can be invoked directly from your mobile application. + +- [Read more about callable functions](https://firebase.google.com/docs/functions/callable) + +Getting Started +--------------- + +- [Add Firebase to your iOS Project](https://firebase.google.com/docs/ios/setup). +- [Set up Firebase Functions](https://firebase.google.com/docs/functions/get-started) +Functions in the docs should be updated, since the functions applied in the +Quickstart might not be the same as the ones in the example from the doc above. + +To get aligned with the Quickstart, the `index.js` could be updated to +``` +const functions = require('firebase-functions'); + +exports.addNumbers = functions.https.onRequest((request, response) => { + var first = Number(request.body.data.firstNumber); + var second = Number(request.body.data.secondNumber); + response.json({ data: {operationResult: first + second} }); +}); + +exports.capitalizeMessage = functions.https.onRequest((request, response) => { + var upText = request.body.data.text; + response.json({ data: {text: upText.toUpperCase()} }); +}); +``` +- Run on a local machine +To let the Quickstart run on a local machine, you can [Emulate execution of your functions](https://firebase.google.com/docs/functions/get-started#emulate-execution-of-your-functions) +locally by adding a flag `-D EMULATOR` to the `Other Swift Flags` under the +`Build Settings`. + +- Run in production +Once functions are [deployed to a production environment](https://firebase.google.com/docs/functions/get-started#deploy-functions-to-a-production-environment), +the Functions Quickstart can just build and run without additional settings to +connect to a Firebase project. Remember to remove the `-D EMULATOR` flag if you +run the Quickstart through an emulator before. + +Support +------- + +- [Stack Overflow](https://stackoverflow.com/questions/tagged/google-cloud-functions) +- [Firebase Support](https://firebase.google.com/support/) + +License +------- + +Copyright 2022 Google, Inc. + +Licensed to the Apache Software Foundation (ASF) under one or more contributor +license agreements. See the NOTICE file distributed with this work for +additional information regarding copyright ownership. The ASF licenses this +file to you under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy of +the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations under +the License. From d4af3a67db51d61fa1f1596859a3ba6aedeb2f64 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 09:01:33 -0800 Subject: [PATCH 20/28] Update button action name. --- .../FunctionsExample/View/AddNumbersView.swift | 2 +- .../FunctionsExample/View/BackgroundFrame.swift | 6 +++--- .../FunctionsExample/View/CapitalizeMessageView.swift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift index 50f8a72ad..3069592b5 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift @@ -26,7 +26,7 @@ struct AddNumbersView: View { BackgroundFrame( title: "AddNumbers", description: "Add two integers and output the sum.", - hitButton: didTapCalculate + buttonAction: didTapCalculate ) { VStack { HStack { diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index f05aec90c..a00ee96d4 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -21,12 +21,12 @@ struct BackgroundFrame: View { var description: String let content: Content let buttonAction: () -> Void - init(title: String, description: String, hitButton: @escaping () -> Void, + init(title: String, description: String, buttonAction: @escaping () -> Void, @ViewBuilder content: () -> Content) { self.title = title self.description = description self.content = content() - buttonAction = hitButton + self.buttonAction = buttonAction } var body: some View { @@ -54,7 +54,7 @@ struct BackgroundFrame_Previews: PreviewProvider { BackgroundFrame( title: "Function", description: "Function description", - hitButton: { print("button") } + buttonAction: { print("button") } ) { Text("Testing View") } diff --git a/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift b/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift index 89a7e6b05..292497953 100644 --- a/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift +++ b/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift @@ -25,7 +25,7 @@ struct CapitalizeMessageView: View { BackgroundFrame( title: "CapitalizeMessage", description: "Capitalize the input message and return it.", - hitButton: didTapAddMessage + buttonAction: didTapAddMessage ) { VStack { TextField("", text: $comment, prompt: Text("Type message")) From 6ce811d0e9a4041fb6992b74087a3ef40a8d20d0 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 09:21:48 -0800 Subject: [PATCH 21/28] Update padding and plus sign. --- .../FunctionsExample/View/AddNumbersView.swift | 7 +++---- .../FunctionsExample/View/BackgroundFrame.swift | 6 ------ .../FunctionsExample/View/CapitalizeMessageView.swift | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift b/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift index 3069592b5..9262fbb5b 100644 --- a/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift +++ b/functions/FunctionsExample/FunctionsExample/View/AddNumbersView.swift @@ -34,13 +34,13 @@ struct AddNumbersView: View { TextField("", text: $num1, prompt: Text("Num1")) .multilineTextAlignment(.center) .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) + .padding() .keyboardType(.numberPad) - Text("+") + Image(systemName: "plus") TextField("", text: $num2, prompt: Text("Num2")) .multilineTextAlignment(.center) .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.2) + .padding() .keyboardType(.numberPad) Spacer() } @@ -49,7 +49,6 @@ struct AddNumbersView: View { } } } - .padding() } func didTapCalculate() { diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index a00ee96d4..2b671217a 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -45,7 +45,6 @@ struct BackgroundFrame: View { CustomStyledButton(title: "Run", action: buttonAction) } .padding() - .frame(width: ScreenDimensions.width * 0.95) } } @@ -61,11 +60,6 @@ struct BackgroundFrame_Previews: PreviewProvider { } } -class ScreenDimensions { - static var width: CGFloat = UIScreen.main.bounds.size.width - static var height: CGFloat = UIScreen.main.bounds.size.height -} - struct CustomStyledButton: View { let title: String let action: () -> Void diff --git a/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift b/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift index 292497953..b561b1cbf 100644 --- a/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift +++ b/functions/FunctionsExample/FunctionsExample/View/CapitalizeMessageView.swift @@ -30,7 +30,7 @@ struct CapitalizeMessageView: View { VStack { TextField("", text: $comment, prompt: Text("Type message")) .background(RoundedRectangle(cornerRadius: 16).fill(Color(.systemGray5))) - .frame(width: ScreenDimensions.width * 0.8) + .padding() Text(outcome) } .padding() From d30692597c974f5893d61c0e5a24c629dadc5fdd Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 09:25:52 -0800 Subject: [PATCH 22/28] Update color of description. --- .../FunctionsExample/FunctionsExample/View/BackgroundFrame.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift index 2b671217a..5c92fc5cf 100644 --- a/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift +++ b/functions/FunctionsExample/FunctionsExample/View/BackgroundFrame.swift @@ -36,6 +36,7 @@ struct BackgroundFrame: View { .font(.title3) Text(description) .font(.subheadline) + .foregroundColor(Color(UIColor.secondaryLabel)) ZStack { RoundedRectangle(cornerRadius: 16) .fill(Color(.secondarySystemBackground)) From 21d6b29ec4475f8ecb47552fa3d7cd603e870f18 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 12:48:00 -0800 Subject: [PATCH 23/28] Create CI spm test for Functions. --- .github/workflows/functions.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index d09439e8a..ea33393d6 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -52,3 +52,33 @@ jobs: run: ./scripts/test.sh env: SWIFT_SUFFIX: Swift + + spm: + name: spm + runs-on: macOS-latest + strategy: + matrix: + # TODO investigate tvOS Xcode 13.1 test failure. + xcode: ["13.0"] + os: [iOS] + device: iPhone 11 + test: false + env: + SETUP: functions + SPM: true + DIR: functions/FunctionsExample/ + OS: ${{ matrix.os }} + DEVICE: ${{ matrix.device }} + TEST: ${{ matrix.test }} + XCODE_VERSION: ${{ matrix.xcode }} + steps: + - name: Checkout + uses: actions/checkout@master + - name: Setup + run: | + sudo xcode-select -s "/Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer" + gem install xcpretty + cd $SETUP + ../scripts/install_prereqs/${SETUP}.sh + - name: Build and Test SwiftUI (${{ matrix.os }}) + run: ./scripts/test.sh From 75f3c93ac41cf32ab6c160f792fa63a90c2fc115 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 12:58:34 -0800 Subject: [PATCH 24/28] Fix matrix. --- .github/workflows/functions.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index ea33393d6..b0bcfff50 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -58,11 +58,12 @@ jobs: runs-on: macOS-latest strategy: matrix: - # TODO investigate tvOS Xcode 13.1 test failure. xcode: ["13.0"] os: [iOS] - device: iPhone 11 - test: false + include: + - os: iOS + device: iPhone 11 + test: false env: SETUP: functions SPM: true From eb92d7802bdb07981b8015d3c3048d03bdee8998 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 13:30:12 -0800 Subject: [PATCH 25/28] Add a scheme for testing purpose. --- .../xcschemes/FunctionsExample.xcscheme | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 functions/FunctionsExample/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme diff --git a/functions/FunctionsExample/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme b/functions/FunctionsExample/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme new file mode 100644 index 000000000..212df2eb4 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 3402530ff2df65dcb491c2403ded6572a64f6488 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 13:40:47 -0800 Subject: [PATCH 26/28] Update scheme. --- .../xcschemes/FunctionsExample (iOS).xcscheme | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 functions/FunctionsExample/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample (iOS).xcscheme diff --git a/functions/FunctionsExample/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample (iOS).xcscheme b/functions/FunctionsExample/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample (iOS).xcscheme new file mode 100644 index 000000000..212df2eb4 --- /dev/null +++ b/functions/FunctionsExample/FunctionsExample.xcodeproj/xcshareddata/xcschemes/FunctionsExample (iOS).xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From cfabc21e6a09c6dfb848ab2fa1216d959b10aa84 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 14:17:04 -0800 Subject: [PATCH 27/28] Test scripts/ --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 8fba99158..30e1e7ced 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -18,7 +18,7 @@ # Build the quickstart. If we're running on the main repo (not a fork), we # also run the tests along with the decoded GoogleService-Info.plist files. -set -euo pipefail +set -exuo pipefail # Set default parameters if [[ -z "${SPM:-}" ]]; then From b65ffa274aacf644b690b413fa924dd747451544 Mon Sep 17 00:00:00 2001 From: granluo Date: Tue, 1 Feb 2022 15:27:18 -0800 Subject: [PATCH 28/28] Reverse test. --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 30e1e7ced..8fba99158 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -18,7 +18,7 @@ # Build the quickstart. If we're running on the main repo (not a fork), we # also run the tests along with the decoded GoogleService-Info.plist files. -set -exuo pipefail +set -euo pipefail # Set default parameters if [[ -z "${SPM:-}" ]]; then