├── .gitignore ├── ChatApp.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── Florian.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── ChatApp.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── ChatApp ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-57x57@1x.png │ │ ├── Icon-App-57x57@2x.png │ │ ├── Icon-App-60x60@1x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-72x72@1x.png │ │ ├── Icon-App-72x72@2x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ ├── Icon-App-76x76@3x.png │ │ ├── Icon-App-83.5x83.5@2x.png │ │ ├── Icon-Small-50x50@1x.png │ │ ├── Icon-Small-50x50@2x.png │ │ └── ItunesArtwork@2x.png │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── ChatHostViewController.swift ├── ChatUIConfiguration.swift ├── Core │ ├── Adapters │ │ ├── ATCCarouselAdapter.swift │ │ ├── ATCStoryAdapter.swift │ │ └── ATCViewControllerContainerRowAdapter.swift │ ├── Assets │ │ ├── CoreImages.xcassets │ │ │ ├── Contents.json │ │ │ └── arrow-right.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── arrow-right.png │ │ │ │ ├── icons8-forward-filled-100.png │ │ │ │ └── icons8-forward-filled-500.png │ │ └── Misc.xcassets │ │ │ ├── Contents.json │ │ │ ├── activity-feed-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── activity-feed-icon.png │ │ │ ├── icons8-activity-feed-100.png │ │ │ └── icons8-activity-feed-50.png │ │ │ ├── analytics-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── analytics-icon.png │ │ │ ├── icons8-combo-chart-100.png │ │ │ └── icons8-combo-chart-50.png │ │ │ ├── arrow-back-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── arrow-back-icon.png │ │ │ ├── icons8-back-filled-100.png │ │ │ └── icons8-back-filled-50.png │ │ │ ├── bars-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── bars-icon.png │ │ │ ├── icons8-bar-chart-100.png │ │ │ └── icons8-bar-chart-50.png │ │ │ ├── bell-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── bell-icon.png │ │ │ ├── icons8-notification-100.png │ │ │ └── icons8-notification-50.png │ │ │ ├── binoculars-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── binoculars-icon-1.png │ │ │ ├── binoculars-icon-2.png │ │ │ └── binoculars-icon.png │ │ │ ├── bubbles-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── bubbles-icon-1.png │ │ │ ├── bubbles-icon-2.png │ │ │ └── bubbles-icon.png │ │ │ ├── calendar-grid-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── calendar-grid-icon.png │ │ │ ├── icons8-calendar-100.png │ │ │ └── icons8-calendar-50.png │ │ │ ├── calendar-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── calendar-icon.png │ │ │ ├── icons8-calendar-96.png │ │ │ └── icons8-calendar-97.png │ │ │ ├── camera-filled-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── camera-filled-icon.png │ │ │ ├── icons8-unsplash-filled-50.png │ │ │ └── icons8-unsplash-filled-75.png │ │ │ ├── camera-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── camera-icon.png │ │ │ ├── icons8-screenshot-50.png │ │ │ └── icons8-screenshot-75.png │ │ │ ├── caret-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── caret-icon.png │ │ │ ├── icons8-expand-arrow-100.png │ │ │ └── icons8-expand-arrow-500.png │ │ │ ├── check-file-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── check-file-icon-1.png │ │ │ ├── check-file-icon-2.png │ │ │ └── check-file-icon.png │ │ │ ├── coins-filled-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── coins-filled-icon.png │ │ │ ├── icons8-coins-filled-100.png │ │ │ └── icons8-coins-filled-50.png │ │ │ ├── coins-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── coins-icon-1.png │ │ │ ├── coins-icon-2.png │ │ │ └── coins-icon.png │ │ │ ├── customers-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── customers-icon.png │ │ │ ├── icons8-customer-filled-100.png │ │ │ └── icons8-customer-filled-50.png │ │ │ ├── facebook-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── facebook-icon-1.png │ │ │ ├── facebook-icon-2.png │ │ │ └── facebook-icon.png │ │ │ ├── forward-arrow-black.imageset │ │ │ ├── Contents.json │ │ │ ├── forward-arrow-black-1.png │ │ │ ├── forward-arrow-black-2.png │ │ │ └── forward-arrow-black.png │ │ │ ├── home-menu-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── home-menu-icon-1.png │ │ │ ├── home-menu-icon-2.png │ │ │ └── home-menu-icon.png │ │ │ ├── icn-fb.imageset │ │ │ ├── Contents.json │ │ │ ├── Facebook.png │ │ │ ├── Facebook@2x.png │ │ │ └── Facebook@3x.png │ │ │ ├── icn-instagram.imageset │ │ │ ├── Contents.json │ │ │ ├── Instagram.png │ │ │ ├── Instagram@2x.png │ │ │ └── Instagram@3x.png │ │ │ ├── icn-twtr.imageset │ │ │ ├── Contents.json │ │ │ ├── Twitter.png │ │ │ ├── Twitter@2x.png │ │ │ └── Twitter@3x.png │ │ │ ├── icn-youtube.imageset │ │ │ ├── Contents.json │ │ │ ├── Youtube.png │ │ │ ├── Youtube@2x.png │ │ │ └── Youtube@3x.png │ │ │ ├── ios-app-ecommerce-i-shop-onboarding-cover.imageset │ │ │ ├── Contents.json │ │ │ ├── ios-app-ecommerce-i-shop-onboarding-cover-1.jpeg │ │ │ ├── ios-app-ecommerce-i-shop-onboarding-cover-2.jpeg │ │ │ └── ios-app-ecommerce-i-shop-onboarding-cover.jpeg │ │ │ ├── logout-menu-item.imageset │ │ │ ├── Contents.json │ │ │ ├── logout-menu-item-1.png │ │ │ ├── logout-menu-item-2.png │ │ │ └── logout-menu-item.png │ │ │ ├── night-stars-wallpaper.imageset │ │ │ ├── Contents.json │ │ │ ├── night-stars-wallpaper-1.png │ │ │ ├── night-stars-wallpaper-2.png │ │ │ └── night-stars-wallpaper.png │ │ │ ├── orders-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── icons8-purchase-order-100.png │ │ │ ├── icons8-purchase-order-50.png │ │ │ └── orders-icon.png │ │ │ ├── products-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── icons8-box-filled-100.png │ │ │ ├── icons8-box-filled-50.png │ │ │ └── products-icon.png │ │ │ ├── settings-menu-item.imageset │ │ │ ├── Contents.json │ │ │ ├── settings-menu-item-1.png │ │ │ ├── settings-menu-item-2.png │ │ │ └── settings-menu-item.png │ │ │ ├── share-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── share-icon-50.png │ │ │ ├── share-icon-75.png │ │ │ └── share-icon.png │ │ │ ├── shopping-cart-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── shopping-cart-icon-1.png │ │ │ ├── shopping-cart-icon-2.png │ │ │ └── shopping-cart-icon.png │ │ │ ├── shopping-ios-app-onboarding-cover.imageset │ │ │ ├── Contents.json │ │ │ ├── shopping-ios-app-onboarding-cover-1.jpg │ │ │ ├── shopping-ios-app-onboarding-cover-2.jpg │ │ │ └── shopping-ios-app-onboarding-cover.jpg │ │ │ ├── task-filled-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── icons8-task-filled-100.png │ │ │ ├── icons8-task-filled-50.png │ │ │ └── task-filled-icon.png │ │ │ ├── three-equal-lines-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── icons8-menu-filled-100.png │ │ │ ├── icons8-menu-filled-50.png │ │ │ └── three-equal-lines-icon.png │ │ │ └── twitter-icon.imageset │ │ │ ├── Contents.json │ │ │ ├── twitter-icon-1.png │ │ │ ├── twitter-icon-2.png │ │ │ └── twitter-icon.png │ ├── Chat │ │ ├── Adapters │ │ │ ├── ATCChatThreadAdapter.swift │ │ │ └── ATCChatUserStoryAdapter.swift │ │ ├── Models │ │ │ ├── ATCChatChannel.swift │ │ │ └── ATChatMessage.swift │ │ ├── Store │ │ │ ├── ATCChatMockStore.swift │ │ │ └── ATCRemoteData.swift │ │ ├── Themes │ │ │ └── Messenger │ │ │ │ ├── ATCThreadCollectionViewCell.swift │ │ │ │ ├── ATCThreadCollectionViewCell.xib │ │ │ │ ├── ATCUserStoryCollectionViewCell.swift │ │ │ │ └── ATCUserStoryCollectionViewCell.xib │ │ └── ViewControllers │ │ │ ├── ATCChatHomeViewController.swift │ │ │ ├── ATCChatThreadViewController.swift │ │ │ └── ATCChatThreadsViewController.swift │ ├── Helpers │ │ ├── ATCGenericFirebaseDataSource.swift │ │ ├── ATCGenericLocalDataSource.swift │ │ ├── ATCGenericLocalHeteroDataSource.swift │ │ ├── ATCUIGenericConfigurationProtocol.swift │ │ ├── TimeFormatHelper.swift │ │ ├── UIImage+ATCAdditions.swift │ │ └── UITabBarItem+ATCAdditions.swift │ ├── Models │ │ ├── ATCUser.swift │ │ └── ATCViewControllerContainerViewModel.swift │ ├── ThirdParty │ │ └── SnapKit │ │ │ ├── Constraint.swift │ │ │ ├── ConstraintAttributes.swift │ │ │ ├── ConstraintConfig.swift │ │ │ ├── ConstraintConstantTarget.swift │ │ │ ├── ConstraintDSL.swift │ │ │ ├── ConstraintDescription.swift │ │ │ ├── ConstraintInsetTarget.swift │ │ │ ├── ConstraintInsets.swift │ │ │ ├── ConstraintItem.swift │ │ │ ├── ConstraintLayoutGuide+Extensions.swift │ │ │ ├── ConstraintLayoutGuide.swift │ │ │ ├── ConstraintLayoutGuideDSL.swift │ │ │ ├── ConstraintLayoutSupport.swift │ │ │ ├── ConstraintLayoutSupportDSL.swift │ │ │ ├── ConstraintMaker.swift │ │ │ ├── ConstraintMakerEditable.swift │ │ │ ├── ConstraintMakerExtendable.swift │ │ │ ├── ConstraintMakerFinalizable.swift │ │ │ ├── ConstraintMakerPriortizable.swift │ │ │ ├── ConstraintMakerRelatable.swift │ │ │ ├── ConstraintMultiplierTarget.swift │ │ │ ├── ConstraintOffsetTarget.swift │ │ │ ├── ConstraintPriority.swift │ │ │ ├── ConstraintPriorityTarget.swift │ │ │ ├── ConstraintRelatableTarget.swift │ │ │ ├── ConstraintRelation.swift │ │ │ ├── ConstraintView+Extensions.swift │ │ │ ├── ConstraintView.swift │ │ │ ├── ConstraintViewDSL.swift │ │ │ ├── Debugging.swift │ │ │ ├── LayoutConstraint.swift │ │ │ ├── LayoutConstraintItem.swift │ │ │ ├── SnapKit.h │ │ │ ├── Typealiases.swift │ │ │ └── UILayoutSupport+Extensions.swift │ ├── UIExtensions │ │ ├── Date.swift │ │ ├── String.swift │ │ ├── UIColor.swift │ │ ├── UIImage.swift │ │ ├── UIScrollView.swift │ │ ├── UITextField.swift │ │ └── UIView.swift │ ├── ViewControllers │ │ ├── ATCGenericCollectionViewController.swift │ │ ├── Layouts │ │ │ ├── ATCCollectionViewFlowLayout.swift │ │ │ └── ATCLiquidCollectionViewLayout.swift │ │ ├── Navigation │ │ │ ├── ATCDrawerController.swift │ │ │ ├── ATCHostViewController.swift │ │ │ ├── ATCMenuCollectionViewController.swift │ │ │ ├── ATCMenuHeaderTableViewCell.swift │ │ │ ├── ATCMenuHeaderTableViewCell.xib │ │ │ ├── ATCMenuItemCollectionViewCellProtocol.swift │ │ │ ├── ATCMenuItemRowAdapter.swift │ │ │ ├── ATCMenuTableViewController.swift │ │ │ ├── ATCMenuTableViewController.xib │ │ │ └── ATCNavigationController.swift │ │ └── UIViewController+ATCAdditions.swift │ └── Views │ │ └── Cells │ │ ├── ATCCarouselCollectionViewCell.swift │ │ ├── ATCCarouselCollectionViewCell.xib │ │ ├── ATCStoryCollectionViewCell.swift │ │ ├── ATCStoryCollectionViewCell.xib │ │ ├── ATCViewControllerContainerCollectionViewCell.swift │ │ ├── ATCViewControllerContainerCollectionViewCell.xib │ │ ├── MenuCells │ │ ├── ATCCircledIconMenuCollectionViewCell.swift │ │ └── ATCCircledIconMenuCollectionViewCell.xib │ │ └── Users │ │ ├── ATCMessengerUserAdapter.swift │ │ ├── ATCMessengerUserCollectionViewCell.swift │ │ └── ATCMessengerUserCollectionViewCell.xib └── Info.plist ├── LICENSE ├── Podfile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | ChatApp.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings 2 | Pods 3 | Podfile.lock 4 | ChatApp.xcodeproj/xcshareddata/ 5 | ChatApp/Core/.DS_Store 6 | GoogleService-Info.plist 7 | ChatApp.xcworkspace/xcuserdata 8 | ChatApp.xcodeproj/xcuserdata/* 9 | -------------------------------------------------------------------------------- /ChatApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ChatApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ChatApp.xcodeproj/project.xcworkspace/xcuserdata/Florian.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp.xcodeproj/project.xcworkspace/xcuserdata/Florian.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ChatApp.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ChatApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ChatApp/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/18/23. 6 | // Copyright © 2023 Instamobile. All rights reserved. 7 | // 8 | 9 | import Firebase 10 | import UIKit 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | 19 | // Configure the UI 20 | let config = ChatUIConfiguration() 21 | config.configureUI() 22 | 23 | FirebaseApp.configure() 24 | 25 | let threadsDataSource = ATCGenericLocalHeteroDataSource(items: ATCChatMockStore.threads) 26 | 27 | // HEY THERE, user. read the next few lines below 28 | // Helper file to access remote data for a user 29 | let remoteData = ATCRemoteData() 30 | // Checks if user's firestore actually has channels setup 31 | remoteData.getChannels() 32 | 33 | // For testing, set this to a usr from 0-4 and run it to your simulator 34 | // Then, set it to any other user and run it to your phone. THEN-> see my comment in ATCChatMockStore.swift 35 | let user = 2 36 | // If both devices have a different user active, AND the chat thread is available, you can msg live 37 | 38 | 39 | // Window setup 40 | window = UIWindow(frame: UIScreen.main.bounds) 41 | window?.rootViewController = ChatHostViewController(uiConfig: config, 42 | threadsDataSource: threadsDataSource, 43 | viewer: ATCChatMockStore.users[user]) 44 | 45 | print("currentUser: \(ATCChatMockStore.users[user].debugDescription)") 46 | window?.makeKeyAndVisible() 47 | 48 | return true 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@1x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /ChatApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ChatApp/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /ChatApp/ChatHostViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatHostViewController.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/18/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ChatHostViewController: UIViewController, UITabBarControllerDelegate { 12 | 13 | let homeVC: UIViewController 14 | let uiConfig: ATCUIGenericConfigurationProtocol 15 | 16 | init(uiConfig: ATCUIGenericConfigurationProtocol, 17 | threadsDataSource: ATCGenericCollectionViewControllerDataSource, 18 | viewer: ATCUser) { 19 | self.uiConfig = uiConfig 20 | self.homeVC = ATCChatHomeViewController.homeVC(uiConfig: uiConfig, threadsDataSource: threadsDataSource, viewer: viewer) 21 | super.init(nibName: nil, bundle: nil) 22 | } 23 | 24 | required init?(coder aDecoder: NSCoder) { 25 | fatalError("init(coder:) has not been implemented") 26 | } 27 | 28 | lazy var hostController: ATCHostViewController = { [unowned self] in 29 | let menuItems: [ATCNavigationItem] = [ 30 | ATCNavigationItem(title: "Home", 31 | viewController: homeVC, 32 | image: UIImage.localImage("bubbles-icon", template: true), 33 | type: .viewController, 34 | leftTopView: nil, 35 | rightTopView: nil), 36 | ] 37 | let menuConfiguration = ATCMenuConfiguration(user: nil, 38 | cellClass: ATCCircledIconMenuCollectionViewCell.self, 39 | headerHeight: 0, 40 | items: menuItems, 41 | uiConfig: ATCMenuUIConfiguration(itemFont: uiConfig.regularMediumFont, 42 | tintColor: uiConfig.mainTextColor, 43 | itemHeight: 45.0, 44 | backgroundColor: uiConfig.mainThemeBackgroundColor)) 45 | 46 | let config = ATCHostConfiguration(menuConfiguration: menuConfiguration, 47 | style: .tabBar, 48 | topNavigationRightView: nil, 49 | topNavigationLeftImage: UIImage.localImage("three-equal-lines-icon", template: true), 50 | topNavigationTintColor: uiConfig.mainThemeForegroundColor, 51 | statusBarStyle: uiConfig.statusBarStyle, 52 | uiConfig: uiConfig) 53 | return ATCHostViewController(configuration: config) 54 | }() 55 | 56 | override func viewDidLoad() { 57 | super.viewDidLoad() 58 | self.addChildViewControllerWithView(hostController) 59 | hostController.view.backgroundColor = uiConfig.mainThemeBackgroundColor 60 | } 61 | 62 | override var preferredStatusBarStyle: UIStatusBarStyle { 63 | return uiConfig.statusBarStyle 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /ChatApp/ChatUIConfiguration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatUIConfiguration.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/18/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ChatUIConfiguration: ATCUIGenericConfigurationProtocol { 12 | let mainThemeBackgroundColor: UIColor = .white 13 | let mainThemeForegroundColor: UIColor = UIColor(hexString: "#3068CC") 14 | let mainTextColor: UIColor = UIColor(hexString: "#000000") 15 | let mainSubtextColor: UIColor = UIColor(hexString: "#7e7e7e") 16 | let statusBarStyle: UIStatusBarStyle = .default 17 | let hairlineColor: UIColor = UIColor(hexString: "#d6d6d6") 18 | 19 | let regularSmallFont = UIFont.systemFont(ofSize: 14) 20 | let regularMediumFont = UIFont.systemFont(ofSize: 17) 21 | let regularLargeFont = UIFont.systemFont(ofSize: 23) 22 | let mediumBoldFont = UIFont.boldSystemFont(ofSize: 17) 23 | let boldLargeFont = UIFont.boldSystemFont(ofSize: 23) 24 | let boldSmallFont = UIFont.boldSystemFont(ofSize: 14) 25 | let boldSuperSmallFont = UIFont.boldSystemFont(ofSize: 11) 26 | let boldSuperLargeFont = UIFont.boldSystemFont(ofSize: 29) 27 | 28 | let italicMediumFont = UIFont.italicSystemFont(ofSize: 17) 29 | 30 | func regularFont(size: CGFloat) -> UIFont { 31 | return UIFont.systemFont(ofSize: size) 32 | } 33 | 34 | func configureUI() { 35 | UITabBar.appearance().barTintColor = self.mainThemeBackgroundColor 36 | UITabBar.appearance().tintColor = self.mainThemeForegroundColor 37 | UITabBar.appearance().unselectedItemTintColor = self.mainTextColor 38 | UITabBarItem.appearance().setTitleTextAttributes([.foregroundColor : self.mainTextColor, 39 | .font: self.boldSuperSmallFont], 40 | for: .normal) 41 | UITabBarItem.appearance().setTitleTextAttributes([.foregroundColor : self.mainThemeForegroundColor, 42 | .font: self.boldSuperSmallFont], 43 | for: .selected) 44 | 45 | UITabBar.appearance().backgroundImage = UIImage.colorForNavBar(self.mainThemeBackgroundColor) 46 | UITabBar.appearance().shadowImage = UIImage.colorForNavBar(self.hairlineColor) 47 | 48 | UINavigationBar.appearance().barTintColor = self.mainThemeBackgroundColor 49 | UINavigationBar.appearance().tintColor = self.mainThemeForegroundColor 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ChatApp/Core/Adapters/ATCCarouselAdapter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCCarouselAdapter.swift 3 | // RestaurantApp 4 | // 5 | // Created by Florian Marcu on 4/25/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCCarouselAdapter : ATCGenericCollectionRowAdapter { 12 | let uiConfig: ATCUIGenericConfigurationProtocol 13 | 14 | init(uiConfig: ATCUIGenericConfigurationProtocol) { 15 | self.uiConfig = uiConfig 16 | } 17 | 18 | func configure(cell: UICollectionViewCell, with object: ATCGenericBaseModel) { 19 | guard let viewModel = object as? ATCCarouselViewModel, let cell = cell as? ATCCarouselCollectionViewCell else { return } 20 | cell.configure(viewModel: viewModel, uiConfig: self.uiConfig) 21 | } 22 | 23 | func cellClass() -> UICollectionViewCell.Type { 24 | return ATCCarouselCollectionViewCell.self 25 | } 26 | 27 | func size(containerBounds: CGRect, object: ATCGenericBaseModel) -> CGSize { 28 | guard let viewModel = object as? ATCCarouselViewModel else { return .zero } 29 | return CGSize(width: containerBounds.width, height: viewModel.cellHeight) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ChatApp/Core/Adapters/ATCStoryAdapter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCStoryAdapter.swift 3 | // RestaurantApp 4 | // 5 | // Created by Florian Marcu on 5/15/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCStoryAdapter: ATCGenericCollectionRowAdapter { 12 | let uiConfig: ATCUIGenericConfigurationProtocol 13 | init(uiConfig: ATCUIGenericConfigurationProtocol) { 14 | self.uiConfig = uiConfig 15 | } 16 | 17 | func configure(cell: UICollectionViewCell, with object: ATCGenericBaseModel) { 18 | guard let viewModel = object as? ATCStoryViewModel, let cell = cell as? ATCStoryCollectionViewCell else { return } 19 | cell.configure(viewModel: viewModel, uiConfig: uiConfig) 20 | } 21 | 22 | func cellClass() -> UICollectionViewCell.Type { 23 | return ATCStoryCollectionViewCell.self 24 | } 25 | 26 | func size(containerBounds: CGRect, object: ATCGenericBaseModel) -> CGSize { 27 | return CGSize(width: 100, height: 100) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ChatApp/Core/Adapters/ATCViewControllerContainerRowAdapter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCViewControllerContainerRowAdapter.swift 3 | // ListingApp 4 | // 5 | // Created by Florian Marcu on 6/12/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCViewControllerContainerRowAdapter: ATCGenericCollectionRowAdapter { 12 | func configure(cell: UICollectionViewCell, with object: ATCGenericBaseModel) { 13 | guard let viewModel = object as? ATCViewControllerContainerViewModel, let cell = cell as? ATCViewControllerContainerCollectionViewCell else { return } 14 | cell.configure(viewModel: viewModel) 15 | } 16 | 17 | func cellClass() -> UICollectionViewCell.Type { 18 | return ATCViewControllerContainerCollectionViewCell.self 19 | } 20 | 21 | func size(containerBounds: CGRect, object: ATCGenericBaseModel) -> CGSize { 22 | guard let viewModel = object as? ATCViewControllerContainerViewModel else { return .zero } 23 | var height: CGFloat 24 | if let cellHeight = viewModel.cellHeight { 25 | height = cellHeight 26 | } else if let collectionVC = viewModel.viewController as? ATCGenericCollectionViewController, 27 | let dataSource = collectionVC.genericDataSource, 28 | let subcellHeight = viewModel.subcellHeight { 29 | height = CGFloat(dataSource.numberOfObjects()) * subcellHeight 30 | } else { 31 | fatalError("Please provide a mechanism to compute the cell height") 32 | } 33 | return CGSize(width: containerBounds.width, height: height) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ChatApp/Core/Assets/CoreImages.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/CoreImages.xcassets/arrow-right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "arrow-right.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-forward-filled-100.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-forward-filled-500.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/CoreImages.xcassets/arrow-right.imageset/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/CoreImages.xcassets/arrow-right.imageset/arrow-right.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/CoreImages.xcassets/arrow-right.imageset/icons8-forward-filled-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/CoreImages.xcassets/arrow-right.imageset/icons8-forward-filled-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/CoreImages.xcassets/arrow-right.imageset/icons8-forward-filled-500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/CoreImages.xcassets/arrow-right.imageset/icons8-forward-filled-500.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/activity-feed-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "activity-feed-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-activity-feed-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-activity-feed-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/activity-feed-icon.imageset/activity-feed-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/activity-feed-icon.imageset/activity-feed-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/activity-feed-icon.imageset/icons8-activity-feed-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/activity-feed-icon.imageset/icons8-activity-feed-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/activity-feed-icon.imageset/icons8-activity-feed-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/activity-feed-icon.imageset/icons8-activity-feed-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/analytics-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "analytics-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-combo-chart-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-combo-chart-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/analytics-icon.imageset/analytics-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/analytics-icon.imageset/analytics-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/analytics-icon.imageset/icons8-combo-chart-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/analytics-icon.imageset/icons8-combo-chart-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/analytics-icon.imageset/icons8-combo-chart-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/analytics-icon.imageset/icons8-combo-chart-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/arrow-back-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "arrow-back-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-back-filled-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-back-filled-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/arrow-back-icon.imageset/arrow-back-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/arrow-back-icon.imageset/arrow-back-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/arrow-back-icon.imageset/icons8-back-filled-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/arrow-back-icon.imageset/icons8-back-filled-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/arrow-back-icon.imageset/icons8-back-filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/arrow-back-icon.imageset/icons8-back-filled-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bars-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "bars-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-bar-chart-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-bar-chart-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bars-icon.imageset/bars-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bars-icon.imageset/bars-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bars-icon.imageset/icons8-bar-chart-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bars-icon.imageset/icons8-bar-chart-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bars-icon.imageset/icons8-bar-chart-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bars-icon.imageset/icons8-bar-chart-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bell-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "bell-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-notification-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-notification-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bell-icon.imageset/bell-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bell-icon.imageset/bell-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bell-icon.imageset/icons8-notification-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bell-icon.imageset/icons8-notification-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bell-icon.imageset/icons8-notification-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bell-icon.imageset/icons8-notification-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/binoculars-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "binoculars-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "binoculars-icon-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "binoculars-icon-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/binoculars-icon.imageset/binoculars-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/binoculars-icon.imageset/binoculars-icon-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/binoculars-icon.imageset/binoculars-icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/binoculars-icon.imageset/binoculars-icon-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/binoculars-icon.imageset/binoculars-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/binoculars-icon.imageset/binoculars-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bubbles-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "bubbles-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "bubbles-icon-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "bubbles-icon-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bubbles-icon.imageset/bubbles-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bubbles-icon.imageset/bubbles-icon-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bubbles-icon.imageset/bubbles-icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bubbles-icon.imageset/bubbles-icon-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/bubbles-icon.imageset/bubbles-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/bubbles-icon.imageset/bubbles-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/calendar-grid-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "calendar-grid-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-calendar-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-calendar-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/calendar-grid-icon.imageset/calendar-grid-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/calendar-grid-icon.imageset/calendar-grid-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/calendar-grid-icon.imageset/icons8-calendar-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/calendar-grid-icon.imageset/icons8-calendar-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/calendar-grid-icon.imageset/icons8-calendar-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/calendar-grid-icon.imageset/icons8-calendar-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/calendar-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "calendar-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-calendar-96.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-calendar-97.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/calendar-icon.imageset/calendar-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/calendar-icon.imageset/calendar-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/calendar-icon.imageset/icons8-calendar-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/calendar-icon.imageset/icons8-calendar-96.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/calendar-icon.imageset/icons8-calendar-97.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/calendar-icon.imageset/icons8-calendar-97.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/camera-filled-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "camera-filled-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-unsplash-filled-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-unsplash-filled-75.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/camera-filled-icon.imageset/camera-filled-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/camera-filled-icon.imageset/camera-filled-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/camera-filled-icon.imageset/icons8-unsplash-filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/camera-filled-icon.imageset/icons8-unsplash-filled-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/camera-filled-icon.imageset/icons8-unsplash-filled-75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/camera-filled-icon.imageset/icons8-unsplash-filled-75.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/camera-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "camera-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-screenshot-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-screenshot-75.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/camera-icon.imageset/camera-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/camera-icon.imageset/camera-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/camera-icon.imageset/icons8-screenshot-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/camera-icon.imageset/icons8-screenshot-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/camera-icon.imageset/icons8-screenshot-75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/camera-icon.imageset/icons8-screenshot-75.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/caret-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "caret-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-expand-arrow-100.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-expand-arrow-500.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/caret-icon.imageset/caret-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/caret-icon.imageset/caret-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/caret-icon.imageset/icons8-expand-arrow-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/caret-icon.imageset/icons8-expand-arrow-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/caret-icon.imageset/icons8-expand-arrow-500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/caret-icon.imageset/icons8-expand-arrow-500.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/check-file-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "check-file-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "check-file-icon-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "check-file-icon-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/check-file-icon.imageset/check-file-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/check-file-icon.imageset/check-file-icon-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/check-file-icon.imageset/check-file-icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/check-file-icon.imageset/check-file-icon-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/check-file-icon.imageset/check-file-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/check-file-icon.imageset/check-file-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/coins-filled-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "coins-filled-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-coins-filled-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-coins-filled-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/coins-filled-icon.imageset/coins-filled-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/coins-filled-icon.imageset/coins-filled-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/coins-filled-icon.imageset/icons8-coins-filled-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/coins-filled-icon.imageset/icons8-coins-filled-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/coins-filled-icon.imageset/icons8-coins-filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/coins-filled-icon.imageset/icons8-coins-filled-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/coins-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "coins-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "coins-icon-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "coins-icon-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/coins-icon.imageset/coins-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/coins-icon.imageset/coins-icon-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/coins-icon.imageset/coins-icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/coins-icon.imageset/coins-icon-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/coins-icon.imageset/coins-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/coins-icon.imageset/coins-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/customers-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "customers-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-customer-filled-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-customer-filled-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/customers-icon.imageset/customers-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/customers-icon.imageset/customers-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/customers-icon.imageset/icons8-customer-filled-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/customers-icon.imageset/icons8-customer-filled-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/customers-icon.imageset/icons8-customer-filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/customers-icon.imageset/icons8-customer-filled-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/facebook-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "facebook-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "facebook-icon-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "facebook-icon-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/facebook-icon.imageset/facebook-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/facebook-icon.imageset/facebook-icon-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/facebook-icon.imageset/facebook-icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/facebook-icon.imageset/facebook-icon-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/facebook-icon.imageset/facebook-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/facebook-icon.imageset/facebook-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/forward-arrow-black.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "forward-arrow-black.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "forward-arrow-black-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "forward-arrow-black-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/forward-arrow-black.imageset/forward-arrow-black-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/forward-arrow-black.imageset/forward-arrow-black-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/forward-arrow-black.imageset/forward-arrow-black-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/forward-arrow-black.imageset/forward-arrow-black-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/forward-arrow-black.imageset/forward-arrow-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/forward-arrow-black.imageset/forward-arrow-black.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/home-menu-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "home-menu-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "home-menu-icon-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "home-menu-icon-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/home-menu-icon.imageset/home-menu-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/home-menu-icon.imageset/home-menu-icon-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/home-menu-icon.imageset/home-menu-icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/home-menu-icon.imageset/home-menu-icon-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/home-menu-icon.imageset/home-menu-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/home-menu-icon.imageset/home-menu-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-fb.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Facebook.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Facebook@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Facebook@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-fb.imageset/Facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-fb.imageset/Facebook.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-fb.imageset/Facebook@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-fb.imageset/Facebook@2x.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-fb.imageset/Facebook@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-fb.imageset/Facebook@3x.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-instagram.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Instagram.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Instagram@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Instagram@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-instagram.imageset/Instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-instagram.imageset/Instagram.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-instagram.imageset/Instagram@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-instagram.imageset/Instagram@2x.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-instagram.imageset/Instagram@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-instagram.imageset/Instagram@3x.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-twtr.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Twitter.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Twitter@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Twitter@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-twtr.imageset/Twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-twtr.imageset/Twitter.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-twtr.imageset/Twitter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-twtr.imageset/Twitter@2x.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-twtr.imageset/Twitter@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-twtr.imageset/Twitter@3x.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-youtube.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Youtube.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Youtube@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Youtube@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-youtube.imageset/Youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-youtube.imageset/Youtube.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-youtube.imageset/Youtube@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-youtube.imageset/Youtube@2x.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/icn-youtube.imageset/Youtube@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/icn-youtube.imageset/Youtube@3x.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/ios-app-ecommerce-i-shop-onboarding-cover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ios-app-ecommerce-i-shop-onboarding-cover.jpeg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ios-app-ecommerce-i-shop-onboarding-cover-1.jpeg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ios-app-ecommerce-i-shop-onboarding-cover-2.jpeg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/ios-app-ecommerce-i-shop-onboarding-cover.imageset/ios-app-ecommerce-i-shop-onboarding-cover-1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/ios-app-ecommerce-i-shop-onboarding-cover.imageset/ios-app-ecommerce-i-shop-onboarding-cover-1.jpeg -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/ios-app-ecommerce-i-shop-onboarding-cover.imageset/ios-app-ecommerce-i-shop-onboarding-cover-2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/ios-app-ecommerce-i-shop-onboarding-cover.imageset/ios-app-ecommerce-i-shop-onboarding-cover-2.jpeg -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/ios-app-ecommerce-i-shop-onboarding-cover.imageset/ios-app-ecommerce-i-shop-onboarding-cover.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/ios-app-ecommerce-i-shop-onboarding-cover.imageset/ios-app-ecommerce-i-shop-onboarding-cover.jpeg -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/logout-menu-item.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "logout-menu-item.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "logout-menu-item-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "logout-menu-item-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/logout-menu-item.imageset/logout-menu-item-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/logout-menu-item.imageset/logout-menu-item-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/logout-menu-item.imageset/logout-menu-item-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/logout-menu-item.imageset/logout-menu-item-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/logout-menu-item.imageset/logout-menu-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/logout-menu-item.imageset/logout-menu-item.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/night-stars-wallpaper.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "night-stars-wallpaper.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "night-stars-wallpaper-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "night-stars-wallpaper-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/night-stars-wallpaper.imageset/night-stars-wallpaper-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/night-stars-wallpaper.imageset/night-stars-wallpaper-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/night-stars-wallpaper.imageset/night-stars-wallpaper-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/night-stars-wallpaper.imageset/night-stars-wallpaper-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/night-stars-wallpaper.imageset/night-stars-wallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/night-stars-wallpaper.imageset/night-stars-wallpaper.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/orders-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "orders-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-purchase-order-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-purchase-order-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/orders-icon.imageset/icons8-purchase-order-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/orders-icon.imageset/icons8-purchase-order-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/orders-icon.imageset/icons8-purchase-order-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/orders-icon.imageset/icons8-purchase-order-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/orders-icon.imageset/orders-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/orders-icon.imageset/orders-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/products-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "products-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-box-filled-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-box-filled-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/products-icon.imageset/icons8-box-filled-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/products-icon.imageset/icons8-box-filled-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/products-icon.imageset/icons8-box-filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/products-icon.imageset/icons8-box-filled-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/products-icon.imageset/products-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/products-icon.imageset/products-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/settings-menu-item.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "settings-menu-item.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "settings-menu-item-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "settings-menu-item-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/settings-menu-item.imageset/settings-menu-item-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/settings-menu-item.imageset/settings-menu-item-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/settings-menu-item.imageset/settings-menu-item-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/settings-menu-item.imageset/settings-menu-item-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/settings-menu-item.imageset/settings-menu-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/settings-menu-item.imageset/settings-menu-item.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/share-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "share-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "share-icon-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "share-icon-75.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/share-icon.imageset/share-icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/share-icon.imageset/share-icon-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/share-icon.imageset/share-icon-75.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/share-icon.imageset/share-icon-75.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/share-icon.imageset/share-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/share-icon.imageset/share-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/shopping-cart-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "shopping-cart-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "shopping-cart-icon-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "shopping-cart-icon-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/shopping-cart-icon.imageset/shopping-cart-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/shopping-cart-icon.imageset/shopping-cart-icon-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/shopping-cart-icon.imageset/shopping-cart-icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/shopping-cart-icon.imageset/shopping-cart-icon-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/shopping-cart-icon.imageset/shopping-cart-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/shopping-cart-icon.imageset/shopping-cart-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/shopping-ios-app-onboarding-cover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "shopping-ios-app-onboarding-cover.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "shopping-ios-app-onboarding-cover-1.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "shopping-ios-app-onboarding-cover-2.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/shopping-ios-app-onboarding-cover.imageset/shopping-ios-app-onboarding-cover-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/shopping-ios-app-onboarding-cover.imageset/shopping-ios-app-onboarding-cover-1.jpg -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/shopping-ios-app-onboarding-cover.imageset/shopping-ios-app-onboarding-cover-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/shopping-ios-app-onboarding-cover.imageset/shopping-ios-app-onboarding-cover-2.jpg -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/shopping-ios-app-onboarding-cover.imageset/shopping-ios-app-onboarding-cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/shopping-ios-app-onboarding-cover.imageset/shopping-ios-app-onboarding-cover.jpg -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/task-filled-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "task-filled-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-task-filled-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-task-filled-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/task-filled-icon.imageset/icons8-task-filled-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/task-filled-icon.imageset/icons8-task-filled-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/task-filled-icon.imageset/icons8-task-filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/task-filled-icon.imageset/icons8-task-filled-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/task-filled-icon.imageset/task-filled-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/task-filled-icon.imageset/task-filled-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/three-equal-lines-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "three-equal-lines-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "icons8-menu-filled-50.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "icons8-menu-filled-100.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/three-equal-lines-icon.imageset/icons8-menu-filled-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/three-equal-lines-icon.imageset/icons8-menu-filled-100.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/three-equal-lines-icon.imageset/icons8-menu-filled-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/three-equal-lines-icon.imageset/icons8-menu-filled-50.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/three-equal-lines-icon.imageset/three-equal-lines-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/three-equal-lines-icon.imageset/three-equal-lines-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/twitter-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "twitter-icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "twitter-icon-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "twitter-icon-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/twitter-icon.imageset/twitter-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/twitter-icon.imageset/twitter-icon-1.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/twitter-icon.imageset/twitter-icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/twitter-icon.imageset/twitter-icon-2.png -------------------------------------------------------------------------------- /ChatApp/Core/Assets/Misc.xcassets/twitter-icon.imageset/twitter-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dopebase/messenger-iOS-chat-swift-firestore/28e212351b285c4d89fb5ef191fb4025f1f67816/ChatApp/Core/Assets/Misc.xcassets/twitter-icon.imageset/twitter-icon.png -------------------------------------------------------------------------------- /ChatApp/Core/Chat/Adapters/ATCChatThreadAdapter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCChatThreadAdapter.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/20/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import Kingfisher 10 | import UIKit 11 | 12 | class ATCChatThreadAdapter: ATCGenericCollectionRowAdapter { 13 | let uiConfig: ATCUIGenericConfigurationProtocol 14 | let viewer: ATCUser 15 | 16 | init(uiConfig: ATCUIGenericConfigurationProtocol, viewer: ATCUser) { 17 | self.uiConfig = uiConfig 18 | self.viewer = viewer 19 | } 20 | 21 | func configure(cell: UICollectionViewCell, with object: ATCGenericBaseModel) { 22 | guard let viewModel = object as? ATChatMessage, let cell = cell as? ATCThreadCollectionViewCell else { return } 23 | let theOtherUser = (viewer.email == viewModel.atcSender.email) ? viewModel.recipient : viewModel.atcSender 24 | if let url = theOtherUser.profilePictureURL { 25 | cell.singleImageView.kf.setImage(with: URL(string: url)) 26 | } else { 27 | // placeholder 28 | } 29 | cell.singleImageView.contentMode = .scaleAspectFill 30 | cell.singleImageView.clipsToBounds = true 31 | cell.singleImageView.layer.cornerRadius = 60.0/2.0 32 | 33 | let unseenByMe = (!viewModel.seenByRecipient && viewer.email == viewModel.recipient.email) 34 | cell.titleLabel.text = (theOtherUser.firstName ?? "") + " " + (theOtherUser.lastName ?? "") 35 | cell.titleLabel.font = unseenByMe ? uiConfig.mediumBoldFont : uiConfig.regularMediumFont 36 | cell.titleLabel.textColor = uiConfig.mainTextColor 37 | 38 | var subtitle = (viewer.email == viewModel.atcSender.email) ? "You: " : "" 39 | subtitle += viewModel.messageText + " \u{00B7} " + TimeFormatHelper.chatString(for: viewModel.sentDate) 40 | cell.subtitleLabel.text = subtitle 41 | cell.subtitleLabel.font = uiConfig.regularSmallFont 42 | cell.subtitleLabel.textColor = uiConfig.mainSubtextColor 43 | 44 | cell.onlineStatusView.isHidden = !theOtherUser.isOnline 45 | cell.onlineStatusView.layer.cornerRadius = 15.0/2.0 46 | cell.onlineStatusView.layer.borderColor = UIColor.white.cgColor 47 | cell.onlineStatusView.layer.borderWidth = 3 48 | cell.onlineStatusView.backgroundColor = UIColor(hexString: "#4acd1d") 49 | 50 | cell.setNeedsLayout() 51 | } 52 | 53 | func cellClass() -> UICollectionViewCell.Type { 54 | return ATCThreadCollectionViewCell.self 55 | } 56 | 57 | func size(containerBounds: CGRect, object: ATCGenericBaseModel) -> CGSize { 58 | guard let viewModel = object as? ATChatMessage else { return .zero } 59 | return CGSize(width: containerBounds.width, height: 85) 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ChatApp/Core/Chat/Adapters/ATCChatUserStoryAdapter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCChatUserStoryAdapter.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/21/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCChatUserStoryAdapter: ATCGenericCollectionRowAdapter { 12 | let uiConfig: ATCUIGenericConfigurationProtocol 13 | 14 | init(uiConfig: ATCUIGenericConfigurationProtocol) { 15 | self.uiConfig = uiConfig 16 | } 17 | 18 | func configure(cell: UICollectionViewCell, with object: ATCGenericBaseModel) { 19 | guard let viewModel = object as? ATCUser, let cell = cell as? ATCUserStoryCollectionViewCell else { return } 20 | if let url = viewModel.profilePictureURL { 21 | cell.storyImageView.kf.setImage(with: URL(string: url)) 22 | } else { 23 | // placeholder 24 | } 25 | cell.storyImageView.contentMode = .scaleAspectFill 26 | cell.storyImageView.clipsToBounds = true 27 | cell.storyImageView.layer.cornerRadius = 50.0/2.0 28 | 29 | cell.storyTitleLabel.text = (viewModel.firstName ?? viewModel.lastName ?? "") 30 | cell.storyTitleLabel.font = uiConfig.regularFont(size: 13) 31 | cell.storyTitleLabel.textColor = uiConfig.mainSubtextColor 32 | 33 | cell.onlineStatusView.isHidden = !viewModel.isOnline 34 | cell.onlineStatusView.layer.cornerRadius = 15.0/2.0 35 | cell.onlineStatusView.layer.borderColor = UIColor.white.cgColor 36 | cell.onlineStatusView.layer.borderWidth = 3 37 | cell.onlineStatusView.backgroundColor = UIColor(hexString: "#4acd1d") 38 | 39 | cell.setNeedsLayout() 40 | } 41 | 42 | func cellClass() -> UICollectionViewCell.Type { 43 | return ATCUserStoryCollectionViewCell.self 44 | } 45 | 46 | func size(containerBounds: CGRect, object: ATCGenericBaseModel) -> CGSize { 47 | guard let viewModel = object as? ATCUser else { return .zero } 48 | return CGSize(width: 75, height: 90) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /ChatApp/Core/Chat/Models/ATCChatChannel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCChatChannel.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/26/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import FirebaseFirestore 10 | 11 | struct ATCChatChannel { 12 | 13 | let id: String 14 | let name: String 15 | 16 | init(id: String, name: String) { 17 | self.id = id 18 | self.name = name 19 | } 20 | 21 | init?(document: QueryDocumentSnapshot) { 22 | let data = document.data() 23 | 24 | guard let name = data["name"] as? String else { 25 | return nil 26 | } 27 | 28 | id = document.documentID 29 | self.name = name 30 | } 31 | } 32 | 33 | extension ATCChatChannel: DatabaseRepresentation { 34 | 35 | var representation: [String : Any] { 36 | var rep = ["name": name] 37 | rep["id"] = id 38 | return rep 39 | } 40 | 41 | } 42 | 43 | extension ATCChatChannel: Comparable { 44 | 45 | static func == (lhs: ATCChatChannel, rhs: ATCChatChannel) -> Bool { 46 | return lhs.id == rhs.id 47 | } 48 | 49 | static func < (lhs: ATCChatChannel, rhs: ATCChatChannel) -> Bool { 50 | return lhs.name < rhs.name 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /ChatApp/Core/Chat/Store/ATCChatMockStore.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCChatMockStore.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/18/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import MessageKit 10 | import UIKit 11 | 12 | class ATCChatMockStore { 13 | static let users = [ 14 | ATCUser(uid: "dan", firstName: "Dan", lastName: "Burkhardt", avatarURL: "https://cdn0.iconfinder.com/data/icons/avatar-2/500/man-2-512.png", email: "test@gigabitelabs.com", isOnline: false), 15 | ATCUser(uid: "simulator", firstName: "iPhone", lastName: "Simulator", avatarURL: "https://cdn-images-1.medium.com/max/1000/1*QUmlH0_tRyjlbxVkSKtk3A.png", email: "testcristina@gmail.com", isOnline: true), 16 | ATCUser(uid: "sandra", firstName: "Sandra", lastName: "O'Connor", avatarURL: "https://cdn0.iconfinder.com/data/icons/people-avatar-flat/64/girl_ginger_curly_people_woman_teenager_avatar-512.png", email: "testcristina@gmail.com", isOnline: true), 17 | ATCUser(uid: "sam", firstName: "Sam", lastName: "Smith", avatarURL: "https://cdn1.iconfinder.com/data/icons/avatar-2-2/512/Programmer-512.png", email: "testcristina@gmail.com", isOnline: false), 18 | ATCUser(uid: "tom", firstName: "Tom", lastName: "Bradley", avatarURL: "https://cdn3.iconfinder.com/data/icons/business-avatar-1/512/4_avatar-512.png", email: "testcristina@gmail.com", isOnline: true), 19 | ] 20 | // HEY AGAIN: set the users for stcSender and atcRecipient on one of these so that one is the user 21 | // for your simulator, the other one is your device 22 | static let threads = [ 23 | ATChatMessage(messageId: "1", messageKind: MessageKind.text("TestThread"), createdAt: Date().yesterday, atcSender: users[2], recipient: users[0], seenByRecipient: false),// <- try this one 24 | ATChatMessage(messageId: "2", messageKind: MessageKind.text("\u{1F631} Wow, it's real time"), createdAt: Date().yesterday, atcSender: users[1], recipient: users[0], seenByRecipient: true) 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /ChatApp/Core/Chat/Themes/Messenger/ATCThreadCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCThreadCollectionViewCell.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/20/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCThreadCollectionViewCell: UICollectionViewCell { 12 | @IBOutlet var containerView: UIView! 13 | @IBOutlet var avatarContainerView: UIView! 14 | @IBOutlet var singleImageView: UIImageView! 15 | @IBOutlet var titleLabel: UILabel! 16 | @IBOutlet var subtitleLabel: UILabel! 17 | @IBOutlet var statusImageView: UIImageView! 18 | @IBOutlet var onlineStatusView: UIView! 19 | } 20 | -------------------------------------------------------------------------------- /ChatApp/Core/Chat/Themes/Messenger/ATCUserStoryCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCUserStoryCollectionViewCell.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/21/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCUserStoryCollectionViewCell: UICollectionViewCell { 12 | @IBOutlet var containerView: UIView! 13 | @IBOutlet var storyImageView: UIImageView! 14 | @IBOutlet var imageContainerView: UIView! 15 | @IBOutlet var onlineStatusView: UIView! 16 | @IBOutlet var storyTitleLabel: UILabel! 17 | } 18 | -------------------------------------------------------------------------------- /ChatApp/Core/Chat/ViewControllers/ATCChatThreadsViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCChatThreadsViewController.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/20/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCChatThreadsViewController: ATCGenericCollectionViewController { 12 | 13 | init(configuration: ATCGenericCollectionViewControllerConfiguration, 14 | selectionBlock: ATCollectionViewSelectionBlock?, 15 | viewer: ATCUser) { 16 | super.init(configuration: configuration, selectionBlock: selectionBlock) 17 | self.use(adapter: ATCChatThreadAdapter(uiConfig: configuration.uiConfig, viewer: viewer), for: "ATChatMessage") 18 | } 19 | 20 | required init?(coder aDecoder: NSCoder) { 21 | fatalError("init(coder:) has not been implemented") 22 | } 23 | 24 | static func mockThreadsVC(uiConfig: ATCUIGenericConfigurationProtocol, 25 | dataSource: ATCGenericCollectionViewControllerDataSource, 26 | viewer: ATCUser) -> ATCChatThreadsViewController { 27 | let collectionVCConfiguration = ATCGenericCollectionViewControllerConfiguration( 28 | pullToRefreshEnabled: false, 29 | pullToRefreshTintColor: .white, 30 | collectionViewBackgroundColor: .white, 31 | collectionViewLayout: ATCLiquidCollectionViewLayout(), 32 | collectionPagingEnabled: false, 33 | hideScrollIndicators: false, 34 | hidesNavigationBar: false, 35 | headerNibName: nil, 36 | scrollEnabled: false, 37 | uiConfig: uiConfig 38 | ) 39 | 40 | let vc = ATCChatThreadsViewController(configuration: collectionVCConfiguration, selectionBlock: ATCChatThreadsViewController.selectionBlock(viewer: viewer), viewer: ATCChatMockStore.users[0]) 41 | vc.genericDataSource = dataSource 42 | return vc 43 | } 44 | 45 | static func selectionBlock(viewer: ATCUser) -> ATCollectionViewSelectionBlock? { 46 | return { (navController, object) in 47 | let uiConfig = ATCChatUIConfiguration(primaryColor: UIColor(hexString: "#0084ff"), 48 | secondaryColor: UIColor(hexString: "#f0f0f0"), 49 | inputTextViewBgColor: UIColor(hexString: "#f4f4f6"), 50 | inputTextViewTextColor: .black, 51 | inputPlaceholderTextColor: UIColor(hexString: "#979797")) 52 | if let lastMessage = object as? ATChatMessage { 53 | let otherUser = viewer.uid == lastMessage.atcSender.uid ? lastMessage.recipient : lastMessage.atcSender 54 | let vc = ATCChatThreadViewController(user: viewer, channel: ATCChatChannel(id: lastMessage.channelId, name: otherUser.fullName()), uiConfig: uiConfig) 55 | navController?.pushViewController(vc, animated: true) 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ChatApp/Core/Helpers/ATCGenericFirebaseDataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCGenericFirebaseDataSource.swift 3 | // ShoppingApp 4 | // 5 | // Created by Florian Marcu on 10/15/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import Firebase 10 | 11 | let kItemsPerPage: UInt = 10 12 | 13 | class ATCGenericFirebaseDataSource: ATCGenericCollectionViewControllerDataSource { 14 | weak var delegate: ATCGenericCollectionViewControllerDataSourceDelegate? 15 | 16 | private let dbRef = Database.database().reference() 17 | private var store: [T] = [T]() 18 | private var lastFetchedObjectKey: Any? 19 | private var didFinishLoadingBottom = false 20 | private let dbChild: DatabaseReference 21 | 22 | init(tableName: String) { 23 | dbChild = dbRef.child(tableName) 24 | } 25 | 26 | func object(at index: Int) -> ATCGenericBaseModel? { 27 | return store[index] 28 | } 29 | 30 | func numberOfObjects() -> Int { 31 | return store.count 32 | } 33 | 34 | func loadFirst() { 35 | dbChild 36 | .queryOrderedByKey() 37 | .queryLimited(toFirst: kItemsPerPage) 38 | .observeSingleEvent(of: .value, with: { snapshot in 39 | let results = self.parseResults(snapshot: snapshot) 40 | self.store += results 41 | if let children = snapshot.children.allObjects as? [DataSnapshot] { 42 | self.lastFetchedObjectKey = children.last?.key 43 | } 44 | self.delegate?.genericCollectionViewControllerDataSource(self, didLoadFirst: results) 45 | }) 46 | } 47 | 48 | func loadBottom() { 49 | if didFinishLoadingBottom { 50 | return 51 | } 52 | dbChild 53 | .queryOrderedByKey() 54 | .queryStarting(atValue: lastFetchedObjectKey) 55 | .queryLimited(toFirst: kItemsPerPage + 1) 56 | .observeSingleEvent(of: .value) { snapshot in 57 | var results = self.parseResults(snapshot: snapshot) 58 | results.removeFirst() 59 | self.didFinishLoadingBottom = (results.count == 0) 60 | self.store += results 61 | if let children = snapshot.children.allObjects as? [DataSnapshot], let last = children.last { 62 | self.lastFetchedObjectKey = last.key 63 | } 64 | self.delegate?.genericCollectionViewControllerDataSource(self, didLoadBottom: results) 65 | } 66 | } 67 | 68 | func loadTop() { 69 | 70 | } 71 | 72 | private func parseResults(snapshot: DataSnapshot) -> [T] { 73 | var res = [T]() 74 | guard let children = snapshot.children.allObjects as? [DataSnapshot] else { 75 | return [] 76 | } 77 | for child in children { 78 | if let dict = child.value as? [String: Any] { 79 | res.append(T(key: child.key, jsonDict: dict)) 80 | } 81 | } 82 | return res 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /ChatApp/Core/Helpers/ATCGenericLocalDataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCGenericLocalDataSource.swift 3 | // RestaurantApp 4 | // 5 | // Created by Florian Marcu on 4/7/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | class ATCGenericLocalDataSource: ATCGenericCollectionViewControllerDataSource { 10 | weak var delegate: ATCGenericCollectionViewControllerDataSourceDelegate? 11 | 12 | var items: [T] 13 | 14 | init(items: [T]) { 15 | self.items = items 16 | } 17 | 18 | func object(at index: Int) -> ATCGenericBaseModel? { 19 | if index < items.count { 20 | return items[index] 21 | } 22 | return nil 23 | } 24 | 25 | func numberOfObjects() -> Int { 26 | return items.count 27 | } 28 | 29 | func loadFirst() { 30 | self.delegate?.genericCollectionViewControllerDataSource(self, didLoadFirst: items) 31 | } 32 | 33 | func loadBottom() { 34 | } 35 | 36 | func loadTop() { 37 | } 38 | 39 | func update(items: [T]) { 40 | self.items = items 41 | self.delegate?.genericCollectionViewControllerDataSource(self, didLoadFirst: items) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /ChatApp/Core/Helpers/ATCGenericLocalHeteroDataSource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCGenericLocalHeteroDataSource.swift 3 | // RestaurantApp 4 | // 5 | // Created by Florian Marcu on 5/19/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCGenericLocalHeteroDataSource: ATCGenericCollectionViewControllerDataSource { 12 | weak var delegate: ATCGenericCollectionViewControllerDataSourceDelegate? 13 | 14 | let items: [ATCGenericBaseModel] 15 | 16 | init(items: [ATCGenericBaseModel]) { 17 | self.items = items 18 | } 19 | 20 | func object(at index: Int) -> ATCGenericBaseModel? { 21 | if index < items.count { 22 | return items[index] 23 | } 24 | return nil 25 | } 26 | 27 | func numberOfObjects() -> Int { 28 | return items.count 29 | } 30 | 31 | func loadFirst() { 32 | self.delegate?.genericCollectionViewControllerDataSource(self, didLoadFirst: items) 33 | } 34 | 35 | func loadBottom() { 36 | } 37 | 38 | func loadTop() { 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ChatApp/Core/Helpers/ATCUIGenericConfigurationProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCUIGenericConfigurationProtocol.swift 3 | // ListingApp 4 | // 5 | // Created by Florian Marcu on 6/9/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | protocol ATCUIGenericConfigurationProtocol { 12 | var mainThemeBackgroundColor: UIColor {get} 13 | var mainThemeForegroundColor: UIColor {get} 14 | var mainTextColor: UIColor {get} 15 | var mainSubtextColor: UIColor {get} 16 | var hairlineColor: UIColor {get} 17 | 18 | var statusBarStyle: UIStatusBarStyle {get} 19 | 20 | var regularSmallFont: UIFont {get} 21 | var regularMediumFont: UIFont {get} 22 | var regularLargeFont: UIFont {get} 23 | var mediumBoldFont: UIFont {get} 24 | 25 | var boldSmallFont: UIFont {get} 26 | var boldLargeFont: UIFont {get} 27 | var boldSuperLargeFont: UIFont {get} 28 | 29 | var italicMediumFont: UIFont {get} 30 | 31 | func regularFont(size: CGFloat) -> UIFont 32 | } 33 | -------------------------------------------------------------------------------- /ChatApp/Core/Helpers/TimeFormatHelper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TimeFormatHelper.swift 3 | // NewsReader 4 | // 5 | // Created by Florian Marcu on 3/28/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class TimeFormatHelper { 12 | static func timeAgoString(date: Date) -> String { 13 | let secondsInterval = Date().timeIntervalSince(date).rounded() 14 | if (secondsInterval < 10) { 15 | return "now" 16 | } 17 | if (secondsInterval < 60) { 18 | return String(Int(secondsInterval)) + " seconds ago" 19 | } 20 | let minutes = (secondsInterval / 60).rounded() 21 | if (minutes < 60) { 22 | return String(Int(minutes)) + " minutes ago" 23 | } 24 | let hours = (minutes / 60).rounded() 25 | if (hours < 24) { 26 | return String(Int(hours)) + " hours ago" 27 | } 28 | let days = (hours / 60).rounded() 29 | if (days < 30) { 30 | return String(Int(days)) + " days ago" 31 | } 32 | let months = (days / 30).rounded() 33 | if (months < 12) { 34 | return String(Int(months)) + " months ago" 35 | } 36 | let years = (months / 12).rounded() 37 | return String(Int(years)) + " years ago" 38 | } 39 | 40 | static func string(for date: Date, format: String) -> String { 41 | let dateFormatter = DateFormatter() 42 | dateFormatter.dateFormat = format 43 | return dateFormatter.string(from: date) 44 | } 45 | 46 | static func chatString(for date: Date) -> String { 47 | let calendar = NSCalendar.current 48 | if calendar.isDateInToday(date) { 49 | return self.string(for: date, format: "HH:mm") 50 | } 51 | return self.string(for: date, format: "MMM dd") 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ChatApp/Core/Helpers/UIImage+ATCAdditions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Additions.swift 3 | // ShoppingApp 4 | // 5 | // Created by Florian Marcu on 8/29/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIImage { 12 | static func localImage(_ name: String, template: Bool = false) -> UIImage { 13 | var image = UIImage(named: name)! 14 | if template { 15 | image = image.withRenderingMode(.alwaysTemplate) 16 | } 17 | return image 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ChatApp/Core/Helpers/UITabBarItem+ATCAdditions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITabBarItem+Additions.swift 3 | // ShoppingApp 4 | // 5 | // Created by Florian Marcu on 8/29/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UITabBarItem { 12 | 13 | func tabBarWithNoTitle() -> UITabBarItem { 14 | self.imageInsets = UIEdgeInsets(top: 6, left: 0,bottom: -6, right: 0) 15 | self.titlePositionAdjustment = UIOffset(horizontal: 0,vertical: 100) 16 | return self 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ChatApp/Core/Models/ATCUser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCUser.swift 3 | // AppTemplatesCore 4 | // 5 | // Created by Florian Marcu on 2/2/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | open class ATCUser: NSObject, ATCGenericBaseModel { 12 | 13 | var uid: String? 14 | var username: String? 15 | var email: String? 16 | var firstName: String? 17 | var lastName: String? 18 | var profilePictureURL: String? 19 | var isOnline: Bool 20 | 21 | public init(uid: String = "", firstName: String, lastName: String, avatarURL: String = "", email: String = "", isOnline: Bool = false) { 22 | self.firstName = firstName 23 | self.lastName = lastName 24 | self.uid = uid 25 | self.email = email 26 | self.profilePictureURL = avatarURL 27 | self.isOnline = isOnline 28 | } 29 | 30 | required public init(jsonDict: [String: Any]) { 31 | fatalError() 32 | } 33 | 34 | // public func mapping(map: Map) { 35 | // username <- map["username"] 36 | // email <- map["email"] 37 | // firstName <- map["first_name"] 38 | // lastName <- map["last_name"] 39 | // profilePictureURL <- map["profile_picture"] 40 | // } 41 | 42 | public func fullName() -> String { 43 | guard let firstName = firstName, let lastName = lastName else { return "" } 44 | return "\(firstName) \(lastName)" 45 | } 46 | 47 | var initials: String { 48 | if let f = firstName?.first, let l = lastName?.first { 49 | return String(f) + String(l) 50 | } 51 | return "?" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ChatApp/Core/Models/ATCViewControllerContainerViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCViewControllerContainerModel.swift 3 | // ListingApp 4 | // 5 | // Created by Florian Marcu on 6/12/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCViewControllerContainerViewModel: ATCGenericBaseModel { 12 | 13 | var description: String = "Carousel" 14 | 15 | let cellHeight: CGFloat? 16 | let subcellHeight: CGFloat? 17 | var viewController: UIViewController 18 | weak var parentViewController: UIViewController? 19 | 20 | init(viewController: UIViewController, cellHeight: CGFloat? = nil, subcellHeight: CGFloat? = nil) { 21 | self.cellHeight = cellHeight 22 | self.subcellHeight = subcellHeight 23 | self.viewController = viewController 24 | if let _ = cellHeight, let _ = subcellHeight { 25 | fatalError("Choose either static or dynamic size. You can have both.") 26 | } 27 | } 28 | 29 | required init(jsonDict: [String: Any]) { 30 | fatalError() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintConfig.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | public typealias ConstraintInterfaceLayoutDirection = UIUserInterfaceLayoutDirection 27 | #else 28 | import AppKit 29 | public typealias ConstraintInterfaceLayoutDirection = NSUserInterfaceLayoutDirection 30 | #endif 31 | 32 | 33 | public struct ConstraintConfig { 34 | 35 | public static var interfaceLayoutDirection: ConstraintInterfaceLayoutDirection = .leftToRight 36 | 37 | } 38 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintDescription.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintDescription { 32 | 33 | internal let item: LayoutConstraintItem 34 | internal var attributes: ConstraintAttributes 35 | internal var relation: ConstraintRelation? = nil 36 | internal var sourceLocation: (String, UInt)? = nil 37 | internal var label: String? = nil 38 | internal var related: ConstraintItem? = nil 39 | internal var multiplier: ConstraintMultiplierTarget = 1.0 40 | internal var constant: ConstraintConstantTarget = 0.0 41 | internal var priority: ConstraintPriorityTarget = 1000.0 42 | internal lazy var constraint: Constraint? = { 43 | guard let relation = self.relation, 44 | let related = self.related, 45 | let sourceLocation = self.sourceLocation else { 46 | return nil 47 | } 48 | let from = ConstraintItem(target: self.item, attributes: self.attributes) 49 | 50 | return Constraint( 51 | from: from, 52 | to: related, 53 | relation: relation, 54 | sourceLocation: sourceLocation, 55 | label: self.label, 56 | multiplier: self.multiplier, 57 | constant: self.constant, 58 | priority: self.priority 59 | ) 60 | }() 61 | 62 | // MARK: Initialization 63 | 64 | internal init(item: LayoutConstraintItem, attributes: ConstraintAttributes) { 65 | self.item = item 66 | self.attributes = attributes 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintInsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintInsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | extension Int: ConstraintInsetTarget { 35 | } 36 | 37 | extension UInt: ConstraintInsetTarget { 38 | } 39 | 40 | extension Float: ConstraintInsetTarget { 41 | } 42 | 43 | extension Double: ConstraintInsetTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintInsetTarget { 47 | } 48 | 49 | extension ConstraintInsets: ConstraintInsetTarget { 50 | } 51 | 52 | extension ConstraintInsetTarget { 53 | 54 | internal var constraintInsetTargetValue: ConstraintInsets { 55 | if let amount = self as? ConstraintInsets { 56 | return amount 57 | } else if let amount = self as? Float { 58 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 59 | } else if let amount = self as? Double { 60 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 61 | } else if let amount = self as? CGFloat { 62 | return ConstraintInsets(top: amount, left: amount, bottom: amount, right: amount) 63 | } else if let amount = self as? Int { 64 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 65 | } else if let amount = self as? UInt { 66 | return ConstraintInsets(top: CGFloat(amount), left: CGFloat(amount), bottom: CGFloat(amount), right: CGFloat(amount)) 67 | } else { 68 | return ConstraintInsets(top: 0, left: 0, bottom: 0, right: 0) 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | public typealias ConstraintInsets = UIEdgeInsets 33 | #else 34 | public typealias ConstraintInsets = NSEdgeInsets 35 | #endif 36 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public final class ConstraintItem { 32 | 33 | internal weak var target: AnyObject? 34 | internal let attributes: ConstraintAttributes 35 | 36 | internal init(target: AnyObject?, attributes: ConstraintAttributes) { 37 | self.target = target 38 | self.attributes = attributes 39 | } 40 | 41 | internal var layoutConstraintItem: LayoutConstraintItem? { 42 | return self.target as? LayoutConstraintItem 43 | } 44 | 45 | } 46 | 47 | public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool { 48 | // pointer equality 49 | guard lhs !== rhs else { 50 | return true 51 | } 52 | 53 | // must both have valid targets and identical attributes 54 | guard let target1 = lhs.target, 55 | let target2 = rhs.target, 56 | target1 === target2 && lhs.attributes == rhs.attributes else { 57 | return false 58 | } 59 | 60 | return true 61 | } 62 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintLayoutGuide+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 9.0, OSX 10.11, *) 30 | public extension ConstraintLayoutGuide { 31 | 32 | public var snp: ConstraintLayoutGuideDSL { 33 | return ConstraintLayoutGuideDSL(guide: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintLayoutGuide.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 9.0, *) 33 | public typealias ConstraintLayoutGuide = UILayoutGuide 34 | #else 35 | @available(OSX 10.11, *) 36 | public typealias ConstraintLayoutGuide = NSLayoutGuide 37 | #endif 38 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintLayoutGuideDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 9.0, OSX 10.11, *) 32 | public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL { 33 | 34 | @discardableResult 35 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 36 | return ConstraintMaker.prepareConstraints(item: self.guide, closure: closure) 37 | } 38 | 39 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 40 | ConstraintMaker.makeConstraints(item: self.guide, closure: closure) 41 | } 42 | 43 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 44 | ConstraintMaker.remakeConstraints(item: self.guide, closure: closure) 45 | } 46 | 47 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 48 | ConstraintMaker.updateConstraints(item: self.guide, closure: closure) 49 | } 50 | 51 | public func removeConstraints() { 52 | ConstraintMaker.removeConstraints(item: self.guide) 53 | } 54 | 55 | public var target: AnyObject? { 56 | return self.guide 57 | } 58 | 59 | internal let guide: ConstraintLayoutGuide 60 | 61 | internal init(guide: ConstraintLayoutGuide) { 62 | self.guide = guide 63 | 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintLayoutSupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 8.0, *) 33 | public typealias ConstraintLayoutSupport = UILayoutSupport 34 | #else 35 | public class ConstraintLayoutSupport {} 36 | #endif 37 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintLayoutSupportDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 8.0, *) 32 | public struct ConstraintLayoutSupportDSL: ConstraintDSL { 33 | 34 | public var target: AnyObject? { 35 | return self.support 36 | } 37 | 38 | internal let support: ConstraintLayoutSupport 39 | 40 | internal init(support: ConstraintLayoutSupport) { 41 | self.support = support 42 | 43 | } 44 | 45 | public var top: ConstraintItem { 46 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top) 47 | } 48 | 49 | public var bottom: ConstraintItem { 50 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom) 51 | } 52 | 53 | public var height: ConstraintItem { 54 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintMakerEditable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerEditable: ConstraintMakerPriortizable { 32 | 33 | @discardableResult 34 | public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 35 | self.description.multiplier = amount 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 41 | return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue) 42 | } 43 | 44 | @discardableResult 45 | public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable { 46 | self.description.constant = amount.constraintOffsetTargetValue 47 | return self 48 | } 49 | 50 | @discardableResult 51 | public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable { 52 | self.description.constant = amount.constraintInsetTargetValue 53 | return self 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintMakerFinalizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerFinalizable { 32 | 33 | internal let description: ConstraintDescription 34 | 35 | internal init(_ description: ConstraintDescription) { 36 | self.description = description 37 | } 38 | 39 | @discardableResult 40 | public func labeled(_ label: String) -> ConstraintMakerFinalizable { 41 | self.description.label = label 42 | return self 43 | } 44 | 45 | public var constraint: Constraint { 46 | return self.description.constraint! 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintMakerPriortizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerPriortizable: ConstraintMakerFinalizable { 32 | 33 | @discardableResult 34 | public func priority(_ amount: ConstraintPriority) -> ConstraintMakerFinalizable { 35 | self.description.priority = amount.value 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func priority(_ amount: ConstraintPriorityTarget) -> ConstraintMakerFinalizable { 41 | self.description.priority = amount 42 | return self 43 | } 44 | 45 | @available(*, deprecated:3.0, message:"Use priority(.required) instead.") 46 | @discardableResult 47 | public func priorityRequired() -> ConstraintMakerFinalizable { 48 | return self.priority(.required) 49 | } 50 | 51 | @available(*, deprecated:3.0, message:"Use priority(.high) instead.") 52 | @discardableResult 53 | public func priorityHigh() -> ConstraintMakerFinalizable { 54 | return self.priority(.high) 55 | } 56 | 57 | @available(*, deprecated:3.0, message:"Use priority(.medium) instead.") 58 | @discardableResult 59 | public func priorityMedium() -> ConstraintMakerFinalizable { 60 | return self.priority(.medium) 61 | } 62 | 63 | @available(*, deprecated:3.0, message:"Use priority(.low) instead.") 64 | @discardableResult 65 | public func priorityLow() -> ConstraintMakerFinalizable { 66 | return self.priority(.low) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintMultiplierTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintMultiplierTarget { 32 | 33 | var constraintMultiplierTargetValue: CGFloat { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintMultiplierTarget { 38 | 39 | public var constraintMultiplierTargetValue: CGFloat { 40 | return CGFloat(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintMultiplierTarget { 46 | 47 | public var constraintMultiplierTargetValue: CGFloat { 48 | return CGFloat(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintMultiplierTarget { 54 | 55 | public var constraintMultiplierTargetValue: CGFloat { 56 | return CGFloat(self) 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintMultiplierTarget { 62 | 63 | public var constraintMultiplierTargetValue: CGFloat { 64 | return CGFloat(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintMultiplierTarget { 70 | 71 | public var constraintMultiplierTargetValue: CGFloat { 72 | return self 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintOffsetTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintOffsetTarget: ConstraintConstantTarget { 32 | } 33 | 34 | extension Int: ConstraintOffsetTarget { 35 | } 36 | 37 | extension UInt: ConstraintOffsetTarget { 38 | } 39 | 40 | extension Float: ConstraintOffsetTarget { 41 | } 42 | 43 | extension Double: ConstraintOffsetTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintOffsetTarget { 47 | } 48 | 49 | extension ConstraintOffsetTarget { 50 | 51 | internal var constraintOffsetTargetValue: CGFloat { 52 | let offset: CGFloat 53 | if let amount = self as? Float { 54 | offset = CGFloat(amount) 55 | } else if let amount = self as? Double { 56 | offset = CGFloat(amount) 57 | } else if let amount = self as? CGFloat { 58 | offset = CGFloat(amount) 59 | } else if let amount = self as? Int { 60 | offset = CGFloat(amount) 61 | } else if let amount = self as? UInt { 62 | offset = CGFloat(amount) 63 | } else { 64 | offset = 0.0 65 | } 66 | return offset 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintPriority.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | public struct ConstraintPriority : ExpressibleByFloatLiteral, Equatable, Strideable { 31 | public typealias FloatLiteralType = Float 32 | 33 | public let value: Float 34 | 35 | public init(floatLiteral value: Float) { 36 | self.value = value 37 | } 38 | 39 | public init(_ value: Float) { 40 | self.value = value 41 | } 42 | 43 | public static var required: ConstraintPriority { 44 | return 1000.0 45 | } 46 | 47 | public static var high: ConstraintPriority { 48 | return 750.0 49 | } 50 | 51 | public static var medium: ConstraintPriority { 52 | #if os(OSX) 53 | return 501.0 54 | #else 55 | return 500.0 56 | #endif 57 | 58 | } 59 | 60 | public static var low: ConstraintPriority { 61 | return 250.0 62 | } 63 | 64 | public static func ==(lhs: ConstraintPriority, rhs: ConstraintPriority) -> Bool { 65 | return lhs.value == rhs.value 66 | } 67 | 68 | // MARK: Strideable 69 | 70 | public func advanced(by n: FloatLiteralType) -> ConstraintPriority { 71 | return ConstraintPriority(floatLiteral: value + n) 72 | } 73 | 74 | public func distance(to other: ConstraintPriority) -> FloatLiteralType { 75 | return other.value - value 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintPriorityTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintPriorityTarget { 32 | 33 | var constraintPriorityTargetValue: Float { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintPriorityTarget { 38 | 39 | public var constraintPriorityTargetValue: Float { 40 | return Float(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintPriorityTarget { 46 | 47 | public var constraintPriorityTargetValue: Float { 48 | return Float(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintPriorityTarget { 54 | 55 | public var constraintPriorityTargetValue: Float { 56 | return self 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintPriorityTarget { 62 | 63 | public var constraintPriorityTargetValue: Float { 64 | return Float(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintPriorityTarget { 70 | 71 | public var constraintPriorityTargetValue: Float { 72 | return Float(self) 73 | } 74 | 75 | } 76 | 77 | #if os(iOS) || os(tvOS) 78 | extension UILayoutPriority: ConstraintPriorityTarget { 79 | 80 | public var constraintPriorityTargetValue: Float { 81 | return self.rawValue 82 | } 83 | 84 | } 85 | #endif 86 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintRelatableTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintRelatableTarget { 32 | } 33 | 34 | extension Int: ConstraintRelatableTarget { 35 | } 36 | 37 | extension UInt: ConstraintRelatableTarget { 38 | } 39 | 40 | extension Float: ConstraintRelatableTarget { 41 | } 42 | 43 | extension Double: ConstraintRelatableTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintRelatableTarget { 47 | } 48 | 49 | extension CGSize: ConstraintRelatableTarget { 50 | } 51 | 52 | extension CGPoint: ConstraintRelatableTarget { 53 | } 54 | 55 | extension ConstraintInsets: ConstraintRelatableTarget { 56 | } 57 | 58 | extension ConstraintItem: ConstraintRelatableTarget { 59 | } 60 | 61 | extension ConstraintView: ConstraintRelatableTarget { 62 | } 63 | 64 | @available(iOS 9.0, OSX 10.11, *) 65 | extension ConstraintLayoutGuide: ConstraintRelatableTarget { 66 | } 67 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintRelation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | internal enum ConstraintRelation : Int { 32 | case equal = 1 33 | case lessThanOrEqual 34 | case greaterThanOrEqual 35 | 36 | internal var layoutRelation: LayoutRelation { 37 | get { 38 | switch(self) { 39 | case .equal: 40 | return .equal 41 | case .lessThanOrEqual: 42 | return .lessThanOrEqual 43 | case .greaterThanOrEqual: 44 | return .greaterThanOrEqual 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | public typealias ConstraintView = UIView 33 | #else 34 | public typealias ConstraintView = NSView 35 | #endif 36 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/ConstraintViewDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public struct ConstraintViewDSL: ConstraintAttributesDSL { 32 | 33 | @discardableResult 34 | public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { 35 | return ConstraintMaker.prepareConstraints(item: self.view, closure: closure) 36 | } 37 | 38 | public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 39 | ConstraintMaker.makeConstraints(item: self.view, closure: closure) 40 | } 41 | 42 | public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 43 | ConstraintMaker.remakeConstraints(item: self.view, closure: closure) 44 | } 45 | 46 | public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { 47 | ConstraintMaker.updateConstraints(item: self.view, closure: closure) 48 | } 49 | 50 | public func removeConstraints() { 51 | ConstraintMaker.removeConstraints(item: self.view) 52 | } 53 | 54 | public var contentHuggingHorizontalPriority: Float { 55 | get { 56 | return self.view.contentHuggingPriority(for: .horizontal).rawValue 57 | } 58 | set { 59 | self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .horizontal) 60 | } 61 | } 62 | 63 | public var contentHuggingVerticalPriority: Float { 64 | get { 65 | return self.view.contentHuggingPriority(for: .vertical).rawValue 66 | } 67 | set { 68 | self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .vertical) 69 | } 70 | } 71 | 72 | public var contentCompressionResistanceHorizontalPriority: Float { 73 | get { 74 | return self.view.contentCompressionResistancePriority(for: .horizontal).rawValue 75 | } 76 | set { 77 | self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .horizontal) 78 | } 79 | } 80 | 81 | public var contentCompressionResistanceVerticalPriority: Float { 82 | get { 83 | return self.view.contentCompressionResistancePriority(for: .vertical).rawValue 84 | } 85 | set { 86 | self.view.setContentCompressionResistancePriority(LayoutPriority(rawValue: newValue), for: .vertical) 87 | } 88 | } 89 | 90 | public var target: AnyObject? { 91 | return self.view 92 | } 93 | 94 | internal let view: ConstraintView 95 | 96 | internal init(view: ConstraintView) { 97 | self.view = view 98 | 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/LayoutConstraint.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class LayoutConstraint : NSLayoutConstraint { 32 | 33 | public var label: String? { 34 | get { 35 | return self.identifier 36 | } 37 | set { 38 | self.identifier = newValue 39 | } 40 | } 41 | 42 | internal weak var constraint: Constraint? = nil 43 | 44 | } 45 | 46 | internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool { 47 | guard lhs.firstItem === rhs.firstItem && 48 | lhs.secondItem === rhs.secondItem && 49 | lhs.firstAttribute == rhs.firstAttribute && 50 | lhs.secondAttribute == rhs.secondAttribute && 51 | lhs.relation == rhs.relation && 52 | lhs.priority == rhs.priority && 53 | lhs.multiplier == rhs.multiplier else { 54 | return false 55 | } 56 | return true 57 | } 58 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/LayoutConstraintItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol LayoutConstraintItem: class { 32 | } 33 | 34 | @available(iOS 9.0, OSX 10.11, *) 35 | extension ConstraintLayoutGuide : LayoutConstraintItem { 36 | } 37 | 38 | extension ConstraintView : LayoutConstraintItem { 39 | } 40 | 41 | 42 | extension LayoutConstraintItem { 43 | 44 | internal func prepare() { 45 | if let view = self as? ConstraintView { 46 | view.translatesAutoresizingMaskIntoConstraints = false 47 | } 48 | } 49 | 50 | internal var superview: ConstraintView? { 51 | if let view = self as? ConstraintView { 52 | return view.superview 53 | } 54 | 55 | if #available(iOS 9.0, OSX 10.11, *), let guide = self as? ConstraintLayoutGuide { 56 | return guide.owningView 57 | } 58 | 59 | return nil 60 | } 61 | internal var constraints: [Constraint] { 62 | return self.constraintsSet.allObjects as! [Constraint] 63 | } 64 | 65 | internal func add(constraints: [Constraint]) { 66 | let constraintsSet = self.constraintsSet 67 | for constraint in constraints { 68 | constraintsSet.add(constraint) 69 | } 70 | } 71 | 72 | internal func remove(constraints: [Constraint]) { 73 | let constraintsSet = self.constraintsSet 74 | for constraint in constraints { 75 | constraintsSet.remove(constraint) 76 | } 77 | } 78 | 79 | private var constraintsSet: NSMutableSet { 80 | let constraintsSet: NSMutableSet 81 | 82 | if let existing = objc_getAssociatedObject(self, &constraintsKey) as? NSMutableSet { 83 | constraintsSet = existing 84 | } else { 85 | constraintsSet = NSMutableSet() 86 | objc_setAssociatedObject(self, &constraintsKey, constraintsSet, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 87 | } 88 | return constraintsSet 89 | 90 | } 91 | 92 | } 93 | private var constraintsKey: UInt8 = 0 94 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/SnapKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | FOUNDATION_EXPORT double SnapKitVersionNumber; 27 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/Typealiases.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | import Foundation 25 | 26 | #if os(iOS) || os(tvOS) 27 | import UIKit 28 | #if swift(>=4.2) 29 | typealias LayoutRelation = NSLayoutConstraint.Relation 30 | typealias LayoutAttribute = NSLayoutConstraint.Attribute 31 | #else 32 | typealias LayoutRelation = NSLayoutRelation 33 | typealias LayoutAttribute = NSLayoutAttribute 34 | #endif 35 | typealias LayoutPriority = UILayoutPriority 36 | #else 37 | import AppKit 38 | typealias LayoutRelation = NSLayoutConstraint.Relation 39 | typealias LayoutAttribute = NSLayoutConstraint.Attribute 40 | typealias LayoutPriority = NSLayoutConstraint.Priority 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /ChatApp/Core/ThirdParty/SnapKit/UILayoutSupport+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 8.0, *) 30 | public extension ConstraintLayoutSupport { 31 | 32 | public var snp: ConstraintLayoutSupportDSL { 33 | return ConstraintLayoutSupportDSL(support: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ChatApp/Core/UIExtensions/Date.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Date.swift 3 | // DashboardApp 4 | // 5 | // Created by Florian Marcu on 8/11/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension Date { 12 | var yesterday: Date { 13 | return Calendar.current.date(byAdding: .day, value: -1, to: noon)! 14 | } 15 | var twoDaysAgo: Date { 16 | return Calendar.current.date(byAdding: .day, value: -2, to: noon)! 17 | } 18 | var threeDaysAgo: Date { 19 | return Calendar.current.date(byAdding: .day, value: -2, to: noon)! 20 | } 21 | var fourDaysAgo: Date { 22 | return Calendar.current.date(byAdding: .day, value: -2, to: noon)! 23 | } 24 | var tomorrow: Date { 25 | return Calendar.current.date(byAdding: .day, value: 1, to: noon)! 26 | } 27 | var twoHoursAgo: Date { 28 | return Calendar.current.date(byAdding: .hour, value: -2, to: noon)! 29 | } 30 | var fiveHoursAgo: Date { 31 | return Calendar.current.date(byAdding: .hour, value: -5, to: noon)! 32 | } 33 | var noon: Date { 34 | return Calendar.current.date(bySettingHour: 12, minute: 0, second: 0, of: self)! 35 | } 36 | var month: Int { 37 | return Calendar.current.component(.month, from: self) 38 | } 39 | var isLastDayOfMonth: Bool { 40 | return tomorrow.month != month 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ChatApp/Core/UIExtensions/String.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String.swift 3 | // ListingApp 4 | // 5 | // Created by Florian Marcu on 6/10/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension String { 12 | func height(withConstrainedWidth width: CGFloat, font: UIFont) -> CGFloat { 13 | let constraintRect = CGSize(width: width, height: .greatestFiniteMagnitude) 14 | let boundingBox = self.boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [.font: font], context: nil) 15 | return ceil(boundingBox.height) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ChatApp/Core/UIExtensions/UIColor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor.swift 3 | // ShoppingApp 4 | // 5 | // Created by Florian Marcu on 11/11/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIColor { 13 | convenience init(hexString: String, alpha: CGFloat = 1.0) { 14 | let hexString: String = hexString.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) 15 | let scanner = Scanner(string: hexString) 16 | 17 | if (hexString.hasPrefix("#")) { 18 | scanner.scanLocation = 1 19 | } 20 | 21 | var color: UInt32 = 0 22 | scanner.scanHexInt32(&color) 23 | 24 | let mask = 0x000000FF 25 | let r = Int(color >> 16) & mask 26 | let g = Int(color >> 8) & mask 27 | let b = Int(color) & mask 28 | 29 | let red = CGFloat(r) / 255.0 30 | let green = CGFloat(g) / 255.0 31 | let blue = CGFloat(b) / 255.0 32 | 33 | self.init(red:red, green:green, blue:blue, alpha:alpha) 34 | } 35 | 36 | func toHexString() -> String { 37 | var r:CGFloat = 0 38 | var g:CGFloat = 0 39 | var b:CGFloat = 0 40 | var a:CGFloat = 0 41 | 42 | getRed(&r, green: &g, blue: &b, alpha: &a) 43 | 44 | let rgb:Int = (Int)(r*255)<<16 | (Int)(g*255)<<8 | (Int)(b*255)<<0 45 | 46 | return String(format:"#%06x", rgb) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ChatApp/Core/UIExtensions/UIImage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage.swift 3 | // ListingApp 4 | // 5 | // Created by Florian Marcu on 6/9/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIImage { 12 | class func colorForNavBar(_ color: UIColor) -> UIImage { 13 | let rect = CGRect(x: 0, y: 0, width: 1, height: 1) 14 | UIGraphicsBeginImageContext(rect.size) 15 | let context = UIGraphicsGetCurrentContext() 16 | context!.setFillColor(color.cgColor) 17 | context!.fill(rect) 18 | let image = UIGraphicsGetImageFromCurrentImageContext() 19 | UIGraphicsEndImageContext() 20 | return image! 21 | } 22 | 23 | var scaledToSafeUploadSize: UIImage? { 24 | let maxImageSideLength: CGFloat = 480 25 | 26 | let largerSide: CGFloat = max(size.width, size.height) 27 | let ratioScale: CGFloat = largerSide > maxImageSideLength ? largerSide / maxImageSideLength : 1 28 | let newImageSize = CGSize(width: size.width / ratioScale, height: size.height / ratioScale) 29 | 30 | return image(scaledTo: newImageSize) 31 | } 32 | 33 | func image(scaledTo size: CGSize) -> UIImage? { 34 | defer { 35 | UIGraphicsEndImageContext() 36 | } 37 | 38 | UIGraphicsBeginImageContextWithOptions(size, true, 0) 39 | draw(in: CGRect(origin: .zero, size: size)) 40 | 41 | return UIGraphicsGetImageFromCurrentImageContext() 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /ChatApp/Core/UIExtensions/UIScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/26/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIScrollView { 12 | 13 | var isAtBottom: Bool { 14 | return contentOffset.y >= verticalOffsetForBottom 15 | } 16 | 17 | var verticalOffsetForBottom: CGFloat { 18 | let scrollViewHeight = bounds.height 19 | let scrollContentSizeHeight = contentSize.height 20 | let bottomInset = contentInset.bottom 21 | let scrollViewBottomOffset = scrollContentSizeHeight + bottomInset - scrollViewHeight 22 | return scrollViewBottomOffset 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /ChatApp/Core/UIExtensions/UITextField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField.swift 3 | // DashboardApp 4 | // 5 | // Created by Florian Marcu on 8/9/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UITextField { 12 | func configure(color: UIColor = .blue, 13 | font: UIFont = UIFont.boldSystemFont(ofSize: 12), 14 | cornerRadius: CGFloat, 15 | borderColor: UIColor? = nil, 16 | backgroundColor: UIColor, 17 | borderWidth: CGFloat? = nil) { 18 | if let borderWidth = borderWidth { 19 | self.layer.borderWidth = borderWidth 20 | } 21 | if let borderColor = borderColor { 22 | self.layer.borderColor = borderColor.cgColor 23 | } 24 | self.layer.cornerRadius = cornerRadius 25 | self.font = font 26 | self.textColor = color 27 | self.backgroundColor = backgroundColor 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/Layouts/ATCCollectionViewFlowLayout.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCCollectionViewFlowLayout.swift 3 | // RestaurantApp 4 | // 5 | // Created by Florian Marcu on 4/25/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class ATCCollectionViewFlowLayout: UICollectionViewFlowLayout { 12 | weak var delegate: ATCLiquidLayoutDelegate? 13 | } 14 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/Navigation/ATCDrawerController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCDrawerController.swift 3 | // AppTemplatesFoundation 4 | // 5 | // Created by Florian Marcu on 2/10/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCDrawerController: UIViewController, ATCNavigationControllerDelegate { 12 | var rootViewController: ATCNavigationController 13 | var menuController: ATCMenuCollectionViewController 14 | var isMenuExpanded: Bool = false 15 | let overlayView = UIView() 16 | 17 | init(rootViewController: ATCNavigationController, menuController: ATCMenuCollectionViewController) { 18 | self.rootViewController = rootViewController 19 | self.menuController = menuController 20 | super.init(nibName: nil, bundle: nil) 21 | } 22 | 23 | required public init?(coder aDecoder: NSCoder) { 24 | fatalError("init(coder:) has not been implemented") 25 | } 26 | 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | 30 | self.addChild(rootViewController) 31 | self.view.addSubview(rootViewController.view) 32 | rootViewController.didMove(toParent: self) 33 | 34 | overlayView.backgroundColor = .black 35 | overlayView.alpha = 0 36 | view.addSubview(overlayView) 37 | 38 | self.menuController.view.frame = CGRect(x: 0, y: 0, width: 0, height: self.view.bounds.height) 39 | self.addChild(menuController) 40 | self.view.addSubview(menuController.view) 41 | menuController.didMove(toParent: self) 42 | 43 | configureGestures() 44 | } 45 | 46 | override func viewDidLayoutSubviews() { 47 | super.viewDidLayoutSubviews() 48 | overlayView.frame = view.bounds 49 | let width: CGFloat = (isMenuExpanded) ? view.bounds.width * 3 / 4 : 0.0 50 | self.menuController.view.frame = CGRect(x: 0, y: 0, width: width , height: self.view.bounds.height) 51 | } 52 | 53 | func toggleMenu() { 54 | isMenuExpanded = !isMenuExpanded 55 | let bounds = self.view.bounds 56 | let width: CGFloat = (isMenuExpanded) ? bounds.width * 3 / 4 : 0.0 57 | 58 | UIView.animate(withDuration: 0.3, animations: { 59 | self.menuController.view.frame = CGRect(x: 0, y: 0, width: width, height: bounds.height) 60 | self.overlayView.alpha = (self.isMenuExpanded) ? 0.5 : 0.0 61 | }) { (success) in 62 | } 63 | } 64 | 65 | func navigateTo(viewController: UIViewController) { 66 | rootViewController.setViewControllers([viewController], animated: false) 67 | self.toggleMenu() 68 | } 69 | 70 | fileprivate func configureGestures() { 71 | let swipeLeftGesture = UISwipeGestureRecognizer(target: self, action: #selector(didSwipeLeft)) 72 | swipeLeftGesture.direction = .left 73 | overlayView.addGestureRecognizer(swipeLeftGesture) 74 | 75 | let tapGesture = UITapGestureRecognizer(target: self, action: #selector(didTapOverlay)) 76 | overlayView.addGestureRecognizer(tapGesture) 77 | } 78 | 79 | @objc fileprivate func didSwipeLeft() { 80 | toggleMenu() 81 | } 82 | 83 | @objc fileprivate func didTapOverlay() { 84 | toggleMenu() 85 | } 86 | } 87 | 88 | extension ATCDrawerController { 89 | func navigationControllerDidTapMenuButton(_ navigationController: ATCNavigationController) { 90 | toggleMenu() 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/Navigation/ATCMenuCollectionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCMenuCollectionViewController.swift 3 | // ShoppingApp 4 | // 5 | // Created by Florian Marcu on 3/19/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | protocol ATCMenuCollectionViewCellConfigurable { 12 | func configure(item: ATCNavigationItem); 13 | } 14 | 15 | public struct ATCMenuUIConfiguration { 16 | var itemFont: UIFont = UIFont(name: "FallingSkyCond", size: 16)! 17 | var tintColor: UIColor = UIColor(hexString: "#555555") 18 | var itemHeight: CGFloat = 45.0 19 | var backgroundColor: UIColor = .white 20 | } 21 | 22 | public struct ATCMenuConfiguration { 23 | let user: ATCUser? 24 | let cellClass: UICollectionViewCell.Type? 25 | let headerHeight: CGFloat 26 | let items: [ATCNavigationItem] 27 | let uiConfig: ATCMenuUIConfiguration 28 | } 29 | 30 | class ATCMenuCollectionViewController: ATCGenericCollectionViewController { 31 | 32 | fileprivate var lastSelectedIndexPath: IndexPath? 33 | 34 | var user: ATCUser? 35 | 36 | let cellClass: UICollectionViewCell.Type? 37 | let headerHeight: CGFloat 38 | let menuConfiguration: ATCMenuConfiguration 39 | 40 | init(menuConfiguration: ATCMenuConfiguration, collectionVCConfiguration: ATCGenericCollectionViewControllerConfiguration) { 41 | self.user = menuConfiguration.user 42 | self.cellClass = menuConfiguration.cellClass 43 | self.headerHeight = menuConfiguration.headerHeight 44 | self.menuConfiguration = menuConfiguration 45 | 46 | super.init(configuration: collectionVCConfiguration) 47 | if let cellClass = cellClass { 48 | self.use(adapter: ATCMenuItemRowAdapter(cellClassType: cellClass, uiConfig: menuConfiguration.uiConfig), for: "ATCNavigationItem") 49 | } 50 | } 51 | 52 | required init?(coder aDecoder: NSCoder) { 53 | fatalError("init(coder:) has not been implemented") 54 | } 55 | 56 | override func viewDidLoad() { 57 | super.viewDidLoad() 58 | collectionView?.backgroundColor = menuConfiguration.uiConfig.backgroundColor 59 | } 60 | 61 | override func viewDidLayoutSubviews() { 62 | super.viewDidLayoutSubviews() 63 | if let collectionView = collectionView { 64 | collectionView.contentInset.top = max((collectionView.frame.height - collectionView.contentSize.height) / 3.0, 0) 65 | } 66 | } 67 | } 68 | 69 | extension ATCMenuCollectionViewController { 70 | override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { 71 | guard let menuItem = self.genericDataSource?.object(at: indexPath.row) as? ATCNavigationItem else { 72 | return 73 | } 74 | let vc = menuItem.viewController 75 | self.drawerController()?.navigateTo(viewController: vc) 76 | } 77 | } 78 | 79 | extension ATCMenuCollectionViewController { 80 | fileprivate func drawerController() -> ATCDrawerController? { 81 | return (self.parent as? ATCDrawerController) 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/Navigation/ATCMenuHeaderTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCMenuHeaderTableViewCell.swift 3 | // AppTemplatesFoundation 4 | // 5 | // Created by Florian Marcu on 2/11/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import Kingfisher 10 | import UIKit 11 | 12 | open class ATCMenuHeaderTableViewCell: UITableViewCell { 13 | 14 | @IBOutlet var nameLabel: UILabel! 15 | @IBOutlet var avatarView: UIImageView! 16 | open func configureCell(user: ATCUser?) { 17 | if let urlString = user?.profilePictureURL { 18 | let imageURL = URL(string: urlString) 19 | avatarView.kf.setImage(with: imageURL) 20 | } 21 | avatarView.layer.cornerRadius = 35 22 | avatarView.clipsToBounds = true 23 | 24 | nameLabel.text = user?.fullName() 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/Navigation/ATCMenuItemCollectionViewCellProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCMenuItemCellProtocol.swift 3 | // MagicShop 4 | // 5 | // Created by Florian Marcu on 3/21/18. 6 | // Copyright © 2018 Magic Shop. All rights reserved. 7 | // 8 | import UIKit 9 | 10 | protocol ATCMenuItemCollectionViewCellProtocol: ATCMenuCollectionViewCellConfigurable { 11 | var menuImageView: UIImageView! {get set} 12 | var menuLabel: UILabel! {get set} 13 | } 14 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/Navigation/ATCMenuItemRowAdapter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCMenuItemRowAdapter.swift 3 | // ShoppingApp 4 | // 5 | // Created by Florian Marcu on 3/19/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCMenuItemRowAdapter: ATCGenericCollectionRowAdapter { 12 | 13 | let cellClassType: UICollectionViewCell.Type 14 | let uiConfig: ATCMenuUIConfiguration 15 | 16 | init(cellClassType: UICollectionViewCell.Type, uiConfig: ATCMenuUIConfiguration) { 17 | self.cellClassType = cellClassType 18 | self.uiConfig = uiConfig 19 | } 20 | 21 | func configure(cell: UICollectionViewCell, with object: ATCGenericBaseModel) { 22 | guard let item = object as? ATCNavigationItem, let cell = cell as? ATCMenuItemCollectionViewCellProtocol else { 23 | fatalError() 24 | } 25 | cell.configure(item: item) 26 | cell.menuLabel.font = uiConfig.itemFont 27 | cell.menuLabel.textColor = uiConfig.tintColor 28 | cell.menuImageView.tintColor = uiConfig.tintColor 29 | } 30 | 31 | func cellClass() -> UICollectionViewCell.Type { 32 | return cellClassType 33 | } 34 | 35 | func size(containerBounds: CGRect, object: ATCGenericBaseModel) -> CGSize { 36 | return CGSize(width: containerBounds.width, height: uiConfig.itemHeight) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/Navigation/ATCMenuTableViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/Navigation/ATCNavigationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCNavigationController.swift 3 | // AppTemplatesFoundation 4 | // 5 | // Created by Florian Marcu on 2/11/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol ATCNavigationControllerDelegate: class { 12 | func navigationControllerDidTapMenuButton(_ navigationController: ATCNavigationController) 13 | } 14 | 15 | public class ATCNavigationController: UINavigationController, UINavigationControllerDelegate { 16 | fileprivate var menuButton: UIBarButtonItem? 17 | fileprivate var topNavigationRightView: UIView? 18 | fileprivate var topNavigationLeftView: UIView? 19 | fileprivate var topNavigationLeftImage: UIImage? 20 | weak var drawerDelegate: ATCNavigationControllerDelegate? 21 | 22 | public init(rootViewController: UIViewController, 23 | topNavigationLeftView: UIView? = nil, 24 | topNavigationRightView: UIView?, 25 | topNavigationLeftImage: UIImage?, 26 | topNavigationTintColor: UIColor? = .white) { 27 | super.init(rootViewController: rootViewController) 28 | self.topNavigationLeftView = topNavigationLeftView 29 | self.topNavigationRightView = topNavigationRightView 30 | self.topNavigationLeftImage = topNavigationLeftImage 31 | if let topNavigationLeftImage = topNavigationLeftImage { 32 | let imageButton = UIButton() 33 | imageButton.setImage(topNavigationLeftImage, for: .normal) 34 | if let topNavigationTintColor = topNavigationTintColor { 35 | imageButton.tintColor = topNavigationTintColor 36 | } 37 | imageButton.addTarget(self, action: #selector(handleMenuButton), for: .touchUpInside) 38 | menuButton = UIBarButtonItem(customView: imageButton) 39 | imageButton.snp.makeConstraints({ (maker) in 40 | maker.width.equalTo(25) 41 | maker.height.equalTo(25) 42 | }) 43 | } 44 | } 45 | 46 | public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 47 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) 48 | } 49 | 50 | required public init?(coder aDecoder: NSCoder) { 51 | fatalError("init(coder:) has not been implemented") 52 | } 53 | 54 | override public func viewDidLoad() { 55 | super.viewDidLoad() 56 | self.delegate = self 57 | self.view.backgroundColor = .white 58 | } 59 | 60 | public func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) { 61 | prepareNavigationBar() 62 | } 63 | } 64 | 65 | extension ATCNavigationController { 66 | fileprivate func prepareNavigationBar() { 67 | topViewController?.navigationItem.title = topViewController?.title 68 | if self.viewControllers.count <= 1 { 69 | if let topNavigationRightView = topNavigationRightView { 70 | topViewController?.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: topNavigationRightView) 71 | } 72 | if let topNavigationLeftView = topNavigationLeftView { 73 | topViewController?.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: topNavigationLeftView) 74 | } else { 75 | if let menuButton = menuButton { 76 | topViewController?.navigationItem.leftBarButtonItem = menuButton 77 | } 78 | } 79 | } 80 | } 81 | } 82 | 83 | extension ATCNavigationController { 84 | @objc 85 | fileprivate func handleMenuButton() { 86 | drawerDelegate?.navigationControllerDidTapMenuButton(self) 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ChatApp/Core/ViewControllers/UIViewController+ATCAdditions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+ATCAdditions.swift 3 | // ShoppingApp 4 | // 5 | // Created by Florian Marcu on 9/2/17. 6 | // Copyright © 2017 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIViewController { 12 | 13 | func addChildViewControllerWithView(_ childViewController: UIViewController, toView view: UIView? = nil) { 14 | let view: UIView = view ?? self.view 15 | 16 | childViewController.removeFromParent() 17 | childViewController.willMove(toParent: self) 18 | addChild(childViewController) 19 | childViewController.didMove(toParent: self) 20 | view.addSubview(childViewController.view) 21 | view.setNeedsLayout() 22 | view.layoutIfNeeded() 23 | } 24 | 25 | func removeChildViewController(_ childViewController: UIViewController) { 26 | childViewController.removeFromParent() 27 | childViewController.willMove(toParent: nil) 28 | childViewController.removeFromParent() 29 | childViewController.didMove(toParent: nil) 30 | childViewController.view.removeFromSuperview() 31 | view.setNeedsLayout() 32 | view.layoutIfNeeded() 33 | } 34 | 35 | func hideKeyboardWhenTappedAround() { 36 | let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(UIViewController.dismissKeyboard)) 37 | tap.cancelsTouchesInView = false 38 | view.addGestureRecognizer(tap) 39 | } 40 | 41 | @objc func dismissKeyboard() { 42 | view.endEditing(true) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ChatApp/Core/Views/Cells/ATCCarouselCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCCarouselCollectionViewCell.swift 3 | // RestaurantApp 4 | // 5 | // Created by Florian Marcu on 4/25/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCGridViewModel: ATCCarouselViewModel { 12 | let callToAction: String? 13 | let callToActionBlock: (() -> Void)? 14 | 15 | init(title: String?, 16 | viewController: ATCGenericCollectionViewController, 17 | cellHeight: CGFloat, 18 | pageControlEnabled: Bool = false, 19 | callToAction: String? = nil, 20 | callToActionBlock: (() -> Void)? = nil) { 21 | self.callToAction = callToAction 22 | self.callToActionBlock = callToActionBlock 23 | super.init(title: title, viewController: viewController, cellHeight: cellHeight) 24 | } 25 | 26 | required init(jsonDict: [String : Any]) { 27 | fatalError("init(jsonDict:) has not been implemented") 28 | } 29 | } 30 | 31 | class ATCCarouselViewModel: ATCGenericBaseModel { 32 | var description: String = "Carousel" 33 | 34 | let cellHeight: CGFloat 35 | let title: String? 36 | let pageControlEnabled: Bool 37 | var viewController: ATCGenericCollectionViewController 38 | weak var parentViewController: UIViewController? 39 | 40 | init(title: String?, viewController: ATCGenericCollectionViewController, cellHeight: CGFloat, pageControlEnabled: Bool = false) { 41 | self.title = title 42 | self.cellHeight = cellHeight 43 | self.viewController = viewController 44 | self.pageControlEnabled = pageControlEnabled 45 | } 46 | 47 | required init(jsonDict: [String: Any]) { 48 | fatalError() 49 | } 50 | } 51 | 52 | class ATCCarouselCollectionViewCell: UICollectionViewCell, ATCGenericCollectionViewScrollDelegate { 53 | @IBOutlet var carouselTitleLabel: UILabel! 54 | @IBOutlet var carouselContainerView: UIView! 55 | @IBOutlet var pageControl: UIPageControl! 56 | 57 | func configure(viewModel: ATCCarouselViewModel, uiConfig: ATCUIGenericConfigurationProtocol) { 58 | if (viewModel.title == nil) { 59 | carouselTitleLabel.removeFromSuperview() 60 | } else { 61 | if (nil == carouselTitleLabel.superview) { 62 | self.addSubview(carouselTitleLabel) 63 | } 64 | } 65 | carouselTitleLabel.text = viewModel.title 66 | carouselTitleLabel.font = uiConfig.boldLargeFont 67 | carouselTitleLabel.textColor = uiConfig.mainTextColor 68 | 69 | carouselContainerView.setNeedsLayout() 70 | carouselContainerView.layoutIfNeeded() 71 | 72 | let viewController = viewModel.viewController 73 | 74 | pageControl.isHidden = !viewModel.pageControlEnabled 75 | if let dS = viewController.genericDataSource { 76 | pageControl.numberOfPages = dS.numberOfObjects() 77 | } 78 | viewController.scrollDelegate = self 79 | 80 | viewController.view.frame = carouselContainerView.bounds 81 | carouselContainerView.addSubview(viewController.view) 82 | self.setNeedsLayout() 83 | viewModel.parentViewController?.addChild(viewModel.viewController) 84 | } 85 | 86 | func genericScrollView(_ scrollView: UIScrollView, didScrollToPage page: Int) { 87 | pageControl.currentPage = page 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /ChatApp/Core/Views/Cells/ATCStoryCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCStoryCollectionViewCell.swift 3 | // RestaurantApp 4 | // 5 | // Created by Florian Marcu on 5/15/18. 6 | // Copyright © 2018 iOS App Templates. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCStoryViewModel: NSObject, ATCGenericBaseModel { 12 | var imageURLString: String 13 | var title: String 14 | var atcDescription: String 15 | 16 | init(imageURLString: String, title: String, description: String) { 17 | self.imageURLString = imageURLString 18 | self.title = title 19 | self.atcDescription = description 20 | } 21 | 22 | required init(jsonDict: [String: Any]) { 23 | fatalError() 24 | } 25 | } 26 | 27 | class ATCStoryCollectionViewCell: UICollectionViewCell { 28 | @IBOutlet var storyImageView: UIImageView! 29 | @IBOutlet var storyLabel: UILabel! 30 | 31 | func configure(viewModel: ATCStoryViewModel, uiConfig: ATCUIGenericConfigurationProtocol) { 32 | storyImageView.contentMode = .scaleAspectFill 33 | storyImageView.layer.masksToBounds = true 34 | storyImageView.clipsToBounds = true 35 | storyImageView.layer.cornerRadius = 35 36 | storyLabel.font = uiConfig.regularSmallFont 37 | 38 | storyImageView.kf.setImage(with: URL(string: viewModel.imageURLString)) 39 | storyLabel.text = viewModel.title 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ChatApp/Core/Views/Cells/ATCViewControllerContainerCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCViewControllerContainerCollectionViewCell.swift 3 | // ListingApp 4 | // 5 | // Created by Florian Marcu on 6/12/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCViewControllerContainerCollectionViewCell: UICollectionViewCell { 12 | 13 | @IBOutlet var containerView: UIView! 14 | 15 | func configure(viewModel: ATCViewControllerContainerViewModel) { 16 | containerView.setNeedsLayout() 17 | containerView.layoutIfNeeded() 18 | 19 | let viewController = viewModel.viewController 20 | 21 | viewController.view.frame = containerView.bounds 22 | containerView.addSubview(viewController.view) 23 | self.setNeedsLayout() 24 | viewModel.parentViewController?.addChild(viewModel.viewController) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ChatApp/Core/Views/Cells/ATCViewControllerContainerCollectionViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ChatApp/Core/Views/Cells/MenuCells/ATCCircledIconMenuCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCCircledIconMenuCollectionViewCell.swift 3 | // DashboardApp 4 | // 5 | // Created by Florian Marcu on 8/4/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCCircledIconMenuCollectionViewCell: UICollectionViewCell, ATCMenuItemCollectionViewCellProtocol { 12 | @IBOutlet var menuImageView: UIImageView! 13 | @IBOutlet var menuLabel: UILabel! 14 | @IBOutlet var imageContainerView: UIView! 15 | 16 | func configure(item: ATCNavigationItem) { 17 | menuImageView.image = item.image 18 | menuLabel.text = item.title 19 | 20 | imageContainerView.layer.cornerRadius = 30 / 2 21 | imageContainerView.layer.borderColor = UIColor.gray.cgColor 22 | imageContainerView.layer.borderWidth = 1.0 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ChatApp/Core/Views/Cells/Users/ATCMessengerUserAdapter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCMessengerUserAdapter.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/22/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCMessengerUserAdapter: ATCGenericCollectionRowAdapter { 12 | let uiConfig: ATCUIGenericConfigurationProtocol 13 | 14 | init(uiConfig: ATCUIGenericConfigurationProtocol) { 15 | self.uiConfig = uiConfig 16 | } 17 | 18 | func configure(cell: UICollectionViewCell, with object: ATCGenericBaseModel) { 19 | if let user = object as? ATCUser, let cell = cell as? ATCMessengerUserCollectionViewCell { 20 | if let url = user.profilePictureURL { 21 | cell.avatarImageView.kf.setImage(with: URL(string: url)) 22 | } else { 23 | // placeholder 24 | } 25 | cell.avatarImageView.contentMode = .scaleAspectFill 26 | cell.avatarImageView.clipsToBounds = true 27 | cell.avatarImageView.layer.cornerRadius = 40.0/2.0 28 | 29 | cell.nameLabel.text = (user.firstName ?? "") + " " + (user.lastName ?? "") 30 | cell.nameLabel.font = uiConfig.mediumBoldFont 31 | cell.nameLabel.textColor = uiConfig.mainTextColor 32 | 33 | cell.borderView.backgroundColor = UIColor(hexString: "#e6e6e6") 34 | cell.setNeedsLayout() 35 | } 36 | } 37 | 38 | func cellClass() -> UICollectionViewCell.Type { 39 | return ATCMessengerUserCollectionViewCell.self 40 | } 41 | 42 | func size(containerBounds: CGRect, object: ATCGenericBaseModel) -> CGSize { 43 | guard let viewModel = object as? ATCUser else { return .zero } 44 | return CGSize(width: containerBounds.width, height: 80) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /ChatApp/Core/Views/Cells/Users/ATCMessengerUserCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATCMessengerUserCollectionViewCell.swift 3 | // ChatApp 4 | // 5 | // Created by Florian Marcu on 8/22/18. 6 | // Copyright © 2018 Instamobile. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ATCMessengerUserCollectionViewCell: UICollectionViewCell { 12 | @IBOutlet var containerView: UIView! 13 | @IBOutlet var nameContainerView: UIView! 14 | @IBOutlet var avatarContainerView: UIView! 15 | @IBOutlet var avatarImageView: UIImageView! 16 | @IBOutlet var nameLabel: UILabel! 17 | @IBOutlet var borderView: UIView! 18 | } 19 | -------------------------------------------------------------------------------- /ChatApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleURLTypes 20 | 21 | 22 | CFBundleURLSchemes 23 | 24 | fb285315185217069 25 | 26 | 27 | 28 | CFBundleVersion 29 | 1 30 | FacebookAppID 31 | 285315185217069 32 | FacebookDisplayName 33 | iOSAppTemplates 34 | LSApplicationQueriesSchemes 35 | 36 | fbapi 37 | fb-messenger-api 38 | fbauth2 39 | fbshareextension 40 | 41 | LSRequiresIPhoneOS 42 | 43 | NSCameraUsageDescription 44 | ${PRODUCT_NAME} needs access to the camera to let you upload photos. 45 | NSPhotoLibraryUsageDescription 46 | $(PRODUCT_NAME) wants to access your Photos library to let you upload images. 47 | UILaunchStoryboardName 48 | LaunchScreen 49 | UIRequiredDeviceCapabilities 50 | 51 | armv7 52 | 53 | UISupportedInterfaceOrientations 54 | 55 | UIInterfaceOrientationPortrait 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | UISupportedInterfaceOrientations~ipad 60 | 61 | UIInterfaceOrientationPortrait 62 | UIInterfaceOrientationPortraitUpsideDown 63 | UIInterfaceOrientationLandscapeLeft 64 | UIInterfaceOrientationLandscapeRight 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 instamobile 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '12.0' 3 | 4 | target 'ChatApp' do 5 | use_frameworks! 6 | 7 | # Pods for ChatApp 8 | pod 'MessageKit' 9 | pod 'FacebookCore' 10 | pod 'FacebookLogin' 11 | pod 'FacebookShare' 12 | 13 | pod 'Firebase/Core' 14 | pod 'Firebase/Auth' 15 | pod 'Firebase/Database' 16 | pod 'Firebase/Storage' 17 | pod 'Firebase/Firestore' 18 | 19 | pod 'Alamofire' 20 | pod 'Kingfisher' 21 | 22 | end 23 | --------------------------------------------------------------------------------