diff --git a/.gitignore b/.gitignore index fd6e82ef..19875575 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.agents/ .idea/ gen/ .DS_Store diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 94eb19ca..00000000 --- a/.travis.yml +++ /dev/null @@ -1,62 +0,0 @@ -osx_image: xcode10 -language: objective-c -cache: - - bundler - - cocoapods - -matrix: - include: - - podfile: ios/objc/Podfile - env: - - LANGUAGE=ObjC - - DIR=ios/objc - - podfile: ios/swift/Podfile - env: - - LANGUAGE=Swift - - DIR=ios/swift - - podfile: grow-ios-starter/objc-starter/Podfile - env: - - LANGUAGE=ObjC - - DIR=grow-ios-starter/objc-starter - - podfile: grow-ios-starter/swift-starter/Podfile - env: - - LANGUAGE=Swift - - DIR=grow-ios-starter/swift-starter - - podfile: ios-starter/objc-starter/Podfile - env: - - LANGUAGE=ObjC - - DIR=ios-starter/objc-starter - before_install: - - bundle install - - gem install xcpretty - - cd ios-starter/objc-starter - - bundle exec pod install --repo-update - - cd - - - podfile: ios-starter/swift-starter/Podfile - env: - - LANGUAGE=Swift - - DIR=ios-starter/swift-starter - before_install: - - bundle install - - gem install xcpretty - - cd ios-starter/swift-starter - - bundle exec pod install --repo-update - - cd - - -before_install: - - bundle install - - gem install xcpretty - - cd ios/$LANGUAGE - - bundle exec pod install --repo-update - - cp ../mock-GoogleService-Info.plist ./GoogleService-Info.plist - - sed -i '' '/BUNDLE_ID"; }; - 107960861C6130EF003DB6CC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 107960871C6130EF003DB6CC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 107960891C6130EF003DB6CC /* FCViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FCViewController.h; sourceTree = ""; }; - 1079608A1C6130EF003DB6CC /* FCViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FCViewController.m; sourceTree = ""; }; - 107960A81C6131B6003DB6CC /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; - 107960AA1C6131E4003DB6CC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 107960AC1C613207003DB6CC /* MeasurementHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeasurementHelper.h; sourceTree = ""; }; - 107960AD1C613207003DB6CC /* MeasurementHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MeasurementHelper.m; sourceTree = ""; }; - 107960AF1C61321D003DB6CC /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; - 107960B01C61321D003DB6CC /* Constants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Constants.m; sourceTree = ""; }; - 107960B41C613263003DB6CC /* SignInViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SignInViewController.h; sourceTree = ""; }; - 107960B51C613263003DB6CC /* SignInViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SignInViewController.m; sourceTree = ""; }; - 10AF4CCD1DD238C00096D192 /* logo1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo1024.png; sourceTree = ""; }; - 10AF4CCE1DD238C00096D192 /* Bladefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Bladefile; sourceTree = ""; }; - 10AF4CCF1DD238C00096D192 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 10AF4CD01DD238C00096D192 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1079607D1C6130EF003DB6CC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 107960771C6130EF003DB6CC = { - isa = PBXGroup; - children = ( - 10AF4CCB1DD238C00096D192 /* shared */, - 107960821C6130EF003DB6CC /* FriendlyChatObjC */, - 107960811C6130EF003DB6CC /* Products */, - 90905DCCB3FF2212AC7AF42D /* Pods */, - ); - sourceTree = ""; - }; - 107960811C6130EF003DB6CC /* Products */ = { - isa = PBXGroup; - children = ( - 107960801C6130EF003DB6CC /* FriendlyChatObjC.app */, - ); - name = Products; - sourceTree = ""; - }; - 107960821C6130EF003DB6CC /* FriendlyChatObjC */ = { - isa = PBXGroup; - children = ( - 107960861C6130EF003DB6CC /* AppDelegate.h */, - 107960871C6130EF003DB6CC /* AppDelegate.m */, - 107960891C6130EF003DB6CC /* FCViewController.h */, - 1079608A1C6130EF003DB6CC /* FCViewController.m */, - 107960AC1C613207003DB6CC /* MeasurementHelper.h */, - 107960AD1C613207003DB6CC /* MeasurementHelper.m */, - 107960B41C613263003DB6CC /* SignInViewController.h */, - 107960B51C613263003DB6CC /* SignInViewController.m */, - 107960AF1C61321D003DB6CC /* Constants.h */, - 107960B01C61321D003DB6CC /* Constants.m */, - 107960831C6130EF003DB6CC /* Supporting Files */, - ); - path = FriendlyChatObjC; - sourceTree = ""; - }; - 107960831C6130EF003DB6CC /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 107960AA1C6131E4003DB6CC /* Info.plist */, - 107960A81C6131B6003DB6CC /* Main.storyboard */, - 107960841C6130EF003DB6CC /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 10AF4CCB1DD238C00096D192 /* shared */ = { - isa = PBXGroup; - children = ( - 10AF4CCC1DD238C00096D192 /* assets */, - 10AF4CCE1DD238C00096D192 /* Bladefile */, - 10AF4CCF1DD238C00096D192 /* Images.xcassets */, - 10AF4CD01DD238C00096D192 /* LaunchScreen.xib */, - ); - path = shared; - sourceTree = ""; - }; - 10AF4CCC1DD238C00096D192 /* assets */ = { - isa = PBXGroup; - children = ( - 10AF4CCD1DD238C00096D192 /* logo1024.png */, - ); - path = assets; - sourceTree = ""; - }; - 90905DCCB3FF2212AC7AF42D /* Pods */ = { - isa = PBXGroup; - children = ( - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1079607F1C6130EF003DB6CC /* FriendlyChatObjC */ = { - isa = PBXNativeTarget; - buildConfigurationList = 107960A21C6130EF003DB6CC /* Build configuration list for PBXNativeTarget "FriendlyChatObjC" */; - buildPhases = ( - 1079607C1C6130EF003DB6CC /* Sources */, - 1079607D1C6130EF003DB6CC /* Frameworks */, - 1079607E1C6130EF003DB6CC /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = FriendlyChatObjC; - productName = FriendlyChatObjC; - productReference = 107960801C6130EF003DB6CC /* FriendlyChatObjC.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 107960781C6130EF003DB6CC /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1130; - ORGANIZATIONNAME = "Ibrahim Ulukaya"; - TargetAttributes = { - 1079607F1C6130EF003DB6CC = { - CreatedOnToolsVersion = 7.2; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 1079607B1C6130EF003DB6CC /* Build configuration list for PBXProject "FriendlyChatObjC" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 107960771C6130EF003DB6CC; - productRefGroup = 107960811C6130EF003DB6CC /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1079607F1C6130EF003DB6CC /* FriendlyChatObjC */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1079607E1C6130EF003DB6CC /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 10AF4CD41DD238C00096D192 /* LaunchScreen.xib in Resources */, - 10AF4CD21DD238C00096D192 /* Bladefile in Resources */, - 10AF4CD31DD238C00096D192 /* Images.xcassets in Resources */, - 107960A91C6131B6003DB6CC /* Main.storyboard in Resources */, - 10AF4CD11DD238C00096D192 /* logo1024.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1079607C1C6130EF003DB6CC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 107960B11C61321D003DB6CC /* Constants.m in Sources */, - 107960AE1C613207003DB6CC /* MeasurementHelper.m in Sources */, - 1079608B1C6130EF003DB6CC /* FCViewController.m in Sources */, - 107960881C6130EF003DB6CC /* AppDelegate.m in Sources */, - 107960B61C613263003DB6CC /* SignInViewController.m in Sources */, - 107960851C6130EF003DB6CC /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 107960A01C6130EF003DB6CC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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 = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 107960A11C6130EF003DB6CC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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 = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 107960A31C6130EF003DB6CC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = FriendlyChatObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.codelab.FriendlyChatObjC; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - }; - name = Debug; - }; - 107960A41C6130EF003DB6CC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = FriendlyChatObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.codelab.FriendlyChatObjC; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1079607B1C6130EF003DB6CC /* Build configuration list for PBXProject "FriendlyChatObjC" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 107960A01C6130EF003DB6CC /* Debug */, - 107960A11C6130EF003DB6CC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 107960A21C6130EF003DB6CC /* Build configuration list for PBXNativeTarget "FriendlyChatObjC" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 107960A31C6130EF003DB6CC /* Debug */, - 107960A41C6130EF003DB6CC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 107960781C6130EF003DB6CC /* Project object */; -} diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC.xcodeproj/xcshareddata/xcschemes/FriendlyChatObjC.xcscheme b/grow-ios-starter/objc-starter/FriendlyChatObjC.xcodeproj/xcshareddata/xcschemes/FriendlyChatObjC.xcscheme deleted file mode 100644 index 4f806b45..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC.xcodeproj/xcshareddata/xcschemes/FriendlyChatObjC.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/.clang-format b/grow-ios-starter/objc-starter/FriendlyChatObjC/.clang-format deleted file mode 100644 index 1f09ce0f..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/.clang-format +++ /dev/null @@ -1,4 +0,0 @@ -BasedOnStyle: Google -ColumnLimit: 100 -BinPackParameters: false -AllowAllParametersOfDeclarationOnNextLine: true diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/AppDelegate.h b/grow-ios-starter/objc-starter/FriendlyChatObjC/AppDelegate.h deleted file mode 100644 index e8f4f669..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/AppDelegate.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 UIKit; -@import GoogleSignIn; - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - - -@end - diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/AppDelegate.m b/grow-ios-starter/objc-starter/FriendlyChatObjC/AppDelegate.m deleted file mode 100644 index 61156ad0..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/AppDelegate.m +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 "AppDelegate.h" - -@import Firebase; -@import GoogleSignIn; - -@implementation AppDelegate - -- (BOOL)application:(nonnull UIApplication *)application - openURL:(nonnull NSURL *)url - options:(nonnull NSDictionary *)options { - return [self application:application - openURL:url - sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] - annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]; -} - -- (BOOL)application:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication - annotation:(id)annotation { - return [[GIDSignIn sharedInstance] handleURL:url]; -} - -- (void)signIn:(GIDSignIn *)signIn -didSignInForUser:(GIDGoogleUser *)user - withError:(NSError *)error { - if (error == nil) { - GIDAuthentication *authentication = user.authentication; - FIRAuthCredential *credential = - [FIRGoogleAuthProvider credentialWithIDToken:authentication.idToken - accessToken:authentication.accessToken]; - [[FIRAuth auth] signInWithCredential:credential completion:^(FIRAuthDataResult * _Nullable authResult, NSError * _Nullable error) { - if (error) { - NSLog(@"Error %@", error.localizedDescription); - } - }]; - } else { - NSLog(@"Error %@", error.localizedDescription); - } -} - -- (BOOL)application:(UIApplication *)application -didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [FIRApp configure]; - [GIDSignIn sharedInstance].clientID = [FIRApp defaultApp].options.clientID; - [GIDSignIn sharedInstance].delegate = self; - return YES; -} - -@end diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/Constants.h b/grow-ios-starter/objc-starter/FriendlyChatObjC/Constants.h deleted file mode 100644 index 8bd3b853..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/Constants.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 - -@interface Constants : NSObject - -extern NSString *const NotificationKeysSignedIn; - -extern NSString *const SeguesSignInToFp; -extern NSString *const SeguesFpToSignIn; - -extern NSString *const MessageFieldsname; -extern NSString *const MessageFieldstext; -extern NSString *const MessageFieldsphotoURL; -extern NSString *const MessageFieldsimageURL; - -@end diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/Constants.m b/grow-ios-starter/objc-starter/FriendlyChatObjC/Constants.m deleted file mode 100644 index 768bf53b..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/Constants.m +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 "Constants.h" - -@implementation Constants - -NSString *const NotificationKeysSignedIn = @"onSignInCompleted"; - -NSString *const SeguesSignInToFp = @"SignInToFP"; -NSString *const SeguesFpToSignIn = @"FPToSignIn"; - -NSString *const MessageFieldsname = @"name"; -NSString *const MessageFieldstext = @"text"; -NSString *const MessageFieldsphotoURL = @"photoURL"; -NSString *const MessageFieldsimageURL = @"imageURL"; - -@end diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/FCViewController.h b/grow-ios-starter/objc-starter/FriendlyChatObjC/FCViewController.h deleted file mode 100644 index 66b5fec7..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/FCViewController.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 UIKit; - -@interface FCViewController : UIViewController - -@end - diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/FCViewController.m b/grow-ios-starter/objc-starter/FriendlyChatObjC/FCViewController.m deleted file mode 100644 index 99ec72c3..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/FCViewController.m +++ /dev/null @@ -1,268 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 "Constants.h" -#import "FCViewController.h" - -@import Photos; - -@import Firebase; - -/** - * AdMob ad unit IDs are not currently stored inside the google-services.plist file. Developers - * using AdMob can store them as custom values in another plist, or simply use constants. Note that - * these ad units are configured to return only test ads, and should not be used outside this sample. - */ - -@interface FCViewController () { - int _msglength; - FIRDatabaseHandle _refHandle; -} - -@property(nonatomic, weak) IBOutlet UITextField *textField; -@property(nonatomic, weak) IBOutlet UIButton *sendButton; - -@property(nonatomic, weak) IBOutlet UITableView *clientTable; - -@property (strong, nonatomic) FIRDatabaseReference *ref; -@property (strong, nonatomic) NSMutableArray *messages; -@property (strong, nonatomic) FIRStorageReference *storageRef; -@property (nonatomic, strong) FIRRemoteConfig *remoteConfig; - -@end - -@implementation FCViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - _msglength = 10; - _messages = [[NSMutableArray alloc] init]; - [_clientTable registerClass:UITableViewCell.self forCellReuseIdentifier:@"tableViewCell"]; - - [self configureDatabase]; - [self configureStorage]; - [self configureRemoteConfig]; - [self fetchConfig]; - [self loadAd]; -} - -- (void)dealloc { - [[_ref child:@"messages"] removeObserverWithHandle:_refHandle]; -} - -- (void)configureDatabase { - _ref = [[FIRDatabase database] reference]; - // Listen for new messages in the Firebase database - _refHandle = [[_ref child:@"messages"] observeEventType:FIRDataEventTypeChildAdded withBlock:^(FIRDataSnapshot *snapshot) { - [_messages addObject:snapshot]; - [_clientTable insertRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:_messages.count-1 inSection:0]] withRowAnimation: UITableViewRowAnimationAutomatic]; - }]; -} - -- (void)configureStorage { - self.storageRef = [[FIRStorage storage] reference]; -} - -- (void)configureRemoteConfig { -} - -- (void)fetchConfig { -} - -- (IBAction)didPressFreshConfig:(id)sender { - [self fetchConfig]; -} - -- (IBAction)didSendMessage:(UIButton *)sender { - [self textFieldShouldReturn:_textField]; -} - -- (IBAction)didPressCrash:(id)sender { - NSLog(@"Crash button pressed!"); - assert(NO); -} - -- (IBAction)inviteTapped:(id)sender { -} - -- (void)loadAd { -} - -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(nonnull NSString *)string { - NSString *text = textField.text; - if (!text) { - return YES; - } - long newLength = text.length + string.length - range.length; - return (newLength <= _msglength); -} - -- (void)viewWillAppear:(BOOL)animated { -} - -- (void)viewWillDisappear:(BOOL)animated { -} - -// UITableViewDataSource protocol methods -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return _messages.count; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { - // Dequeue cell - UITableViewCell *cell = [_clientTable dequeueReusableCellWithIdentifier:@"tableViewCell" forIndexPath:indexPath]; - - // Unpack message from Firebase DataSnapshot - FIRDataSnapshot *messageSnapshot = _messages[indexPath.row]; - NSDictionary *message = messageSnapshot.value; - NSString *name = message[MessageFieldsname]; - NSString *imageURL = message[MessageFieldsimageURL]; - if (imageURL) { - if ([imageURL hasPrefix:@"gs://"]) { - [[[FIRStorage storage] referenceForURL:imageURL] dataWithMaxSize:INT64_MAX - completion:^(NSData *data, NSError *error) { - if (error) { - NSLog(@"Error downloading: %@", error); - return; - } - dispatch_async(dispatch_get_main_queue(), ^{ - cell.imageView.image = [UIImage imageWithData:data]; - [cell setNeedsLayout]; - }); - }]; - } else { - cell.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageURL]]]; - } - cell.textLabel.text = [NSString stringWithFormat:@"sent by: %@", name]; - } else { - NSString *text = message[MessageFieldstext]; - cell.textLabel.text = [NSString stringWithFormat:@"%@: %@", name, text]; - cell.imageView.image = [UIImage imageNamed: @"ic_account_circle"]; - NSString *photoURL = message[MessageFieldsphotoURL]; - if (photoURL) { - NSURL *URL = [NSURL URLWithString:photoURL]; - if (URL) { - NSData *data = [NSData dataWithContentsOfURL:URL]; - if (data) { - cell.imageView.image = [UIImage imageWithData:data]; - } - } - } - } - return cell; -} - -// UITextViewDelegate protocol methods -- (BOOL)textFieldShouldReturn:(UITextField *)textField { - [self sendMessage:@{MessageFieldstext: textField.text}]; - textField.text = @""; - [self.view endEditing:YES]; - return YES; -} - -- (void)sendMessage:(NSDictionary *)data { - NSMutableDictionary *mdata = [data mutableCopy]; - mdata[MessageFieldsname] = [FIRAuth auth].currentUser.displayName; - NSURL *photoURL = [FIRAuth auth].currentUser.photoURL; - if (photoURL) { - mdata[MessageFieldsphotoURL] = [photoURL absoluteString]; - } - - // Push data to Firebase Database - [[[_ref child:@"messages"] childByAutoId] setValue:mdata]; -} - -# pragma mark - Image Picker - -- (IBAction)didTapAddPhoto:(id)sender { - UIImagePickerController * picker = [[UIImagePickerController alloc] init]; - picker.delegate = self; - if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { - picker.sourceType = UIImagePickerControllerSourceTypeCamera; - } else { - picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; - } - - [self presentViewController:picker animated:YES completion:NULL]; -} - -- (void)imagePickerController:(UIImagePickerController *)picker -didFinishPickingMediaWithInfo:(NSDictionary *)info { - [picker dismissViewControllerAnimated:YES completion:NULL]; - - NSURL *referenceURL = info[UIImagePickerControllerReferenceURL]; - // if it's a photo from the library, not an image from the camera - if (referenceURL) { - PHFetchResult* assets = [PHAsset fetchAssetsWithALAssetURLs:@[referenceURL] options:nil]; - PHAsset *asset = assets.firstObject; - [asset requestContentEditingInputWithOptions:nil - completionHandler:^(PHContentEditingInput *contentEditingInput, NSDictionary *info) { - NSURL *imageFile = contentEditingInput.fullSizeImageURL; - NSString *filePath = [NSString stringWithFormat:@"%@/%lld/%@", - [FIRAuth auth].currentUser.uid, - (long long)([NSDate date].timeIntervalSince1970 * 1000.0), - referenceURL.lastPathComponent]; - [[_storageRef child:filePath] - putFile:imageFile metadata:nil - completion:^(FIRStorageMetadata *metadata, NSError *error) { - if (error) { - NSLog(@"Error uploading: %@", error); - return; - } - [self sendMessage:@{MessageFieldsimageURL:[_storageRef child:metadata.path].description}]; - } - ]; - }]; - } else { - UIImage *image = info[UIImagePickerControllerOriginalImage]; - NSData *imageData = UIImageJPEGRepresentation(image, 0.8); - NSString *imagePath = - [NSString stringWithFormat:@"%@/%lld.jpg", - [FIRAuth auth].currentUser.uid, - (long long)([NSDate date].timeIntervalSince1970 * 1000.0)]; - FIRStorageMetadata *metadata = [FIRStorageMetadata new]; - metadata.contentType = @"image/jpeg"; - [[_storageRef child:imagePath] putData:imageData metadata:metadata - completion:^(FIRStorageMetadata * _Nullable metadata, NSError * _Nullable error) { - if (error) { - NSLog(@"Error uploading: %@", error); - return; - } - [self sendMessage:@{MessageFieldsimageURL:[_storageRef child:metadata.path].description}]; - }]; - } -} - -- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { - [picker dismissViewControllerAnimated:YES completion:NULL]; -} - -- (IBAction)signOut:(UIButton *)sender { - [self dismissViewControllerAnimated:YES completion:NULL]; -} - -- (void)showAlert:(NSString *)title message:(NSString *)message { - dispatch_async(dispatch_get_main_queue(), ^{ - UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction *dismissAction = [UIAlertAction actionWithTitle:@"Dismiss" style:UIAlertActionStyleDestructive handler:nil]; - [alert addAction:dismissAction]; - [self presentViewController:alert animated: true completion: nil]; - }); -} - -@end diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/Info.plist b/grow-ios-starter/objc-starter/FriendlyChatObjC/Info.plist deleted file mode 100644 index 730dcfd9..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/Info.plist +++ /dev/null @@ -1,72 +0,0 @@ - - - - - NSContactsUsageDescription - Used for Firebase Invites - NSCameraUsageDescription - Take and upload photos to Cloud Storage - NSPhotoLibraryUsageDescription - Upload photo to Cloud Storage - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - REVERSED_CLIENT_ID - - - - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIBackgroundModes - - remote-notification - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/Main.storyboard b/grow-ios-starter/objc-starter/FriendlyChatObjC/Main.storyboard deleted file mode 100644 index 9e97badb..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/Main.storyboard +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/MeasurementHelper.h b/grow-ios-starter/objc-starter/FriendlyChatObjC/MeasurementHelper.h deleted file mode 100644 index fc2fdce4..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/MeasurementHelper.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 - -@interface MeasurementHelper : NSObject - -+ (void)sendLoginEvent; -+ (void)sendLogoutEvent; -+ (void)sendMessageEvent; - -@end diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/MeasurementHelper.m b/grow-ios-starter/objc-starter/FriendlyChatObjC/MeasurementHelper.m deleted file mode 100644 index 63182e66..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/MeasurementHelper.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 "MeasurementHelper.h" - -@import Firebase; - -@implementation MeasurementHelper - -+ (void)sendLoginEvent { -} - -+ (void)sendLogoutEvent { -} - -+ (void)sendMessageEvent{ -} - -@end diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/SignInViewController.h b/grow-ios-starter/objc-starter/FriendlyChatObjC/SignInViewController.h deleted file mode 100644 index 4354dcdc..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/SignInViewController.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 UIKit; -@import GoogleSignIn; - -@interface SignInViewController : UIViewController - -@end diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/SignInViewController.m b/grow-ios-starter/objc-starter/FriendlyChatObjC/SignInViewController.m deleted file mode 100644 index c42a6fae..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/SignInViewController.m +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 "Constants.h" -#import "MeasurementHelper.h" -#import "SignInViewController.h" - -@import Firebase; - -@interface SignInViewController () -@property(weak, nonatomic) IBOutlet GIDSignInButton *signInButton; -@property(strong, nonatomic) FIRAuthStateDidChangeListenerHandle handle; -@end - -@implementation SignInViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - [GIDSignIn sharedInstance].presentingViewController = self; - [[GIDSignIn sharedInstance] restorePreviousSignIn]; - self.handle = [[FIRAuth auth] - addAuthStateDidChangeListener:^(FIRAuth *_Nonnull auth, FIRUser *_Nullable user) { - if (user) { - [MeasurementHelper sendLoginEvent]; - [self performSegueWithIdentifier:SeguesSignInToFp sender:nil]; - } - }]; -} - -- (void)dealloc { - [[FIRAuth auth] removeAuthStateDidChangeListener:_handle]; -} - -- (IBAction)signOut:(UIButton *)sender { - FIRAuth *firebaseAuth = [FIRAuth auth]; - NSError *signOutError; - BOOL status = [firebaseAuth signOut:&signOutError]; - if (!status) { - NSLog(@"Error signing out: %@", signOutError); - return; - } - [self dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/grow-ios-starter/objc-starter/FriendlyChatObjC/main.m b/grow-ios-starter/objc-starter/FriendlyChatObjC/main.m deleted file mode 100644 index f30ae42a..00000000 --- a/grow-ios-starter/objc-starter/FriendlyChatObjC/main.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) 2016 Google Inc. -// -// 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 -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/grow-ios-starter/objc-starter/Podfile b/grow-ios-starter/objc-starter/Podfile deleted file mode 100644 index 3e6c1229..00000000 --- a/grow-ios-starter/objc-starter/Podfile +++ /dev/null @@ -1,15 +0,0 @@ -# FriendlyChat Codelab - -platform :ios, '8.0' - -pod 'GoogleSignIn' -pod 'Firebase/Core' -pod 'Firebase/Auth' -pod 'Firebase/Crashlytics' -pod 'Firebase/Database' -pod 'Firebase/InAppMessagingDisplay' -pod 'Firebase/RemoteConfig' -pod 'Firebase/Storage' - -target 'FriendlyChatObjC' do -end diff --git a/grow-ios-starter/objc-starter/Podfile.lock b/grow-ios-starter/objc-starter/Podfile.lock deleted file mode 100644 index 14c92be7..00000000 --- a/grow-ios-starter/objc-starter/Podfile.lock +++ /dev/null @@ -1,230 +0,0 @@ -PODS: - - AppAuth (1.6.0): - - AppAuth/Core (= 1.6.0) - - AppAuth/ExternalUserAgent (= 1.6.0) - - AppAuth/Core (1.6.0) - - AppAuth/ExternalUserAgent (1.6.0): - - AppAuth/Core - - Firebase/Auth (6.15.0): - - Firebase/CoreOnly - - FirebaseAuth (~> 6.4.2) - - Firebase/Core (6.15.0): - - Firebase/CoreOnly - - FirebaseAnalytics (= 6.2.1) - - Firebase/CoreOnly (6.15.0): - - FirebaseCore (= 6.6.0) - - Firebase/Crashlytics (6.15.0): - - Firebase/CoreOnly - - FirebaseCrashlytics (~> 4.0.0-beta.1) - - Firebase/Database (6.15.0): - - Firebase/CoreOnly - - FirebaseDatabase (~> 6.1.4) - - Firebase/InAppMessagingDisplay (6.15.0): - - Firebase/CoreOnly - - FirebaseInAppMessagingDisplay (~> 0.15.5) - - Firebase/RemoteConfig (6.15.0): - - Firebase/CoreOnly - - FirebaseRemoteConfig (~> 4.4.6) - - Firebase/Storage (6.15.0): - - Firebase/CoreOnly - - FirebaseStorage (~> 3.5.0) - - FirebaseABTesting (3.2.0): - - FirebaseAnalyticsInterop (~> 1.3) - - FirebaseCore (~> 6.1) - - Protobuf (>= 3.9.2, ~> 3.9) - - FirebaseAnalytics (6.2.1): - - FirebaseCore (~> 6.6) - - FirebaseInstanceID (~> 4.3) - - GoogleAppMeasurement (= 6.2.1) - - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - - GoogleUtilities/MethodSwizzler (~> 6.0) - - GoogleUtilities/Network (~> 6.0) - - "GoogleUtilities/NSData+zlib (~> 6.0)" - - nanopb (= 0.3.9011) - - FirebaseAnalyticsInterop (1.5.0) - - FirebaseAuth (6.4.3): - - FirebaseAuthInterop (~> 1.0) - - FirebaseCore (~> 6.6) - - GoogleUtilities/AppDelegateSwizzler (~> 6.5) - - GoogleUtilities/Environment (~> 6.5) - - GTMSessionFetcher/Core (~> 1.1) - - FirebaseAuthInterop (1.1.0) - - FirebaseCore (6.6.0): - - FirebaseCoreDiagnostics (~> 1.2) - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) - - FirebaseCoreDiagnostics (1.2.4): - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleDataTransportCCTSupport (~> 3.0) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) - - nanopb (~> 0.3.901) - - FirebaseCoreDiagnosticsInterop (1.2.0) - - FirebaseCrashlytics (4.0.0): - - FirebaseAnalyticsInterop (~> 1.2) - - FirebaseCore (~> 6.6) - - FirebaseInstallations (~> 1.1) - - GoogleDataTransport (~> 6.0) - - GoogleDataTransportCCTSupport (~> 3.0) - - nanopb (~> 0.3.901) - - PromisesObjC (~> 1.2) - - FirebaseDatabase (6.1.4): - - FirebaseAuthInterop (~> 1.0) - - FirebaseCore (~> 6.0) - - leveldb-library (~> 1.22) - - FirebaseInAppMessaging (0.15.3): - - FirebaseAnalyticsInterop (~> 1.3) - - FirebaseCore (~> 6.2) - - FirebaseInstanceID (~> 4.0) - - FirebaseInAppMessagingDisplay (0.15.5): - - FirebaseCore (~> 6.2) - - FirebaseInAppMessaging (>= 0.15.0) - - FirebaseInstallations (1.3.0): - - FirebaseCore (~> 6.6) - - GoogleUtilities/Environment (~> 6.6) - - GoogleUtilities/UserDefaults (~> 6.6) - - PromisesObjC (~> 1.2) - - FirebaseInstanceID (4.3.4): - - FirebaseCore (~> 6.6) - - FirebaseInstallations (~> 1.0) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/UserDefaults (~> 6.5) - - FirebaseRemoteConfig (4.4.11): - - FirebaseABTesting (~> 3.1) - - FirebaseAnalyticsInterop (~> 1.4) - - FirebaseCore (~> 6.2) - - FirebaseInstallations (~> 1.1) - - GoogleUtilities/Environment (~> 6.2) - - "GoogleUtilities/NSData+zlib (~> 6.2)" - - Protobuf (>= 3.9.2, ~> 3.9) - - FirebaseStorage (3.5.0): - - FirebaseAuthInterop (~> 1.0) - - FirebaseCore (~> 6.0) - - GTMSessionFetcher/Core (~> 1.1) - - GoogleAppMeasurement (6.2.1): - - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - - GoogleUtilities/MethodSwizzler (~> 6.0) - - GoogleUtilities/Network (~> 6.0) - - "GoogleUtilities/NSData+zlib (~> 6.0)" - - nanopb (= 0.3.9011) - - GoogleDataTransport (6.2.1) - - GoogleDataTransportCCTSupport (3.0.0): - - GoogleDataTransport (~> 6.0) - - nanopb (~> 0.3.901) - - GoogleSignIn (5.0.2): - - AppAuth (~> 1.2) - - GTMAppAuth (~> 1.0) - - GTMSessionFetcher/Core (~> 1.1) - - GoogleUtilities/AppDelegateSwizzler (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (6.7.2): - - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (6.7.2): - - GoogleUtilities/Logger - - GoogleUtilities/Network (6.7.2): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (6.7.2)" - - GoogleUtilities/Reachability (6.7.2): - - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (6.7.2): - - GoogleUtilities/Logger - - GTMAppAuth (1.1.0): - - AppAuth/Core (~> 1.4) - - GTMSessionFetcher (~> 1.4) - - GTMSessionFetcher (1.4.0): - - GTMSessionFetcher/Full (= 1.4.0) - - GTMSessionFetcher/Core (1.4.0) - - GTMSessionFetcher/Full (1.4.0): - - GTMSessionFetcher/Core (= 1.4.0) - - leveldb-library (1.22.1) - - nanopb (0.3.9011): - - nanopb/decode (= 0.3.9011) - - nanopb/encode (= 0.3.9011) - - nanopb/decode (0.3.9011) - - nanopb/encode (0.3.9011) - - PromisesObjC (1.2.10) - - Protobuf (3.13.0) - -DEPENDENCIES: - - Firebase/Auth - - Firebase/Core - - Firebase/Crashlytics - - Firebase/Database - - Firebase/InAppMessagingDisplay - - Firebase/RemoteConfig - - Firebase/Storage - - GoogleSignIn - -SPEC REPOS: - trunk: - - AppAuth - - Firebase - - FirebaseABTesting - - FirebaseAnalytics - - FirebaseAnalyticsInterop - - FirebaseAuth - - FirebaseAuthInterop - - FirebaseCore - - FirebaseCoreDiagnostics - - FirebaseCoreDiagnosticsInterop - - FirebaseCrashlytics - - FirebaseDatabase - - FirebaseInAppMessaging - - FirebaseInAppMessagingDisplay - - FirebaseInstallations - - FirebaseInstanceID - - FirebaseRemoteConfig - - FirebaseStorage - - GoogleAppMeasurement - - GoogleDataTransport - - GoogleDataTransportCCTSupport - - GoogleSignIn - - GoogleUtilities - - GTMAppAuth - - GTMSessionFetcher - - leveldb-library - - nanopb - - PromisesObjC - - Protobuf - -SPEC CHECKSUMS: - AppAuth: 8fca6b5563a5baef2c04bee27538025e4ceb2add - Firebase: 5d77105d9740a07ca6b16927ca971db7e860faaf - FirebaseABTesting: 821a3a3e4a145987e80fee3657c4de1cb9adf693 - FirebaseAnalytics: e83e64b1231dedcd9ddd4bdecd9bcfd6ba341679 - FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae - FirebaseAuth: 5ce2b03a3d7fe56b7a6e4c5ec7ff1522890b1d6f - FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9 - FirebaseCore: 4aeb81ff53dcd9a3634ca725dc1fb8c2a4622046 - FirebaseCoreDiagnostics: b59c024493a409f8aecba02c99928d0d8431d159 - FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 - FirebaseCrashlytics: 941608d2a3475b48fb7010b998703d07696b8db1 - FirebaseDatabase: 0144e0706a4761f1b0e8679572eba8095ddb59be - FirebaseInAppMessaging: 5db5fa181ed4215e02ded09f7e4bbcc2ce624a47 - FirebaseInAppMessagingDisplay: 60a65c8277f17675a8a5b92e9a97cd914b45d4ff - FirebaseInstallations: 6f5f680e65dc374397a483c32d1799ba822a395b - FirebaseInstanceID: cef67c4967c7cecb56ea65d8acbb4834825c587b - FirebaseRemoteConfig: 3d189cf0c3c5abc0c924ef1cce60c4add8d3262c - FirebaseStorage: 6c5263796af3b1be82ed173598aade47535fe125 - GoogleAppMeasurement: a08a43b8677b95ed51fcef880e36737334d804fd - GoogleDataTransport: 9a8a16f79feffc7f42096743de2a7c4815e84020 - GoogleDataTransportCCTSupport: 0f39025e8cf51f168711bd3fb773938d7e62ddb5 - GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213 - GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 - GTMAppAuth: 197a8dabfea5d665224aa00d17f164fc2248dab9 - GTMSessionFetcher: 6f5c8abbab8a9bce4bb3f057e317728ec6182b10 - leveldb-library: 50c7b45cbd7bf543c81a468fe557a16ae3db8729 - nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd - PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151 - Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748 - -PODFILE CHECKSUM: fea00eef5ea96a18c9030e342fb1300022a9929c - -COCOAPODS: 1.15.2 diff --git a/grow-ios-starter/objc-starter/shared/Bladefile b/grow-ios-starter/objc-starter/shared/Bladefile deleted file mode 100644 index 6332a0b5..00000000 --- a/grow-ios-starter/objc-starter/shared/Bladefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# Uncomment below to specify your own resources. -# See https://github.com/jondot/blade for more information. -# - -blades: - - source: assets/logo1024.png - mount: Images.xcassets/AppIcon.appiconset - contents: true - - source: assets/logo1024.png - mount: Images.xcassets/Logo.imageset diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png deleted file mode 100644 index 5779681c..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png deleted file mode 100644 index 451dedeb..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png deleted file mode 100644 index a4e88111..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png deleted file mode 100644 index 9dd85950..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 10f123d6..00000000 --- a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "images": [ - { - "filename": "logo1024-iphone-29@2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "29x29" - }, - { - "filename": "logo1024-iphone-29@3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "29x29" - }, - { - "filename": "logo1024-iphone-40@2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "40x40" - }, - { - "filename": "logo1024-iphone-40@3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "40x40" - }, - { - "filename": "AppIcon-60-2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "60x60" - }, - { - "filename": "AppIcon-60-3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "60x60" - }, - { - "filename": "logo1024-ipad-29@1x.png", - "idiom": "ipad", - "scale": "1x", - "size": "29x29" - }, - { - "filename": "logo1024-ipad-29@2x.png", - "idiom": "ipad", - "scale": "2x", - "size": "29x29" - }, - { - "filename": "logo1024-ipad-40@1x.png", - "idiom": "ipad", - "scale": "1x", - "size": "40x40" - }, - { - "filename": "logo1024-ipad-40@2x.png", - "idiom": "ipad", - "scale": "2x", - "size": "40x40" - }, - { - "filename": "AppIcon-76.png", - "idiom": "ipad", - "scale": "1x", - "size": "76x76" - }, - { - "filename": "AppIcon-76-2x.png", - "idiom": "ipad", - "scale": "2x", - "size": "76x76" - }, - { - "filename": "logo1024-ipad-83@2x.png", - "idiom": "ipad", - "scale": "2x", - "size": "83.5x83.5" - } - ], - "info": { - "author": "xcode", - "version": 1 - } -} \ No newline at end of file diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png deleted file mode 100644 index c3252dac..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png deleted file mode 100644 index a51aed88..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png deleted file mode 100644 index 6c930900..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png deleted file mode 100644 index 9167b50c..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png deleted file mode 100644 index 300a49e6..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png deleted file mode 100644 index a51aed88..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png deleted file mode 100644 index e51af9a6..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png deleted file mode 100644 index 9167b50c..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png deleted file mode 100644 index 5779681c..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/Brand Assets.launchimage/Contents.json b/grow-ios-starter/objc-starter/shared/Images.xcassets/Brand Assets.launchimage/Contents.json deleted file mode 100644 index a0ad363c..00000000 --- a/grow-ios-starter/objc-starter/shared/Images.xcassets/Brand Assets.launchimage/Contents.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/Contents.json b/grow-ios-starter/objc-starter/shared/Images.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/grow-ios-starter/objc-starter/shared/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/LaunchImage.launchimage/Contents.json b/grow-ios-starter/objc-starter/shared/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index 3dd8aa5b..00000000 --- a/grow-ios-starter/objc-starter/shared/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "8.0", - "subtype" : "736h", - "scale" : "3x" - }, - { - "orientation" : "landscape", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "8.0", - "subtype" : "736h", - "scale" : "3x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "8.0", - "subtype" : "667h", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/Contents.json b/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/Contents.json deleted file mode 100644 index 92d797ce..00000000 --- a/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "logo1024-universal-341@1x.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "logo1024-universal-341@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "logo1024-universal-341@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png deleted file mode 100644 index 0dae4835..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png deleted file mode 100644 index cf3f0001..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png deleted file mode 100644 index 0541acfa..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/Contents.json b/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/Contents.json deleted file mode 100644 index 9239c1bc..00000000 --- a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "filename": "ic_account_circle.png", - "idiom": "universal", - "scale": "1x" - }, - { - "filename": "ic_account_circle_2x.png", - "idiom": "universal", - "scale": "2x" - }, - { - "filename": "ic_account_circle_3x.png", - "idiom": "universal", - "scale": "3x" - } - ], - "info": { - "author": "xcode", - "version": 1 - } -} diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle.png deleted file mode 100644 index 0c1202de..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_2x.png deleted file mode 100644 index f26b201a..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_3x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_3x.png deleted file mode 100644 index 3cc0a63e..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_3x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/Contents.json b/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/Contents.json deleted file mode 100644 index 7b8af074..00000000 --- a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "filename": "ic_add_a_photo.png", - "idiom": "universal", - "scale": "1x" - }, - { - "filename": "ic_add_a_photo_2x.png", - "idiom": "universal", - "scale": "2x" - }, - { - "filename": "ic_add_a_photo_3x.png", - "idiom": "universal", - "scale": "3x" - } - ], - "info": { - "author": "xcode", - "version": 1 - } -} diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo.png deleted file mode 100644 index 629354d8..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_2x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_2x.png deleted file mode 100644 index 85d97f0a..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_2x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_3x.png b/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_3x.png deleted file mode 100644 index 31dd5ebf..00000000 Binary files a/grow-ios-starter/objc-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_3x.png and /dev/null differ diff --git a/grow-ios-starter/objc-starter/shared/LaunchScreen.xib b/grow-ios-starter/objc-starter/shared/LaunchScreen.xib deleted file mode 100644 index e2d42c62..00000000 --- a/grow-ios-starter/objc-starter/shared/LaunchScreen.xib +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/grow-ios-starter/objc-starter/shared/assets/logo1024.png b/grow-ios-starter/objc-starter/shared/assets/logo1024.png deleted file mode 100644 index 126686c8..00000000 Binary files a/grow-ios-starter/objc-starter/shared/assets/logo1024.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/project.pbxproj b/grow-ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/project.pbxproj deleted file mode 100644 index 5f777da2..00000000 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/project.pbxproj +++ /dev/null @@ -1,430 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 107960731C612531003DB6CC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 107960711C612531003DB6CC /* Main.storyboard */; }; - 10AF4CDB1DD23A7E0096D192 /* logo1024.png in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CD71DD23A7E0096D192 /* logo1024.png */; }; - 10AF4CDC1DD23A7E0096D192 /* Bladefile in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CD81DD23A7E0096D192 /* Bladefile */; }; - 10AF4CDD1DD23A7E0096D192 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CD91DD23A7E0096D192 /* Images.xcassets */; }; - 10AF4CDE1DD23A7E0096D192 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CDA1DD23A7E0096D192 /* LaunchScreen.xib */; }; - 2C595F061B34B73A00355AE7 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C595F041B34B73A00355AE7 /* Constants.swift */; }; - 2C8E6C2B1B16875B0073CE3D /* SignInViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */; }; - 2CA807BC1B21702E009AD7F2 /* MeasurementHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */; }; - 5F5A537E1ADE67D500F81DF0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */; }; - 5F5A53801ADE67D500F81DF0 /* FCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1037935F1BF4256400C88958 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = Pods/Firebase/Headers/module.modulemap; sourceTree = ""; }; - 107960721C612531003DB6CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 107960741C61253B003DB6CC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 10AF4CD71DD23A7E0096D192 /* logo1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo1024.png; sourceTree = ""; }; - 10AF4CD81DD23A7E0096D192 /* Bladefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Bladefile; sourceTree = ""; }; - 10AF4CD91DD23A7E0096D192 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 10AF4CDA1DD23A7E0096D192 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; - 2C595F041B34B73A00355AE7 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; - 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignInViewController.swift; sourceTree = ""; }; - 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeasurementHelper.swift; sourceTree = ""; }; - 3210DFA2214B11430080C380 /* FriendlyChatSwift.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FriendlyChatSwift.entitlements; sourceTree = ""; }; - 5F5A53791ADE67D500F81DF0 /* FriendlyChatSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FriendlyChatSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FCViewController.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 5F5A53761ADE67D500F81DF0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 10AF4CD51DD23A7E0096D192 /* shared */ = { - isa = PBXGroup; - children = ( - 10AF4CD61DD23A7E0096D192 /* assets */, - 10AF4CD81DD23A7E0096D192 /* Bladefile */, - 10AF4CD91DD23A7E0096D192 /* Images.xcassets */, - 10AF4CDA1DD23A7E0096D192 /* LaunchScreen.xib */, - ); - path = shared; - sourceTree = ""; - }; - 10AF4CD61DD23A7E0096D192 /* assets */ = { - isa = PBXGroup; - children = ( - 10AF4CD71DD23A7E0096D192 /* logo1024.png */, - ); - path = assets; - sourceTree = ""; - }; - 5855E1FD55ACF10849B621A3 /* Pods */ = { - isa = PBXGroup; - children = ( - ); - path = Pods; - sourceTree = ""; - }; - 5F5A53431ADE670C00F81DF0 = { - isa = PBXGroup; - children = ( - 10AF4CD51DD23A7E0096D192 /* shared */, - 5F5A537A1ADE67D500F81DF0 /* FriendlyChatSwift */, - 5F5A534D1ADE670C00F81DF0 /* Products */, - AD1F1C80A93A096F652504F5 /* Frameworks */, - 5855E1FD55ACF10849B621A3 /* Pods */, - ); - sourceTree = ""; - }; - 5F5A534D1ADE670C00F81DF0 /* Products */ = { - isa = PBXGroup; - children = ( - 5F5A53791ADE67D500F81DF0 /* FriendlyChatSwift.app */, - ); - name = Products; - sourceTree = ""; - }; - 5F5A537A1ADE67D500F81DF0 /* FriendlyChatSwift */ = { - isa = PBXGroup; - children = ( - 3210DFA2214B11430080C380 /* FriendlyChatSwift.entitlements */, - 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */, - 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */, - 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */, - 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */, - 2C595F041B34B73A00355AE7 /* Constants.swift */, - 5F5A537B1ADE67D500F81DF0 /* Supporting Files */, - ); - path = FriendlyChatSwift; - sourceTree = ""; - }; - 5F5A537B1ADE67D500F81DF0 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 107960711C612531003DB6CC /* Main.storyboard */, - 107960741C61253B003DB6CC /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - AD1F1C80A93A096F652504F5 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1037935F1BF4256400C88958 /* module.modulemap */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 5F5A53781ADE67D500F81DF0 /* FriendlyChatSwift */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5F5A53991ADE67D500F81DF0 /* Build configuration list for PBXNativeTarget "FriendlyChatSwift" */; - buildPhases = ( - 5F5A53751ADE67D500F81DF0 /* Sources */, - 5F5A53761ADE67D500F81DF0 /* Frameworks */, - 5F5A53771ADE67D500F81DF0 /* Resources */, - 32C13C982154267900D092D0 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = FriendlyChatSwift; - productName = FriendlyPingSwift; - productReference = 5F5A53791ADE67D500F81DF0 /* FriendlyChatSwift.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 5F5A53441ADE670C00F81DF0 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 1130; - ORGANIZATIONNAME = "Google Inc."; - TargetAttributes = { - 5F5A53781ADE67D500F81DF0 = { - CreatedOnToolsVersion = 6.3; - LastSwiftMigration = 1110; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.BackgroundModes = { - enabled = 0; - }; - com.apple.SafariKeychain = { - enabled = 1; - }; - }; - }; - }; - }; - buildConfigurationList = 5F5A53471ADE670C00F81DF0 /* Build configuration list for PBXProject "FriendlyChatSwift" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 5F5A53431ADE670C00F81DF0; - productRefGroup = 5F5A534D1ADE670C00F81DF0 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 5F5A53781ADE67D500F81DF0 /* FriendlyChatSwift */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 5F5A53771ADE67D500F81DF0 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 10AF4CDE1DD23A7E0096D192 /* LaunchScreen.xib in Resources */, - 10AF4CDC1DD23A7E0096D192 /* Bladefile in Resources */, - 10AF4CDD1DD23A7E0096D192 /* Images.xcassets in Resources */, - 107960731C612531003DB6CC /* Main.storyboard in Resources */, - 10AF4CDB1DD23A7E0096D192 /* logo1024.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 32C13C982154267900D092D0 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 5F5A53751ADE67D500F81DF0 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C8E6C2B1B16875B0073CE3D /* SignInViewController.swift in Sources */, - 5F5A53801ADE67D500F81DF0 /* FCViewController.swift in Sources */, - 5F5A537E1ADE67D500F81DF0 /* AppDelegate.swift in Sources */, - 2CA807BC1B21702E009AD7F2 /* MeasurementHelper.swift in Sources */, - 2C595F061B34B73A00355AE7 /* Constants.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 107960711C612531003DB6CC /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 107960721C612531003DB6CC /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 5F5A536D1ADE670C00F81DF0 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_ENTITLEMENTS[sdk=*]" = FriendlyChatSwift/FriendlyChatSwift.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer: Google Development (3F4Y5873JF)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Google Development (3F4Y5873JF)"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - 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 = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE = "65c2088b-2425-4961-b6d5-0256d4790678"; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 5F5A536E1ADE670C00F81DF0 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer: Google Development (3F4Y5873JF)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Google Development (3F4Y5873JF)"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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 = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - PROVISIONING_PROFILE = "65c2088b-2425-4961-b6d5-0256d4790678"; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 5F5A53951ADE67D500F81DF0 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "$(SRCROOT)/FriendlyChatSwift/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.google.GCMTestApp.dev; - PRODUCT_NAME = FriendlyChatSwift; - PROVISIONING_PROFILE = ""; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OBJC_BRIDGING_HEADER = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 5F5A53961ADE67D500F81DF0 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = EQHXZ8M8AV; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = "$(SRCROOT)/FriendlyChatSwift/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.GrowFriendlyChat; - PRODUCT_NAME = FriendlyChatSwift; - PROVISIONING_PROFILE = ""; - PROVISIONING_PROFILE_SPECIFIER = "Google Development"; - SWIFT_OBJC_BRIDGING_HEADER = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 5F5A53471ADE670C00F81DF0 /* Build configuration list for PBXProject "FriendlyChatSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F5A536D1ADE670C00F81DF0 /* Debug */, - 5F5A536E1ADE670C00F81DF0 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5F5A53991ADE67D500F81DF0 /* Build configuration list for PBXNativeTarget "FriendlyChatSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F5A53951ADE67D500F81DF0 /* Debug */, - 5F5A53961ADE67D500F81DF0 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 5F5A53441ADE670C00F81DF0 /* Project object */; -} diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwift.xcscheme b/grow-ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwift.xcscheme deleted file mode 100644 index d47d7639..00000000 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwift.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift/AppDelegate.swift b/grow-ios-starter/swift-starter/FriendlyChatSwift/AppDelegate.swift deleted file mode 100644 index f186456e..00000000 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift/AppDelegate.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 UIKit - -import Firebase -import GoogleSignIn - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate { - - var window: UIWindow? - - @available(iOS 9.0, *) - func application(_ application: UIApplication, - open url: URL, - options: [UIApplication.OpenURLOptionsKey : Any]) - -> Bool { - if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) { - // Handle the deep link. For example, show the deep-linked content or - // apply a promotional offer to the user's account. - // ... - print(dynamicLink.url) - return true - } - return GIDSignIn.sharedInstance().handle(url) - } - - func application(_ application: UIApplication, continue userActivity: NSUserActivity, - restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { - let handled = DynamicLinks.dynamicLinks().handleUniversalLink(userActivity.webpageURL!) { (dynamiclink, error) in - print(dynamiclink?.url ?? "no dynamic url found") - } - return handled - } - - func application(_ application: UIApplication, didFinishLaunchingWithOptions - launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - FirebaseApp.configure() - GIDSignIn.sharedInstance().clientID = FirebaseApp.app()?.options.clientID - GIDSignIn.sharedInstance().delegate = self - return true - } - - func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error?) { - if let error = error { - print("Error \(error)") - return - } - guard let authentication = user.authentication else { return } - let credential = GoogleAuthProvider.credential(withIDToken: authentication.idToken, - accessToken: authentication.accessToken) - Auth.auth().signIn(with: credential) { (user, error) in - if let error = error { - print("Error \(error)") - return - } - } - } -} diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift/Base.lproj/Main.storyboard b/grow-ios-starter/swift-starter/FriendlyChatSwift/Base.lproj/Main.storyboard deleted file mode 100644 index 456ab802..00000000 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift/Base.lproj/Main.storyboard +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift/Constants.swift b/grow-ios-starter/swift-starter/FriendlyChatSwift/Constants.swift deleted file mode 100644 index 3ed31d06..00000000 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift/Constants.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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. -// - -struct Constants { - - struct NotificationKeys { - static let SignedIn = "onSignInCompleted" - } - - struct Segues { - static let SignInToFp = "SignInToFP" - static let FpToSignIn = "FPToSignIn" - } - - struct MessageFields { - static let name = "name" - static let text = "text" - static let photoURL = "photoURL" - static let imageURL = "imageURL" - } -} diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift b/grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift deleted file mode 100644 index b476d1cb..00000000 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift +++ /dev/null @@ -1,271 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 Photos -import UIKit - -import Firebase -import GoogleMobileAds - -/** - * AdMob ad unit IDs are not currently stored inside the google-services.plist file. Developers - * using AdMob can store them as custom values in another plist, or simply use constants. Note that - * these ad units are configured to return only test ads, and should not be used outside this sample. - */ -let kBannerAdUnitID = "ca-app-pub-3940256099942544/2934735716" - -@objc(FCViewController) -class FCViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, - UITextFieldDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate { - - // Instance variables - @IBOutlet weak var textField: UITextField! - @IBOutlet weak var sendButton: UIButton! - var ref: DatabaseReference! - var messages: [DataSnapshot]! = [] - var msglength: NSNumber = 10 - fileprivate var _refHandle: DatabaseHandle! - - var storageRef: StorageReference! - var remoteConfig: RemoteConfig! - - @IBOutlet weak var banner: GADBannerView! - @IBOutlet weak var clientTable: UITableView! - - override func viewDidLoad() { - super.viewDidLoad() - - self.clientTable.register(UITableViewCell.self, forCellReuseIdentifier: "tableViewCell") - - configureDatabase() - configureStorage() - configureRemoteConfig() - fetchConfig() - loadAd() - } - - deinit { - if let refHandle = _refHandle { - self.ref.child("messages").removeObserver(withHandle: _refHandle) - } - } - - func configureDatabase() { - ref = Database.database().reference() - // Listen for new messages in the Firebase database - _refHandle = self.ref.child("messages").observe(.childAdded, with: { [weak self] (snapshot) -> Void in - guard let strongSelf = self else { return } - strongSelf.messages.append(snapshot) - strongSelf.clientTable.insertRows(at: [IndexPath(row: strongSelf.messages.count-1, section: 0)], with: .automatic) - }) - } - - func configureStorage() { - storageRef = Storage.storage().reference() - } - - func configureRemoteConfig() { - } - - func fetchConfig() { - } - - @IBAction func didPressFreshConfig(_ sender: AnyObject) { - InstanceID.instanceID().instanceID { (result, error) in - if let error = error { - print("Error fetching remote instange ID: \(error)") - } else if let result = result { - print("Remote instance ID token: \(result.token)") - } - } - fetchConfig() - } - - @IBAction func didSendMessage(_ sender: UIButton) { - _ = textFieldShouldReturn(textField) - } - - @IBAction func didPressCrash(_ sender: AnyObject) { - } - - @IBAction func inviteTapped(_ sender: AnyObject) { - } - - func loadAd() { - } - - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { - guard let text = textField.text else { return true } - - let newLength = text.count + string.count - range.length - return newLength <= self.msglength.intValue // Bool - } - - // UITableViewDataSource protocol methods - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return messages.count - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - // Dequeue cell - let cell = self.clientTable .dequeueReusableCell(withIdentifier: "tableViewCell", for: indexPath) - // Unpack message from Firebase DataSnapshot - let messageSnapshot: DataSnapshot! = self.messages[indexPath.row] - guard let message = messageSnapshot.value as? [String:String] else { return cell } - let name = message[Constants.MessageFields.name] ?? "" - if let imageURL = message[Constants.MessageFields.imageURL] { - if imageURL.hasPrefix("gs://") { - Storage.storage().reference(forURL: imageURL).getData(maxSize: INT64_MAX) {(data, error) in - if let error = error { - print("Error downloading: \(error)") - return - } - DispatchQueue.main.async { - cell.imageView?.image = UIImage.init(data: data!) - cell.setNeedsLayout() - } - } - } else if let URL = URL(string: imageURL), let data = try? Data(contentsOf: URL) { - cell.imageView?.image = UIImage.init(data: data) - } - cell.textLabel?.text = "sent by: \(name)" - } else { - let text = message[Constants.MessageFields.text] ?? "" - cell.textLabel?.text = name + ": " + text - cell.imageView?.image = UIImage(named: "ic_account_circle") - if let photoURL = message[Constants.MessageFields.photoURL], let URL = URL(string: photoURL), - let data = try? Data(contentsOf: URL) { - cell.imageView?.image = UIImage(data: data) - } - } - return cell - } - - // UITextViewDelegate protocol methods - func textFieldShouldReturn(_ textField: UITextField) -> Bool { - guard let text = textField.text else { return true } - textField.text = "" - view.endEditing(true) - let data = [Constants.MessageFields.text: text] - sendMessage(withData: data) - return true - } - - func sendMessage(withData data: [String: String]) { - var mdata = data - mdata[Constants.MessageFields.name] = Auth.auth().currentUser?.displayName - if let photoURL = Auth.auth().currentUser?.photoURL { - mdata[Constants.MessageFields.photoURL] = photoURL.absoluteString - } - - // Push data to Firebase Database - self.ref.child("messages").childByAutoId().setValue(mdata) - MeasurementHelper.sendMessageEvent() - } - - // MARK: - Image Picker - - @IBAction func didTapAddPhoto(_ sender: AnyObject) { - let picker = UIImagePickerController() - picker.delegate = self - if UIImagePickerController.isSourceTypeAvailable(UIImagePickerController.SourceType.camera) { - picker.sourceType = UIImagePickerController.SourceType.camera - } else { - picker.sourceType = UIImagePickerController.SourceType.photoLibrary - } - - present(picker, animated: true, completion:nil) - } - - func imagePickerController(_ picker: UIImagePickerController, - didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { -// Local variable inserted by Swift 4.2 migrator. -let info = convertFromUIImagePickerControllerInfoKeyDictionary(info) - - picker.dismiss(animated: true, completion:nil) - guard let uid = Auth.auth().currentUser?.uid else { return } - - // if it's a photo from the library, not an image from the camera - if #available(iOS 8.0, *), let referenceURL = info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.referenceURL)] as? URL { - let assets = PHAsset.fetchAssets(withALAssetURLs: [referenceURL], options: nil) - let asset = assets.firstObject - asset?.requestContentEditingInput(with: nil, completionHandler: { [weak self] (contentEditingInput, info) in - let imageFile = contentEditingInput?.fullSizeImageURL - let filePath = "\(uid)/\(Int(Date.timeIntervalSinceReferenceDate * 1000))/\((referenceURL as AnyObject).lastPathComponent!)" - guard let strongSelf = self else { return } - strongSelf.storageRef.child(filePath) - .putFile(from: imageFile!, metadata: nil) { (metadata, error) in - if let error = error { - let nsError = error as NSError - print("Error uploading: \(nsError.localizedDescription)") - return - } - strongSelf.sendMessage(withData: [Constants.MessageFields.imageURL: strongSelf.storageRef.child((metadata?.path)!).description]) - } - }) - } else { - guard let image = info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.originalImage)] as? UIImage else { return } - let imageData = image.jpegData(compressionQuality: 0.8) - let imagePath = "\(uid)/\(Int(Date.timeIntervalSinceReferenceDate * 1000)).jpg" - let metadata = StorageMetadata() - metadata.contentType = "image/jpeg" - self.storageRef.child(imagePath) - .putData(imageData!, metadata: metadata) { [weak self] (metadata, error) in - if let error = error { - print("Error uploading: \(error)") - return - } - guard let strongSelf = self else { return } - strongSelf.sendMessage(withData: [Constants.MessageFields.imageURL: strongSelf.storageRef.child((metadata?.path)!).description]) - } - } - } - - func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { - picker.dismiss(animated: true, completion:nil) - } - - @IBAction func signOut(_ sender: UIButton) { - let firebaseAuth = Auth.auth() - do { - try firebaseAuth.signOut() - dismiss(animated: true, completion: nil) - } catch let signOutError as NSError { - print ("Error signing out: \(signOutError.localizedDescription)") - } - } - - func showAlert(withTitle title: String, message: String) { - DispatchQueue.main.async { - let alert = UIAlertController(title: title, - message: message, preferredStyle: .alert) - let dismissAction = UIAlertAction(title: "Dismiss", style: .destructive, handler: nil) - alert.addAction(dismissAction) - self.present(alert, animated: true, completion: nil) - } - } - -} - -// Helper function inserted by Swift 4.2 migrator. -fileprivate func convertFromUIImagePickerControllerInfoKeyDictionary(_ input: [UIImagePickerController.InfoKey: Any]) -> [String: Any] { - return Dictionary(uniqueKeysWithValues: input.map {key, value in (key.rawValue, value)}) -} - -// Helper function inserted by Swift 4.2 migrator. -fileprivate func convertFromUIImagePickerControllerInfoKey(_ input: UIImagePickerController.InfoKey) -> String { - return input.rawValue -} diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift/Info.plist b/grow-ios-starter/swift-starter/FriendlyChatSwift/Info.plist deleted file mode 100644 index 7285449d..00000000 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift/Info.plist +++ /dev/null @@ -1,59 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleURLTypes - - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSCameraUsageDescription - Take and upload photos to Cloud Storage - NSContactsUsageDescription - Used for Firebase Invites - NSPhotoLibraryUsageDescription - Upload photo to Cloud Storage - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift/SignInViewController.swift b/grow-ios-starter/swift-starter/FriendlyChatSwift/SignInViewController.swift deleted file mode 100644 index 85116794..00000000 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift/SignInViewController.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 UIKit - -import Firebase -import GoogleSignIn - -@objc(SignInViewController) -class SignInViewController: UIViewController { - @IBOutlet weak var signInButton: GIDSignInButton! - var handle: AuthStateDidChangeListenerHandle? - - override func viewDidLoad() { - super.viewDidLoad() - GIDSignIn.sharedInstance()?.presentingViewController = self - GIDSignIn.sharedInstance()?.restorePreviousSignIn() - handle = Auth.auth().addStateDidChangeListener() { (auth, user) in - if user != nil { - MeasurementHelper.sendLoginEvent() - self.performSegue(withIdentifier: Constants.Segues.SignInToFp, sender: nil) - } - } - } - - deinit { - if let handle = handle { - Auth.auth().removeStateDidChangeListener(handle) - } - } -} diff --git a/grow-ios-starter/swift-starter/Podfile b/grow-ios-starter/swift-starter/Podfile deleted file mode 100644 index a00b1e63..00000000 --- a/grow-ios-starter/swift-starter/Podfile +++ /dev/null @@ -1,18 +0,0 @@ -# FriendlyChat Codelab - -use_frameworks! -platform :ios, '8.0' - -pod 'GoogleSignIn' -pod 'Firebase/Core' -pod 'Firebase/DynamicLinks' -pod 'Firebase/Crashlytics' -pod 'Firebase/AdMob' -pod 'Firebase/Auth' -pod 'Firebase/Database' -pod 'Firebase/InAppMessagingDisplay' -pod 'Firebase/RemoteConfig' -pod 'Firebase/Storage' - -target 'FriendlyChatSwift' do -end diff --git a/grow-ios-starter/swift-starter/Podfile.lock b/grow-ios-starter/swift-starter/Podfile.lock deleted file mode 100644 index 744dafdf..00000000 --- a/grow-ios-starter/swift-starter/Podfile.lock +++ /dev/null @@ -1,247 +0,0 @@ -PODS: - - AppAuth (1.6.0): - - AppAuth/Core (= 1.6.0) - - AppAuth/ExternalUserAgent (= 1.6.0) - - AppAuth/Core (1.6.0) - - AppAuth/ExternalUserAgent (1.6.0): - - AppAuth/Core - - Firebase/AdMob (6.15.0): - - Firebase/CoreOnly - - Google-Mobile-Ads-SDK (~> 7.50) - - Firebase/Auth (6.15.0): - - Firebase/CoreOnly - - FirebaseAuth (~> 6.4.2) - - Firebase/Core (6.15.0): - - Firebase/CoreOnly - - FirebaseAnalytics (= 6.2.1) - - Firebase/CoreOnly (6.15.0): - - FirebaseCore (= 6.6.0) - - Firebase/Crashlytics (6.15.0): - - Firebase/CoreOnly - - FirebaseCrashlytics (~> 4.0.0-beta.1) - - Firebase/Database (6.15.0): - - Firebase/CoreOnly - - FirebaseDatabase (~> 6.1.4) - - Firebase/DynamicLinks (6.15.0): - - Firebase/CoreOnly - - FirebaseDynamicLinks (~> 4.0.6) - - Firebase/InAppMessagingDisplay (6.15.0): - - Firebase/CoreOnly - - FirebaseInAppMessagingDisplay (~> 0.15.5) - - Firebase/RemoteConfig (6.15.0): - - Firebase/CoreOnly - - FirebaseRemoteConfig (~> 4.4.6) - - Firebase/Storage (6.15.0): - - Firebase/CoreOnly - - FirebaseStorage (~> 3.5.0) - - FirebaseABTesting (3.2.0): - - FirebaseAnalyticsInterop (~> 1.3) - - FirebaseCore (~> 6.1) - - Protobuf (>= 3.9.2, ~> 3.9) - - FirebaseAnalytics (6.2.1): - - FirebaseCore (~> 6.6) - - FirebaseInstanceID (~> 4.3) - - GoogleAppMeasurement (= 6.2.1) - - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - - GoogleUtilities/MethodSwizzler (~> 6.0) - - GoogleUtilities/Network (~> 6.0) - - "GoogleUtilities/NSData+zlib (~> 6.0)" - - nanopb (= 0.3.9011) - - FirebaseAnalyticsInterop (1.5.0) - - FirebaseAuth (6.4.3): - - FirebaseAuthInterop (~> 1.0) - - FirebaseCore (~> 6.6) - - GoogleUtilities/AppDelegateSwizzler (~> 6.5) - - GoogleUtilities/Environment (~> 6.5) - - GTMSessionFetcher/Core (~> 1.1) - - FirebaseAuthInterop (1.1.0) - - FirebaseCore (6.6.0): - - FirebaseCoreDiagnostics (~> 1.2) - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) - - FirebaseCoreDiagnostics (1.2.4): - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleDataTransportCCTSupport (~> 3.0) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) - - nanopb (~> 0.3.901) - - FirebaseCoreDiagnosticsInterop (1.2.0) - - FirebaseCrashlytics (4.0.0): - - FirebaseAnalyticsInterop (~> 1.2) - - FirebaseCore (~> 6.6) - - FirebaseInstallations (~> 1.1) - - GoogleDataTransport (~> 6.0) - - GoogleDataTransportCCTSupport (~> 3.0) - - nanopb (~> 0.3.901) - - PromisesObjC (~> 1.2) - - FirebaseDatabase (6.1.4): - - FirebaseAuthInterop (~> 1.0) - - FirebaseCore (~> 6.0) - - leveldb-library (~> 1.22) - - FirebaseDynamicLinks (4.0.8): - - FirebaseAnalyticsInterop (~> 1.3) - - FirebaseCore (~> 6.2) - - FirebaseInAppMessaging (0.15.3): - - FirebaseAnalyticsInterop (~> 1.3) - - FirebaseCore (~> 6.2) - - FirebaseInstanceID (~> 4.0) - - FirebaseInAppMessagingDisplay (0.15.5): - - FirebaseCore (~> 6.2) - - FirebaseInAppMessaging (>= 0.15.0) - - FirebaseInstallations (1.3.0): - - FirebaseCore (~> 6.6) - - GoogleUtilities/Environment (~> 6.6) - - GoogleUtilities/UserDefaults (~> 6.6) - - PromisesObjC (~> 1.2) - - FirebaseInstanceID (4.3.4): - - FirebaseCore (~> 6.6) - - FirebaseInstallations (~> 1.0) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/UserDefaults (~> 6.5) - - FirebaseRemoteConfig (4.4.11): - - FirebaseABTesting (~> 3.1) - - FirebaseAnalyticsInterop (~> 1.4) - - FirebaseCore (~> 6.2) - - FirebaseInstallations (~> 1.1) - - GoogleUtilities/Environment (~> 6.2) - - "GoogleUtilities/NSData+zlib (~> 6.2)" - - Protobuf (>= 3.9.2, ~> 3.9) - - FirebaseStorage (3.5.0): - - FirebaseAuthInterop (~> 1.0) - - FirebaseCore (~> 6.0) - - GTMSessionFetcher/Core (~> 1.1) - - Google-Mobile-Ads-SDK (7.63.0): - - GoogleAppMeasurement (~> 6.0) - - GoogleAppMeasurement (6.2.1): - - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - - GoogleUtilities/MethodSwizzler (~> 6.0) - - GoogleUtilities/Network (~> 6.0) - - "GoogleUtilities/NSData+zlib (~> 6.0)" - - nanopb (= 0.3.9011) - - GoogleDataTransport (6.2.1) - - GoogleDataTransportCCTSupport (3.0.0): - - GoogleDataTransport (~> 6.0) - - nanopb (~> 0.3.901) - - GoogleSignIn (5.0.2): - - AppAuth (~> 1.2) - - GTMAppAuth (~> 1.0) - - GTMSessionFetcher/Core (~> 1.1) - - GoogleUtilities/AppDelegateSwizzler (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (6.7.2): - - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (6.7.2): - - GoogleUtilities/Logger - - GoogleUtilities/Network (6.7.2): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (6.7.2)" - - GoogleUtilities/Reachability (6.7.2): - - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (6.7.2): - - GoogleUtilities/Logger - - GTMAppAuth (1.1.0): - - AppAuth/Core (~> 1.4) - - GTMSessionFetcher (~> 1.4) - - GTMSessionFetcher (1.4.0): - - GTMSessionFetcher/Full (= 1.4.0) - - GTMSessionFetcher/Core (1.4.0) - - GTMSessionFetcher/Full (1.4.0): - - GTMSessionFetcher/Core (= 1.4.0) - - leveldb-library (1.22.1) - - nanopb (0.3.9011): - - nanopb/decode (= 0.3.9011) - - nanopb/encode (= 0.3.9011) - - nanopb/decode (0.3.9011) - - nanopb/encode (0.3.9011) - - PromisesObjC (1.2.10) - - Protobuf (3.13.0) - -DEPENDENCIES: - - Firebase/AdMob - - Firebase/Auth - - Firebase/Core - - Firebase/Crashlytics - - Firebase/Database - - Firebase/DynamicLinks - - Firebase/InAppMessagingDisplay - - Firebase/RemoteConfig - - Firebase/Storage - - GoogleSignIn - -SPEC REPOS: - trunk: - - AppAuth - - Firebase - - FirebaseABTesting - - FirebaseAnalytics - - FirebaseAnalyticsInterop - - FirebaseAuth - - FirebaseAuthInterop - - FirebaseCore - - FirebaseCoreDiagnostics - - FirebaseCoreDiagnosticsInterop - - FirebaseCrashlytics - - FirebaseDatabase - - FirebaseDynamicLinks - - FirebaseInAppMessaging - - FirebaseInAppMessagingDisplay - - FirebaseInstallations - - FirebaseInstanceID - - FirebaseRemoteConfig - - FirebaseStorage - - Google-Mobile-Ads-SDK - - GoogleAppMeasurement - - GoogleDataTransport - - GoogleDataTransportCCTSupport - - GoogleSignIn - - GoogleUtilities - - GTMAppAuth - - GTMSessionFetcher - - leveldb-library - - nanopb - - PromisesObjC - - Protobuf - -SPEC CHECKSUMS: - AppAuth: 8fca6b5563a5baef2c04bee27538025e4ceb2add - Firebase: 5d77105d9740a07ca6b16927ca971db7e860faaf - FirebaseABTesting: 821a3a3e4a145987e80fee3657c4de1cb9adf693 - FirebaseAnalytics: e83e64b1231dedcd9ddd4bdecd9bcfd6ba341679 - FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae - FirebaseAuth: 5ce2b03a3d7fe56b7a6e4c5ec7ff1522890b1d6f - FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9 - FirebaseCore: 4aeb81ff53dcd9a3634ca725dc1fb8c2a4622046 - FirebaseCoreDiagnostics: b59c024493a409f8aecba02c99928d0d8431d159 - FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 - FirebaseCrashlytics: 941608d2a3475b48fb7010b998703d07696b8db1 - FirebaseDatabase: 0144e0706a4761f1b0e8679572eba8095ddb59be - FirebaseDynamicLinks: 417dc6dbb6013233c77558290d73296f429656a6 - FirebaseInAppMessaging: 5db5fa181ed4215e02ded09f7e4bbcc2ce624a47 - FirebaseInAppMessagingDisplay: 60a65c8277f17675a8a5b92e9a97cd914b45d4ff - FirebaseInstallations: 6f5f680e65dc374397a483c32d1799ba822a395b - FirebaseInstanceID: cef67c4967c7cecb56ea65d8acbb4834825c587b - FirebaseRemoteConfig: 3d189cf0c3c5abc0c924ef1cce60c4add8d3262c - FirebaseStorage: 6c5263796af3b1be82ed173598aade47535fe125 - Google-Mobile-Ads-SDK: a71d6bc14f9cf1f66d686dbdf9ad2091de04059c - GoogleAppMeasurement: a08a43b8677b95ed51fcef880e36737334d804fd - GoogleDataTransport: 9a8a16f79feffc7f42096743de2a7c4815e84020 - GoogleDataTransportCCTSupport: 0f39025e8cf51f168711bd3fb773938d7e62ddb5 - GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213 - GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 - GTMAppAuth: 197a8dabfea5d665224aa00d17f164fc2248dab9 - GTMSessionFetcher: 6f5c8abbab8a9bce4bb3f057e317728ec6182b10 - leveldb-library: 50c7b45cbd7bf543c81a468fe557a16ae3db8729 - nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd - PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151 - Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748 - -PODFILE CHECKSUM: 0bbe04d624b3fc371c72d4c3511d050fbb62d4b4 - -COCOAPODS: 1.15.2 diff --git a/grow-ios-starter/swift-starter/shared/Bladefile b/grow-ios-starter/swift-starter/shared/Bladefile deleted file mode 100644 index 6332a0b5..00000000 --- a/grow-ios-starter/swift-starter/shared/Bladefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# Uncomment below to specify your own resources. -# See https://github.com/jondot/blade for more information. -# - -blades: - - source: assets/logo1024.png - mount: Images.xcassets/AppIcon.appiconset - contents: true - - source: assets/logo1024.png - mount: Images.xcassets/Logo.imageset diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png deleted file mode 100644 index 5779681c..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png deleted file mode 100644 index 451dedeb..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png deleted file mode 100644 index a4e88111..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png deleted file mode 100644 index 9dd85950..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 3751673c..00000000 --- a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "logo1024-iphone-29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "logo1024-iphone-29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "logo1024-iphone-40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "logo1024-iphone-40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "AppIcon-60-2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "AppIcon-60-3x.png", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "logo1024-ipad-29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "logo1024-ipad-29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "logo1024-ipad-40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "logo1024-ipad-40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "AppIcon-76.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "AppIcon-76-2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "logo1024-ipad-83@2x.png", - "scale" : "2x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png deleted file mode 100644 index c3252dac..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png deleted file mode 100644 index a51aed88..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png deleted file mode 100644 index 6c930900..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png deleted file mode 100644 index 9167b50c..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png deleted file mode 100644 index 300a49e6..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png deleted file mode 100644 index a51aed88..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png deleted file mode 100644 index e51af9a6..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png deleted file mode 100644 index 9167b50c..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png deleted file mode 100644 index 5779681c..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/Brand Assets.launchimage/Contents.json b/grow-ios-starter/swift-starter/shared/Images.xcassets/Brand Assets.launchimage/Contents.json deleted file mode 100644 index a0ad363c..00000000 --- a/grow-ios-starter/swift-starter/shared/Images.xcassets/Brand Assets.launchimage/Contents.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/Contents.json b/grow-ios-starter/swift-starter/shared/Images.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/grow-ios-starter/swift-starter/shared/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/LaunchImage.launchimage/Contents.json b/grow-ios-starter/swift-starter/shared/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index 3dd8aa5b..00000000 --- a/grow-ios-starter/swift-starter/shared/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "8.0", - "subtype" : "736h", - "scale" : "3x" - }, - { - "orientation" : "landscape", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "8.0", - "subtype" : "736h", - "scale" : "3x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "8.0", - "subtype" : "667h", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/Contents.json b/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/Contents.json deleted file mode 100644 index 92d797ce..00000000 --- a/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "logo1024-universal-341@1x.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "logo1024-universal-341@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "logo1024-universal-341@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png deleted file mode 100644 index 0dae4835..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png deleted file mode 100644 index cf3f0001..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png deleted file mode 100644 index 0541acfa..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/Contents.json b/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/Contents.json deleted file mode 100644 index 9239c1bc..00000000 --- a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "filename": "ic_account_circle.png", - "idiom": "universal", - "scale": "1x" - }, - { - "filename": "ic_account_circle_2x.png", - "idiom": "universal", - "scale": "2x" - }, - { - "filename": "ic_account_circle_3x.png", - "idiom": "universal", - "scale": "3x" - } - ], - "info": { - "author": "xcode", - "version": 1 - } -} diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle.png deleted file mode 100644 index 0c1202de..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_2x.png deleted file mode 100644 index f26b201a..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_3x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_3x.png deleted file mode 100644 index 3cc0a63e..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_account_circle.imageset/ic_account_circle_3x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/Contents.json b/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/Contents.json deleted file mode 100644 index 7b8af074..00000000 --- a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images": [ - { - "filename": "ic_add_a_photo.png", - "idiom": "universal", - "scale": "1x" - }, - { - "filename": "ic_add_a_photo_2x.png", - "idiom": "universal", - "scale": "2x" - }, - { - "filename": "ic_add_a_photo_3x.png", - "idiom": "universal", - "scale": "3x" - } - ], - "info": { - "author": "xcode", - "version": 1 - } -} diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo.png deleted file mode 100644 index 629354d8..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_2x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_2x.png deleted file mode 100644 index 85d97f0a..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_2x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_3x.png b/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_3x.png deleted file mode 100644 index 31dd5ebf..00000000 Binary files a/grow-ios-starter/swift-starter/shared/Images.xcassets/ic_add_a_photo.imageset/ic_add_a_photo_3x.png and /dev/null differ diff --git a/grow-ios-starter/swift-starter/shared/LaunchScreen.xib b/grow-ios-starter/swift-starter/shared/LaunchScreen.xib deleted file mode 100644 index e2d42c62..00000000 --- a/grow-ios-starter/swift-starter/shared/LaunchScreen.xib +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/grow-ios-starter/swift-starter/shared/assets/logo1024.png b/grow-ios-starter/swift-starter/shared/assets/logo1024.png deleted file mode 100644 index 126686c8..00000000 Binary files a/grow-ios-starter/swift-starter/shared/assets/logo1024.png and /dev/null differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png index 5779681c..b9f4327e 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png index 451dedeb..39a81a58 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png index a4e88111..e1f42120 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png index 9dd85950..b91f04fd 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png index c3252dac..3b3a892e 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png index a51aed88..7241625d 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png index 6c930900..2204ff89 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png index 9167b50c..78ddce1a 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png index 300a49e6..ce88bd87 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png index a51aed88..7241625d 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png index e51af9a6..5fa097ec 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png index 9167b50c..78ddce1a 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png index 5779681c..67b3e56b 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png and b/ios-starter/objc-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png b/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png index 0dae4835..a01ecb10 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png and b/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png b/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png index cf3f0001..dd7ee96a 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png and b/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png differ diff --git a/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png b/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png index 0541acfa..e046e1fc 100644 Binary files a/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png and b/ios-starter/objc-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png differ diff --git a/ios-starter/objc-starter/shared/assets/logo1024.png b/ios-starter/objc-starter/shared/assets/logo1024.png index 126686c8..e046e1fc 100644 Binary files a/ios-starter/objc-starter/shared/assets/logo1024.png and b/ios-starter/objc-starter/shared/assets/logo1024.png differ diff --git a/ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/project.pbxproj b/ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/project.pbxproj index bdc1948c..39eb866b 100644 --- a/ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/project.pbxproj +++ b/ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/project.pbxproj @@ -3,36 +3,55 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ - 107960731C612531003DB6CC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 107960711C612531003DB6CC /* Main.storyboard */; }; - 10AF4CDB1DD23A7E0096D192 /* logo1024.png in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CD71DD23A7E0096D192 /* logo1024.png */; }; - 10AF4CDC1DD23A7E0096D192 /* Bladefile in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CD81DD23A7E0096D192 /* Bladefile */; }; - 10AF4CDD1DD23A7E0096D192 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CD91DD23A7E0096D192 /* Images.xcassets */; }; - 10AF4CDE1DD23A7E0096D192 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CDA1DD23A7E0096D192 /* LaunchScreen.xib */; }; - 2C595F061B34B73A00355AE7 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C595F041B34B73A00355AE7 /* Constants.swift */; }; - 2C8E6C2B1B16875B0073CE3D /* SignInViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */; }; - 2CA807BC1B21702E009AD7F2 /* MeasurementHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */; }; - 5F5A537E1ADE67D500F81DF0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */; }; - 5F5A53801ADE67D500F81DF0 /* FCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */; }; + 02FB2823443E51E454F39059 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6258EC9A1529A142E8BB350 /* LoginView.swift */; }; + 0C9FEBB8AEDA41AEE860F3A2 /* FriendlyMessageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C611996A2B2DB27FD35A4B80 /* FriendlyMessageViewModel.swift */; }; + 1D9D08C3496A6447DE63C6D5 /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960ABD31D77C3BCB6005E6DD /* HeaderView.swift */; }; + 1E603898B9A499339A32E5BD /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 1162055A82E15933ADDC8E93 /* FirebaseStorage */; }; + 34383D3D8A62224EE3C8D36F /* FriendlyMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8012FE2238289B6B419D08D2 /* FriendlyMessageView.swift */; }; + 4599A4AB53E0DA80A97F7BED /* InitialsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C466A78D37B065EE1FAFFC6 /* InitialsView.swift */; }; + 6D1CEB94DC738B6D00C79890 /* FriendlyMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FD525F044EF30F6E829D073 /* FriendlyMessage.swift */; }; + 76EFBCE764E49DC331695269 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EC069E3AC48FF7EC173DA8C /* ContentView.swift */; }; + 8DBECA17303F9C3C00927717 /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = 8DBECA16303F9C3C00927717 /* FirebaseFirestore */; }; + 8DBECA1C303FA3C800927717 /* FirebaseDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = 17736B3C989694E25473CE7C /* FirebaseDatabase */; }; + 96F4781712D71426C2C5D0E0 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8FC28A10A9AF1B45E474161D /* GoogleService-Info.plist */; }; + 9CED26083BB1BC268B3BE004 /* UserViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED82E90882211A500080E97 /* UserViewModel.swift */; }; + A0E713A6F1DF3D497757B854 /* FriendlyChatSwiftApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA2DDA879335D37F9250246D /* FriendlyChatSwiftApp.swift */; }; + B0AA9F2CB8EF47B869E4B8C3 /* FriendlyMessageImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61F3924C13DFEEE8F9E97A37 /* FriendlyMessageImageView.swift */; }; + B1FA7BB8637BF11F9F588DB0 /* FriendlyMessageTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4766BB0C7F2DBF700965F5CB /* FriendlyMessageTextView.swift */; }; + B33FEA198B0AB20A7D62DAFE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 87480CF2D86934ADC836664F /* Assets.xcassets */; }; + DDF4D1F2AE128E62059AF518 /* FooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 711310CF42A5A4C96B61E445 /* FooterView.swift */; }; + E46063AAD37402C0FE016AA9 /* SignUpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22BBD65D1C35081C7863F0CA /* SignUpView.swift */; }; + EBA060EAE1432868D83084F8 /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 01497A6DEE6AF81ED1C464F3 /* FirebaseAuth */; }; + EE358390F1A2C8E6745D1DD1 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4CC558835D3398A6DE21453 /* ProfileView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 1037935F1BF4256400C88958 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = Pods/Firebase/Headers/module.modulemap; sourceTree = ""; }; - 107960721C612531003DB6CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 107960741C61253B003DB6CC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 10AF4CD71DD23A7E0096D192 /* logo1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo1024.png; sourceTree = ""; }; - 10AF4CD81DD23A7E0096D192 /* Bladefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Bladefile; sourceTree = ""; }; - 10AF4CD91DD23A7E0096D192 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 10AF4CDA1DD23A7E0096D192 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; - 2C595F041B34B73A00355AE7 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; - 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignInViewController.swift; sourceTree = ""; }; - 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeasurementHelper.swift; sourceTree = ""; }; + 10AF4CAF1DD236DE0096D192 /* logo1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo1024.png; sourceTree = ""; }; + 10AF4CB01DD236DE0096D192 /* Bladefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Bladefile; sourceTree = ""; }; + 10AF4CB11DD236DE0096D192 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 10AF4CB21DD236DE0096D192 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; + 1C466A78D37B065EE1FAFFC6 /* InitialsView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = InitialsView.swift; sourceTree = ""; }; + 22BBD65D1C35081C7863F0CA /* SignUpView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SignUpView.swift; sourceTree = ""; }; + 4766BB0C7F2DBF700965F5CB /* FriendlyMessageTextView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessageTextView.swift; sourceTree = ""; }; 5F5A53791ADE67D500F81DF0 /* FriendlyChatSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FriendlyChatSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FCViewController.swift; sourceTree = ""; }; + 61F3924C13DFEEE8F9E97A37 /* FriendlyMessageImageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessageImageView.swift; sourceTree = ""; }; + 711310CF42A5A4C96B61E445 /* FooterView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FooterView.swift; sourceTree = ""; }; + 7EC069E3AC48FF7EC173DA8C /* ContentView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 8012FE2238289B6B419D08D2 /* FriendlyMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessageView.swift; sourceTree = ""; }; + 87480CF2D86934ADC836664F /* Assets.xcassets */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8FC28A10A9AF1B45E474161D /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 8FD525F044EF30F6E829D073 /* FriendlyMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessage.swift; sourceTree = ""; }; + 960ABD31D77C3BCB6005E6DD /* HeaderView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; + C611996A2B2DB27FD35A4B80 /* FriendlyMessageViewModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessageViewModel.swift; sourceTree = ""; }; + CA2DDA879335D37F9250246D /* FriendlyChatSwiftApp.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyChatSwiftApp.swift; sourceTree = ""; }; + D6258EC9A1529A142E8BB350 /* LoginView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; + DED82E90882211A500080E97 /* UserViewModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserViewModel.swift; sourceTree = ""; }; + E4CC558835D3398A6DE21453 /* ProfileView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -40,35 +59,73 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 8DBECA1C303FA3C800927717 /* FirebaseDatabase in Frameworks */, + EBA060EAE1432868D83084F8 /* FirebaseAuth in Frameworks */, + 8DBECA17303F9C3C00927717 /* FirebaseFirestore in Frameworks */, + 1E603898B9A499339A32E5BD /* FirebaseStorage in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 10AF4CD51DD23A7E0096D192 /* shared */ = { + 0FFCEDB3CDB4C091120766AA /* Models */ = { isa = PBXGroup; children = ( - 10AF4CD61DD23A7E0096D192 /* assets */, - 10AF4CD81DD23A7E0096D192 /* Bladefile */, - 10AF4CD91DD23A7E0096D192 /* Images.xcassets */, - 10AF4CDA1DD23A7E0096D192 /* LaunchScreen.xib */, + 8FD525F044EF30F6E829D073 /* FriendlyMessage.swift */, + ); + path = Models; + sourceTree = ""; + }; + 10AF4CAD1DD236DE0096D192 /* shared */ = { + isa = PBXGroup; + children = ( + 10AF4CAE1DD236DE0096D192 /* assets */, + 10AF4CB01DD236DE0096D192 /* Bladefile */, + 10AF4CB11DD236DE0096D192 /* Images.xcassets */, + 10AF4CB21DD236DE0096D192 /* LaunchScreen.xib */, ); path = shared; sourceTree = ""; }; - 10AF4CD61DD23A7E0096D192 /* assets */ = { + 10AF4CAE1DD236DE0096D192 /* assets */ = { isa = PBXGroup; children = ( - 10AF4CD71DD23A7E0096D192 /* logo1024.png */, + 10AF4CAF1DD236DE0096D192 /* logo1024.png */, ); path = assets; sourceTree = ""; }; + 25A9090EA43CF9C5D009EB3B /* Views */ = { + isa = PBXGroup; + children = ( + 7EC069E3AC48FF7EC173DA8C /* ContentView.swift */, + 960ABD31D77C3BCB6005E6DD /* HeaderView.swift */, + 711310CF42A5A4C96B61E445 /* FooterView.swift */, + 8012FE2238289B6B419D08D2 /* FriendlyMessageView.swift */, + 4766BB0C7F2DBF700965F5CB /* FriendlyMessageTextView.swift */, + 61F3924C13DFEEE8F9E97A37 /* FriendlyMessageImageView.swift */, + 1C466A78D37B065EE1FAFFC6 /* InitialsView.swift */, + D6258EC9A1529A142E8BB350 /* LoginView.swift */, + 22BBD65D1C35081C7863F0CA /* SignUpView.swift */, + E4CC558835D3398A6DE21453 /* ProfileView.swift */, + ); + path = Views; + sourceTree = ""; + }; + 4F0169EFB16C39A845E1763B /* ViewModels */ = { + isa = PBXGroup; + children = ( + DED82E90882211A500080E97 /* UserViewModel.swift */, + C611996A2B2DB27FD35A4B80 /* FriendlyMessageViewModel.swift */, + ); + path = ViewModels; + sourceTree = ""; + }; 5F5A53431ADE670C00F81DF0 = { isa = PBXGroup; children = ( - 10AF4CD51DD23A7E0096D192 /* shared */, + 10AF4CAD1DD236DE0096D192 /* shared */, 5F5A537A1ADE67D500F81DF0 /* FriendlyChatSwift */, 5F5A534D1ADE670C00F81DF0 /* Products */, AD1F1C80A93A096F652504F5 /* Frameworks */, @@ -86,25 +143,16 @@ 5F5A537A1ADE67D500F81DF0 /* FriendlyChatSwift */ = { isa = PBXGroup; children = ( - 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */, - 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */, - 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */, - 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */, - 2C595F041B34B73A00355AE7 /* Constants.swift */, - 5F5A537B1ADE67D500F81DF0 /* Supporting Files */, + CA2DDA879335D37F9250246D /* FriendlyChatSwiftApp.swift */, + 8FC28A10A9AF1B45E474161D /* GoogleService-Info.plist */, + 87480CF2D86934ADC836664F /* Assets.xcassets */, + 0FFCEDB3CDB4C091120766AA /* Models */, + 4F0169EFB16C39A845E1763B /* ViewModels */, + 25A9090EA43CF9C5D009EB3B /* Views */, ); path = FriendlyChatSwift; sourceTree = ""; }; - 5F5A537B1ADE67D500F81DF0 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 107960711C612531003DB6CC /* Main.storyboard */, - 107960741C61253B003DB6CC /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; AD1F1C80A93A096F652504F5 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -123,12 +171,19 @@ 5F5A53751ADE67D500F81DF0 /* Sources */, 5F5A53761ADE67D500F81DF0 /* Frameworks */, 5F5A53771ADE67D500F81DF0 /* Resources */, + 779FCD6F1FDF0B2F00582829 /* ShellScript */, ); buildRules = ( ); dependencies = ( ); name = FriendlyChatSwift; + packageProductDependencies = ( + 01497A6DEE6AF81ED1C464F3 /* FirebaseAuth */, + 17736B3C989694E25473CE7C /* FirebaseDatabase */, + 1162055A82E15933ADDC8E93 /* FirebaseStorage */, + 8DBECA16303F9C3C00927717 /* FirebaseFirestore */, + ); productName = FriendlyPingSwift; productReference = 5F5A53791ADE67D500F81DF0 /* FriendlyChatSwift.app */; productType = "com.apple.product-type.application"; @@ -140,7 +195,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 1130; + LastUpgradeCheck = 1110; ORGANIZATIONNAME = "Google Inc."; TargetAttributes = { 5F5A53781ADE67D500F81DF0 = { @@ -150,6 +205,9 @@ com.apple.BackgroundModes = { enabled = 1; }; + com.apple.Push = { + enabled = 1; + }; }; }; }; @@ -163,6 +221,9 @@ Base, ); mainGroup = 5F5A53431ADE670C00F81DF0; + packageReferences = ( + B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + ); productRefGroup = 5F5A534D1ADE670C00F81DF0 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -177,47 +238,59 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 10AF4CDE1DD23A7E0096D192 /* LaunchScreen.xib in Resources */, - 10AF4CDC1DD23A7E0096D192 /* Bladefile in Resources */, - 10AF4CDD1DD23A7E0096D192 /* Images.xcassets in Resources */, - 107960731C612531003DB6CC /* Main.storyboard in Resources */, - 10AF4CDB1DD23A7E0096D192 /* logo1024.png in Resources */, + 96F4781712D71426C2C5D0E0 /* GoogleService-Info.plist in Resources */, + B33FEA198B0AB20A7D62DAFE /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 779FCD6F1FDF0B2F00582829 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# \"${PODS_ROOT}/FirebaseCrashlytics/run\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 5F5A53751ADE67D500F81DF0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2C8E6C2B1B16875B0073CE3D /* SignInViewController.swift in Sources */, - 5F5A53801ADE67D500F81DF0 /* FCViewController.swift in Sources */, - 5F5A537E1ADE67D500F81DF0 /* AppDelegate.swift in Sources */, - 2CA807BC1B21702E009AD7F2 /* MeasurementHelper.swift in Sources */, - 2C595F061B34B73A00355AE7 /* Constants.swift in Sources */, + A0E713A6F1DF3D497757B854 /* FriendlyChatSwiftApp.swift in Sources */, + 6D1CEB94DC738B6D00C79890 /* FriendlyMessage.swift in Sources */, + 9CED26083BB1BC268B3BE004 /* UserViewModel.swift in Sources */, + 0C9FEBB8AEDA41AEE860F3A2 /* FriendlyMessageViewModel.swift in Sources */, + 76EFBCE764E49DC331695269 /* ContentView.swift in Sources */, + 1D9D08C3496A6447DE63C6D5 /* HeaderView.swift in Sources */, + DDF4D1F2AE128E62059AF518 /* FooterView.swift in Sources */, + 34383D3D8A62224EE3C8D36F /* FriendlyMessageView.swift in Sources */, + B1FA7BB8637BF11F9F588DB0 /* FriendlyMessageTextView.swift in Sources */, + B0AA9F2CB8EF47B869E4B8C3 /* FriendlyMessageImageView.swift in Sources */, + 4599A4AB53E0DA80A97F7BED /* InitialsView.swift in Sources */, + 02FB2823443E51E454F39059 /* LoginView.swift in Sources */, + E46063AAD37402C0FE016AA9 /* SignUpView.swift in Sources */, + EE358390F1A2C8E6745D1DD1 /* ProfileView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXVariantGroup section */ - 107960711C612531003DB6CC /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 107960721C612531003DB6CC /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 5F5A536D1ADE670C00F81DF0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -261,7 +334,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE = "65c2088b-2425-4961-b6d5-0256d4790678"; @@ -275,6 +348,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -311,11 +385,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; MTL_ENABLE_DEBUG_INFO = NO; PROVISIONING_PROFILE = "65c2088b-2425-4961-b6d5-0256d4790678"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -325,17 +400,21 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; - INFOPLIST_FILE = "$(SRCROOT)/FriendlyChatSwift/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + INFOPLIST_FILE = FriendlyChatSwift/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.codelab.FriendlyChatSwift; PRODUCT_NAME = FriendlyChatSwift; PROVISIONING_PROFILE = ""; - SWIFT_OBJC_BRIDGING_HEADER = ""; + SWIFT_INSTALL_OBJC_HEADER = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; }; @@ -345,17 +424,21 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; - INFOPLIST_FILE = "$(SRCROOT)/FriendlyChatSwift/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + INFOPLIST_FILE = FriendlyChatSwift/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.codelab.FriendlyChatSwift; PRODUCT_NAME = FriendlyChatSwift; PROVISIONING_PROFILE = ""; - SWIFT_OBJC_BRIDGING_HEADER = ""; + SWIFT_INSTALL_OBJC_HEADER = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; }; @@ -383,6 +466,40 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 12.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 01497A6DEE6AF81ED1C464F3 /* FirebaseAuth */ = { + isa = XCSwiftPackageProductDependency; + package = B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAuth; + }; + 1162055A82E15933ADDC8E93 /* FirebaseStorage */ = { + isa = XCSwiftPackageProductDependency; + package = B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseStorage; + }; + 17736B3C989694E25473CE7C /* FirebaseDatabase */ = { + isa = XCSwiftPackageProductDependency; + package = B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseDatabase; + }; + 8DBECA16303F9C3C00927717 /* FirebaseFirestore */ = { + isa = XCSwiftPackageProductDependency; + package = B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseFirestore; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 5F5A53441ADE670C00F81DF0 /* Project object */; } diff --git a/ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwift.xcscheme b/ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwift.xcscheme index d47d7639..ec102c71 100644 --- a/ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwift.xcscheme +++ b/ios-starter/swift-starter/FriendlyChatSwift.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwift.xcscheme @@ -1,6 +1,6 @@ Bool { - return GIDSignIn.sharedInstance().handle(url) - } - - func application(_ application: UIApplication, - open url: URL, - sourceApplication: String?, - annotation: Any) -> Bool { - return GIDSignIn.sharedInstance().handle(url) - } - - func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error?) { - if let error = error { - print("Error \(error)") - return - } - } - - func application(_ application: UIApplication, didFinishLaunchingWithOptions - launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - GIDSignIn.sharedInstance().delegate = self - return true - } -} diff --git a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 84% rename from ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json rename to ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/AccentColor.colorset/Contents.json index 94894208..58247eba 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json +++ b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/AccentColor.colorset/Contents.json @@ -6,8 +6,8 @@ "components" : { "alpha" : "1.000", "blue" : "0", - "green" : "124", - "red" : "245" + "green" : "145", + "red" : "255" } }, "idiom" : "universal" diff --git a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json rename to ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png new file mode 100644 index 00000000..67b3e56b Binary files /dev/null and b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png differ diff --git a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/Contents.json b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/Contents.json similarity index 100% rename from ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/Contents.json rename to ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/Contents.json diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseBlue.colorset/Contents.json b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseBlue.colorset/Contents.json new file mode 100644 index 00000000..7d199c35 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseBlue.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "244", + "green" : "133", + "red" : "66" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseGray.colorset/Contents.json b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseGray.colorset/Contents.json similarity index 76% rename from ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseGray.colorset/Contents.json rename to ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseGray.colorset/Contents.json index 07124370..1d4795a5 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseGray.colorset/Contents.json +++ b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseGray.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "241", - "green" : "239", - "red" : "236" + "blue" : "242", + "green" : "242", + "red" : "242" } }, "idiom" : "universal" diff --git a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseOrange.colorset/Contents.json b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseOrange.colorset/Contents.json similarity index 84% rename from ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseOrange.colorset/Contents.json rename to ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseOrange.colorset/Contents.json index 94894208..58247eba 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseOrange.colorset/Contents.json +++ b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseOrange.colorset/Contents.json @@ -6,8 +6,8 @@ "components" : { "alpha" : "1.000", "blue" : "0", - "green" : "124", - "red" : "245" + "green" : "145", + "red" : "255" } }, "idiom" : "universal" diff --git a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseYellow.colorset/Contents.json b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseYellow.colorset/Contents.json similarity index 83% rename from ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseYellow.colorset/Contents.json rename to ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseYellow.colorset/Contents.json index 58547909..7a5c6c2f 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseYellow.colorset/Contents.json +++ b/ios-starter/swift-starter/FriendlyChatSwift/Assets.xcassets/FirebaseYellow.colorset/Contents.json @@ -5,8 +5,8 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "40", - "green" : "202", + "blue" : "0", + "green" : "196", "red" : "255" } }, diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Base.lproj/Main.storyboard b/ios-starter/swift-starter/FriendlyChatSwift/Base.lproj/Main.storyboard deleted file mode 100644 index 456ab802..00000000 --- a/ios-starter/swift-starter/FriendlyChatSwift/Base.lproj/Main.storyboard +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Constants.swift b/ios-starter/swift-starter/FriendlyChatSwift/Constants.swift deleted file mode 100644 index 328e7e8b..00000000 --- a/ios-starter/swift-starter/FriendlyChatSwift/Constants.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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. -// - -struct Constants { - - struct NotificationKeys { - static let SignedIn = "onSignInCompleted" - } - - struct Segues { - static let SignInToFp = "SignInToFP" - static let FpToSignIn = "FPToSignIn" - } - - struct MessageFields { - static let name = "name" - static let text = "text" - static let photoURL = "photoUrl" - static let imageURL = "imageUrl" - } -} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift b/ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift deleted file mode 100644 index 0609e216..00000000 --- a/ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift +++ /dev/null @@ -1,191 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 Photos -import UIKit - -import Firebase -import GoogleMobileAds -import FirebaseCrashlytics - -/** - * AdMob ad unit IDs are not currently stored inside the google-services.plist file. Developers - * using AdMob can store them as custom values in another plist, or simply use constants. Note that - * these ad units are configured to return only test ads, and should not be used outside this sample. - */ -let kBannerAdUnitID = "ca-app-pub-3940256099942544/2934735716" - -@objc(FCViewController) -class FCViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, - UITextFieldDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate { - - // Instance variables - @IBOutlet weak var textField: UITextField! - @IBOutlet weak var sendButton: UIButton! - var ref: DatabaseReference! - var messages: [DataSnapshot] = [] - var msglength: NSNumber = 10 - fileprivate var _refHandle: DatabaseHandle! - - var storageRef: StorageReference! - var remoteConfig: RemoteConfig! - - @IBOutlet weak var banner: GADBannerView! - @IBOutlet weak var clientTable: UITableView! - - override func viewDidLoad() { - super.viewDidLoad() - - self.clientTable.register(UITableViewCell.self, forCellReuseIdentifier: "tableViewCell") - - configureDatabase() - configureStorage() - configureRemoteConfig() - fetchConfig() - loadAd() - } - - deinit { - } - - func configureDatabase() { - } - - func configureStorage() { - } - - func configureRemoteConfig() { - } - - func fetchConfig() { - } - - @IBAction func didPressFreshConfig(_ sender: AnyObject) { - fetchConfig() - } - - @IBAction func didSendMessage(_ sender: UIButton) { - _ = textFieldShouldReturn(textField) - } - - @IBAction func didPressCrash(_ sender: AnyObject) { - } - - @IBAction func inviteTapped(_ sender: AnyObject) { - } - - func loadAd() { - } - - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { - guard let text = textField.text else { return true } - - let newLength = text.utf16.count + string.utf16.count - range.length - return newLength <= self.msglength.intValue // Bool - } - - // UITableViewDataSource protocol methods - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return messages.count - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - // Dequeue cell - let cell = self.clientTable.dequeueReusableCell(withIdentifier: "tableViewCell", for: indexPath) - - return cell - } - - // UITextViewDelegate protocol methods - func textFieldShouldReturn(_ textField: UITextField) -> Bool { - guard let text = textField.text else { return true } - textField.text = "" - view.endEditing(true) - let data = [Constants.MessageFields.text: text] - sendMessage(withData: data) - return true - } - - func sendMessage(withData data: [String: String]) { - } - - // MARK: - Image Picker - - @IBAction func didTapAddPhoto(_ sender: AnyObject) { - let picker = UIImagePickerController() - picker.delegate = self - if UIImagePickerController.isSourceTypeAvailable(UIImagePickerController.SourceType.camera) { - picker.sourceType = UIImagePickerController.SourceType.camera - } else { - picker.sourceType = UIImagePickerController.SourceType.photoLibrary - } - - present(picker, animated: true, completion:nil) - } - - func imagePickerController(_ picker: UIImagePickerController, - didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { -// Local variable inserted by Swift 4.2 migrator. -let info = convertFromUIImagePickerControllerInfoKeyDictionary(info) - - picker.dismiss(animated: true, completion:nil) - guard let uid = Auth.auth().currentUser?.uid else { return } - - // if it's a photo from the library, not an image from the camera - if #available(iOS 8.0, *), let referenceURL = info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.referenceURL)] as? URL { - let assets = PHAsset.fetchAssets(withALAssetURLs: [referenceURL], options: nil) - let asset = assets.firstObject - asset?.requestContentEditingInput(with: nil, completionHandler: { (contentEditingInput, info) in - let imageFile = contentEditingInput?.fullSizeImageURL - let filePath = "\(uid)/\(Int(Date.timeIntervalSinceReferenceDate * 1000))/\((referenceURL as AnyObject).lastPathComponent!)" - }) - } else { - guard let image = info[convertFromUIImagePickerControllerInfoKey(UIImagePickerController.InfoKey.originalImage)] as? UIImage else { return } - let imageData = image.jpegData(compressionQuality: 0.8) - guard let uid = Auth.auth().currentUser?.uid else { return } - let imagePath = "\(uid)/\(Int(Date.timeIntervalSinceReferenceDate * 1000)).jpg" - } - } - - func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { - picker.dismiss(animated: true, completion:nil) - } - - @IBAction func signOut(_ sender: UIButton) { - dismiss(animated: true, completion: nil) - } - - func showAlert(withTitle title: String, message: String) { - DispatchQueue.main.async { - let alert = UIAlertController(title: title, - message: message, preferredStyle: .alert) - let dismissAction = UIAlertAction(title: "Dismiss", style: .destructive, handler: nil) - alert.addAction(dismissAction) - self.present(alert, animated: true, completion: nil) - } - } - -} - -// Helper function inserted by Swift 4.2 migrator. -fileprivate func convertFromUIImagePickerControllerInfoKeyDictionary(_ input: [UIImagePickerController.InfoKey: Any]) -> [String: Any] { - return Dictionary(uniqueKeysWithValues: input.map {key, value in (key.rawValue, value)}) -} - -// Helper function inserted by Swift 4.2 migrator. -fileprivate func convertFromUIImagePickerControllerInfoKey(_ input: UIImagePickerController.InfoKey) -> String { - return input.rawValue -} diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwift.entitlements b/ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwift.entitlements similarity index 75% rename from grow-ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwift.entitlements rename to ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwift.entitlements index 31429136..903def2a 100644 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwift.entitlements +++ b/ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwift.entitlements @@ -2,7 +2,7 @@ - com.apple.developer.associated-domains - + aps-environment + development diff --git a/ios-starter/swift-starter/FriendlyChatSwift/MeasurementHelper.swift b/ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwiftApp.swift similarity index 66% rename from ios-starter/swift-starter/FriendlyChatSwift/MeasurementHelper.swift rename to ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwiftApp.swift index 23f9da1b..0f62f740 100644 --- a/ios-starter/swift-starter/FriendlyChatSwift/MeasurementHelper.swift +++ b/ios-starter/swift-starter/FriendlyChatSwift/FriendlyChatSwiftApp.swift @@ -1,5 +1,8 @@ // -// Copyright (c) 2015 Google Inc. +// FriendlyChatSwiftApp.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,16 +17,18 @@ // limitations under the License. // -import Firebase - -class MeasurementHelper: NSObject { - - static func sendLoginEvent() { - } +import SwiftUI +// TODO: Import FirebaseCore - static func sendLogoutEvent() { +@main +struct FriendlyChatSwiftApp: App { + init() { + // TODO: Configure FirebaseApp } - static func sendMessageEvent() { + var body: some Scene { + WindowGroup { + ContentView() + } } } diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Info.plist b/ios-starter/swift-starter/FriendlyChatSwift/Info.plist index dcfe01d4..8e93d7ff 100644 --- a/ios-starter/swift-starter/FriendlyChatSwift/Info.plist +++ b/ios-starter/swift-starter/FriendlyChatSwift/Info.plist @@ -2,22 +2,10 @@ - GADIsAdManagerApp - - NSContactsUsageDescription - Used for Firebase Invites - NSCameraUsageDescription - Take and upload photos to Cloud Storage - NSPhotoLibraryUsageDescription - Upload photo to Cloud Storage CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion @@ -34,14 +22,12 @@ 1 LSRequiresIPhoneOS - UIBackgroundModes - - remote-notification - + NSCameraUsageDescription + Take and upload photos to Cloud Storage + NSPhotoLibraryUsageDescription + Upload photo to Cloud Storage UILaunchStoryboardName LaunchScreen - UIMainStoryboardFile - Main UIRequiredDeviceCapabilities armv7 diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Models/FriendlyMessage.swift b/ios-starter/swift-starter/FriendlyChatSwift/Models/FriendlyMessage.swift new file mode 100644 index 00000000..16651069 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Models/FriendlyMessage.swift @@ -0,0 +1,67 @@ +// +// FriendlyMessage.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 Foundation +import FirebaseFirestore + +struct FriendlyMessage: Identifiable, Codable { + @DocumentID var id: String? + var text: String? + var displayName: String? + var imageUrl: String? + var userId: String? + + enum CodingKeys: String, CodingKey { + case id + case text + case displayName + case name + case imageUrl + case userId + } + + init(id: String? = nil, text: String? = nil, displayName: String? = nil, imageUrl: String? = nil, userId: String? = nil) { + self.id = id + self.text = text + self.displayName = displayName + self.imageUrl = imageUrl + self.userId = userId + } + + init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + _id = try container.decodeIfPresent(DocumentID.self, forKey: .id) ?? DocumentID(wrappedValue: nil) + text = try container.decodeIfPresent(String.self, forKey: .text) + if let name = try container.decodeIfPresent(String.self, forKey: .displayName) { + displayName = name + } else { + displayName = try container.decodeIfPresent(String.self, forKey: .name) + } + imageUrl = try container.decodeIfPresent(String.self, forKey: .imageUrl) + userId = try container.decodeIfPresent(String.self, forKey: .userId) + } + + func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(text, forKey: .text) + try container.encodeIfPresent(displayName, forKey: .displayName) + try container.encodeIfPresent(imageUrl, forKey: .imageUrl) + try container.encodeIfPresent(userId, forKey: .userId) + } +} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/SignInViewController.swift b/ios-starter/swift-starter/FriendlyChatSwift/SignInViewController.swift deleted file mode 100644 index 991f71ed..00000000 --- a/ios-starter/swift-starter/FriendlyChatSwift/SignInViewController.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 UIKit - -import Firebase -import GoogleSignIn - -@objc(SignInViewController) -class SignInViewController: UIViewController { - @IBOutlet weak var signInButton: GIDSignInButton! - var handle: AuthStateDidChangeListenerHandle? - - override func viewDidLoad() { - super.viewDidLoad() - GIDSignIn.sharedInstance()?.presentingViewController = self - } - - deinit { - } -} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/ViewModels/FriendlyMessageViewModel.swift b/ios-starter/swift-starter/FriendlyChatSwift/ViewModels/FriendlyMessageViewModel.swift new file mode 100644 index 00000000..6abb0d61 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/ViewModels/FriendlyMessageViewModel.swift @@ -0,0 +1,44 @@ +// +// FriendlyMessageViewModel.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 Observation +import FirebaseAuth +import FirebaseFirestore + +@MainActor +@Observable +final class FriendlyMessageViewModel { + var messages: [FriendlyMessage] = [] + @ObservationIgnored + private var listenerTask: Task? + + func startListening() { + stopListening() + // TODO: Observe Firestore snapshots AsyncSequence + } + + func stopListening() { + // TODO: Cancel listener task + } + + func sendMessage(text: String?, imageUrl: String?) async throws { + // TODO: Write FriendlyMessage to Firestore messages collection + } +} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/ViewModels/UserViewModel.swift b/ios-starter/swift-starter/FriendlyChatSwift/ViewModels/UserViewModel.swift new file mode 100644 index 00000000..2b12d435 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/ViewModels/UserViewModel.swift @@ -0,0 +1,72 @@ +// +// UserViewModel.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 Observation +import FirebaseAuth + +@MainActor +@Observable +final class UserViewModel { + var user: User? + var errorMessage: String? + var showAlert = false + + @ObservationIgnored + private var authTask: Task? + + init() { + // TODO: Observe Auth state changes using authStateChanges AsyncSequence + } + + deinit { + authTask?.cancel() + } + + func signIn(email: String, password: String) async { + errorMessage = nil + if email.isEmpty || password.isEmpty { + showError("Please enter both email and password.") + return + } + // TODO: Sign in with email and password using Auth.auth().signIn(withEmail:password:) + } + + func signUp(email: String, password: String, displayName: String) async { + errorMessage = nil + if email.isEmpty || password.isEmpty { + showError("Please enter both email and password.") + return + } + // TODO: Create account and update profile displayName + } + + func updateDisplayName(_ displayName: String) async { + // TODO: Update current user profile displayName + } + + func signOut() { + // TODO: Sign out using Auth.auth().signOut() + } + + private func showError(_ message: String) { + errorMessage = message + showAlert = true + } +} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Views/ContentView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/ContentView.swift new file mode 100644 index 00000000..042c6218 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/ContentView.swift @@ -0,0 +1,87 @@ +// +// ContentView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 + +struct ContentView: View { + @State private var userViewModel = UserViewModel() + @State private var messageViewModel = FriendlyMessageViewModel() + @State private var profileViewPresented = false + + var body: some View { + if userViewModel.user != nil { + VStack(spacing: 0) { + HeaderView() + + HStack { + Spacer() + Menu { + Button("Profile", action: { + profileViewPresented = true + }) + Button("Logout", action: userViewModel.signOut) + } label: { + Image(systemName: "list.bullet.circle.fill") + .font(.system(size: 28)) + .foregroundStyle(.blue) + .accessibilityLabel("User options") + } + } + .padding(.horizontal) + .padding(.top, 4) + .sheet(isPresented: $profileViewPresented) { + ProfileView(isPresented: $profileViewPresented, userViewModel: userViewModel) + } + + ScrollViewReader { scrollViewReader in + ScrollView { + LazyVStack(spacing: 12) { + ForEach(messageViewModel.messages) { message in + FriendlyMessageView(friendlyMessage: message) + .id(message.id) + } + } + .padding(.horizontal) + .padding(.vertical, 8) + .onChange(of: messageViewModel.messages.count) { _, count in + guard count > 0, let lastId = messageViewModel.messages.last?.id else { return } + withAnimation(.easeInOut) { + scrollViewReader.scrollTo(lastId, anchor: .bottom) + } + } + } + } + + FooterView(viewModel: messageViewModel) + } + .onAppear { + messageViewModel.startListening() + } + .onDisappear { + messageViewModel.stopListening() + } + } else { + LoginView(userViewModel: userViewModel) + } + } +} + +#Preview { + ContentView() +} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Views/FooterView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/FooterView.swift new file mode 100644 index 00000000..4ec68094 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/FooterView.swift @@ -0,0 +1,87 @@ +// +// FooterView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 PhotosUI +import FirebaseAuth +import FirebaseStorage + +struct FooterView: View { + @State private var selectedItem: PhotosPickerItem? + @State private var messageText = "" + @State private var isUploading = false + var viewModel: FriendlyMessageViewModel + + var body: some View { + HStack(spacing: 12) { + if isUploading { + ProgressView() + .frame(width: 28, height: 28) + } else { + PhotosPicker(selection: $selectedItem, matching: .images) { + Image(systemName: "photo.on.rectangle.angled") + .font(.system(size: 26)) + .foregroundStyle(.blue) + .accessibilityLabel("Select photo") + } + .onChange(of: selectedItem) { _, newItem in + Task { + if let data = try? await newItem?.loadTransferable(type: Data.self) { + await uploadAndSendImage(data: data) + } + } + } + } + + TextField("Say something...", text: $messageText) + .padding(10) + .background(Color.white) + .clipShape(.rect(cornerRadius: 20)) + + Button("Send", systemImage: "paperplane.fill", action: sendMessage) + .labelStyle(.iconOnly) + .font(.system(size: 24)) + .foregroundStyle(messageText.isEmpty ? .gray : .blue) + .accessibilityLabel("Send message") + .disabled(messageText.isEmpty) + } + .padding() + .background(Color("FirebaseGray")) + } + + private func sendMessage() { + let textToSend = messageText + messageText = "" + Task { + do { + try await viewModel.sendMessage(text: textToSend, imageUrl: nil) + } catch { + print("Error sending message: \(error)") + } + } + } + + private func uploadAndSendImage(data: Data) async { + // TODO: Upload image data to Cloud Storage and send message with downloadURL + } +} + +#Preview { + FooterView(viewModel: FriendlyMessageViewModel()) +} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageImageView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageImageView.swift new file mode 100644 index 00000000..8e780424 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageImageView.swift @@ -0,0 +1,81 @@ +// +// FriendlyMessageImageView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 FirebaseStorage + +struct FriendlyMessageImageView: View { + let imageUrl: String + @State private var image: UIImage? + @State private var isLoading = true + + var body: some View { + Group { + if let image = image { + Image(uiImage: image) + .resizable() + .scaledToFill() + .frame(maxWidth: 200, maxHeight: 200) + .clipShape(.rect(cornerRadius: 12)) + .clipped() + } else if isLoading { + ProgressView() + .frame(width: 120, height: 120) + .background(Color("FirebaseGray")) + .clipShape(.rect(cornerRadius: 12)) + } else { + Image(systemName: "photo") + .font(.system(size: 32)) + .foregroundStyle(.gray) + .frame(width: 120, height: 120) + .background(Color("FirebaseGray")) + .clipShape(.rect(cornerRadius: 12)) + } + } + .task { + await loadImage() + } + } + + private func loadImage() async { + isLoading = true + defer { isLoading = false } + if imageUrl.hasPrefix("http://") || imageUrl.hasPrefix("https://") { + guard let url = URL(string: imageUrl), + let (data, _) = try? await URLSession.shared.data(from: url), + let downloadedImage = UIImage(data: data) else { return } + self.image = downloadedImage + } else { + let storageRef: StorageReference + if imageUrl.hasPrefix("gs://") { + storageRef = Storage.storage().reference(forURL: imageUrl) + } else { + storageRef = Storage.storage().reference(withPath: imageUrl) + } + if let data = try? await storageRef.data(maxSize: 5 * 1024 * 1024), + let downloadedImage = UIImage(data: data) { + self.image = downloadedImage + } + } + } +} + +#Preview { + FriendlyMessageImageView(imageUrl: "https://example.com/image.jpg") +} diff --git a/ios/swiftui/FriendlyChatSwiftUI/Views/FriendlyMessageTextView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageTextView.swift similarity index 59% rename from ios/swiftui/FriendlyChatSwiftUI/Views/FriendlyMessageTextView.swift rename to ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageTextView.swift index b03b3fcd..111472a3 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/Views/FriendlyMessageTextView.swift +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageTextView.swift @@ -1,8 +1,8 @@ // // FriendlyMessageTextView.swift -// FriendlyChatSwiftUI +// FriendlyChatSwift // -// Copyright (c) 2022 Google Inc. +// Copyright (c) 2026 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -24,19 +24,18 @@ struct FriendlyMessageTextView: View { var isUserText: Bool var body: some View { - if (isUserText) { - Color("FirebaseBlue") - .clipShape(RoundedRectangle(cornerRadius: 25)) - Text(text) - .padding() - .layoutPriority(1) - .foregroundColor(Color.white) - } else { - Color("FirebaseGray") - .clipShape(RoundedRectangle(cornerRadius: 25)) - Text(text) - .padding() - .layoutPriority(1) - } + Text(text) + .padding(.horizontal, 16) + .padding(.vertical, 10) + .background(isUserText ? Color("FirebaseBlue") : Color("FirebaseGray")) + .foregroundStyle(isUserText ? .white : .primary) + .clipShape(.rect(cornerRadius: 18)) + } +} + +#Preview { + VStack { + FriendlyMessageTextView(text: "Hello from current user!", isUserText: true) + FriendlyMessageTextView(text: "Hello from someone else!", isUserText: false) } } diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageView.swift new file mode 100644 index 00000000..4d7571ea --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/FriendlyMessageView.swift @@ -0,0 +1,83 @@ +// +// FriendlyMessageView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 FirebaseAuth + +struct FriendlyMessageView: View { + var friendlyMessage: FriendlyMessage + + private var isCurrentUserMessage: Bool { + if let currentUid = Auth.auth().currentUser?.uid, + let senderUid = friendlyMessage.userId, + !senderUid.isEmpty { + return currentUid == senderUid + } + if let currentName = Auth.auth().currentUser?.displayName, + let senderName = friendlyMessage.displayName, + !currentName.isEmpty { + return currentName == senderName + } + return false + } + + var body: some View { + HStack(alignment: .top, spacing: 10) { + if !isCurrentUserMessage { + if let name = friendlyMessage.displayName, !name.isEmpty { + InitialsView(name: name) + } else { + Image(systemName: "person.crop.circle.fill") + .font(.system(size: 42)) + .foregroundStyle(.gray) + } + } else { + Spacer() + } + + VStack(alignment: isCurrentUserMessage ? .trailing : .leading, spacing: 4) { + if let imageUrl = friendlyMessage.imageUrl, !imageUrl.isEmpty { + FriendlyMessageImageView(imageUrl: imageUrl) + } else if let text = friendlyMessage.text { + FriendlyMessageTextView(text: text, isUserText: isCurrentUserMessage) + } + + Text(friendlyMessage.displayName ?? "Anonymous") + .font(.caption) + .foregroundStyle(.gray) + } + + if isCurrentUserMessage { + if let name = friendlyMessage.displayName, !name.isEmpty { + InitialsView(name: name) + } else { + Image(systemName: "person.crop.circle.fill") + .font(.system(size: 42)) + .foregroundStyle(.gray) + } + } else { + Spacer() + } + } + } +} + +#Preview { + FriendlyMessageView(friendlyMessage: FriendlyMessage(id: "1", text: "Hello world", displayName: "Google", imageUrl: nil)) +} diff --git a/ios/swiftui/FriendlyChatSwiftUI/Views/HeaderView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/HeaderView.swift similarity index 67% rename from ios/swiftui/FriendlyChatSwiftUI/Views/HeaderView.swift rename to ios-starter/swift-starter/FriendlyChatSwift/Views/HeaderView.swift index 5e1e6ad6..436ecf4c 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/Views/HeaderView.swift +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/HeaderView.swift @@ -1,8 +1,8 @@ // // HeaderView.swift -// FriendlyChatSwiftUI +// FriendlyChatSwift // -// Copyright (c) 2022 Google Inc. +// Copyright (c) 2026 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,12 +21,19 @@ import SwiftUI struct HeaderView: View { var body: some View { - Text("Friendly Chat") - .fontWeight(.bold) - .frame(width: 375, height: 30, alignment: .topLeading) - .font(.title) - .padding() - .background(Color("FirebaseOrange")) - .foregroundColor(.white) + HStack { + Text("Friendly Chat") + .fontWeight(.bold) + .font(.title2) + Spacer() + } + .padding() + .frame(maxWidth: .infinity) + .background(Color("FirebaseOrange")) + .foregroundStyle(.white) } } + +#Preview { + HeaderView() +} diff --git a/ios/swiftui/FriendlyChatSwiftUI/Views/InitialsView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/InitialsView.swift similarity index 73% rename from ios/swiftui/FriendlyChatSwiftUI/Views/InitialsView.swift rename to ios-starter/swift-starter/FriendlyChatSwift/Views/InitialsView.swift index 782b85dd..d63c2ea2 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/Views/InitialsView.swift +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/InitialsView.swift @@ -1,8 +1,8 @@ // // InitialsView.swift -// FriendlyChatSwiftUI +// FriendlyChatSwift // -// Copyright (c) 2022 Google Inc. +// Copyright (c) 2026 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,8 +26,15 @@ struct InitialsView: View { ZStack(alignment: .center) { Circle() .frame(width: 45, height: 45) - .foregroundColor(Color("FirebaseYellow")) - Text(name.prefix(1)) + .foregroundStyle(Color("FirebaseYellow")) + Text(name.prefix(1).uppercased()) + .font(.headline) + .fontWeight(.bold) + .foregroundStyle(.black) } } } + +#Preview { + InitialsView(name: "Google") +} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Views/LoginView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/LoginView.swift new file mode 100644 index 00000000..184cbfb1 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/LoginView.swift @@ -0,0 +1,100 @@ +// +// LoginView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 + +struct LoginView: View { + @Bindable var userViewModel: UserViewModel + @State private var email = "" + @State private var password = "" + @State private var signUpViewPresented = false + + var body: some View { + VStack(spacing: 24) { + Text("Friendly Chat") + .font(.largeTitle) + .fontWeight(.bold) + .foregroundStyle(Color("FirebaseOrange")) + + Text("LOGIN") + .font(.title2) + .fontWeight(.semibold) + + VStack(spacing: 16) { + HStack { + Image(systemName: "envelope.fill") + .foregroundStyle(.gray) + TextField("Email", text: $email) + .keyboardType(.emailAddress) + .textInputAutocapitalization(.never) + .autocorrectionDisabled() + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + + HStack { + Image(systemName: "lock.fill") + .foregroundStyle(.gray) + SecureField("Password", text: $password) + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + } + .padding(.horizontal, 32) + + Button(action: { + Task { + await userViewModel.signIn(email: email, password: password) + } + }) { + Text("LOGIN") + .font(.headline) + .foregroundStyle(.white) + .padding() + .frame(maxWidth: .infinity) + .background(Color("FirebaseOrange")) + .clipShape(Capsule()) + } + .padding(.horizontal, 32) + + HStack { + Text("Don't have an account?") + Button("Sign Up") { + signUpViewPresented = true + } + .fontWeight(.bold) + .foregroundStyle(Color("FirebaseOrange")) + } + .sheet(isPresented: $signUpViewPresented) { + SignUpView(userViewModel: userViewModel, isPresented: $signUpViewPresented) + } + } + .alert("Notice", isPresented: $userViewModel.showAlert) { + Button("OK", role: .cancel) { } + } message: { + Text(userViewModel.errorMessage ?? "") + } + } +} + +#Preview { + LoginView(userViewModel: UserViewModel()) +} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Views/ProfileView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/ProfileView.swift new file mode 100644 index 00000000..97b47167 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/ProfileView.swift @@ -0,0 +1,92 @@ +// +// ProfileView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 FirebaseAuth + +struct ProfileView: View { + @Binding var isPresented: Bool + var userViewModel: UserViewModel + @State private var displayName = Auth.auth().currentUser?.displayName ?? "" + + var body: some View { + NavigationStack { + VStack(spacing: 24) { + VStack(spacing: 8) { + Image(systemName: "person.circle.fill") + .font(.system(size: 80)) + .foregroundStyle(Color("FirebaseOrange")) + Text(Auth.auth().currentUser?.email ?? "User Profile") + .font(.subheadline) + .foregroundStyle(.gray) + } + .padding(.top, 32) + + VStack(alignment: .leading, spacing: 8) { + Text("DISPLAY NAME") + .font(.caption) + .fontWeight(.semibold) + .foregroundStyle(.gray) + + HStack { + Image(systemName: "person.fill") + .foregroundStyle(.gray) + TextField("Display Name", text: $displayName) + .autocorrectionDisabled() + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + } + .padding(.horizontal, 32) + + Button(action: { + Task { + await userViewModel.updateDisplayName(displayName) + isPresented = false + } + }) { + Text("UPDATE PROFILE") + .font(.headline) + .foregroundStyle(.white) + .padding() + .frame(maxWidth: .infinity) + .background(Color("FirebaseOrange")) + .clipShape(Capsule()) + } + .padding(.horizontal, 32) + + Spacer() + } + .navigationTitle("Profile") + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .topBarTrailing) { + Button("Done") { + isPresented = false + } + } + } + } + } +} + +#Preview { + ProfileView(isPresented: .constant(true), userViewModel: UserViewModel()) +} diff --git a/ios-starter/swift-starter/FriendlyChatSwift/Views/SignUpView.swift b/ios-starter/swift-starter/FriendlyChatSwift/Views/SignUpView.swift new file mode 100644 index 00000000..ef81fd32 --- /dev/null +++ b/ios-starter/swift-starter/FriendlyChatSwift/Views/SignUpView.swift @@ -0,0 +1,111 @@ +// +// SignUpView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 + +struct SignUpView: View { + @Bindable var userViewModel: UserViewModel + @Binding var isPresented: Bool + + @State private var email = "" + @State private var password = "" + @State private var displayName = "" + + var body: some View { + VStack(spacing: 24) { + Text("CREATE ACCOUNT") + .font(.title2) + .fontWeight(.bold) + .foregroundStyle(Color("FirebaseOrange")) + .padding(.top, 24) + + VStack(spacing: 16) { + HStack { + Image(systemName: "person.fill") + .foregroundStyle(.gray) + TextField("Display Name", text: $displayName) + .autocorrectionDisabled() + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + + HStack { + Image(systemName: "envelope.fill") + .foregroundStyle(.gray) + TextField("Email", text: $email) + .keyboardType(.emailAddress) + .textInputAutocapitalization(.never) + .autocorrectionDisabled() + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + + HStack { + Image(systemName: "lock.fill") + .foregroundStyle(.gray) + SecureField("Password", text: $password) + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + } + .padding(.horizontal, 32) + + Button(action: { + Task { + await userViewModel.signUp(email: email, password: password, displayName: displayName) + if userViewModel.user != nil { + isPresented = false + } + } + }) { + Text("SIGN UP") + .font(.headline) + .foregroundStyle(.white) + .padding() + .frame(maxWidth: .infinity) + .background(Color("FirebaseOrange")) + .clipShape(Capsule()) + } + .padding(.horizontal, 32) + + HStack { + Text("Already have an account?") + Button("Login") { + isPresented = false + } + .fontWeight(.bold) + .foregroundStyle(Color("FirebaseOrange")) + } + + Spacer() + } + .alert("Notice", isPresented: $userViewModel.showAlert) { + Button("OK", role: .cancel) { } + } message: { + Text(userViewModel.errorMessage ?? "") + } + } +} + +#Preview { + SignUpView(userViewModel: UserViewModel(), isPresented: .constant(true)) +} diff --git a/ios-starter/swift-starter/Podfile b/ios-starter/swift-starter/Podfile deleted file mode 100644 index 36978fc3..00000000 --- a/ios-starter/swift-starter/Podfile +++ /dev/null @@ -1,16 +0,0 @@ -# FriendlyChat Codelab - -use_frameworks! -platform :ios, '9.0' - -pod 'Firebase/AdMob' -pod 'Firebase/Analytics' -pod 'Firebase/Auth' -pod 'Firebase/Database' -pod 'Firebase/RemoteConfig' -pod 'Firebase/Storage' -pod 'Firebase/Crashlytics' -pod 'GoogleSignIn' - -target 'FriendlyChatSwift' do -end diff --git a/ios-starter/swift-starter/Podfile.lock b/ios-starter/swift-starter/Podfile.lock deleted file mode 100644 index 8a9ff825..00000000 --- a/ios-starter/swift-starter/Podfile.lock +++ /dev/null @@ -1,185 +0,0 @@ -PODS: - - AppAuth (1.7.2): - - AppAuth/Core (= 1.7.2) - - AppAuth/ExternalUserAgent (= 1.7.2) - - AppAuth/Core (1.7.2) - - AppAuth/ExternalUserAgent (1.7.2): - - AppAuth/Core - - Firebase/AdMob (3.6.0): - - Firebase/Analytics - - Google-Mobile-Ads-SDK (= 7.11.0) - - Firebase/Analytics (3.6.0): - - FirebaseAnalytics (= 3.4.2) - - Firebase/Auth (3.6.0): - - Firebase/Analytics - - FirebaseAuth (= 3.0.5) - - Firebase/CoreOnly (9.6.0): - - FirebaseCore (= 9.6.0) - - Firebase/Crashlytics (9.6.0): - - Firebase/CoreOnly - - FirebaseCrashlytics (~> 9.6.0) - - Firebase/Database (3.6.0): - - Firebase/Analytics - - FirebaseDatabase (= 3.0.3) - - Firebase/RemoteConfig (3.6.0): - - Firebase/Analytics - - FirebaseRemoteConfig (= 1.3.0) - - Firebase/Storage (3.6.0): - - Firebase/Analytics - - FirebaseStorage (= 1.0.3) - - FirebaseAnalytics (3.4.2): - - FirebaseInstanceID (~> 1.0) - - GoogleInterchangeUtilities (~> 1.2) - - GoogleSymbolUtilities (~> 1.1) - - GoogleUtilities (~> 1.2) - - FirebaseAuth (3.0.5): - - FirebaseAnalytics (~> 3.3) - - GoogleNetworkingUtilities (~> 1.2) - - GoogleUtilities (~> 1.2) - - FirebaseCore (9.6.0): - - FirebaseCoreDiagnostics (~> 9.0) - - FirebaseCoreInternal (~> 9.0) - - GoogleUtilities/Environment (~> 7.7) - - GoogleUtilities/Logger (~> 7.7) - - FirebaseCoreDiagnostics (9.6.0): - - GoogleDataTransport (< 10.0.0, >= 9.1.4) - - GoogleUtilities/Environment (~> 7.7) - - GoogleUtilities/Logger (~> 7.7) - - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseCoreInternal (9.6.0): - - "GoogleUtilities/NSData+zlib (~> 7.7)" - - FirebaseCrashlytics (9.6.0): - - FirebaseCore (~> 9.0) - - FirebaseInstallations (~> 9.0) - - GoogleDataTransport (< 10.0.0, >= 9.1.4) - - GoogleUtilities/Environment (~> 7.7) - - nanopb (< 2.30910.0, >= 2.30908.0) - - PromisesObjC (~> 2.1) - - FirebaseDatabase (3.0.3): - - FirebaseAnalytics (~> 3.3) - - FirebaseInstallations (9.6.0): - - FirebaseCore (~> 9.0) - - GoogleUtilities/Environment (~> 7.7) - - GoogleUtilities/UserDefaults (~> 7.7) - - PromisesObjC (~> 2.1) - - FirebaseInstanceID (1.0.9) - - FirebaseRemoteConfig (1.3.0): - - FirebaseAnalytics (~> 3.3) - - FirebaseInstanceID (~> 1.0) - - GoogleInterchangeUtilities (~> 1.2) - - GoogleIPhoneUtilities (~> 1.2) - - GoogleSymbolUtilities (~> 1.1) - - GoogleUtilities (~> 1.2) - - FirebaseStorage (1.0.3): - - FirebaseAnalytics (~> 3.3) - - GoogleNetworkingUtilities (~> 1.2) - - Google-Mobile-Ads-SDK (7.11.0) - - GoogleDataTransport (9.4.1): - - GoogleUtilities/Environment (~> 7.7) - - nanopb (< 2.30911.0, >= 2.30908.0) - - PromisesObjC (< 3.0, >= 1.2) - - GoogleInterchangeUtilities (1.2.2): - - GoogleSymbolUtilities (~> 1.1) - - GoogleIPhoneUtilities (1.2.1): - - GoogleSymbolUtilities (~> 1.0) - - GoogleUtilities (~> 1.0) - - GoogleNetworkingUtilities (1.2.2): - - GoogleSymbolUtilities (~> 1.1) - - GoogleSignIn (6.2.4): - - AppAuth (~> 1.5) - - GTMAppAuth (~> 1.3) - - GTMSessionFetcher/Core (< 3.0, >= 1.1) - - GoogleSymbolUtilities (1.1.2) - - GoogleUtilities (1.3.2): - - GoogleSymbolUtilities (~> 1.1) - - GoogleUtilities/Environment (7.13.0): - - GoogleUtilities/Privacy - - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.13.0): - - GoogleUtilities/Environment - - GoogleUtilities/Privacy - - "GoogleUtilities/NSData+zlib (7.13.0)": - - GoogleUtilities/Privacy - - GoogleUtilities/Privacy (7.13.0) - - GoogleUtilities/UserDefaults (7.13.0): - - GoogleUtilities/Logger - - GoogleUtilities/Privacy - - GTMAppAuth (1.3.1): - - AppAuth/Core (~> 1.6) - - GTMSessionFetcher/Core (< 3.0, >= 1.5) - - GTMSessionFetcher/Core (2.3.0) - - nanopb (2.30909.1): - - nanopb/decode (= 2.30909.1) - - nanopb/encode (= 2.30909.1) - - nanopb/decode (2.30909.1) - - nanopb/encode (2.30909.1) - - PromisesObjC (2.4.0) - -DEPENDENCIES: - - Firebase/AdMob - - Firebase/Analytics - - Firebase/Auth - - Firebase/Crashlytics - - Firebase/Database - - Firebase/RemoteConfig - - Firebase/Storage - - GoogleSignIn - -SPEC REPOS: - trunk: - - AppAuth - - Firebase - - FirebaseAnalytics - - FirebaseAuth - - FirebaseCore - - FirebaseCoreDiagnostics - - FirebaseCoreInternal - - FirebaseCrashlytics - - FirebaseDatabase - - FirebaseInstallations - - FirebaseInstanceID - - FirebaseRemoteConfig - - FirebaseStorage - - Google-Mobile-Ads-SDK - - GoogleDataTransport - - GoogleInterchangeUtilities - - GoogleIPhoneUtilities - - GoogleNetworkingUtilities - - GoogleSignIn - - GoogleSymbolUtilities - - GoogleUtilities - - GTMAppAuth - - GTMSessionFetcher - - nanopb - - PromisesObjC - -SPEC CHECKSUMS: - AppAuth: ca2458caccec349cc1e26d8d9e8fd7d22f1d01f3 - Firebase: 34187200ef4979dbd485c7aa685ef078bf587c86 - FirebaseAnalytics: 3f5358d9104adf159cc8d99b7b501e50099a39ad - FirebaseAuth: 75a062bbf2d3c97d1e6e55bbc110e13a6853e25d - FirebaseCore: 2082fffcd855f95f883c0a1641133eb9bbe76d40 - FirebaseCoreDiagnostics: 99a495094b10a57eeb3ae8efa1665700ad0bdaa6 - FirebaseCoreInternal: bca76517fe1ed381e989f5e7d8abb0da8d85bed3 - FirebaseCrashlytics: 3210572ddb77801e5a0bd9d7bc890769f2066a0c - FirebaseDatabase: 750a4a0fe18ef114318876fd654b2d9c671e0992 - FirebaseInstallations: 0a115432c4e223c5ab20b0dbbe4cbefa793a0e8e - FirebaseInstanceID: 2d0518b1378fe9d685ef40cbdd63d2fdc1125339 - FirebaseRemoteConfig: 981f45d4278281cfefa8f48a6f5c566f2c95ac5a - FirebaseStorage: 3992817bf405f5c1a4f8349678d22724cd0ef509 - Google-Mobile-Ads-SDK: 0e864ab93ba1ff8afe92e16de0e4e883f581ed33 - GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a - GoogleInterchangeUtilities: d5bc4d88d5b661ab72f9d70c58d02ca8c27ad1f7 - GoogleIPhoneUtilities: 63f25e93a3ddcb66884d182aab3a660d98f1479b - GoogleNetworkingUtilities: 3edd3a8161347494f2da60ea0deddc8a472d94cb - GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a - GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96 - GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152 - GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd - GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2 - nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5 - PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 - -PODFILE CHECKSUM: 7ac21aa08bcf2fc450d620d791eba9687dcd6d10 - -COCOAPODS: 1.15.2 diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png index 5779681c..67b3e56b 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png index 451dedeb..e9dc2f38 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png index a4e88111..e5893dbd 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png index 9dd85950..3cf1aeb2 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json index 10f123d6..3cb52959 100644 --- a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,86 +1,106 @@ { - "images": [ + "images" : [ { - "filename": "logo1024-iphone-29@2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "29x29" + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" }, { - "filename": "logo1024-iphone-29@3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "29x29" + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" }, { - "filename": "logo1024-iphone-40@2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "40x40" + "size" : "29x29", + "idiom" : "iphone", + "filename" : "logo1024-iphone-29@2x.png", + "scale" : "2x" }, { - "filename": "logo1024-iphone-40@3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "40x40" + "size" : "29x29", + "idiom" : "iphone", + "filename" : "logo1024-iphone-29@3x.png", + "scale" : "3x" }, { - "filename": "AppIcon-60-2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "60x60" + "size" : "40x40", + "idiom" : "iphone", + "filename" : "logo1024-iphone-40@2x.png", + "scale" : "2x" }, { - "filename": "AppIcon-60-3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "60x60" + "size" : "40x40", + "idiom" : "iphone", + "filename" : "logo1024-iphone-40@3x.png", + "scale" : "3x" }, { - "filename": "logo1024-ipad-29@1x.png", - "idiom": "ipad", - "scale": "1x", - "size": "29x29" + "size" : "60x60", + "idiom" : "iphone", + "filename" : "AppIcon-60-2x.png", + "scale" : "2x" }, { - "filename": "logo1024-ipad-29@2x.png", - "idiom": "ipad", - "scale": "2x", - "size": "29x29" + "size" : "60x60", + "idiom" : "iphone", + "filename" : "AppIcon-60-3x.png", + "scale" : "3x" }, { - "filename": "logo1024-ipad-40@1x.png", - "idiom": "ipad", - "scale": "1x", - "size": "40x40" + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" }, { - "filename": "logo1024-ipad-40@2x.png", - "idiom": "ipad", - "scale": "2x", - "size": "40x40" + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" }, { - "filename": "AppIcon-76.png", - "idiom": "ipad", - "scale": "1x", - "size": "76x76" + "size" : "29x29", + "idiom" : "ipad", + "filename" : "logo1024-ipad-29@1x.png", + "scale" : "1x" }, { - "filename": "AppIcon-76-2x.png", - "idiom": "ipad", - "scale": "2x", - "size": "76x76" + "size" : "29x29", + "idiom" : "ipad", + "filename" : "logo1024-ipad-29@2x.png", + "scale" : "2x" }, { - "filename": "logo1024-ipad-83@2x.png", - "idiom": "ipad", - "scale": "2x", - "size": "83.5x83.5" + "size" : "40x40", + "idiom" : "ipad", + "filename" : "logo1024-ipad-40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "logo1024-ipad-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "AppIcon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "AppIcon-76-2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "logo1024-ipad-83@2x.png", + "scale" : "2x" } ], - "info": { - "author": "xcode", - "version": 1 + "info" : { + "version" : 1, + "author" : "xcode" } } \ No newline at end of file diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png index c3252dac..bfe6e8a6 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png index a51aed88..b8ff5501 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png index 6c930900..62c79118 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png index 9167b50c..4a968eac 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png index 300a49e6..12ac4307 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png index a51aed88..b8ff5501 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png index e51af9a6..3b8bbd50 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png index 9167b50c..4a968eac 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png index 5779681c..4c1f87e7 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png and b/ios-starter/swift-starter/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png b/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png index 0dae4835..31814ea0 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png and b/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png b/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png index cf3f0001..60429dbd 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png and b/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png differ diff --git a/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png b/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png index 0541acfa..2bdf879f 100644 Binary files a/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png and b/ios-starter/swift-starter/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png differ diff --git a/ios-starter/swift-starter/shared/assets/logo1024.png b/ios-starter/swift-starter/shared/assets/logo1024.png index 126686c8..2bdf879f 100644 Binary files a/ios-starter/swift-starter/shared/assets/logo1024.png and b/ios-starter/swift-starter/shared/assets/logo1024.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png index 5779681c..4c1f87e7 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png index 451dedeb..ed914a40 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png index a4e88111..24cd993e 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png index 9dd85950..24043f30 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png index c3252dac..c6e79f21 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png index a51aed88..af860a57 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png index 6c930900..d810c46a 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png index 9167b50c..00dfc7bc 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png index 300a49e6..426df780 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png index a51aed88..af860a57 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png index e51af9a6..c6a059b7 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png index 9167b50c..00dfc7bc 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png differ diff --git a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png index 5779681c..8984adca 100644 Binary files a/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png and b/ios/objc/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png differ diff --git a/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png b/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png index 0dae4835..10da7a76 100644 Binary files a/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png and b/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png differ diff --git a/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png b/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png index cf3f0001..f4bded5c 100644 Binary files a/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png and b/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png differ diff --git a/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png b/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png index 0541acfa..311aaad4 100644 Binary files a/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png and b/ios/objc/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png differ diff --git a/ios/objc/shared/assets/logo1024.png b/ios/objc/shared/assets/logo1024.png index 126686c8..311aaad4 100644 Binary files a/ios/objc/shared/assets/logo1024.png and b/ios/objc/shared/assets/logo1024.png differ diff --git a/ios/swift/FriendlyChatSwift.xcodeproj/project.pbxproj b/ios/swift/FriendlyChatSwift.xcodeproj/project.pbxproj index ac213f37..f2a931b0 100644 --- a/ios/swift/FriendlyChatSwift.xcodeproj/project.pbxproj +++ b/ios/swift/FriendlyChatSwift.xcodeproj/project.pbxproj @@ -3,37 +3,54 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ - 107960731C612531003DB6CC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 107960711C612531003DB6CC /* Main.storyboard */; }; - 10AF4CB31DD236DE0096D192 /* logo1024.png in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CAF1DD236DE0096D192 /* logo1024.png */; }; - 10AF4CB41DD236DE0096D192 /* Bladefile in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CB01DD236DE0096D192 /* Bladefile */; }; - 10AF4CB51DD236DE0096D192 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CB11DD236DE0096D192 /* Images.xcassets */; }; - 10AF4CB61DD236DE0096D192 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 10AF4CB21DD236DE0096D192 /* LaunchScreen.xib */; }; - 2C595F061B34B73A00355AE7 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C595F041B34B73A00355AE7 /* Constants.swift */; }; - 2C8E6C2B1B16875B0073CE3D /* SignInViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */; }; - 2CA807BC1B21702E009AD7F2 /* MeasurementHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */; }; - 5F5A537E1ADE67D500F81DF0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */; }; - 5F5A53801ADE67D500F81DF0 /* FCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */; }; + 02FB2823443E51E454F39059 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6258EC9A1529A142E8BB350 /* LoginView.swift */; }; + 0C9FEBB8AEDA41AEE860F3A2 /* FriendlyMessageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C611996A2B2DB27FD35A4B80 /* FriendlyMessageViewModel.swift */; }; + 1D9D08C3496A6447DE63C6D5 /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960ABD31D77C3BCB6005E6DD /* HeaderView.swift */; }; + 1E603898B9A499339A32E5BD /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 1162055A82E15933ADDC8E93 /* FirebaseStorage */; }; + 34383D3D8A62224EE3C8D36F /* FriendlyMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8012FE2238289B6B419D08D2 /* FriendlyMessageView.swift */; }; + 4599A4AB53E0DA80A97F7BED /* InitialsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C466A78D37B065EE1FAFFC6 /* InitialsView.swift */; }; + 6D1CEB94DC738B6D00C79890 /* FriendlyMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FD525F044EF30F6E829D073 /* FriendlyMessage.swift */; }; + 76EFBCE764E49DC331695269 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EC069E3AC48FF7EC173DA8C /* ContentView.swift */; }; + 8DBECA19303F9C5700927717 /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = 8DBECA18303F9C5700927717 /* FirebaseFirestore */; }; + 8DBECA1B303FA32600927717 /* FirebaseDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = 17736B3C989694E25473CE7C /* FirebaseDatabase */; }; + 96F4781712D71426C2C5D0E0 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8FC28A10A9AF1B45E474161D /* GoogleService-Info.plist */; }; + 9CED26083BB1BC268B3BE004 /* UserViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED82E90882211A500080E97 /* UserViewModel.swift */; }; + A0E713A6F1DF3D497757B854 /* FriendlyChatSwiftApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA2DDA879335D37F9250246D /* FriendlyChatSwiftApp.swift */; }; + B0AA9F2CB8EF47B869E4B8C3 /* FriendlyMessageImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61F3924C13DFEEE8F9E97A37 /* FriendlyMessageImageView.swift */; }; + B1FA7BB8637BF11F9F588DB0 /* FriendlyMessageTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4766BB0C7F2DBF700965F5CB /* FriendlyMessageTextView.swift */; }; + B33FEA198B0AB20A7D62DAFE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 87480CF2D86934ADC836664F /* Assets.xcassets */; }; + DDF4D1F2AE128E62059AF518 /* FooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 711310CF42A5A4C96B61E445 /* FooterView.swift */; }; + E46063AAD37402C0FE016AA9 /* SignUpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22BBD65D1C35081C7863F0CA /* SignUpView.swift */; }; + EBA060EAE1432868D83084F8 /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 01497A6DEE6AF81ED1C464F3 /* FirebaseAuth */; }; + EE358390F1A2C8E6745D1DD1 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4CC558835D3398A6DE21453 /* ProfileView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 1037935F1BF4256400C88958 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = Pods/Firebase/Headers/module.modulemap; sourceTree = ""; }; - 106E09CC1E4E5DB800A0FA44 /* FriendlyChatSwift.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = FriendlyChatSwift.entitlements; sourceTree = ""; }; - 107960721C612531003DB6CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 107960741C61253B003DB6CC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 10AF4CAF1DD236DE0096D192 /* logo1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo1024.png; sourceTree = ""; }; - 10AF4CB01DD236DE0096D192 /* Bladefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Bladefile; sourceTree = ""; }; 10AF4CB11DD236DE0096D192 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 10AF4CB21DD236DE0096D192 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; - 2C595F041B34B73A00355AE7 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; - 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignInViewController.swift; sourceTree = ""; }; - 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeasurementHelper.swift; sourceTree = ""; }; + 1C466A78D37B065EE1FAFFC6 /* InitialsView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = InitialsView.swift; sourceTree = ""; }; + 22BBD65D1C35081C7863F0CA /* SignUpView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SignUpView.swift; sourceTree = ""; }; + 4766BB0C7F2DBF700965F5CB /* FriendlyMessageTextView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessageTextView.swift; sourceTree = ""; }; 5F5A53791ADE67D500F81DF0 /* FriendlyChatSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FriendlyChatSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FCViewController.swift; sourceTree = ""; }; + 61F3924C13DFEEE8F9E97A37 /* FriendlyMessageImageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessageImageView.swift; sourceTree = ""; }; + 711310CF42A5A4C96B61E445 /* FooterView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FooterView.swift; sourceTree = ""; }; + 7EC069E3AC48FF7EC173DA8C /* ContentView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 8012FE2238289B6B419D08D2 /* FriendlyMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessageView.swift; sourceTree = ""; }; + 87480CF2D86934ADC836664F /* Assets.xcassets */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 8FC28A10A9AF1B45E474161D /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 8FD525F044EF30F6E829D073 /* FriendlyMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessage.swift; sourceTree = ""; }; + 960ABD31D77C3BCB6005E6DD /* HeaderView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; + C611996A2B2DB27FD35A4B80 /* FriendlyMessageViewModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyMessageViewModel.swift; sourceTree = ""; }; + CA2DDA879335D37F9250246D /* FriendlyChatSwiftApp.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FriendlyChatSwiftApp.swift; sourceTree = ""; }; + D6258EC9A1529A142E8BB350 /* LoginView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; + DED82E90882211A500080E97 /* UserViewModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserViewModel.swift; sourceTree = ""; }; + E4CC558835D3398A6DE21453 /* ProfileView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -41,17 +58,28 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 8DBECA1B303FA32600927717 /* FirebaseDatabase in Frameworks */, + EBA060EAE1432868D83084F8 /* FirebaseAuth in Frameworks */, + 1E603898B9A499339A32E5BD /* FirebaseStorage in Frameworks */, + 8DBECA19303F9C5700927717 /* FirebaseFirestore in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 0FFCEDB3CDB4C091120766AA /* Models */ = { + isa = PBXGroup; + children = ( + 8FD525F044EF30F6E829D073 /* FriendlyMessage.swift */, + ); + path = Models; + sourceTree = ""; + }; 10AF4CAD1DD236DE0096D192 /* shared */ = { isa = PBXGroup; children = ( 10AF4CAE1DD236DE0096D192 /* assets */, - 10AF4CB01DD236DE0096D192 /* Bladefile */, 10AF4CB11DD236DE0096D192 /* Images.xcassets */, 10AF4CB21DD236DE0096D192 /* LaunchScreen.xib */, ); @@ -66,6 +94,32 @@ path = assets; sourceTree = ""; }; + 25A9090EA43CF9C5D009EB3B /* Views */ = { + isa = PBXGroup; + children = ( + 7EC069E3AC48FF7EC173DA8C /* ContentView.swift */, + 960ABD31D77C3BCB6005E6DD /* HeaderView.swift */, + 711310CF42A5A4C96B61E445 /* FooterView.swift */, + 8012FE2238289B6B419D08D2 /* FriendlyMessageView.swift */, + 4766BB0C7F2DBF700965F5CB /* FriendlyMessageTextView.swift */, + 61F3924C13DFEEE8F9E97A37 /* FriendlyMessageImageView.swift */, + 1C466A78D37B065EE1FAFFC6 /* InitialsView.swift */, + D6258EC9A1529A142E8BB350 /* LoginView.swift */, + 22BBD65D1C35081C7863F0CA /* SignUpView.swift */, + E4CC558835D3398A6DE21453 /* ProfileView.swift */, + ); + path = Views; + sourceTree = ""; + }; + 4F0169EFB16C39A845E1763B /* ViewModels */ = { + isa = PBXGroup; + children = ( + DED82E90882211A500080E97 /* UserViewModel.swift */, + C611996A2B2DB27FD35A4B80 /* FriendlyMessageViewModel.swift */, + ); + path = ViewModels; + sourceTree = ""; + }; 5F5A53431ADE670C00F81DF0 = { isa = PBXGroup; children = ( @@ -87,26 +141,16 @@ 5F5A537A1ADE67D500F81DF0 /* FriendlyChatSwift */ = { isa = PBXGroup; children = ( - 106E09CC1E4E5DB800A0FA44 /* FriendlyChatSwift.entitlements */, - 5F5A537D1ADE67D500F81DF0 /* AppDelegate.swift */, - 5F5A537F1ADE67D500F81DF0 /* FCViewController.swift */, - 2CA807BB1B21702E009AD7F2 /* MeasurementHelper.swift */, - 2C8E6C2A1B16875B0073CE3D /* SignInViewController.swift */, - 2C595F041B34B73A00355AE7 /* Constants.swift */, - 5F5A537B1ADE67D500F81DF0 /* Supporting Files */, + CA2DDA879335D37F9250246D /* FriendlyChatSwiftApp.swift */, + 8FC28A10A9AF1B45E474161D /* GoogleService-Info.plist */, + 87480CF2D86934ADC836664F /* Assets.xcassets */, + 0FFCEDB3CDB4C091120766AA /* Models */, + 4F0169EFB16C39A845E1763B /* ViewModels */, + 25A9090EA43CF9C5D009EB3B /* Views */, ); path = FriendlyChatSwift; sourceTree = ""; }; - 5F5A537B1ADE67D500F81DF0 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 107960711C612531003DB6CC /* Main.storyboard */, - 107960741C61253B003DB6CC /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; AD1F1C80A93A096F652504F5 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -132,6 +176,12 @@ dependencies = ( ); name = FriendlyChatSwift; + packageProductDependencies = ( + 01497A6DEE6AF81ED1C464F3 /* FirebaseAuth */, + 17736B3C989694E25473CE7C /* FirebaseDatabase */, + 1162055A82E15933ADDC8E93 /* FirebaseStorage */, + 8DBECA18303F9C5700927717 /* FirebaseFirestore */, + ); productName = FriendlyPingSwift; productReference = 5F5A53791ADE67D500F81DF0 /* FriendlyChatSwift.app */; productType = "com.apple.product-type.application"; @@ -169,6 +219,9 @@ Base, ); mainGroup = 5F5A53431ADE670C00F81DF0; + packageReferences = ( + B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + ); productRefGroup = 5F5A534D1ADE670C00F81DF0 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -183,11 +236,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 10AF4CB61DD236DE0096D192 /* LaunchScreen.xib in Resources */, - 10AF4CB41DD236DE0096D192 /* Bladefile in Resources */, - 10AF4CB51DD236DE0096D192 /* Images.xcassets in Resources */, - 107960731C612531003DB6CC /* Main.storyboard in Resources */, - 10AF4CB31DD236DE0096D192 /* logo1024.png in Resources */, + 96F4781712D71426C2C5D0E0 /* GoogleService-Info.plist in Resources */, + B33FEA198B0AB20A7D62DAFE /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -214,27 +264,25 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2C8E6C2B1B16875B0073CE3D /* SignInViewController.swift in Sources */, - 5F5A53801ADE67D500F81DF0 /* FCViewController.swift in Sources */, - 5F5A537E1ADE67D500F81DF0 /* AppDelegate.swift in Sources */, - 2CA807BC1B21702E009AD7F2 /* MeasurementHelper.swift in Sources */, - 2C595F061B34B73A00355AE7 /* Constants.swift in Sources */, + A0E713A6F1DF3D497757B854 /* FriendlyChatSwiftApp.swift in Sources */, + 6D1CEB94DC738B6D00C79890 /* FriendlyMessage.swift in Sources */, + 9CED26083BB1BC268B3BE004 /* UserViewModel.swift in Sources */, + 0C9FEBB8AEDA41AEE860F3A2 /* FriendlyMessageViewModel.swift in Sources */, + 76EFBCE764E49DC331695269 /* ContentView.swift in Sources */, + 1D9D08C3496A6447DE63C6D5 /* HeaderView.swift in Sources */, + DDF4D1F2AE128E62059AF518 /* FooterView.swift in Sources */, + 34383D3D8A62224EE3C8D36F /* FriendlyMessageView.swift in Sources */, + B1FA7BB8637BF11F9F588DB0 /* FriendlyMessageTextView.swift in Sources */, + B0AA9F2CB8EF47B869E4B8C3 /* FriendlyMessageImageView.swift in Sources */, + 4599A4AB53E0DA80A97F7BED /* InitialsView.swift in Sources */, + 02FB2823443E51E454F39059 /* LoginView.swift in Sources */, + E46063AAD37402C0FE016AA9 /* SignUpView.swift in Sources */, + EE358390F1A2C8E6745D1DD1 /* ProfileView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXVariantGroup section */ - 107960711C612531003DB6CC /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 107960721C612531003DB6CC /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 5F5A536D1ADE670C00F81DF0 /* Debug */ = { isa = XCBuildConfiguration; @@ -284,7 +332,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE = "65c2088b-2425-4961-b6d5-0256d4790678"; @@ -335,11 +383,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; MTL_ENABLE_DEBUG_INFO = NO; PROVISIONING_PROFILE = "65c2088b-2425-4961-b6d5-0256d4790678"; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -349,15 +398,17 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_ENTITLEMENTS = FriendlyChatSwift/FriendlyChatSwift.entitlements; + CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; - INFOPLIST_FILE = "$(SRCROOT)/FriendlyChatSwift/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + INFOPLIST_FILE = FriendlyChatSwift/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.codelab.FriendlyChatSwift; PRODUCT_NAME = FriendlyChatSwift; PROVISIONING_PROFILE = ""; @@ -371,15 +422,17 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_ENTITLEMENTS = FriendlyChatSwift/FriendlyChatSwift.entitlements; + CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; - INFOPLIST_FILE = "$(SRCROOT)/FriendlyChatSwift/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + INFOPLIST_FILE = FriendlyChatSwift/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.codelab.FriendlyChatSwift; PRODUCT_NAME = FriendlyChatSwift; PROVISIONING_PROFILE = ""; @@ -411,6 +464,40 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 12.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 01497A6DEE6AF81ED1C464F3 /* FirebaseAuth */ = { + isa = XCSwiftPackageProductDependency; + package = B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAuth; + }; + 1162055A82E15933ADDC8E93 /* FirebaseStorage */ = { + isa = XCSwiftPackageProductDependency; + package = B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseStorage; + }; + 17736B3C989694E25473CE7C /* FirebaseDatabase */ = { + isa = XCSwiftPackageProductDependency; + package = B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseDatabase; + }; + 8DBECA18303F9C5700927717 /* FirebaseFirestore */ = { + isa = XCSwiftPackageProductDependency; + package = B1DF9AC3BEA4D4DF54041A5B /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseFirestore; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 5F5A53441ADE670C00F81DF0 /* Project object */; } diff --git a/ios/swift/FriendlyChatSwift/AppDelegate.swift b/ios/swift/FriendlyChatSwift/AppDelegate.swift deleted file mode 100644 index 482a3f1c..00000000 --- a/ios/swift/FriendlyChatSwift/AppDelegate.swift +++ /dev/null @@ -1,150 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 UIKit -// UserNotifications are only required for the optional FCM step -import UserNotifications - -import Firebase -import GoogleSignIn - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate { - - var window: UIWindow? - - @available(iOS 9.0, *) - func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) - -> Bool { - return self.application(application, - open: url, - sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String, - annotation: "") - } - - func application(_ application: UIApplication, - open url: URL, sourceApplication: String?, annotation: Any) -> Bool { - return GIDSignIn.sharedInstance().handle(url) - } - - func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error?) { - if let error = error { - print("Error \(error)") - return - } - - guard let authentication = user.authentication else { return } - let credential = GoogleAuthProvider.credential(withIDToken: authentication.idToken, - accessToken: authentication.accessToken) - Auth.auth().signIn(with: credential) { (result, error) in - if let error = error { - print("Error \(error)") - return - } - } - } - - func application(_ application: UIApplication, didFinishLaunchingWithOptions - launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - - - FirebaseApp.configure() - GIDSignIn.sharedInstance().clientID = FirebaseApp.app()?.options.clientID - GIDSignIn.sharedInstance().delegate = self - - -//////////////////////////////////////////////////////////////////////// -// // -// CODE BELOW THIS POINT IS ONLY REQUIRED FOR THE OPTIONAL FCM STEP // -// // -//////////////////////////////////////////////////////////////////////// - - // Register for remote notifications. This shows a permission dialog on first run, to - // show the dialog at a more appropriate time move this registration accordingly. - if #available(iOS 10.0, *) { - let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] - UNUserNotificationCenter.current().requestAuthorization( - options: authOptions) {_,_ in } - // For iOS 10 display notification (sent via APNS) - UNUserNotificationCenter.current().delegate = self - } else { - let settings: UIUserNotificationSettings = - UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil) - application.registerUserNotificationSettings(settings) - } - application.registerForRemoteNotifications() - return true - } - - func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) { - // If you are receiving a notification message while your app is in the background, - // this callback will not be fired till the user taps on the notification launching the application. - - showAlert(withUserInfo: userInfo) - } - - func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], - fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { - // If you are receiving a notification message while your app is in the background, - // this callback will not be fired till the user taps on the notification launching the application. - - showAlert(withUserInfo: userInfo) - - completionHandler(UIBackgroundFetchResult.newData) - } - - func showAlert(withUserInfo userInfo: [AnyHashable : Any]) { - let apsKey = "aps" - let gcmMessage = "alert" - let gcmLabel = "google.c.a.c_l" - - if let aps = userInfo[apsKey] as? NSDictionary { - if let message = aps[gcmMessage] as? String { - DispatchQueue.main.async { - let alert = UIAlertController(title: userInfo[gcmLabel] as? String ?? "", - message: message, preferredStyle: .alert) - let dismissAction = UIAlertAction(title: "Dismiss", style: .destructive, handler: nil) - alert.addAction(dismissAction) - self.window?.rootViewController?.presentedViewController?.present(alert, animated: true, completion: nil) - } - } - } - } -} - -@available(iOS 10, *) -extension AppDelegate : UNUserNotificationCenterDelegate { - - // Receive displayed notifications for iOS 10 devices. - func userNotificationCenter(_ center: UNUserNotificationCenter, - willPresent notification: UNNotification, - withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - let userInfo = notification.request.content.userInfo - showAlert(withUserInfo: userInfo) - - // Change this to your preferred presentation option - completionHandler([]) - } - - func userNotificationCenter(_ center: UNUserNotificationCenter, - didReceive response: UNNotificationResponse, - withCompletionHandler completionHandler: @escaping () -> Void) { - let userInfo = response.notification.request.content.userInfo - showAlert(withUserInfo: userInfo) - - completionHandler() - } -} diff --git a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseBlue.colorset/Contents.json b/ios/swift/FriendlyChatSwift/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 76% rename from ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseBlue.colorset/Contents.json rename to ios/swift/FriendlyChatSwift/Assets.xcassets/AccentColor.colorset/Contents.json index 6a846181..58247eba 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/FirebaseBlue.colorset/Contents.json +++ b/ios/swift/FriendlyChatSwift/Assets.xcassets/AccentColor.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "229", - "green" : "155", - "red" : "3" + "blue" : "0", + "green" : "145", + "red" : "255" } }, "idiom" : "universal" diff --git a/ios/swift/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/swift/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..65f1e5ed --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,99 @@ +{ + "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" + }, + { + "filename" : "firebaseLogo120.png", + "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/ios/swift/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png b/ios/swift/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png new file mode 100644 index 00000000..8984adca Binary files /dev/null and b/ios/swift/FriendlyChatSwift/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png differ diff --git a/ios/swiftui/FriendlyChatSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json b/ios/swift/FriendlyChatSwift/Assets.xcassets/Contents.json similarity index 100% rename from ios/swiftui/FriendlyChatSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json rename to ios/swift/FriendlyChatSwift/Assets.xcassets/Contents.json diff --git a/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseBlue.colorset/Contents.json b/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseBlue.colorset/Contents.json new file mode 100644 index 00000000..7d199c35 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseBlue.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "244", + "green" : "133", + "red" : "66" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseGray.colorset/Contents.json b/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseGray.colorset/Contents.json new file mode 100644 index 00000000..1d4795a5 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseGray.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "242", + "green" : "242", + "red" : "242" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseOrange.colorset/Contents.json b/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseOrange.colorset/Contents.json new file mode 100644 index 00000000..58247eba --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseOrange.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0", + "green" : "145", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseYellow.colorset/Contents.json b/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseYellow.colorset/Contents.json new file mode 100644 index 00000000..7a5c6c2f --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Assets.xcassets/FirebaseYellow.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0", + "green" : "196", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/swift/FriendlyChatSwift/Base.lproj/Main.storyboard b/ios/swift/FriendlyChatSwift/Base.lproj/Main.storyboard deleted file mode 100644 index 456ab802..00000000 --- a/ios/swift/FriendlyChatSwift/Base.lproj/Main.storyboard +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/swift/FriendlyChatSwift/Constants.swift b/ios/swift/FriendlyChatSwift/Constants.swift deleted file mode 100644 index 328e7e8b..00000000 --- a/ios/swift/FriendlyChatSwift/Constants.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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. -// - -struct Constants { - - struct NotificationKeys { - static let SignedIn = "onSignInCompleted" - } - - struct Segues { - static let SignInToFp = "SignInToFP" - static let FpToSignIn = "FPToSignIn" - } - - struct MessageFields { - static let name = "name" - static let text = "text" - static let photoURL = "photoUrl" - static let imageURL = "imageUrl" - } -} diff --git a/ios/swift/FriendlyChatSwift/FCViewController.swift b/ios/swift/FriendlyChatSwift/FCViewController.swift deleted file mode 100644 index 0ecd93d6..00000000 --- a/ios/swift/FriendlyChatSwift/FCViewController.swift +++ /dev/null @@ -1,280 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 Photos -import UIKit - -import Firebase -import GoogleSignIn -import GoogleMobileAds - -/** - * AdMob ad unit IDs are not currently stored inside the google-services.plist file. Developers - * using AdMob can store them as custom values in another plist, or simply use constants. Note that - * these ad units are configured to return only test ads, and should not be used outside this sample. - */ -let kBannerAdUnitID = "ca-app-pub-3940256099942544/2934735716" - -@objc(FCViewController) -class FCViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, - UITextFieldDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate { - - // Instance variables - @IBOutlet weak var textField: UITextField! - @IBOutlet weak var sendButton: UIButton! - var ref: DatabaseReference! - var messages: [DataSnapshot]! = [] - var msglength: NSNumber = 10 - fileprivate var _refHandle: DatabaseHandle? - - var storageRef: StorageReference! - var remoteConfig: RemoteConfig! - - @IBOutlet weak var banner: GADBannerView! - @IBOutlet weak var clientTable: UITableView! - - override func viewDidLoad() { - super.viewDidLoad() - - self.clientTable.register(UITableViewCell.self, forCellReuseIdentifier: "tableViewCell") - - configureDatabase() - configureStorage() - configureRemoteConfig() - fetchConfig() - loadAd() - } - - deinit { - if let refHandle = _refHandle { - self.ref.child("messages").removeObserver(withHandle: refHandle) - } - } - - func configureDatabase() { - ref = Database.database().reference() - // Listen for new messages in the Firebase database - _refHandle = self.ref.child("messages").observe(.childAdded, with: { [weak self] (snapshot) -> Void in - guard let strongSelf = self else { return } - strongSelf.messages.append(snapshot) - strongSelf.clientTable.insertRows(at: [IndexPath(row: strongSelf.messages.count-1, section: 0)], with: .automatic) - }) - } - - func configureStorage() { - storageRef = Storage.storage().reference() - } - - func configureRemoteConfig() { - remoteConfig = RemoteConfig.remoteConfig() - // Create Remote Config Setting to enable developer mode. - // Fetching configs from the server is normally limited to 5 requests per hour. - // Setting the fetch interval to zero allows many more requests to be made per - // hour, so developers can test different config values during development. - let remoteConfigSettings = RemoteConfigSettings() - remoteConfigSettings.minimumFetchInterval = 0 - remoteConfig.configSettings = remoteConfigSettings - } - - func fetchConfig() { - // Since the minimum fetch interval is set to zero, the next fetch will go to - // the server unless throttling is in progress. - // The default expiration duration is 43200 (12 hours). - remoteConfig.fetchAndActivate() { [weak self] (status, error) in - if status != .error { - print("Config fetched!") - guard let strongSelf = self else { return } - let friendlyMsgLength = strongSelf.remoteConfig["friendly_msg_length"] - if friendlyMsgLength.source != .static { - strongSelf.msglength = friendlyMsgLength.numberValue! - print("Friendly msg length config: \(strongSelf.msglength)") - } - } else { - print("Config not fetched") - if let error = error { - print("Error \(error)") - } - } - } - } - - @IBAction func didPressFreshConfig(_ sender: AnyObject) { - fetchConfig() - } - - @IBAction func didSendMessage(_ sender: UIButton) { - _ = textFieldShouldReturn(textField) - } - - @IBAction func didPressCrash(_ sender: AnyObject) { - print("Crash button pressed!") - fatalError("Crash for Crashlytics") - } - - func loadAd() { - self.banner.adUnitID = kBannerAdUnitID - self.banner.rootViewController = self - self.banner.load(GADRequest()) - } - - func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { - guard let text = textField.text else { return true } - - let newLength = text.utf16.count + string.utf16.count - range.length - return newLength <= self.msglength.intValue // Bool - } - - // UITableViewDataSource protocol methods - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return messages.count - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - // Dequeue cell - let cell = self.clientTable .dequeueReusableCell(withIdentifier: "tableViewCell", for: indexPath) - // Unpack message from Firebase DataSnapshot - let messageSnapshot: DataSnapshot! = self.messages[indexPath.row] - guard let message = messageSnapshot.value as? [String:String] else { return cell } - let name = message[Constants.MessageFields.name] ?? "" - if let imageURL = message[Constants.MessageFields.imageURL] { - if imageURL.hasPrefix("gs://") { - Storage.storage().reference(forURL: imageURL).getData(maxSize: INT64_MAX) {(data, error) in - if let error = error { - print("Error downloading: \(error)") - return - } - DispatchQueue.main.async { - cell.imageView?.image = UIImage.init(data: data!) - cell.setNeedsLayout() - } - } - } else if let URL = URL(string: imageURL), let data = try? Data(contentsOf: URL) { - cell.imageView?.image = UIImage.init(data: data) - } - cell.textLabel?.text = "sent by: \(name)" - } else { - let text = message[Constants.MessageFields.text] ?? "" - cell.textLabel?.text = name + ": " + text - cell.imageView?.image = UIImage(named: "ic_account_circle") - if let photoURL = message[Constants.MessageFields.photoURL], let URL = URL(string: photoURL), - let data = try? Data(contentsOf: URL) { - cell.imageView?.image = UIImage(data: data) - } - } - return cell - } - - // UITextViewDelegate protocol methods - func textFieldShouldReturn(_ textField: UITextField) -> Bool { - guard let text = textField.text else { return true } - textField.text = "" - view.endEditing(true) - let data = [Constants.MessageFields.text: text] - sendMessage(withData: data) - return true - } - - func sendMessage(withData data: [String: String]) { - var mdata = data - mdata[Constants.MessageFields.name] = Auth.auth().currentUser?.displayName - if let photoURL = Auth.auth().currentUser?.photoURL { - mdata[Constants.MessageFields.photoURL] = photoURL.absoluteString - } - - // Push data to Firebase Database - self.ref.child("messages").childByAutoId().setValue(mdata) - } - - // MARK: - Image Picker - - @IBAction func didTapAddPhoto(_ sender: AnyObject) { - let picker = UIImagePickerController() - picker.delegate = self - if UIImagePickerController.isSourceTypeAvailable(UIImagePickerController.SourceType.camera) { - picker.sourceType = .camera - } else { - picker.sourceType = .photoLibrary - } - - present(picker, animated: true, completion:nil) - } - - func imagePickerController(_ picker: UIImagePickerController, - didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { - picker.dismiss(animated: true, completion:nil) - guard let uid = Auth.auth().currentUser?.uid else { return } - - // if it's a photo from the library, not an image from the camera - if #available(iOS 8.0, *), let referenceURL = info[UIImagePickerController.InfoKey.referenceURL] as? URL { - let assets = PHAsset.fetchAssets(withALAssetURLs: [referenceURL], options: nil) - let asset = assets.firstObject - asset?.requestContentEditingInput(with: nil, completionHandler: { [weak self] (contentEditingInput, info) in - let imageFile = contentEditingInput?.fullSizeImageURL - let filePath = "\(uid)/\(Int(Date.timeIntervalSinceReferenceDate * 1000))/\((referenceURL as AnyObject).lastPathComponent!)" - guard let strongSelf = self else { return } - strongSelf.storageRef.child(filePath) - .putFile(from: imageFile!, metadata: nil) { (metadata, error) in - if let error = error { - let nsError = error as NSError - print("Error uploading: \(nsError.localizedDescription)") - return - } - strongSelf.sendMessage(withData: [Constants.MessageFields.imageURL: strongSelf.storageRef.child((metadata?.path)!).description]) - } - }) - } else { - guard let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage else { return } - let imageData = image.jpegData(compressionQuality: 0.8) - let imagePath = "\(uid)/\(Int(Date.timeIntervalSinceReferenceDate * 1000)).jpg" - let metadata = StorageMetadata() - metadata.contentType = "image/jpeg" - self.storageRef.child(imagePath) - .putData(imageData!, metadata: metadata) { [weak self] (metadata, error) in - if let error = error { - print("Error uploading: \(error)") - return - } - guard let strongSelf = self else { return } - strongSelf.sendMessage(withData: [Constants.MessageFields.imageURL: strongSelf.storageRef.child((metadata?.path)!).description]) - } - } - } - - func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { - picker.dismiss(animated: true, completion:nil) - } - - @IBAction func signOut(_ sender: UIButton) { - let firebaseAuth = Auth.auth() - do { - try firebaseAuth.signOut() - dismiss(animated: true, completion: nil) - } catch let signOutError as NSError { - print ("Error signing out: \(signOutError.localizedDescription)") - } - } - - func showAlert(withTitle title: String, message: String) { - DispatchQueue.main.async { - let alert = UIAlertController(title: title, - message: message, preferredStyle: .alert) - let dismissAction = UIAlertAction(title: "Dismiss", style: .destructive, handler: nil) - alert.addAction(dismissAction) - self.present(alert, animated: true, completion: nil) - } - } - -} diff --git a/ios/swiftui/FriendlyChatSwiftUI/FriendlyChatSwiftUIApp.swift b/ios/swift/FriendlyChatSwift/FriendlyChatSwiftApp.swift similarity index 85% rename from ios/swiftui/FriendlyChatSwiftUI/FriendlyChatSwiftUIApp.swift rename to ios/swift/FriendlyChatSwift/FriendlyChatSwiftApp.swift index 5f102243..4e6728d4 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/FriendlyChatSwiftUIApp.swift +++ b/ios/swift/FriendlyChatSwift/FriendlyChatSwiftApp.swift @@ -1,8 +1,8 @@ // -// FriendlyChatSwiftUIApp.swift -// FriendlyChatSwiftUI +// FriendlyChatSwiftApp.swift +// FriendlyChatSwift // -// Copyright (c) 2022 Google Inc. +// Copyright (c) 2026 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import SwiftUI import FirebaseCore @main -struct FriendlyChatSwiftUIApp: App { +struct FriendlyChatSwiftApp: App { init() { FirebaseApp.configure() } diff --git a/ios/swift/FriendlyChatSwift/Info.plist b/ios/swift/FriendlyChatSwift/Info.plist index 8ee6c5ec..8e93d7ff 100644 --- a/ios/swift/FriendlyChatSwift/Info.plist +++ b/ios/swift/FriendlyChatSwift/Info.plist @@ -2,16 +2,10 @@ - GADIsAdManagerApp - CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion @@ -24,35 +18,16 @@ 1.0 CFBundleSignature ???? - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - REVERSED_CLIENT_ID - - - CFBundleVersion 1 LSRequiresIPhoneOS NSCameraUsageDescription Take and upload photos to Cloud Storage - NSContactsUsageDescription - Used for Firebase Invites NSPhotoLibraryUsageDescription Upload photo to Cloud Storage - UIBackgroundModes - - remote-notification - UILaunchStoryboardName LaunchScreen - UIMainStoryboardFile - Main UIRequiredDeviceCapabilities armv7 diff --git a/ios/swift/FriendlyChatSwift/MeasurementHelper.swift b/ios/swift/FriendlyChatSwift/MeasurementHelper.swift deleted file mode 100644 index ef830ca5..00000000 --- a/ios/swift/FriendlyChatSwift/MeasurementHelper.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 Firebase - -class MeasurementHelper: NSObject { - - static func sendLoginEvent() { - Analytics.logEvent(AnalyticsEventLogin, parameters: nil) - } - - static func sendLogoutEvent() { - Analytics.logEvent("logout", parameters: nil) - } - - static func sendMessageEvent() { - Analytics.logEvent("message", parameters: nil) - } -} diff --git a/ios/swift/FriendlyChatSwift/Models/FriendlyMessage.swift b/ios/swift/FriendlyChatSwift/Models/FriendlyMessage.swift new file mode 100644 index 00000000..16651069 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Models/FriendlyMessage.swift @@ -0,0 +1,67 @@ +// +// FriendlyMessage.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 Foundation +import FirebaseFirestore + +struct FriendlyMessage: Identifiable, Codable { + @DocumentID var id: String? + var text: String? + var displayName: String? + var imageUrl: String? + var userId: String? + + enum CodingKeys: String, CodingKey { + case id + case text + case displayName + case name + case imageUrl + case userId + } + + init(id: String? = nil, text: String? = nil, displayName: String? = nil, imageUrl: String? = nil, userId: String? = nil) { + self.id = id + self.text = text + self.displayName = displayName + self.imageUrl = imageUrl + self.userId = userId + } + + init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + _id = try container.decodeIfPresent(DocumentID.self, forKey: .id) ?? DocumentID(wrappedValue: nil) + text = try container.decodeIfPresent(String.self, forKey: .text) + if let name = try container.decodeIfPresent(String.self, forKey: .displayName) { + displayName = name + } else { + displayName = try container.decodeIfPresent(String.self, forKey: .name) + } + imageUrl = try container.decodeIfPresent(String.self, forKey: .imageUrl) + userId = try container.decodeIfPresent(String.self, forKey: .userId) + } + + func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(text, forKey: .text) + try container.encodeIfPresent(displayName, forKey: .displayName) + try container.encodeIfPresent(imageUrl, forKey: .imageUrl) + try container.encodeIfPresent(userId, forKey: .userId) + } +} diff --git a/ios/swift/FriendlyChatSwift/SignInViewController.swift b/ios/swift/FriendlyChatSwift/SignInViewController.swift deleted file mode 100644 index 0fb8f024..00000000 --- a/ios/swift/FriendlyChatSwift/SignInViewController.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright (c) 2015 Google Inc. -// -// 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 UIKit - -import Firebase -import GoogleSignIn - -@objc(SignInViewController) -class SignInViewController: UIViewController { - - @IBOutlet weak var signInButton: GIDSignInButton! - var handle: AuthStateDidChangeListenerHandle? - - override func viewDidLoad() { - super.viewDidLoad() - GIDSignIn.sharedInstance()?.presentingViewController = self - GIDSignIn.sharedInstance()?.restorePreviousSignIn() - handle = Auth.auth().addStateDidChangeListener() { (auth, user) in - if user != nil { - MeasurementHelper.sendLoginEvent() - self.performSegue(withIdentifier: Constants.Segues.SignInToFp, sender: nil) - } - } - } - - deinit { - if let handle = handle { - Auth.auth().removeStateDidChangeListener(handle) - } - } -} diff --git a/ios/swift/FriendlyChatSwift/ViewModels/FriendlyMessageViewModel.swift b/ios/swift/FriendlyChatSwift/ViewModels/FriendlyMessageViewModel.swift new file mode 100644 index 00000000..e0611589 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/ViewModels/FriendlyMessageViewModel.swift @@ -0,0 +1,65 @@ +// +// FriendlyMessageViewModel.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 Observation +import FirebaseAuth +import FirebaseFirestore + +@MainActor +@Observable +final class FriendlyMessageViewModel { + var messages: [FriendlyMessage] = [] + @ObservationIgnored + private var listenerTask: Task? + + func startListening() { + stopListening() + listenerTask = Task { + let db = Firestore.firestore() + do { + for try await snapshot in db.collection("messages").snapshots { + self.messages = snapshot.documents.compactMap { document in + try? document.data(as: FriendlyMessage.self) + } + } + } catch { + print("Error listening for messages: \(error)") + } + } + } + + func stopListening() { + listenerTask?.cancel() + listenerTask = nil + messages.removeAll() + } + + func sendMessage(text: String?, imageUrl: String?) async throws { + guard let currentUser = Auth.auth().currentUser else { return } + let message = FriendlyMessage( + text: text, + displayName: currentUser.displayName ?? currentUser.email ?? "Anonymous", + imageUrl: imageUrl, + userId: currentUser.uid + ) + let db = Firestore.firestore() + _ = try db.collection("messages").addDocument(from: message) + } +} diff --git a/ios/swift/FriendlyChatSwift/ViewModels/UserViewModel.swift b/ios/swift/FriendlyChatSwift/ViewModels/UserViewModel.swift new file mode 100644 index 00000000..a378d072 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/ViewModels/UserViewModel.swift @@ -0,0 +1,100 @@ +// +// UserViewModel.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 Observation +import FirebaseAuth + +@MainActor +@Observable +final class UserViewModel { + var user: User? + var errorMessage: String? + var showAlert = false + + @ObservationIgnored + private var authTask: Task? + + init() { + authTask = Task { + for await user in Auth.auth().authStateChanges { + self.user = user + } + } + } + + deinit { + authTask?.cancel() + } + + func signIn(email: String, password: String) async { + errorMessage = nil + if email.isEmpty || password.isEmpty { + showError("Please enter both email and password.") + return + } + do { + try await Auth.auth().signIn(withEmail: email, password: password) + } catch { + showError(error.localizedDescription) + } + } + + func signUp(email: String, password: String, displayName: String) async { + errorMessage = nil + if email.isEmpty || password.isEmpty { + showError("Please enter both email and password.") + return + } + do { + let result = try await Auth.auth().createUser(withEmail: email, password: password) + let changeRequest = result.user.createProfileChangeRequest() + changeRequest.displayName = displayName.isEmpty ? email : displayName + try await changeRequest.commitChanges() + self.user = Auth.auth().currentUser + } catch { + showError(error.localizedDescription) + } + } + + func updateDisplayName(_ displayName: String) async { + guard let currentUser = Auth.auth().currentUser else { return } + do { + let changeRequest = currentUser.createProfileChangeRequest() + changeRequest.displayName = displayName + try await changeRequest.commitChanges() + self.user = Auth.auth().currentUser + } catch { + showError(error.localizedDescription) + } + } + + func signOut() { + do { + try Auth.auth().signOut() + } catch { + showError(error.localizedDescription) + } + } + + private func showError(_ message: String) { + errorMessage = message + showAlert = true + } +} diff --git a/ios/swift/FriendlyChatSwift/Views/ContentView.swift b/ios/swift/FriendlyChatSwift/Views/ContentView.swift new file mode 100644 index 00000000..042c6218 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Views/ContentView.swift @@ -0,0 +1,87 @@ +// +// ContentView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 + +struct ContentView: View { + @State private var userViewModel = UserViewModel() + @State private var messageViewModel = FriendlyMessageViewModel() + @State private var profileViewPresented = false + + var body: some View { + if userViewModel.user != nil { + VStack(spacing: 0) { + HeaderView() + + HStack { + Spacer() + Menu { + Button("Profile", action: { + profileViewPresented = true + }) + Button("Logout", action: userViewModel.signOut) + } label: { + Image(systemName: "list.bullet.circle.fill") + .font(.system(size: 28)) + .foregroundStyle(.blue) + .accessibilityLabel("User options") + } + } + .padding(.horizontal) + .padding(.top, 4) + .sheet(isPresented: $profileViewPresented) { + ProfileView(isPresented: $profileViewPresented, userViewModel: userViewModel) + } + + ScrollViewReader { scrollViewReader in + ScrollView { + LazyVStack(spacing: 12) { + ForEach(messageViewModel.messages) { message in + FriendlyMessageView(friendlyMessage: message) + .id(message.id) + } + } + .padding(.horizontal) + .padding(.vertical, 8) + .onChange(of: messageViewModel.messages.count) { _, count in + guard count > 0, let lastId = messageViewModel.messages.last?.id else { return } + withAnimation(.easeInOut) { + scrollViewReader.scrollTo(lastId, anchor: .bottom) + } + } + } + } + + FooterView(viewModel: messageViewModel) + } + .onAppear { + messageViewModel.startListening() + } + .onDisappear { + messageViewModel.stopListening() + } + } else { + LoginView(userViewModel: userViewModel) + } + } +} + +#Preview { + ContentView() +} diff --git a/ios/swift/FriendlyChatSwift/Views/FooterView.swift b/ios/swift/FriendlyChatSwift/Views/FooterView.swift new file mode 100644 index 00000000..b344dfb9 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Views/FooterView.swift @@ -0,0 +1,104 @@ +// +// FooterView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 PhotosUI +import FirebaseAuth +import FirebaseStorage + +struct FooterView: View { + @State private var selectedItem: PhotosPickerItem? + @State private var messageText = "" + @State private var isUploading = false + var viewModel: FriendlyMessageViewModel + + var body: some View { + HStack(spacing: 12) { + if isUploading { + ProgressView() + .frame(width: 28, height: 28) + } else { + PhotosPicker(selection: $selectedItem, matching: .images) { + Image(systemName: "photo.on.rectangle.angled") + .font(.system(size: 26)) + .foregroundStyle(.blue) + .accessibilityLabel("Select photo") + } + .onChange(of: selectedItem) { _, newItem in + Task { + if let data = try? await newItem?.loadTransferable(type: Data.self) { + await uploadAndSendImage(data: data) + } + } + } + } + + TextField("Say something...", text: $messageText) + .padding(10) + .background(Color.white) + .clipShape(.rect(cornerRadius: 20)) + + Button("Send", systemImage: "paperplane.fill", action: sendMessage) + .labelStyle(.iconOnly) + .font(.system(size: 24)) + .foregroundStyle(messageText.isEmpty ? .gray : .blue) + .accessibilityLabel("Send message") + .disabled(messageText.isEmpty) + } + .padding() + .background(Color("FirebaseGray")) + } + + private func sendMessage() { + let textToSend = messageText + messageText = "" + Task { + do { + try await viewModel.sendMessage(text: textToSend, imageUrl: nil) + } catch { + print("Error sending message: \(error)") + } + } + } + + private func uploadAndSendImage(data: Data) async { + guard let uid = Auth.auth().currentUser?.uid else { return } + isUploading = true + defer { + isUploading = false + selectedItem = nil + } + do { + let filename = "\(uid)/\(UUID().uuidString).jpg" + let storageRef = Storage.storage().reference().child("images").child(filename) + let metadata = StorageMetadata() + metadata.contentType = "image/jpeg" + + _ = try await storageRef.putDataAsync(data, metadata: metadata) + let downloadURL = try await storageRef.downloadURL() + try await viewModel.sendMessage(text: nil, imageUrl: downloadURL.absoluteString) + } catch { + print("Error uploading image: \(error.localizedDescription)") + } + } +} + +#Preview { + FooterView(viewModel: FriendlyMessageViewModel()) +} diff --git a/ios/swift/FriendlyChatSwift/Views/FriendlyMessageImageView.swift b/ios/swift/FriendlyChatSwift/Views/FriendlyMessageImageView.swift new file mode 100644 index 00000000..8e780424 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Views/FriendlyMessageImageView.swift @@ -0,0 +1,81 @@ +// +// FriendlyMessageImageView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 FirebaseStorage + +struct FriendlyMessageImageView: View { + let imageUrl: String + @State private var image: UIImage? + @State private var isLoading = true + + var body: some View { + Group { + if let image = image { + Image(uiImage: image) + .resizable() + .scaledToFill() + .frame(maxWidth: 200, maxHeight: 200) + .clipShape(.rect(cornerRadius: 12)) + .clipped() + } else if isLoading { + ProgressView() + .frame(width: 120, height: 120) + .background(Color("FirebaseGray")) + .clipShape(.rect(cornerRadius: 12)) + } else { + Image(systemName: "photo") + .font(.system(size: 32)) + .foregroundStyle(.gray) + .frame(width: 120, height: 120) + .background(Color("FirebaseGray")) + .clipShape(.rect(cornerRadius: 12)) + } + } + .task { + await loadImage() + } + } + + private func loadImage() async { + isLoading = true + defer { isLoading = false } + if imageUrl.hasPrefix("http://") || imageUrl.hasPrefix("https://") { + guard let url = URL(string: imageUrl), + let (data, _) = try? await URLSession.shared.data(from: url), + let downloadedImage = UIImage(data: data) else { return } + self.image = downloadedImage + } else { + let storageRef: StorageReference + if imageUrl.hasPrefix("gs://") { + storageRef = Storage.storage().reference(forURL: imageUrl) + } else { + storageRef = Storage.storage().reference(withPath: imageUrl) + } + if let data = try? await storageRef.data(maxSize: 5 * 1024 * 1024), + let downloadedImage = UIImage(data: data) { + self.image = downloadedImage + } + } + } +} + +#Preview { + FriendlyMessageImageView(imageUrl: "https://example.com/image.jpg") +} diff --git a/ios/swift/FriendlyChatSwift/Views/FriendlyMessageTextView.swift b/ios/swift/FriendlyChatSwift/Views/FriendlyMessageTextView.swift new file mode 100644 index 00000000..111472a3 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Views/FriendlyMessageTextView.swift @@ -0,0 +1,41 @@ +// +// FriendlyMessageTextView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 + +struct FriendlyMessageTextView: View { + var text: String + var isUserText: Bool + + var body: some View { + Text(text) + .padding(.horizontal, 16) + .padding(.vertical, 10) + .background(isUserText ? Color("FirebaseBlue") : Color("FirebaseGray")) + .foregroundStyle(isUserText ? .white : .primary) + .clipShape(.rect(cornerRadius: 18)) + } +} + +#Preview { + VStack { + FriendlyMessageTextView(text: "Hello from current user!", isUserText: true) + FriendlyMessageTextView(text: "Hello from someone else!", isUserText: false) + } +} diff --git a/ios/swift/FriendlyChatSwift/Views/FriendlyMessageView.swift b/ios/swift/FriendlyChatSwift/Views/FriendlyMessageView.swift new file mode 100644 index 00000000..4d7571ea --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Views/FriendlyMessageView.swift @@ -0,0 +1,83 @@ +// +// FriendlyMessageView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 FirebaseAuth + +struct FriendlyMessageView: View { + var friendlyMessage: FriendlyMessage + + private var isCurrentUserMessage: Bool { + if let currentUid = Auth.auth().currentUser?.uid, + let senderUid = friendlyMessage.userId, + !senderUid.isEmpty { + return currentUid == senderUid + } + if let currentName = Auth.auth().currentUser?.displayName, + let senderName = friendlyMessage.displayName, + !currentName.isEmpty { + return currentName == senderName + } + return false + } + + var body: some View { + HStack(alignment: .top, spacing: 10) { + if !isCurrentUserMessage { + if let name = friendlyMessage.displayName, !name.isEmpty { + InitialsView(name: name) + } else { + Image(systemName: "person.crop.circle.fill") + .font(.system(size: 42)) + .foregroundStyle(.gray) + } + } else { + Spacer() + } + + VStack(alignment: isCurrentUserMessage ? .trailing : .leading, spacing: 4) { + if let imageUrl = friendlyMessage.imageUrl, !imageUrl.isEmpty { + FriendlyMessageImageView(imageUrl: imageUrl) + } else if let text = friendlyMessage.text { + FriendlyMessageTextView(text: text, isUserText: isCurrentUserMessage) + } + + Text(friendlyMessage.displayName ?? "Anonymous") + .font(.caption) + .foregroundStyle(.gray) + } + + if isCurrentUserMessage { + if let name = friendlyMessage.displayName, !name.isEmpty { + InitialsView(name: name) + } else { + Image(systemName: "person.crop.circle.fill") + .font(.system(size: 42)) + .foregroundStyle(.gray) + } + } else { + Spacer() + } + } + } +} + +#Preview { + FriendlyMessageView(friendlyMessage: FriendlyMessage(id: "1", text: "Hello world", displayName: "Google", imageUrl: nil)) +} diff --git a/grow-ios-starter/swift-starter/FriendlyChatSwift/MeasurementHelper.swift b/ios/swift/FriendlyChatSwift/Views/HeaderView.swift similarity index 59% rename from grow-ios-starter/swift-starter/FriendlyChatSwift/MeasurementHelper.swift rename to ios/swift/FriendlyChatSwift/Views/HeaderView.swift index 42cdc5bc..436ecf4c 100644 --- a/grow-ios-starter/swift-starter/FriendlyChatSwift/MeasurementHelper.swift +++ b/ios/swift/FriendlyChatSwift/Views/HeaderView.swift @@ -1,5 +1,8 @@ // -// Copyright (c) 2015 Google Inc. +// HeaderView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,16 +17,23 @@ // limitations under the License. // -import Firebase - -class MeasurementHelper: NSObject { +import SwiftUI - static func sendLoginEvent() { - } - - static func sendLogoutEvent() { - } - - static func sendMessageEvent() { +struct HeaderView: View { + var body: some View { + HStack { + Text("Friendly Chat") + .fontWeight(.bold) + .font(.title2) + Spacer() } + .padding() + .frame(maxWidth: .infinity) + .background(Color("FirebaseOrange")) + .foregroundStyle(.white) + } +} + +#Preview { + HeaderView() } diff --git a/ios/swiftui/FriendlyChatSwiftUI/FriendlyMessage.swift b/ios/swift/FriendlyChatSwift/Views/InitialsView.swift similarity index 56% rename from ios/swiftui/FriendlyChatSwiftUI/FriendlyMessage.swift rename to ios/swift/FriendlyChatSwift/Views/InitialsView.swift index 2ade01d2..d63c2ea2 100644 --- a/ios/swiftui/FriendlyChatSwiftUI/FriendlyMessage.swift +++ b/ios/swift/FriendlyChatSwift/Views/InitialsView.swift @@ -1,8 +1,8 @@ // -// FriendlyMessage.swift -// FriendlyChatSwiftUI +// InitialsView.swift +// FriendlyChatSwift // -// Copyright (c) 2022 Google Inc. +// Copyright (c) 2026 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,11 +17,24 @@ // limitations under the License. // -import Foundation +import SwiftUI -struct FriendlyMessage: Identifiable, Codable { - var id: String - let text: String? - let displayName: String? - let imageUrl: String? +struct InitialsView: View { + var name: String + + var body: some View { + ZStack(alignment: .center) { + Circle() + .frame(width: 45, height: 45) + .foregroundStyle(Color("FirebaseYellow")) + Text(name.prefix(1).uppercased()) + .font(.headline) + .fontWeight(.bold) + .foregroundStyle(.black) + } + } +} + +#Preview { + InitialsView(name: "Google") } diff --git a/ios/swift/FriendlyChatSwift/Views/LoginView.swift b/ios/swift/FriendlyChatSwift/Views/LoginView.swift new file mode 100644 index 00000000..184cbfb1 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Views/LoginView.swift @@ -0,0 +1,100 @@ +// +// LoginView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 + +struct LoginView: View { + @Bindable var userViewModel: UserViewModel + @State private var email = "" + @State private var password = "" + @State private var signUpViewPresented = false + + var body: some View { + VStack(spacing: 24) { + Text("Friendly Chat") + .font(.largeTitle) + .fontWeight(.bold) + .foregroundStyle(Color("FirebaseOrange")) + + Text("LOGIN") + .font(.title2) + .fontWeight(.semibold) + + VStack(spacing: 16) { + HStack { + Image(systemName: "envelope.fill") + .foregroundStyle(.gray) + TextField("Email", text: $email) + .keyboardType(.emailAddress) + .textInputAutocapitalization(.never) + .autocorrectionDisabled() + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + + HStack { + Image(systemName: "lock.fill") + .foregroundStyle(.gray) + SecureField("Password", text: $password) + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + } + .padding(.horizontal, 32) + + Button(action: { + Task { + await userViewModel.signIn(email: email, password: password) + } + }) { + Text("LOGIN") + .font(.headline) + .foregroundStyle(.white) + .padding() + .frame(maxWidth: .infinity) + .background(Color("FirebaseOrange")) + .clipShape(Capsule()) + } + .padding(.horizontal, 32) + + HStack { + Text("Don't have an account?") + Button("Sign Up") { + signUpViewPresented = true + } + .fontWeight(.bold) + .foregroundStyle(Color("FirebaseOrange")) + } + .sheet(isPresented: $signUpViewPresented) { + SignUpView(userViewModel: userViewModel, isPresented: $signUpViewPresented) + } + } + .alert("Notice", isPresented: $userViewModel.showAlert) { + Button("OK", role: .cancel) { } + } message: { + Text(userViewModel.errorMessage ?? "") + } + } +} + +#Preview { + LoginView(userViewModel: UserViewModel()) +} diff --git a/ios/swift/FriendlyChatSwift/Views/ProfileView.swift b/ios/swift/FriendlyChatSwift/Views/ProfileView.swift new file mode 100644 index 00000000..97b47167 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Views/ProfileView.swift @@ -0,0 +1,92 @@ +// +// ProfileView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 FirebaseAuth + +struct ProfileView: View { + @Binding var isPresented: Bool + var userViewModel: UserViewModel + @State private var displayName = Auth.auth().currentUser?.displayName ?? "" + + var body: some View { + NavigationStack { + VStack(spacing: 24) { + VStack(spacing: 8) { + Image(systemName: "person.circle.fill") + .font(.system(size: 80)) + .foregroundStyle(Color("FirebaseOrange")) + Text(Auth.auth().currentUser?.email ?? "User Profile") + .font(.subheadline) + .foregroundStyle(.gray) + } + .padding(.top, 32) + + VStack(alignment: .leading, spacing: 8) { + Text("DISPLAY NAME") + .font(.caption) + .fontWeight(.semibold) + .foregroundStyle(.gray) + + HStack { + Image(systemName: "person.fill") + .foregroundStyle(.gray) + TextField("Display Name", text: $displayName) + .autocorrectionDisabled() + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + } + .padding(.horizontal, 32) + + Button(action: { + Task { + await userViewModel.updateDisplayName(displayName) + isPresented = false + } + }) { + Text("UPDATE PROFILE") + .font(.headline) + .foregroundStyle(.white) + .padding() + .frame(maxWidth: .infinity) + .background(Color("FirebaseOrange")) + .clipShape(Capsule()) + } + .padding(.horizontal, 32) + + Spacer() + } + .navigationTitle("Profile") + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .topBarTrailing) { + Button("Done") { + isPresented = false + } + } + } + } + } +} + +#Preview { + ProfileView(isPresented: .constant(true), userViewModel: UserViewModel()) +} diff --git a/ios/swift/FriendlyChatSwift/Views/SignUpView.swift b/ios/swift/FriendlyChatSwift/Views/SignUpView.swift new file mode 100644 index 00000000..ef81fd32 --- /dev/null +++ b/ios/swift/FriendlyChatSwift/Views/SignUpView.swift @@ -0,0 +1,111 @@ +// +// SignUpView.swift +// FriendlyChatSwift +// +// Copyright (c) 2026 Google Inc. +// +// 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 + +struct SignUpView: View { + @Bindable var userViewModel: UserViewModel + @Binding var isPresented: Bool + + @State private var email = "" + @State private var password = "" + @State private var displayName = "" + + var body: some View { + VStack(spacing: 24) { + Text("CREATE ACCOUNT") + .font(.title2) + .fontWeight(.bold) + .foregroundStyle(Color("FirebaseOrange")) + .padding(.top, 24) + + VStack(spacing: 16) { + HStack { + Image(systemName: "person.fill") + .foregroundStyle(.gray) + TextField("Display Name", text: $displayName) + .autocorrectionDisabled() + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + + HStack { + Image(systemName: "envelope.fill") + .foregroundStyle(.gray) + TextField("Email", text: $email) + .keyboardType(.emailAddress) + .textInputAutocapitalization(.never) + .autocorrectionDisabled() + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + + HStack { + Image(systemName: "lock.fill") + .foregroundStyle(.gray) + SecureField("Password", text: $password) + } + .padding() + .background(Color(.systemGray6)) + .clipShape(.rect(cornerRadius: 10)) + } + .padding(.horizontal, 32) + + Button(action: { + Task { + await userViewModel.signUp(email: email, password: password, displayName: displayName) + if userViewModel.user != nil { + isPresented = false + } + } + }) { + Text("SIGN UP") + .font(.headline) + .foregroundStyle(.white) + .padding() + .frame(maxWidth: .infinity) + .background(Color("FirebaseOrange")) + .clipShape(Capsule()) + } + .padding(.horizontal, 32) + + HStack { + Text("Already have an account?") + Button("Login") { + isPresented = false + } + .fontWeight(.bold) + .foregroundStyle(Color("FirebaseOrange")) + } + + Spacer() + } + .alert("Notice", isPresented: $userViewModel.showAlert) { + Button("OK", role: .cancel) { } + } message: { + Text(userViewModel.errorMessage ?? "") + } + } +} + +#Preview { + SignUpView(userViewModel: UserViewModel(), isPresented: .constant(true)) +} diff --git a/ios/swift/Podfile b/ios/swift/Podfile deleted file mode 100644 index f683ba2f..00000000 --- a/ios/swift/Podfile +++ /dev/null @@ -1,17 +0,0 @@ -# FriendlyChat Codelab - -use_frameworks! -platform :ios, '9.0' - -pod 'Firebase/AdMob' -pod 'Firebase/Analytics' -pod 'Firebase/Auth' -pod 'Firebase/Database' -pod 'Firebase/Messaging' -pod 'Firebase/RemoteConfig' -pod 'Firebase/Storage' -pod 'Firebase/Crashlytics' -pod 'GoogleSignIn' - -target 'FriendlyChatSwift' do -end diff --git a/ios/swift/Podfile.lock b/ios/swift/Podfile.lock deleted file mode 100644 index 78bd52b2..00000000 --- a/ios/swift/Podfile.lock +++ /dev/null @@ -1,197 +0,0 @@ -PODS: - - AppAuth (1.7.2): - - AppAuth/Core (= 1.7.2) - - AppAuth/ExternalUserAgent (= 1.7.2) - - AppAuth/Core (1.7.2) - - AppAuth/ExternalUserAgent (1.7.2): - - AppAuth/Core - - Firebase/AdMob (3.6.0): - - Firebase/Analytics - - Google-Mobile-Ads-SDK (= 7.11.0) - - Firebase/Analytics (3.6.0): - - FirebaseAnalytics (= 3.4.2) - - Firebase/Auth (3.6.0): - - Firebase/Analytics - - FirebaseAuth (= 3.0.5) - - Firebase/CoreOnly (9.6.0): - - FirebaseCore (= 9.6.0) - - Firebase/Crashlytics (9.6.0): - - Firebase/CoreOnly - - FirebaseCrashlytics (~> 9.6.0) - - Firebase/Database (3.6.0): - - Firebase/Analytics - - FirebaseDatabase (= 3.0.3) - - Firebase/Messaging (3.6.0): - - Firebase/Analytics - - FirebaseMessaging (= 1.2.0) - - Firebase/RemoteConfig (3.6.0): - - Firebase/Analytics - - FirebaseRemoteConfig (= 1.3.0) - - Firebase/Storage (3.6.0): - - Firebase/Analytics - - FirebaseStorage (= 1.0.3) - - FirebaseAnalytics (3.4.2): - - FirebaseInstanceID (~> 1.0) - - GoogleInterchangeUtilities (~> 1.2) - - GoogleSymbolUtilities (~> 1.1) - - GoogleUtilities (~> 1.2) - - FirebaseAuth (3.0.5): - - FirebaseAnalytics (~> 3.3) - - GoogleNetworkingUtilities (~> 1.2) - - GoogleUtilities (~> 1.2) - - FirebaseCore (9.6.0): - - FirebaseCoreDiagnostics (~> 9.0) - - FirebaseCoreInternal (~> 9.0) - - GoogleUtilities/Environment (~> 7.7) - - GoogleUtilities/Logger (~> 7.7) - - FirebaseCoreDiagnostics (9.6.0): - - GoogleDataTransport (< 10.0.0, >= 9.1.4) - - GoogleUtilities/Environment (~> 7.7) - - GoogleUtilities/Logger (~> 7.7) - - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseCoreInternal (9.6.0): - - "GoogleUtilities/NSData+zlib (~> 7.7)" - - FirebaseCrashlytics (9.6.0): - - FirebaseCore (~> 9.0) - - FirebaseInstallations (~> 9.0) - - GoogleDataTransport (< 10.0.0, >= 9.1.4) - - GoogleUtilities/Environment (~> 7.7) - - nanopb (< 2.30910.0, >= 2.30908.0) - - PromisesObjC (~> 2.1) - - FirebaseDatabase (3.0.3): - - FirebaseAnalytics (~> 3.3) - - FirebaseInstallations (9.6.0): - - FirebaseCore (~> 9.0) - - GoogleUtilities/Environment (~> 7.7) - - GoogleUtilities/UserDefaults (~> 7.7) - - PromisesObjC (~> 2.1) - - FirebaseInstanceID (1.0.9) - - FirebaseMessaging (1.2.0): - - FirebaseAnalytics (~> 3.3) - - FirebaseInstanceID (~> 1.0) - - GoogleInterchangeUtilities (~> 1.2) - - GoogleIPhoneUtilities (~> 1.2) - - GoogleSymbolUtilities (~> 1.1) - - FirebaseRemoteConfig (1.3.0): - - FirebaseAnalytics (~> 3.3) - - FirebaseInstanceID (~> 1.0) - - GoogleInterchangeUtilities (~> 1.2) - - GoogleIPhoneUtilities (~> 1.2) - - GoogleSymbolUtilities (~> 1.1) - - GoogleUtilities (~> 1.2) - - FirebaseStorage (1.0.3): - - FirebaseAnalytics (~> 3.3) - - GoogleNetworkingUtilities (~> 1.2) - - Google-Mobile-Ads-SDK (7.11.0) - - GoogleDataTransport (9.4.1): - - GoogleUtilities/Environment (~> 7.7) - - nanopb (< 2.30911.0, >= 2.30908.0) - - PromisesObjC (< 3.0, >= 1.2) - - GoogleInterchangeUtilities (1.2.2): - - GoogleSymbolUtilities (~> 1.1) - - GoogleIPhoneUtilities (1.2.1): - - GoogleSymbolUtilities (~> 1.0) - - GoogleUtilities (~> 1.0) - - GoogleNetworkingUtilities (1.2.2): - - GoogleSymbolUtilities (~> 1.1) - - GoogleSignIn (6.2.4): - - AppAuth (~> 1.5) - - GTMAppAuth (~> 1.3) - - GTMSessionFetcher/Core (< 3.0, >= 1.1) - - GoogleSymbolUtilities (1.1.2) - - GoogleUtilities (1.3.2): - - GoogleSymbolUtilities (~> 1.1) - - GoogleUtilities/Environment (7.13.0): - - GoogleUtilities/Privacy - - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.13.0): - - GoogleUtilities/Environment - - GoogleUtilities/Privacy - - "GoogleUtilities/NSData+zlib (7.13.0)": - - GoogleUtilities/Privacy - - GoogleUtilities/Privacy (7.13.0) - - GoogleUtilities/UserDefaults (7.13.0): - - GoogleUtilities/Logger - - GoogleUtilities/Privacy - - GTMAppAuth (1.3.1): - - AppAuth/Core (~> 1.6) - - GTMSessionFetcher/Core (< 3.0, >= 1.5) - - GTMSessionFetcher/Core (2.3.0) - - nanopb (2.30909.1): - - nanopb/decode (= 2.30909.1) - - nanopb/encode (= 2.30909.1) - - nanopb/decode (2.30909.1) - - nanopb/encode (2.30909.1) - - PromisesObjC (2.4.0) - -DEPENDENCIES: - - Firebase/AdMob - - Firebase/Analytics - - Firebase/Auth - - Firebase/Crashlytics - - Firebase/Database - - Firebase/Messaging - - Firebase/RemoteConfig - - Firebase/Storage - - GoogleSignIn - -SPEC REPOS: - trunk: - - AppAuth - - Firebase - - FirebaseAnalytics - - FirebaseAuth - - FirebaseCore - - FirebaseCoreDiagnostics - - FirebaseCoreInternal - - FirebaseCrashlytics - - FirebaseDatabase - - FirebaseInstallations - - FirebaseInstanceID - - FirebaseMessaging - - FirebaseRemoteConfig - - FirebaseStorage - - Google-Mobile-Ads-SDK - - GoogleDataTransport - - GoogleInterchangeUtilities - - GoogleIPhoneUtilities - - GoogleNetworkingUtilities - - GoogleSignIn - - GoogleSymbolUtilities - - GoogleUtilities - - GTMAppAuth - - GTMSessionFetcher - - nanopb - - PromisesObjC - -SPEC CHECKSUMS: - AppAuth: ca2458caccec349cc1e26d8d9e8fd7d22f1d01f3 - Firebase: 34187200ef4979dbd485c7aa685ef078bf587c86 - FirebaseAnalytics: 3f5358d9104adf159cc8d99b7b501e50099a39ad - FirebaseAuth: 75a062bbf2d3c97d1e6e55bbc110e13a6853e25d - FirebaseCore: 2082fffcd855f95f883c0a1641133eb9bbe76d40 - FirebaseCoreDiagnostics: 99a495094b10a57eeb3ae8efa1665700ad0bdaa6 - FirebaseCoreInternal: bca76517fe1ed381e989f5e7d8abb0da8d85bed3 - FirebaseCrashlytics: 3210572ddb77801e5a0bd9d7bc890769f2066a0c - FirebaseDatabase: 750a4a0fe18ef114318876fd654b2d9c671e0992 - FirebaseInstallations: 0a115432c4e223c5ab20b0dbbe4cbefa793a0e8e - FirebaseInstanceID: 2d0518b1378fe9d685ef40cbdd63d2fdc1125339 - FirebaseMessaging: 789d23fd796594dfb55dcf36cd325541df887c22 - FirebaseRemoteConfig: 981f45d4278281cfefa8f48a6f5c566f2c95ac5a - FirebaseStorage: 3992817bf405f5c1a4f8349678d22724cd0ef509 - Google-Mobile-Ads-SDK: 0e864ab93ba1ff8afe92e16de0e4e883f581ed33 - GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a - GoogleInterchangeUtilities: d5bc4d88d5b661ab72f9d70c58d02ca8c27ad1f7 - GoogleIPhoneUtilities: 63f25e93a3ddcb66884d182aab3a660d98f1479b - GoogleNetworkingUtilities: 3edd3a8161347494f2da60ea0deddc8a472d94cb - GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a - GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96 - GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152 - GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd - GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2 - nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5 - PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 - -PODFILE CHECKSUM: 909b4508c75c9fd514517b7dce89d635507c9c03 - -COCOAPODS: 1.15.2 diff --git a/ios/swift/shared/Bladefile b/ios/swift/shared/Bladefile deleted file mode 100644 index 6332a0b5..00000000 --- a/ios/swift/shared/Bladefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# Uncomment below to specify your own resources. -# See https://github.com/jondot/blade for more information. -# - -blades: - - source: assets/logo1024.png - mount: Images.xcassets/AppIcon.appiconset - contents: true - - source: assets/logo1024.png - mount: Images.xcassets/Logo.imageset diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png index 5779681c..8984adca 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-2x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png index 451dedeb..a78fb078 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-60-3x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png index a4e88111..8af38ae2 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76-2x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png index 9dd85950..6a9126c4 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/AppIcon-76.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png index c3252dac..9f6497f2 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@1x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png index a51aed88..08712c71 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-29@2x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png index 6c930900..ecd2ee41 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@1x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png index 9167b50c..26ef4b71 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-40@2x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png index 300a49e6..f4e4a72d 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-ipad-83@2x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png index a51aed88..08712c71 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@2x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png index e51af9a6..5b7e896a 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-29@3x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png index 9167b50c..26ef4b71 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@2x.png differ diff --git a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png index 5779681c..342de47b 100644 Binary files a/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png and b/ios/swift/shared/Images.xcassets/AppIcon.appiconset/logo1024-iphone-40@3x.png differ diff --git a/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png b/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png index 0dae4835..d89a4a39 100644 Binary files a/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png and b/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@1x.png differ diff --git a/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png b/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png index cf3f0001..8b73f2f5 100644 Binary files a/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png and b/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@2x.png differ diff --git a/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png b/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png index 0541acfa..1b33742c 100644 Binary files a/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png and b/ios/swift/shared/Images.xcassets/Logo.imageset/logo1024-universal-341@3x.png differ diff --git a/ios/swift/shared/assets/logo1024.png b/ios/swift/shared/assets/logo1024.png index 126686c8..1b33742c 100644 Binary files a/ios/swift/shared/assets/logo1024.png and b/ios/swift/shared/assets/logo1024.png differ diff --git a/ios/swiftui/FriendlyChatSwiftUI.xcodeproj/project.pbxproj b/ios/swiftui/FriendlyChatSwiftUI.xcodeproj/project.pbxproj deleted file mode 100644 index 8ebb2190..00000000 --- a/ios/swiftui/FriendlyChatSwiftUI.xcodeproj/project.pbxproj +++ /dev/null @@ -1,406 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 55; - objects = { - -/* Begin PBXBuildFile section */ - 8E30DA5329411ECB00465D5A /* ImageUploader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E30DA5229411ECB00465D5A /* ImageUploader.swift */; }; - 8ED5064E28ADA0C70031A996 /* FriendlyChatSwiftUIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5064D28ADA0C70031A996 /* FriendlyChatSwiftUIApp.swift */; }; - 8ED5065028ADA0C70031A996 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5064F28ADA0C70031A996 /* ContentView.swift */; }; - 8ED5065228ADA0C90031A996 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8ED5065128ADA0C90031A996 /* Assets.xcassets */; }; - 8ED5065528ADA0C90031A996 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8ED5065428ADA0C90031A996 /* Preview Assets.xcassets */; }; - 8ED5065E28ADAD770031A996 /* FriendlyMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5065D28ADAD770031A996 /* FriendlyMessageView.swift */; }; - 8ED5066028ADF2F50031A996 /* ImagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5065F28ADF2F50031A996 /* ImagePicker.swift */; }; - 8ED5066328AEE2A30031A996 /* InitialsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5066228AEE2A30031A996 /* InitialsView.swift */; }; - 8ED5066528AEE4830031A996 /* FriendlyMessageImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5066428AEE4830031A996 /* FriendlyMessageImageView.swift */; }; - 8ED5066728AEE5080031A996 /* FriendlyMessageTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5066628AEE5080031A996 /* FriendlyMessageTextView.swift */; }; - 8ED5066928AEE6600031A996 /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5066828AEE6600031A996 /* HeaderView.swift */; }; - 8ED5066B28AEE7AF0031A996 /* FooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED5066A28AEE7AF0031A996 /* FooterView.swift */; }; - 8EDA9ACB294A5C0C00704690 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EDA9ACA294A5C0C00704690 /* ProfileView.swift */; }; - 8EDCBB63293805CC00C1D4EB /* FriendlyMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EDCBB62293805CC00C1D4EB /* FriendlyMessage.swift */; }; - 8EDCBB65293805E800C1D4EB /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EDCBB64293805E800C1D4EB /* LoginView.swift */; }; - 8EDCBB672938064E00C1D4EB /* UserViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EDCBB662938064E00C1D4EB /* UserViewModel.swift */; }; - 8EDCBB692938077B00C1D4EB /* SignUpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EDCBB682938077B00C1D4EB /* SignUpView.swift */; }; - 8EDCBB6D293E8B9100C1D4EB /* FriendlyMessageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EDCBB6C293E8B9100C1D4EB /* FriendlyMessageViewModel.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 8E30DA5229411ECB00465D5A /* ImageUploader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageUploader.swift; sourceTree = ""; }; - 8ED5064A28ADA0C70031A996 /* FriendlyChatSwiftUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FriendlyChatSwiftUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 8ED5064D28ADA0C70031A996 /* FriendlyChatSwiftUIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendlyChatSwiftUIApp.swift; sourceTree = ""; }; - 8ED5064F28ADA0C70031A996 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 8ED5065128ADA0C90031A996 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 8ED5065428ADA0C90031A996 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 8ED5065D28ADAD770031A996 /* FriendlyMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendlyMessageView.swift; sourceTree = ""; }; - 8ED5065F28ADF2F50031A996 /* ImagePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImagePicker.swift; sourceTree = ""; }; - 8ED5066228AEE2A30031A996 /* InitialsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InitialsView.swift; sourceTree = ""; }; - 8ED5066428AEE4830031A996 /* FriendlyMessageImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendlyMessageImageView.swift; sourceTree = ""; }; - 8ED5066628AEE5080031A996 /* FriendlyMessageTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendlyMessageTextView.swift; sourceTree = ""; }; - 8ED5066828AEE6600031A996 /* HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; - 8ED5066A28AEE7AF0031A996 /* FooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FooterView.swift; sourceTree = ""; }; - 8EDA9ACA294A5C0C00704690 /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = ""; }; - 8EDCBB62293805CC00C1D4EB /* FriendlyMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendlyMessage.swift; sourceTree = ""; }; - 8EDCBB64293805E800C1D4EB /* LoginView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; - 8EDCBB662938064E00C1D4EB /* UserViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserViewModel.swift; sourceTree = ""; }; - 8EDCBB682938077B00C1D4EB /* SignUpView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpView.swift; sourceTree = ""; }; - 8EDCBB6C293E8B9100C1D4EB /* FriendlyMessageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendlyMessageViewModel.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8ED5064728ADA0C60031A996 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 8ED5064128ADA0C60031A996 = { - isa = PBXGroup; - children = ( - 8ED5064C28ADA0C70031A996 /* FriendlyChatSwiftUI */, - 8ED5064B28ADA0C70031A996 /* Products */, - ); - sourceTree = ""; - }; - 8ED5064B28ADA0C70031A996 /* Products */ = { - isa = PBXGroup; - children = ( - 8ED5064A28ADA0C70031A996 /* FriendlyChatSwiftUI.app */, - ); - name = Products; - sourceTree = ""; - }; - 8ED5064C28ADA0C70031A996 /* FriendlyChatSwiftUI */ = { - isa = PBXGroup; - children = ( - 8E30DA5229411ECB00465D5A /* ImageUploader.swift */, - 8EDCBB62293805CC00C1D4EB /* FriendlyMessage.swift */, - 8EDCBB662938064E00C1D4EB /* UserViewModel.swift */, - 8EDCBB6C293E8B9100C1D4EB /* FriendlyMessageViewModel.swift */, - 8ED5066128AEE2680031A996 /* Views */, - 8ED5064D28ADA0C70031A996 /* FriendlyChatSwiftUIApp.swift */, - 8ED5065128ADA0C90031A996 /* Assets.xcassets */, - 8ED5065328ADA0C90031A996 /* Preview Content */, - 8ED5065F28ADF2F50031A996 /* ImagePicker.swift */, - ); - path = FriendlyChatSwiftUI; - sourceTree = ""; - }; - 8ED5065328ADA0C90031A996 /* Preview Content */ = { - isa = PBXGroup; - children = ( - 8ED5065428ADA0C90031A996 /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - 8ED5066128AEE2680031A996 /* Views */ = { - isa = PBXGroup; - children = ( - 8EDCBB64293805E800C1D4EB /* LoginView.swift */, - 8EDCBB682938077B00C1D4EB /* SignUpView.swift */, - 8ED5064F28ADA0C70031A996 /* ContentView.swift */, - 8ED5066828AEE6600031A996 /* HeaderView.swift */, - 8ED5066228AEE2A30031A996 /* InitialsView.swift */, - 8ED5065D28ADAD770031A996 /* FriendlyMessageView.swift */, - 8ED5066428AEE4830031A996 /* FriendlyMessageImageView.swift */, - 8ED5066628AEE5080031A996 /* FriendlyMessageTextView.swift */, - 8ED5066A28AEE7AF0031A996 /* FooterView.swift */, - 8EDA9ACA294A5C0C00704690 /* ProfileView.swift */, - ); - path = Views; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8ED5064928ADA0C60031A996 /* FriendlyChatSwiftUI */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8ED5065828ADA0C90031A996 /* Build configuration list for PBXNativeTarget "FriendlyChatSwiftUI" */; - buildPhases = ( - 8ED5064628ADA0C60031A996 /* Sources */, - 8ED5064728ADA0C60031A996 /* Frameworks */, - 8ED5064828ADA0C60031A996 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = FriendlyChatSwiftUI; - productName = FriendlyChatSwiftUI; - productReference = 8ED5064A28ADA0C70031A996 /* FriendlyChatSwiftUI.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 8ED5064228ADA0C60031A996 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1340; - LastUpgradeCheck = 1340; - TargetAttributes = { - 8ED5064928ADA0C60031A996 = { - CreatedOnToolsVersion = 13.4.1; - }; - }; - }; - buildConfigurationList = 8ED5064528ADA0C60031A996 /* Build configuration list for PBXProject "FriendlyChatSwiftUI" */; - compatibilityVersion = "Xcode 13.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 8ED5064128ADA0C60031A996; - productRefGroup = 8ED5064B28ADA0C70031A996 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8ED5064928ADA0C60031A996 /* FriendlyChatSwiftUI */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8ED5064828ADA0C60031A996 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8ED5065528ADA0C90031A996 /* Preview Assets.xcassets in Resources */, - 8ED5065228ADA0C90031A996 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8ED5064628ADA0C60031A996 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8ED5066328AEE2A30031A996 /* InitialsView.swift in Sources */, - 8EDCBB672938064E00C1D4EB /* UserViewModel.swift in Sources */, - 8ED5066728AEE5080031A996 /* FriendlyMessageTextView.swift in Sources */, - 8ED5066928AEE6600031A996 /* HeaderView.swift in Sources */, - 8EDCBB6D293E8B9100C1D4EB /* FriendlyMessageViewModel.swift in Sources */, - 8ED5065E28ADAD770031A996 /* FriendlyMessageView.swift in Sources */, - 8ED5066028ADF2F50031A996 /* ImagePicker.swift in Sources */, - 8ED5066528AEE4830031A996 /* FriendlyMessageImageView.swift in Sources */, - 8EDA9ACB294A5C0C00704690 /* ProfileView.swift in Sources */, - 8ED5066B28AEE7AF0031A996 /* FooterView.swift in Sources */, - 8EDCBB692938077B00C1D4EB /* SignUpView.swift in Sources */, - 8ED5065028ADA0C70031A996 /* ContentView.swift in Sources */, - 8EDCBB65293805E800C1D4EB /* LoginView.swift in Sources */, - 8E30DA5329411ECB00465D5A /* ImageUploader.swift in Sources */, - 8EDCBB63293805CC00C1D4EB /* FriendlyMessage.swift in Sources */, - 8ED5064E28ADA0C70031A996 /* FriendlyChatSwiftUIApp.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 8ED5065628ADA0C90031A996 /* 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_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.5; - 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; - }; - 8ED5065728ADA0C90031A996 /* 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_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.5; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 8ED5065928ADA0C90031A996 /* 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 = "\"FriendlyChatSwiftUI/Preview Content\""; - 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.codelab.friendlychat.FriendlyChatSwiftUI; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 8ED5065A28ADA0C90031A996 /* 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 = "\"FriendlyChatSwiftUI/Preview Content\""; - 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.codelab.friendlychat.FriendlyChatSwiftUI; - 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 */ - 8ED5064528ADA0C60031A996 /* Build configuration list for PBXProject "FriendlyChatSwiftUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8ED5065628ADA0C90031A996 /* Debug */, - 8ED5065728ADA0C90031A996 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 8ED5065828ADA0C90031A996 /* Build configuration list for PBXNativeTarget "FriendlyChatSwiftUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8ED5065928ADA0C90031A996 /* Debug */, - 8ED5065A28ADA0C90031A996 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 8ED5064228ADA0C60031A996 /* Project object */; -} diff --git a/ios/swiftui/FriendlyChatSwiftUI.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwiftUI.xcscheme b/ios/swiftui/FriendlyChatSwiftUI.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwiftUI.xcscheme deleted file mode 100644 index a65e29f3..00000000 --- a/ios/swiftui/FriendlyChatSwiftUI.xcodeproj/xcshareddata/xcschemes/FriendlyChatSwiftUI.xcscheme +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png b/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png deleted file mode 100644 index 39111ccf..00000000 Binary files a/ios/swiftui/FriendlyChatSwiftUI/Assets.xcassets/AppIcon.appiconset/firebaseLogo120.png and /dev/null differ diff --git a/ios/swiftui/FriendlyChatSwiftUI/FriendlyMessageViewModel.swift b/ios/swiftui/FriendlyChatSwiftUI/FriendlyMessageViewModel.swift deleted file mode 100644 index ad793505..00000000 --- a/ios/swiftui/FriendlyChatSwiftUI/FriendlyMessageViewModel.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// FriendlyMessageViewModel.swift -// FriendlyChatSwiftUI -// -// Copyright (c) 2022 Google Inc. -// -// 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 Foundation -import FirebaseDatabase - -final class FriendlyMessageViewModel: ObservableObject { - @Published var messages: [FriendlyMessage] = [] - - private lazy var dbPath: DatabaseReference? = { - return Database.database().reference().child("messages") - }() - - private let encoder = JSONEncoder() - private let decoder = JSONDecoder() - - func listen() { - guard let dbPath = dbPath else { - return - } - dbPath - .observe(.childAdded) { [weak self] snapshot in - guard - let self = self, - var json = snapshot.value as? [String: Any] - else { - return - } - json["id"] = snapshot.key - do { - let messageData = try JSONSerialization.data(withJSONObject: json) - let message = try self.decoder.decode(FriendlyMessage.self, from: messageData) - self.messages.append(message) - } catch { - print("Error retrieving messages: \(error)") - } - } - } - - func stopListen() { - messages = [] - dbPath?.removeAllObservers() - } -} diff --git a/ios/swiftui/FriendlyChatSwiftUI/ImagePicker.swift b/ios/swiftui/FriendlyChatSwiftUI/ImagePicker.swift deleted file mode 100644 index 5b28137d..00000000 --- a/ios/swiftui/FriendlyChatSwiftUI/ImagePicker.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// ImagePicker.swift -// FriendlyChatSwiftUI -// -// Copyright (c) 2022 Google Inc. -// -// 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 - -struct ImagePicker: UIViewControllerRepresentable { - @Environment(\.presentationMode) private var presentationMode - @Binding var selectedImage: UIImage - - func makeUIViewController(context: UIViewControllerRepresentableContext) -> UIImagePickerController { - let imagePicker = UIImagePickerController() - imagePicker.allowsEditing = false - imagePicker.sourceType = .photoLibrary - imagePicker.delegate = context.coordinator - - return imagePicker - } - - func updateUIViewController(_ uiViewController: UIImagePickerController, context: UIViewControllerRepresentableContext) {} - - func makeCoordinator() -> Coordinator { - Coordinator(self) - } - - final class Coordinator: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate { - var parent: ImagePicker - - init(_ parent: ImagePicker) { - self.parent = parent - } - - func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { - if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage { - parent.selectedImage = image - - ImageUploader().uploadImage(image: image) - } - - parent.presentationMode.wrappedValue.dismiss() - } - } -} diff --git a/ios/swiftui/FriendlyChatSwiftUI/ImageUploader.swift b/ios/swiftui/FriendlyChatSwiftUI/ImageUploader.swift deleted file mode 100644 index 556e59b2..00000000 --- a/ios/swiftui/FriendlyChatSwiftUI/ImageUploader.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// ImageUploader.swift -// FriendlyChatSwiftUI -// -// Copyright (c) 2022 Google Inc. -// -// 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 FirebaseStorage -import FirebaseAuth -import FirebaseDatabase - -class ImageUploader: ObservableObject { - let storage = Storage.storage() - let user = Auth.auth().currentUser - let db = Database.database() - - func uploadImage(image: UIImage) { - let storageRef = storage.reference().child(user!.uid).child("images").child(image.description) - let imageData = image.jpegData(compressionQuality: 0.5) - let dbRef = db.reference() - - // Upload the file and send as message to db - if let imageData = imageData { - storageRef.putData(imageData, metadata: nil).observe(.success) { snapshot in - // Upload completed successfully - dbRef.child("messages").childByAutoId().setValue(["imageUrl": storageRef.fullPath, "displayName": Auth.auth().currentUser!.displayName]) - } - } - } -} - - - diff --git a/ios/swiftui/FriendlyChatSwiftUI/UserViewModel.swift b/ios/swiftui/FriendlyChatSwiftUI/UserViewModel.swift deleted file mode 100644 index b970a896..00000000 --- a/ios/swiftui/FriendlyChatSwiftUI/UserViewModel.swift +++ /dev/null @@ -1,98 +0,0 @@ -// -// UserViewModel.swift -// FriendlyChatSwiftUI -// -// Copyright (c) 2022 Google Inc. -// -// 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 FirebaseAuth - -class UserViewModel: ObservableObject { - @AppStorage("isSignedIn") var isSignedIn = false - @Published var email = "" - @Published var password = "" - @Published var displayName = "" - @Published var alert = false - @Published var alertMessage = "" - - private func showAlertMessage(message: String) { - alertMessage = message - alert.toggle() - } - - func login() { - // check if all fields are inputted correctly - if email.isEmpty || password.isEmpty { - showAlertMessage(message: "Neither email nor password can be empty.") - return - } - // Sign in with email and password - Auth.auth().signIn(withEmail: email, password: password) { result, err in - if let err = err { - self.alertMessage = err.localizedDescription - self.alert.toggle() - } else { - self.isSignedIn = true - } - } - } - - func signUp() { - // Check if all fields are inputted correctly - if email.isEmpty || password.isEmpty { - showAlertMessage(message: "Neither email nor password can be empty.") - return - } - // Sign up with email and password - Auth.auth().createUser(withEmail: email, password: password) { result, err in - if let err = err { - self.alertMessage = err.localizedDescription - self.alert.toggle() - } else { - self.login() - } - } - } - - func updateDisplayName() { - print("signing up user and setting display name to: \(self.displayName)") - // On creation of new user, set display name - let changeRequest = Auth.auth().currentUser!.createProfileChangeRequest() - changeRequest.displayName = self.displayName - changeRequest.commitChanges { error in - if let error = error { - print("got some sort of error in display name") - self.alertMessage = error.localizedDescription - self.alert.toggle() - } else { - print("display was supposedly a success...") - } - } - } - - func logout() { - do { - try Auth.auth().signOut() - isSignedIn = false - email = "" - password = "" - } catch { - print("Error signing out: \(error)") - } - } -} - -let user = UserViewModel() diff --git a/ios/swiftui/FriendlyChatSwiftUI/Views/ContentView.swift b/ios/swiftui/FriendlyChatSwiftUI/Views/ContentView.swift deleted file mode 100644 index a486a2ae..00000000 --- a/ios/swiftui/FriendlyChatSwiftUI/Views/ContentView.swift +++ /dev/null @@ -1,79 +0,0 @@ -// -// ContentView.swift -// FriendlyChatSwiftUI -// -// Copyright (c) 2022 Google Inc. -// -// 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 - -struct ContentView: View { - @AppStorage("isSignedIn") var isSignedIn = false - @State private var newMessageText = "" - @StateObject private var friendlyMessageVM = FriendlyMessageViewModel() - @State private var profileViewPresented = false - - var body: some View { - if isSignedIn { - VStack { - HeaderView() - Menu { - Button("Profile", action: { - profileViewPresented = true - }) - Button("Logout", action: user.logout) - } label: { - Image(systemName: "list.bullet.circle.fill") - .font(.system(size: 30.0)) - } - .frame(maxWidth: .infinity, alignment: .topTrailing) - .padding(.horizontal) - .sheet(isPresented: $profileViewPresented) { - ProfileView(isPresented: $profileViewPresented, user: user) - } - ScrollViewReader { scrollViewReader in - ScrollView { - ForEach(0.. 6.10) - - GoogleUtilities/AppDelegateSwizzler (~> 6.7) - - GoogleUtilities/Environment (~> 6.7) - - GTMSessionFetcher/Core (~> 1.1) - - FirebaseCore (6.10.4): - - FirebaseCoreDiagnostics (~> 1.6) - - GoogleUtilities/Environment (~> 6.7) - - GoogleUtilities/Logger (~> 6.7) - - FirebaseCoreDiagnostics (1.7.0): - - GoogleDataTransport (~> 7.4) - - GoogleUtilities/Environment (~> 6.7) - - GoogleUtilities/Logger (~> 6.7) - - nanopb (~> 1.30906.0) - - FirebaseDatabase (6.6.0): - - FirebaseCore (~> 6.10) - - leveldb-library (~> 1.22) - - FirebaseStorage (3.9.1): - - FirebaseCore (~> 6.10) - - GTMSessionFetcher/Core (~> 1.1) - - GoogleDataTransport (7.5.1): - - nanopb (~> 1.30906.0) - - GoogleUtilities/AppDelegateSwizzler (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (6.7.2): - - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (6.7.2): - - GoogleUtilities/Environment - - GoogleUtilities/Network (6.7.2): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (6.7.2)" - - GoogleUtilities/Reachability (6.7.2): - - GoogleUtilities/Logger - - GTMSessionFetcher/Core (1.7.2) - - leveldb-library (1.22.1) - - nanopb (1.30906.0): - - nanopb/decode (= 1.30906.0) - - nanopb/encode (= 1.30906.0) - - nanopb/decode (1.30906.0) - - nanopb/encode (1.30906.0) - - PromisesObjC (1.2.12) - -DEPENDENCIES: - - FirebaseAuth - - FirebaseDatabase - - FirebaseStorage - -SPEC REPOS: - trunk: - - FirebaseAuth - - FirebaseCore - - FirebaseCoreDiagnostics - - FirebaseDatabase - - FirebaseStorage - - GoogleDataTransport - - GoogleUtilities - - GTMSessionFetcher - - leveldb-library - - nanopb - - PromisesObjC - -SPEC CHECKSUMS: - FirebaseAuth: c92d49ada7948d1a23466e3db17bc4c2039dddc3 - FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec - FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 - FirebaseDatabase: 13a865a4b85897462b930eb683bda8f52583713f - FirebaseStorage: 15e0f15ef3c7fec3d1899d68623e47d4447066b4 - GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833 - GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 - GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba - leveldb-library: 50c7b45cbd7bf543c81a468fe557a16ae3db8729 - nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc - PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 - -PODFILE CHECKSUM: 355b6454c06c6378b6906c76c54835139abbf48c - -COCOAPODS: 1.15.2 diff --git a/ios/swiftui/README.md b/ios/swiftui/README.md deleted file mode 100644 index 3b7dbf55..00000000 --- a/ios/swiftui/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# In Progress - -This folder is in progress. It will contain an update to the Swift version of this codelab for SwiftUI, better aligning with the Android version of this codelab: [Firebase Android Codelab - Build Friendly Chat](https://firebase.google.com/codelabs/firebase-android). - -So far it contains: - -1. Basic UI elements and styling: - - - -2. LogIn screen and a SignUp screen with Firebase Authentication. -3. Read/write messages to Firebase Realtime DB -4. Read/write images to Firebase Storage and references in Realtime DB - -Future PRs: -1. Fixing bugs (such as the color of message when Auth'd user's display name is nil and scroll to bottom on message send) -1. Re-writing codelab to include latest updates + emulators -1. Removing the current version of this codelab (currently in the swift folder) and replacing it with this version - diff --git a/test.sh b/test.sh index 162f83cb..d3187a42 100755 --- a/test.sh +++ b/test.sh @@ -4,15 +4,20 @@ set -eo pipefail EXIT_STATUS=0 +if [ -d "${DIR}/FriendlyChat${LANGUAGE}.xcworkspace" ]; then + BUILD_TARGET=(-workspace "${DIR}/FriendlyChat${LANGUAGE}.xcworkspace") +else + BUILD_TARGET=(-project "${DIR}/FriendlyChat${LANGUAGE}.xcodeproj") +fi + (xcodebuild \ - -workspace ${DIR}/FriendlyChat${LANGUAGE}.xcworkspace \ + "${BUILD_TARGET[@]}" \ -scheme FriendlyChat${LANGUAGE} \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone XR' \ + -destination 'generic/platform=iOS Simulator' \ build \ - #test \ ONLY_ACTIVE_ARCH=YES \ CODE_SIGNING_REQUIRED=NO \ | xcpretty) || EXIT_STATUS=$? - - exit $EXIT_STATUS + +exit $EXIT_STATUS