├── .gitignore ├── .swiftlint.yml ├── .travis.yml ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── KIF │ ├── Additions │ │ ├── CAAnimation+KIFAdditions.h │ │ ├── CAAnimation+KIFAdditions.m │ │ ├── CALayer-KIFAdditions.h │ │ ├── CALayer-KIFAdditions.m │ │ ├── CGGeometry-KIFAdditions.h │ │ ├── CGGeometry-KIFAdditions.m │ │ ├── LoadableCategory.h │ │ ├── NSBundle-KIFAdditions.h │ │ ├── NSBundle-KIFAdditions.m │ │ ├── NSError-KIFAdditions.h │ │ ├── NSError-KIFAdditions.m │ │ ├── NSException-KIFAdditions.h │ │ ├── NSException-KIFAdditions.m │ │ ├── NSFileManager-KIFAdditions.h │ │ ├── NSFileManager-KIFAdditions.m │ │ ├── NSPredicate+KIFAdditions.h │ │ ├── NSPredicate+KIFAdditions.m │ │ ├── NSString+KIFAdditions.h │ │ ├── NSString+KIFAdditions.m │ │ ├── UIAccessibilityElement-KIFAdditions.h │ │ ├── UIAccessibilityElement-KIFAdditions.m │ │ ├── UIApplication-KIFAdditions.h │ │ ├── UIApplication-KIFAdditions.m │ │ ├── UIEvent+KIFAdditions.h │ │ ├── UIEvent+KIFAdditions.m │ │ ├── UIScreen+KIFAdditions.h │ │ ├── UIScreen+KIFAdditions.m │ │ ├── UIScrollView-KIFAdditions.h │ │ ├── UIScrollView-KIFAdditions.m │ │ ├── UITableView-KIFAdditions.h │ │ ├── UITableView-KIFAdditions.m │ │ ├── UITouch-KIFAdditions.h │ │ ├── UITouch-KIFAdditions.m │ │ ├── UIView-Debugging.h │ │ ├── UIView-Debugging.m │ │ ├── UIView-KIFAdditions.h │ │ ├── UIView-KIFAdditions.m │ │ ├── UIWindow-KIFAdditions.h │ │ ├── UIWindow-KIFAdditions.m │ │ ├── XCTestCase-KIFAdditions.h │ │ └── XCTestCase-KIFAdditions.m │ ├── Classes │ │ ├── IOHIDEvent+KIF.h │ │ ├── IOHIDEvent+KIF.m │ │ ├── KIF.h │ │ ├── KIFAccessibilityEnabler.h │ │ ├── KIFAccessibilityEnabler.m │ │ ├── KIFSystemTestActor.h │ │ ├── KIFSystemTestActor.m │ │ ├── KIFTestActor.h │ │ ├── KIFTestActor.m │ │ ├── KIFTestActor_Private.h │ │ ├── KIFTestCase.h │ │ ├── KIFTestCase.m │ │ ├── KIFTestStepValidation.h │ │ ├── KIFTestStepValidation.m │ │ ├── KIFTextInputTraitsOverrides.h │ │ ├── KIFTextInputTraitsOverrides.m │ │ ├── KIFTypist.h │ │ ├── KIFTypist.m │ │ ├── KIFUIObject.h │ │ ├── KIFUIObject.m │ │ ├── KIFUITestActor-ConditionalTests.h │ │ ├── KIFUITestActor-ConditionalTests.m │ │ ├── KIFUITestActor.h │ │ ├── KIFUITestActor.m │ │ ├── KIFUITestActor_Private.h │ │ ├── KIFUIViewTestActor.h │ │ ├── KIFUIViewTestActor.m │ │ ├── UIAutomationHelper.h │ │ └── UIAutomationHelper.m │ ├── LICENSE │ └── README.md ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj ├── SDWebImage │ ├── LICENSE │ ├── README.md │ └── SDWebImage │ │ ├── NSButton+WebCache.h │ │ ├── NSButton+WebCache.m │ │ ├── NSData+ImageContentType.h │ │ ├── NSData+ImageContentType.m │ │ ├── NSImage+WebCache.h │ │ ├── NSImage+WebCache.m │ │ ├── SDAnimatedImageRep.h │ │ ├── SDAnimatedImageRep.m │ │ ├── SDImageCache.h │ │ ├── SDImageCache.m │ │ ├── SDImageCacheConfig.h │ │ ├── SDImageCacheConfig.m │ │ ├── SDWebImageCoder.h │ │ ├── SDWebImageCoder.m │ │ ├── SDWebImageCoderHelper.h │ │ ├── SDWebImageCoderHelper.m │ │ ├── SDWebImageCodersManager.h │ │ ├── SDWebImageCodersManager.m │ │ ├── SDWebImageCompat.h │ │ ├── SDWebImageCompat.m │ │ ├── SDWebImageDownloader.h │ │ ├── SDWebImageDownloader.m │ │ ├── SDWebImageDownloaderOperation.h │ │ ├── SDWebImageDownloaderOperation.m │ │ ├── SDWebImageFrame.h │ │ ├── SDWebImageFrame.m │ │ ├── SDWebImageGIFCoder.h │ │ ├── SDWebImageGIFCoder.m │ │ ├── SDWebImageImageIOCoder.h │ │ ├── SDWebImageImageIOCoder.m │ │ ├── SDWebImageManager.h │ │ ├── SDWebImageManager.m │ │ ├── SDWebImageOperation.h │ │ ├── SDWebImagePrefetcher.h │ │ ├── SDWebImagePrefetcher.m │ │ ├── SDWebImageTransition.h │ │ ├── SDWebImageTransition.m │ │ ├── UIButton+WebCache.h │ │ ├── UIButton+WebCache.m │ │ ├── UIImage+ForceDecode.h │ │ ├── UIImage+ForceDecode.m │ │ ├── UIImage+GIF.h │ │ ├── UIImage+GIF.m │ │ ├── UIImage+MultiFormat.h │ │ ├── UIImage+MultiFormat.m │ │ ├── UIImageView+HighlightedWebCache.h │ │ ├── UIImageView+HighlightedWebCache.m │ │ ├── UIImageView+WebCache.h │ │ ├── UIImageView+WebCache.m │ │ ├── UIView+WebCache.h │ │ ├── UIView+WebCache.m │ │ ├── UIView+WebCacheOperation.h │ │ └── UIView+WebCacheOperation.m ├── Smooch │ ├── Smooch.framework │ │ ├── Headers │ │ │ ├── SKTConversation.h │ │ │ ├── SKTConversationActivity.h │ │ │ ├── SKTCoordinates.h │ │ │ ├── SKTDisplaySettings.h │ │ │ ├── SKTMessage.h │ │ │ ├── SKTMessageAction.h │ │ │ ├── SKTMessageItem.h │ │ │ ├── SKTSettings.h │ │ │ ├── SKTUser.h │ │ │ └── Smooch.h │ │ ├── Info.plist │ │ ├── Modules │ │ │ └── module.modulemap │ │ ├── Smooch │ │ ├── _CodeSignature │ │ │ └── CodeResources │ │ ├── ar.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── backArrow.png │ │ ├── backArrow@2x.png │ │ ├── backArrow@3x.png │ │ ├── de.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── defaultAvatar.png │ │ ├── defaultAvatar@2x.png │ │ ├── defaultAvatar@3x.png │ │ ├── en.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── es.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── fa.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── fi.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── fr.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── ios7-icon.ttf │ │ ├── it.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── ja.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── ko.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── locationIcon.png │ │ ├── locationIcon@2x.png │ │ ├── locationIcon@3x.png │ │ ├── mediaButton.png │ │ ├── mediaButton@2x.png │ │ ├── mediaButton@3x.png │ │ ├── nl.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── paperClip.png │ │ ├── paperClip@2x.png │ │ ├── paperClip@3x.png │ │ ├── pt-BR.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── pt.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── ru.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── sl.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── stp_card_amex.png │ │ ├── stp_card_amex@2x.png │ │ ├── stp_card_amex@3x.png │ │ ├── stp_card_cvc.png │ │ ├── stp_card_cvc@2x.png │ │ ├── stp_card_cvc@3x.png │ │ ├── stp_card_cvc_amex.png │ │ ├── stp_card_cvc_amex@2x.png │ │ ├── stp_card_cvc_amex@3x.png │ │ ├── stp_card_diners.png │ │ ├── stp_card_diners@2x.png │ │ ├── stp_card_diners@3x.png │ │ ├── stp_card_discover.png │ │ ├── stp_card_discover@2x.png │ │ ├── stp_card_discover@3x.png │ │ ├── stp_card_jcb.png │ │ ├── stp_card_jcb@2x.png │ │ ├── stp_card_jcb@3x.png │ │ ├── stp_card_mastercard.png │ │ ├── stp_card_mastercard@2x.png │ │ ├── stp_card_mastercard@3x.png │ │ ├── stp_card_placeholder.png │ │ ├── stp_card_placeholder@2x.png │ │ ├── stp_card_placeholder@3x.png │ │ ├── stp_card_placeholder_template.png │ │ ├── stp_card_placeholder_template@2x.png │ │ ├── stp_card_placeholder_template@3x.png │ │ ├── stp_card_visa.png │ │ ├── stp_card_visa@2x.png │ │ ├── stp_card_visa@3x.png │ │ ├── sv.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── uk.lproj │ │ │ └── SmoochLocalizable.strings │ │ ├── zh-Hans.lproj │ │ │ └── SmoochLocalizable.strings │ │ └── zh-Hant.lproj │ │ │ └── SmoochLocalizable.strings │ └── readme.md └── Target Support Files │ ├── KIF │ ├── Info.plist │ ├── KIF-dummy.m │ ├── KIF-prefix.pch │ ├── KIF-umbrella.h │ ├── KIF.modulemap │ └── KIF.xcconfig │ ├── Pods-ReceptionKit │ ├── Info.plist │ ├── Pods-ReceptionKit-acknowledgements.markdown │ ├── Pods-ReceptionKit-acknowledgements.plist │ ├── Pods-ReceptionKit-dummy.m │ ├── Pods-ReceptionKit-frameworks.sh │ ├── Pods-ReceptionKit-resources.sh │ ├── Pods-ReceptionKit-umbrella.h │ ├── Pods-ReceptionKit.debug.xcconfig │ ├── Pods-ReceptionKit.modulemap │ └── Pods-ReceptionKit.release.xcconfig │ ├── Pods-ReceptionKitTests │ ├── Info.plist │ ├── Pods-ReceptionKitTests-acknowledgements.markdown │ ├── Pods-ReceptionKitTests-acknowledgements.plist │ ├── Pods-ReceptionKitTests-dummy.m │ ├── Pods-ReceptionKitTests-frameworks.sh │ ├── Pods-ReceptionKitTests-resources.sh │ ├── Pods-ReceptionKitTests-umbrella.h │ ├── Pods-ReceptionKitTests.debug.xcconfig │ ├── Pods-ReceptionKitTests.modulemap │ └── Pods-ReceptionKitTests.release.xcconfig │ └── SDWebImage │ ├── Info.plist │ ├── SDWebImage-dummy.m │ ├── SDWebImage-prefix.pch │ ├── SDWebImage-umbrella.h │ ├── SDWebImage.modulemap │ └── SDWebImage.xcconfig ├── README.md ├── ReceptionKit.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── ReceptionKit.xcscheme ├── ReceptionKit.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── ReceptionKit ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Config.swift ├── FontAwesome.otf ├── Helpers │ ├── ButtonFormatter.swift │ ├── Camera.swift │ ├── Colour.swift │ ├── DoorBell.swift │ ├── Icons.swift │ ├── Logger.swift │ ├── MessageSender.swift │ └── Text.swift ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── AppIcon.png │ │ ├── Contents.json │ │ ├── Icon-72.png │ │ ├── Icon-72@2x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-Small-50.png │ │ ├── Icon-Small-50@2x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Spotlight-40.png │ │ ├── Icon-Spotlight-40@2x.png │ │ └── Icon-iPadPro@2x.png │ ├── CompanyLogo.imageset │ │ ├── Contents.json │ │ └── Logo.png │ ├── Contents.json │ ├── Delivery Logos │ │ ├── IconDeliveryCanadaPost.imageset │ │ │ ├── Contents.json │ │ │ └── DeliveryLogos.png │ │ ├── IconDeliveryFedEx.imageset │ │ │ ├── Contents.json │ │ │ └── fedex.png │ │ └── IconDeliveryUPS.imageset │ │ │ ├── Contents.json │ │ │ └── ups.png │ └── UnknownContact.imageset │ │ ├── Contents.json │ │ └── UnknownContact.png ├── Info.plist ├── Models │ ├── Contacts.swift │ ├── DeliveryCompany.swift │ └── SlackMessage.swift ├── ReceptionKit-Bridging-Header.h ├── View Controllers │ ├── Delivery │ │ ├── DeliveryCompanyViewController.swift │ │ └── DeliveryMethodViewController.swift │ ├── HomeViewController.swift │ ├── OrientationNavigationController.swift │ ├── Received Messages │ │ ├── ReceivedMessageViewController.swift │ │ ├── ReceivedMessageViewController.xib │ │ └── SmoochConversationDelegate.swift │ ├── Template │ │ ├── ReturnToHomeTableViewController.swift │ │ ├── ReturnToHomeViewController.swift │ │ ├── UIViewController+ReturnsToHome.swift │ │ ├── UIViewController+StackViewOrientable.swift │ │ └── UIViewController+Themed.swift │ ├── Visitor │ │ ├── ContactTableViewCell.swift │ │ ├── VisitorAskNameViewController.swift │ │ ├── VisitorSearchResultsTableViewController.swift │ │ ├── VisitorSearchViewController.swift │ │ └── VisitorViewController.swift │ └── WaitingViewController.swift └── doorbell.mp3 ├── ReceptionKitTests ├── DeliveryTests.swift ├── Info.plist ├── KIFTestCase+Helpers.swift ├── MockMessageSender.swift ├── ReceptionKitTests-Bridging-Header.h ├── VisitorTests.swift └── XCTestCase+KIF.swift ├── Screenshots ├── colours.png ├── contacts.png ├── french.png ├── home.png ├── reply.png └── slack.png └── Scripts └── install_swiftlint.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | 28 | # Mac 29 | .DS_Store 30 | 31 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - line_length 3 | excluded: 4 | - Pods 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode9.3 3 | xcode_workspace: ReceptionKit.xcworkspace 4 | xcode_scheme: ReceptionKit 5 | 6 | # From https://github.com/travis-ci/travis-ci/issues/6675 7 | before_install: 8 | - export IOS_SIMULATOR_UDID=`instruments -s devices | grep "iPad Pro (12.9-inch" | awk -F '[ ]' '{print $4}' | awk -F '[\[]' '{print $2}' | sed 's/.$//'` 9 | - echo $IOS_SIMULATOR_UDID 10 | - open -a "simulator" --args -CurrentDeviceUDID $IOS_SIMULATOR_UDID 11 | 12 | install: 13 | - ./Scripts/install_swiftlint.sh 14 | 15 | # Temporarily disable xctool: https://github.com/travis-ci/travis-ci/issues/3986 16 | # xcodebuild runs swiftlint automatically 17 | script: 18 | # - swiftlint 19 | # - xctool test -workspace ReceptionKit.xcworkspace -scheme ReceptionKit -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPad Pro' 20 | - set -o pipefail && xcodebuild test -workspace ReceptionKit.xcworkspace -scheme ReceptionKit -destination 'platform=iOS Simulator,name=iPad Pro (12.9-inch)' | xcpretty 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Andy Cho 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | platform :ios, '9.0' 3 | 4 | target 'ReceptionKit' do 5 | pod 'Smooch', '~> 6.9' 6 | pod 'SDWebImage', '~> 4.3' 7 | end 8 | 9 | target 'ReceptionKitTests' do 10 | pod 'Smooch', '~> 6.9' 11 | pod 'KIF', '~> 3.7', :configurations => ['Debug'] 12 | end 13 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - KIF (3.7.3): 3 | - KIF/Core (= 3.7.3) 4 | - KIF/Core (3.7.3) 5 | - SDWebImage (4.3.3): 6 | - SDWebImage/Core (= 4.3.3) 7 | - SDWebImage/Core (4.3.3) 8 | - Smooch (6.9.1) 9 | 10 | DEPENDENCIES: 11 | - KIF (~> 3.7) 12 | - SDWebImage (~> 4.3) 13 | - Smooch (~> 6.9) 14 | 15 | SPEC CHECKSUMS: 16 | KIF: 4c23b5d24dba24d3cb6dbb9c7d325b31e526ba4a 17 | SDWebImage: de4d90b5bff3571eae7bd16202b1f43135409fa5 18 | Smooch: 0aa7c588ac85c80c17c2d1ca7db16ffe5bea22a8 19 | 20 | PODFILE CHECKSUM: f8265f35653d23938a72b81f9e7852efd5acac3b 21 | 22 | COCOAPODS: 1.2.1 23 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CAAnimation+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimation+KIFAdditions.h 3 | // Pods 4 | // 5 | // Created by Justin Martin on 6/6/16. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface CAAnimation (KIFAdditions) 12 | 13 | - (double)KIF_completionTime; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CAAnimation+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimation+KIFAdditions.m 3 | // Pods 4 | // 5 | // Created by Justin Martin on 6/6/16. 6 | // 7 | 8 | #import "CAAnimation+KIFAdditions.h" 9 | 10 | 11 | @implementation CAAnimation (KIFAdditions) 12 | 13 | - (double)KIF_completionTime; 14 | { 15 | if (self.repeatDuration > 0) { 16 | return self.beginTime + self.repeatDuration; 17 | } else if (self.repeatCount == HUGE_VALF) { 18 | return HUGE_VALF; 19 | } else if (self.repeatCount > 0) { 20 | return self.beginTime + (self.repeatCount * self.duration); 21 | } else { 22 | return self.beginTime + self.duration; 23 | } 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CALayer-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer-KIFAdditions.h 3 | // Pods 4 | // 5 | // Created by Radu Ciobanu on 28/01/2016. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | // 10 | 11 | #import 12 | 13 | @interface CALayer (KIFAdditions) 14 | 15 | /** 16 | * @method hasAnimations 17 | * @abstract Traverses self's hierarchy of layers and checks whether any 18 | * visible sublayers or self have ongoing anymations. 19 | * @return YES if an animated layer has been found, NO otherwise. 20 | */ 21 | - (BOOL)hasAnimations; 22 | 23 | /*! 24 | @method performBlockOnDescendentLayers: 25 | @abstract Calls a block on the layer itself and on all its descendent layers. 26 | @param block The block that will be called on the layers. Stop the traversation 27 | of the layers by assigning YES to the stop-parameter of the block. 28 | */ 29 | - (void)performBlockOnDescendentLayers:(void (^)(CALayer *layer, BOOL *stop))block; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CALayer-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer-KIFAdditions.m 3 | // Pods 4 | // 5 | // Created by Radu Ciobanu on 28/01/2016. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | // 10 | 11 | #import "CALayer-KIFAdditions.h" 12 | #import "CAAnimation+KIFAdditions.h" 13 | 14 | 15 | @implementation CALayer (KIFAdditions) 16 | 17 | - (float)KIF_absoluteSpeed 18 | { 19 | __block float speed = 1.0f; 20 | [self performBlockOnAncestorLayers:^(CALayer *layer) { 21 | speed = speed * layer.speed; 22 | }]; 23 | return speed; 24 | } 25 | 26 | - (BOOL)hasAnimations 27 | { 28 | __block BOOL result = NO; 29 | [self performBlockOnDescendentLayers:^(CALayer *layer, BOOL *stop) { 30 | // explicitly exclude _UIParallaxMotionEffect as it is used in alertviews, and we don't want every alertview to be paused) 31 | BOOL hasAnimation = layer.animationKeys.count != 0 && ![layer.animationKeys isEqualToArray:@[@"_UIParallaxMotionEffect"]]; 32 | if (hasAnimation && !layer.hidden) { 33 | double currentTime = CACurrentMediaTime() * [layer KIF_absoluteSpeed]; 34 | 35 | [layer.animationKeys enumerateObjectsUsingBlock:^(NSString *animationKey, NSUInteger idx, BOOL *innerStop) { 36 | CAAnimation *animation = [layer animationForKey:animationKey]; 37 | double beginTime = [animation beginTime]; 38 | double completionTime = [animation KIF_completionTime]; 39 | 40 | // Ignore infinitely repeating animations 41 | if (currentTime >= beginTime && completionTime != HUGE_VALF && currentTime < completionTime) { 42 | result = YES; 43 | *innerStop = YES; 44 | *stop = YES; 45 | } 46 | }]; 47 | } 48 | }]; 49 | return result; 50 | } 51 | 52 | - (void)performBlockOnDescendentLayers:(void (^)(CALayer *layer, BOOL *stop))block 53 | { 54 | BOOL stop = NO; 55 | [self performBlockOnDescendentLayers:block stop:&stop]; 56 | } 57 | 58 | - (void)performBlockOnDescendentLayers:(void (^)(CALayer *, BOOL *))block stop:(BOOL *)stop 59 | { 60 | block(self, stop); 61 | if (*stop) { 62 | return; 63 | } 64 | 65 | for (CALayer *layer in self.sublayers) { 66 | [layer performBlockOnDescendentLayers:block stop:stop]; 67 | if (*stop) { 68 | return; 69 | } 70 | } 71 | } 72 | 73 | - (void)performBlockOnAncestorLayers:(void (^)(CALayer *))block; 74 | { 75 | block(self); 76 | 77 | if (self.superlayer != nil) { 78 | [self.superlayer performBlockOnAncestorLayers:block]; 79 | } 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CGGeometry-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGGeometry-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | CG_INLINE CGPoint CGPointCenteredInRect(CGRect bounds) { 13 | return CGPointMake(bounds.origin.x + bounds.size.width * 0.5f, bounds.origin.y + bounds.size.height * 0.5f); 14 | } 15 | 16 | CG_INLINE CGPoint CGPointMidPoint(CGPoint point1, CGPoint point2) { 17 | return CGPointMake((point1.x + point2.x) / 2.0f, (point1.y + point2.y) / 2.0f); 18 | } 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CGGeometry-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGGeometry-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGGeometry-KIFAdditions.h" 11 | 12 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/LoadableCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoadableCategory.h 3 | // KIF 4 | // 5 | // Created by Karl Stenerud on 7/16/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | /** Make all categories in the current file loadable without using -load-all. 11 | * 12 | * Normally, compilers will skip linking files that contain only categories. 13 | * Adding a call to this macro adds a dummy class, which causes the linker 14 | * to add the file. 15 | * 16 | * @param UNIQUE_NAME A globally unique name. 17 | */ 18 | #define MAKE_CATEGORIES_LOADABLE(UNIQUE_NAME) @interface FORCELOAD_##UNIQUE_NAME : NSObject @end @implementation FORCELOAD_##UNIQUE_NAME @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSBundle-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSBundle (KIFAdditions) 12 | 13 | + (NSBundle *)KIFTestBundle; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSBundle-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "NSBundle-KIFAdditions.h" 10 | #import "KIFTestCase.h" 11 | #import "LoadableCategory.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(NSBundle_KIFAdditions) 14 | 15 | @implementation NSBundle (KIFAdditions) 16 | 17 | + (NSBundle *)KIFTestBundle 18 | { 19 | static NSBundle *bundle; 20 | static dispatch_once_t onceToken; 21 | dispatch_once(&onceToken, ^{ 22 | bundle = [self bundleForClass:[KIFTestCase class]]; 23 | }); 24 | return bundle; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSError-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSError (KIFAdditions) 12 | 13 | + (instancetype)KIFErrorWithUnderlyingError:(NSError *)underlyingError format:(NSString *)format, ... NS_FORMAT_FUNCTION(2,3); 14 | + (instancetype)KIFErrorWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSError-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "NSError-KIFAdditions.h" 10 | #import "LoadableCategory.h" 11 | #import "KIFTestActor.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(NSError_KIFAdditions) 14 | 15 | @implementation NSError (KIFAdditions) 16 | 17 | + (instancetype)KIFErrorWithFormat:(NSString *)format, ... 18 | { 19 | va_list args; 20 | va_start(args, format); 21 | NSString *description = [[NSString alloc] initWithFormat:format arguments:args]; 22 | va_end(args); 23 | 24 | return [self errorWithDomain:@"KIFTest" code:KIFTestStepResultFailure userInfo:@{NSLocalizedDescriptionKey: description}]; 25 | } 26 | 27 | + (instancetype)KIFErrorWithUnderlyingError:(NSError *)underlyingError format:(NSString *)format, ... 28 | { 29 | va_list args; 30 | va_start(args, format); 31 | NSString *description = [[NSString alloc] initWithFormat:format arguments:args]; 32 | va_end(args); 33 | 34 | NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:description, NSLocalizedDescriptionKey, underlyingError, NSUnderlyingErrorKey, nil]; 35 | 36 | return [self errorWithDomain:@"KIFTest" code:KIFTestStepResultFailure userInfo:userInfo]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSException-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSException-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/20/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSException (KIFAdditions) 12 | 13 | + (NSException *)failureInFile:(NSString *)file atLine:(NSInteger)line withDescription:(NSString *)formatString, ...; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSException-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSException-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/20/13. 6 | // 7 | // 8 | 9 | #import "NSException-KIFAdditions.h" 10 | 11 | @implementation NSException (KIFAdditions) 12 | 13 | + (NSException *)failureInFile:(NSString *)file atLine:(NSInteger)line withDescription:(NSString *)formatString, ... 14 | { 15 | va_list argumentList; 16 | va_start(argumentList, formatString); 17 | 18 | NSString *reason = [[NSString alloc] initWithFormat:formatString arguments:argumentList]; 19 | 20 | va_end(argumentList); 21 | 22 | return [NSException exceptionWithName:@"KIFFailureException" 23 | reason: reason 24 | userInfo:@{@"FilenameKey": file, 25 | @"LineNumberKey": @(line)}]; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSFileManager-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Michael Thole on 6/1/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface NSFileManager (KIFAdditions) 14 | 15 | - (NSString *)createUserDirectory:(NSSearchPathDirectory)searchPath; 16 | - (BOOL)recursivelyCreateDirectory:(NSString *)path; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSFileManager-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Michael Thole on 6/1/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "NSFileManager-KIFAdditions.h" 11 | #import "LoadableCategory.h" 12 | 13 | 14 | MAKE_CATEGORIES_LOADABLE(NSFileManager_KIFAdditions) 15 | 16 | 17 | @implementation NSFileManager (KIFAdditions) 18 | 19 | #pragma mark Public Methods 20 | 21 | - (NSString *)createUserDirectory:(NSSearchPathDirectory)searchPath; 22 | { 23 | NSArray *paths = NSSearchPathForDirectoriesInDomains(searchPath, NSUserDomainMask, YES); 24 | if (!paths.count) { 25 | return nil; 26 | } 27 | 28 | NSString *rootDirectory = paths[0]; 29 | 30 | BOOL isDir; 31 | BOOL created = NO; 32 | if ([self fileExistsAtPath:rootDirectory isDirectory:&isDir] && isDir) { 33 | created = YES; 34 | } else { 35 | created = [self recursivelyCreateDirectory:rootDirectory]; 36 | } 37 | 38 | return created ? rootDirectory : nil; 39 | } 40 | 41 | - (BOOL)recursivelyCreateDirectory:(NSString *)path; 42 | { 43 | BOOL isDir = NO; 44 | BOOL isParentADir = NO; 45 | NSString *parentDir = nil; 46 | 47 | if (![self fileExistsAtPath:path isDirectory:&isDir]) { 48 | // if file doesn't exist, first create parent 49 | parentDir = [path stringByDeletingLastPathComponent]; 50 | 51 | if (!parentDir.length || [parentDir isEqualToString:@"/"]) { 52 | isParentADir = YES; 53 | } else { 54 | isParentADir = [self recursivelyCreateDirectory:parentDir]; 55 | } 56 | 57 | if (isParentADir) { 58 | isDir = [self createDirectoryAtPath:path withIntermediateDirectories:NO attributes:nil error:nil]; 59 | } else { 60 | return NO; 61 | } 62 | } 63 | 64 | return isDir; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSPredicate+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSPredicate+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 2/3/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSPredicate (KIFAdditions) 12 | 13 | @property NSString *kifPredicateDescription; 14 | 15 | - (NSArray *)flatten; 16 | - (NSCompoundPredicate *)minusSubpredicatesFrom:(NSPredicate *)otherPredicate; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSPredicate+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSPredicate+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 2/3/15. 6 | // 7 | // 8 | 9 | #import 10 | #import "NSPredicate+KIFAdditions.h" 11 | 12 | @implementation NSPredicate (KIFAdditions) 13 | 14 | - (NSArray *)flatten 15 | { 16 | NSMutableArray *result = [[NSMutableArray alloc] init]; 17 | 18 | if ([self isKindOfClass:[NSCompoundPredicate class]]) { 19 | for (NSPredicate *predicate in ((NSCompoundPredicate *)self).subpredicates) { 20 | [result addObjectsFromArray:[predicate flatten]]; 21 | } 22 | } else { 23 | [result addObject:self]; 24 | } 25 | 26 | return result; 27 | } 28 | 29 | - (NSCompoundPredicate *)minusSubpredicatesFrom:(NSPredicate *)otherPredicate; 30 | { 31 | if (self == otherPredicate) { 32 | return nil; 33 | } 34 | NSMutableSet *subpredicates = [NSMutableSet setWithArray:[self flatten]]; 35 | NSMutableSet *otherSubpredicates = [NSMutableSet setWithArray:[otherPredicate flatten]]; 36 | [subpredicates minusSet:otherSubpredicates]; 37 | return [[NSCompoundPredicate alloc] initWithType:NSAndPredicateType 38 | subpredicates:[subpredicates allObjects]]; 39 | } 40 | 41 | - (void)setKifPredicateDescription:(NSString *)description; 42 | { 43 | NSString *desc = description.copy; 44 | objc_setAssociatedObject(self, @selector(kifPredicateDescription), desc, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 45 | } 46 | 47 | - (NSString *)kifPredicateDescription; 48 | { 49 | id object = objc_getAssociatedObject(self, @selector(kifPredicateDescription)); 50 | if (object) { 51 | return object; 52 | } 53 | // Compound predicates containing subpredicates with the kifPredicateDescription set should still get our pretty formatting. 54 | if ([self isKindOfClass:[NSCompoundPredicate class]]) { 55 | NSArray *subpredicates = [self flatten]; 56 | NSString *description = @""; 57 | 58 | for (NSPredicate *predicate in subpredicates) { 59 | if (description.length > 0) { 60 | description = [description stringByAppendingString:@", "]; 61 | } 62 | description = [description stringByAppendingString:predicate.kifPredicateDescription]; 63 | } 64 | if (description.length > 0) { 65 | return description; 66 | } 67 | } 68 | 69 | return self.description; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSString+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 1/28/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #pragma mark - NSString 12 | @interface NSString (KIFAdditions) 13 | 14 | - (BOOL)KIF_isEqualToStringOrAttributedString:(id)aString; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSString+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 1/28/16. 6 | // 7 | // 8 | 9 | #import "NSString+KIFAdditions.h" 10 | 11 | #pragma mark - NSString 12 | @implementation NSString (KIFAdditions) 13 | 14 | - (BOOL)KIF_isEqualToStringOrAttributedString:(id)aString; 15 | { 16 | // Somtimes Accessibility Elements will return an AXAttributedString. 17 | // This compares the raw backing string against a vanilla NSString, ignoring any attributes. 18 | if ([aString respondsToSelector:@selector(string)]) { 19 | return [self isEqualToString:[(id)aString string]]; 20 | } 21 | return [self isEqualToString:aString]; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIEvent+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIEvent+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Thomas on 3/1/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | // Exposes methods of UITouchesEvent so that the compiler doesn't complain 12 | @interface UIEvent (KIFAdditionsPrivateHeaders) 13 | - (void)_addTouch:(UITouch *)touch forDelayedDelivery:(BOOL)arg2; 14 | - (void)_clearTouches; 15 | @end 16 | 17 | @interface UIEvent (KIFAdditions) 18 | - (void)kif_setEventWithTouches:(NSArray *)touches; 19 | @end 20 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIEvent+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIEvent+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Thomas on 3/1/15. 6 | // 7 | // 8 | 9 | #import "UIEvent+KIFAdditions.h" 10 | #import "LoadableCategory.h" 11 | #import "IOHIDEvent+KIF.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(UIEvent_KIFAdditions) 14 | 15 | // 16 | // GSEvent is an undeclared object. We don't need to use it ourselves but some 17 | // Apple APIs (UIScrollView in particular) require the x and y fields to be present. 18 | // 19 | @interface KIFGSEventProxy : NSObject 20 | { 21 | @public 22 | unsigned int flags; 23 | unsigned int type; 24 | unsigned int ignored1; 25 | float x1; 26 | float y1; 27 | float x2; 28 | float y2; 29 | unsigned int ignored2[10]; 30 | unsigned int ignored3[7]; 31 | float sizeX; 32 | float sizeY; 33 | float x3; 34 | float y3; 35 | unsigned int ignored4[3]; 36 | } 37 | @end 38 | 39 | @implementation KIFGSEventProxy 40 | @end 41 | 42 | typedef struct __GSEvent * GSEventRef; 43 | 44 | @interface UIEvent (KIFAdditionsMorePrivateHeaders) 45 | - (void)_setGSEvent:(GSEventRef)event; 46 | - (void)_setHIDEvent:(IOHIDEventRef)event; 47 | - (void)_setTimestamp:(NSTimeInterval)timestemp; 48 | @end 49 | 50 | @implementation UIEvent (KIFAdditions) 51 | 52 | - (void)kif_setEventWithTouches:(NSArray *)touches 53 | { 54 | NSOperatingSystemVersion iOS8 = {8, 0, 0}; 55 | if ([NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)] 56 | && [[NSProcessInfo new] isOperatingSystemAtLeastVersion:iOS8]) { 57 | [self kif_setIOHIDEventWithTouches:touches]; 58 | } else { 59 | [self kif_setGSEventWithTouches:touches]; 60 | } 61 | } 62 | 63 | - (void)kif_setGSEventWithTouches:(NSArray *)touches 64 | { 65 | UITouch *touch = touches[0]; 66 | CGPoint location = [touch locationInView:touch.window]; 67 | KIFGSEventProxy *gsEventProxy = [[KIFGSEventProxy alloc] init]; 68 | gsEventProxy->x1 = location.x; 69 | gsEventProxy->y1 = location.y; 70 | gsEventProxy->x2 = location.x; 71 | gsEventProxy->y2 = location.y; 72 | gsEventProxy->x3 = location.x; 73 | gsEventProxy->y3 = location.y; 74 | gsEventProxy->sizeX = 1.0; 75 | gsEventProxy->sizeY = 1.0; 76 | gsEventProxy->flags = ([touch phase] == UITouchPhaseEnded) ? 0x1010180 : 0x3010180; 77 | gsEventProxy->type = 3001; 78 | 79 | [self _setGSEvent:(GSEventRef)gsEventProxy]; 80 | 81 | [self _setTimestamp:(((UITouch*)touches[0]).timestamp)]; 82 | } 83 | 84 | - (void)kif_setIOHIDEventWithTouches:(NSArray *)touches 85 | { 86 | IOHIDEventRef event = kif_IOHIDEventWithTouches(touches); 87 | [self _setHIDEvent:event]; 88 | CFRelease(event); 89 | } 90 | 91 | @end 92 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScreen+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScreen+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Steven King on 25/02/2016. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface UIScreen (KIFAdditions) 12 | 13 | @property (nonatomic, readonly) CGFloat majorSwipeDisplacement; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScreen+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScreen+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Steven King on 25/02/2016. 6 | // 7 | // 8 | 9 | #import "UIScreen+KIFAdditions.h" 10 | 11 | @implementation UIScreen (KIFAdditions) 12 | 13 | - (CGFloat)majorSwipeDisplacement { 14 | return self.bounds.size.width * 0.5; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScrollView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UIScrollView (KIFAdditions) 14 | 15 | - (void)scrollViewToVisible:(UIView *)view animated:(BOOL)animated; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScrollView-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "UIScrollView-KIFAdditions.h" 11 | #import "LoadableCategory.h" 12 | #import "UIApplication-KIFAdditions.h" 13 | #import "UIView-KIFAdditions.h" 14 | 15 | 16 | MAKE_CATEGORIES_LOADABLE(UIScrollView_KIFAdditions) 17 | 18 | 19 | @implementation UIScrollView (KIFAdditions) 20 | 21 | - (void)scrollViewToVisible:(UIView *)view animated:(BOOL)animated; 22 | { 23 | CGRect viewFrame = [self convertRect:view.bounds fromView:view]; 24 | CGPoint contentOffset = self.contentOffset; 25 | 26 | if (CGRectGetMaxX(viewFrame) > self.contentOffset.x + CGRectGetWidth(self.bounds)) { 27 | contentOffset.x = MIN(CGRectGetMaxX(viewFrame) - CGRectGetWidth(self.bounds), CGRectGetMinX(viewFrame)); 28 | } else if (CGRectGetMinX(viewFrame) < self.contentOffset.x) { 29 | contentOffset.x = MAX(CGRectGetMaxX(viewFrame) - CGRectGetWidth(self.bounds), CGRectGetMinX(viewFrame)); 30 | } 31 | 32 | if (CGRectGetMaxY(viewFrame) > self.contentOffset.y + CGRectGetHeight(self.bounds)) { 33 | contentOffset.y = MIN(CGRectGetMaxY(viewFrame) - CGRectGetHeight(self.bounds), CGRectGetMinY(viewFrame)); 34 | } else if (CGRectGetMinY(viewFrame) < self.contentOffset.y) { 35 | contentOffset.y = MAX(CGRectGetMaxY(viewFrame) - CGRectGetHeight(self.bounds), CGRectGetMinY(viewFrame)); 36 | } 37 | 38 | UIEdgeInsets contentInset; 39 | #ifdef __IPHONE_11_0 40 | if (@available(iOS 11.0, *)) { 41 | contentInset = self.adjustedContentInset; 42 | } else { 43 | contentInset = self.contentInset; 44 | } 45 | #else 46 | contentInset = self.contentInset; 47 | #endif 48 | CGFloat minX = -self.contentInset.left; 49 | CGFloat maxX = minX + MAX(0, self.contentSize.width + contentInset.right - CGRectGetWidth(self.bounds)); 50 | CGFloat minY = -self.contentInset.top; 51 | CGFloat maxY = minY + MAX(0, self.contentSize.height + contentInset.bottom - CGRectGetHeight(self.bounds)); 52 | contentOffset.x = MAX(minX, MIN(contentOffset.x, maxX)); 53 | contentOffset.y = MAX(minY, MIN(contentOffset.y, maxY)); 54 | 55 | if (!CGPointEqualToPoint(contentOffset, self.contentOffset)) { 56 | [self setContentOffset:contentOffset animated:animated]; 57 | KIFRunLoopRunInModeRelativeToAnimationSpeed(kCFRunLoopDefaultMode, 0.2, false); 58 | } 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UITableView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Hilton Campbell on 4/12/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | @interface UITableView (KIFAdditions) 13 | 14 | - (BOOL)dragCell:(UITableViewCell *)cell toIndexPath:(NSIndexPath *)indexPath error:(NSError **)error; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UITouch-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITouch-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UITouch (KIFAdditions) 14 | 15 | - (id)initInView:(UIView *)view; 16 | - (id)initAtPoint:(CGPoint)point inView:(UIView *)view; 17 | 18 | - (void)setLocationInWindow:(CGPoint)location; 19 | - (void)setPhaseAndUpdateTimestamp:(UITouchPhase)phase; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIView-Debugging.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Debugging.h 3 | // KIF 4 | // 5 | // Created by Graeme Arthur on 02/05/15. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface UIView (Debugging) 12 | /*! 13 | @abstract Prints the view hiererchy, starting from the top window(s), along with accessibility information, which is more related to KIF than the usual information given by the 'description' method. 14 | */ 15 | +(void)printViewHierarchy; 16 | 17 | /*! 18 | @abstract Prints the view hiererchy, starting from this view, along with accessibility information, which is more related to KIF than the usual information given by the 'description' method. 19 | */ 20 | -(void)printViewHierarchy; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIWindow-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UIWindow (KIFAdditions) 14 | 15 | - (UIResponder *)firstResponder; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIWindow-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "UIWindow-KIFAdditions.h" 11 | 12 | 13 | //@implementation UIWindow (KIFAdditions) 14 | // 15 | //@end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/XCTestCase-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // XCTestCase-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/9/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "KIFTestActor.h" 11 | 12 | @interface XCTestCase (KIFAdditions) 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/IOHIDEvent+KIF.h: -------------------------------------------------------------------------------- 1 | // 2 | // IOHIDEvent+KIF.h 3 | // KIF 4 | // 5 | // Created by Thomas Bonnin on 7/6/15. 6 | // 7 | // 8 | 9 | typedef struct __IOHIDEvent * IOHIDEventRef; 10 | IOHIDEventRef kif_IOHIDEventWithTouches(NSArray *touches) CF_RETURNS_RETAINED; 11 | 12 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIF.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIF.h 3 | // KIF 4 | // 5 | // Created by Jim Puls on 12/21/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "KIFTestActor.h" 11 | #import "KIFTestCase.h" 12 | #import "KIFSystemTestActor.h" 13 | #import "KIFUITestActor.h" 14 | #import "KIFUITestActor-ConditionalTests.h" 15 | 16 | #import "KIFUIViewTestActor.h" 17 | #import "KIFUIObject.h" 18 | 19 | #import "XCTestCase-KIFAdditions.h" 20 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFAccessibilityEnabler.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFAccessibilityEnabler.h 3 | // KIF 4 | // 5 | // Created by Timothy Clem on 10/11/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * Provides a way to enable the Accessibility Inspector. 13 | */ 14 | FOUNDATION_EXTERN void KIFEnableAccessibility(void); 15 | 16 | /** 17 | * Returns YES if `KIFEnableAccessibility` has been already called successfully. 18 | * It returns NO otherwise. 19 | */ 20 | FOUNDATION_EXTERN BOOL KIFAccessibilityEnabled(void); 21 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestActor_Private.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | @interface KIFTestActor () 5 | 6 | - (instancetype)initWithFile:(NSString *)file line:(NSInteger)line delegate:(id)delegate; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestCase.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestCase.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 12/14/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | /*! 11 | * @abstract @c KIFTestCase subclasses @c XCTestCase to add setup and teardown steps that can be used to execute KIF test steps. 12 | * @discussion This class provides four new methods: @c beforeAll and @c afterAll which run once before and after all tests and @c beforeEach and @c afterEach which run before and after every test. @c beforeEach and @c afterEach are guaranteed to run in the same instance as each test, but @c beforeAll and @c afterAll are not. As such, @c beforeEach can be used to set up instance variables while @c beforeAll can only be used to set up static variables. 13 | */ 14 | #import 15 | #import "XCTestCase-KIFAdditions.h" 16 | @interface KIFTestCase : XCTestCase 17 | 18 | /*! 19 | * @abstract This method runs once before executing the first test in the class. 20 | * @discussion This should be used for navigating to the starting point in the app where all tests will start from. Because this method is not guaranteed to run in the same instance as tests, it should not be used for setting up instance variables but can be used for setting up static variables. 21 | */ 22 | - (void)beforeAll; 23 | 24 | /*! 25 | * @abstract This method runs before each test. 26 | * @discussion This should be used for any common tasks required before each test. Because this method is guaranteed to run in the same instance as tests, it can be used for setting up instance variables. 27 | */ 28 | - (void)beforeEach; 29 | 30 | /*! 31 | * @abstract This method runs after each test. 32 | * @discussion This should be used for restoring the app to the state it was in before the test. This could include conditional logic to recover from failed tests. 33 | */ 34 | - (void)afterEach; 35 | 36 | /*! 37 | * @abstract This method runs once after executing the last test in the class. 38 | * @discussion This should be used for navigating back to the initial state of the app, where it was before @c beforeAll. This should also be used for tearing down any static methods created by @c beforeAll. 39 | */ 40 | - (void)afterAll; 41 | 42 | /*! 43 | * @discussion When @c YES, rather than failing the test and advancing on the first failure, KIF will stop executing tests and begin spinning the run loop. This provides an opportunity for inspecting the state of the app when the failure occurred. 44 | */ 45 | @property (nonatomic, assign) BOOL stopTestsOnFirstBigFailure; 46 | 47 | @end 48 | 49 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestStepValidation.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestStepValidation.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "KIFTestCase.h" 11 | 12 | #define __KIFFail XCTFail 13 | #define __KIFAssertEqual XCTAssertEqual 14 | #define __KIFAssertEqualObjects XCTAssertEqualObjects 15 | 16 | #define KIFExpectFailure(stmt) \ 17 | {\ 18 | _MockKIFTestActorDelegate *mockDelegate = [_MockKIFTestActorDelegate mockDelegate];\ 19 | {\ 20 | _MockKIFTestActorDelegate *self = mockDelegate;\ 21 | @try { stmt; }\ 22 | @catch (NSException *exception) { }\ 23 | }\ 24 | if (!mockDelegate.failed) {\ 25 | __KIFFail(@"%s should have failed.", #stmt);\ 26 | }\ 27 | } 28 | 29 | #define KIFExpectFailureWithCount(stmt, cnt) \ 30 | {\ 31 | _MockKIFTestActorDelegate *mockDelegate = [_MockKIFTestActorDelegate mockDelegate];\ 32 | {\ 33 | _MockKIFTestActorDelegate *self = mockDelegate;\ 34 | @try { stmt; }\ 35 | @catch (NSException *exception) { }\ 36 | }\ 37 | if (!mockDelegate.failed) {\ 38 | __KIFFail(@"%s should have failed.", #stmt);\ 39 | }\ 40 | __KIFAssertEqual((NSUInteger)cnt, mockDelegate.exceptions.count, @"Expected a different number of exceptions.");\ 41 | } 42 | 43 | 44 | @interface _MockKIFTestActorDelegate : NSObject 45 | @property (nonatomic, assign) BOOL failed; 46 | @property (nonatomic, strong) NSArray *exceptions; 47 | @property (nonatomic, assign) BOOL stopped; 48 | 49 | + (instancetype)mockDelegate; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestStepValidation.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestStepValidation.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "KIFTestStepValidation.h" 10 | 11 | @implementation _MockKIFTestActorDelegate 12 | 13 | - (void)failWithException:(NSException *)exception stopTest:(BOOL)stop 14 | { 15 | [self failWithExceptions:@[exception] stopTest:stop]; 16 | } 17 | 18 | - (void)failWithExceptions:(NSArray *)exceptions stopTest:(BOOL)stop 19 | { 20 | self.failed = YES; 21 | self.exceptions = exceptions; 22 | self.stopped = stop; 23 | if (stop) { 24 | [[exceptions objectAtIndex:0] raise]; 25 | } 26 | } 27 | 28 | + (instancetype)mockDelegate 29 | { 30 | return [[self alloc] init]; 31 | } 32 | 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTextInputTraitsOverrides.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTextInputTraitsOverrides.h 3 | // KIF 4 | // 5 | // Created by Harley Cooper on 1/31/18. 6 | // 7 | 8 | @interface KIFTextInputTraitsOverrides : NSObject 9 | 10 | /*! 11 | @abstract If set to @c YES then KIF will observe default autocorrect behavior. If set to @c NO then autocorrect will always be disabled. 12 | */ 13 | + (BOOL)allowDefaultAutocorrectBehavior; 14 | /*! 15 | @abstract Set whether KIF will observe default autocorrect behavior. If set to @c NO then autocorrect will always be disabled. 16 | */ 17 | + (void)setAllowDefaultAutocorrectBehavior:(BOOL)allowDefaultBehavior; 18 | 19 | /*! 20 | @abstract If set to @c YES then KIF will observe default smart quotes behavior. If set to @c NO then smart dashes will always be disabled. 21 | */ 22 | + (BOOL)allowDefaultSmartDashesBehavior; 23 | /*! 24 | @abstract Set whether KIF will observe default smart dashes behavior. If set to @c NO then smart dashes will always be disabled. 25 | */ 26 | + (void)setAllowDefaultSmartDashesBehavior:(BOOL)allowDefaultBehavior; 27 | 28 | /*! 29 | @abstract If set to @c YES then KIF will observe default smart quotes behavior. If set to @c NO then smart quotes will always be disabled. 30 | */ 31 | + (BOOL)allowDefaultSmartQuotesBehavior; 32 | /*! 33 | @abstract Set whether KIF will observe default smart quotes behavior. If set to @c NO then smart quotes will always be disabled. 34 | */ 35 | + (void)setAllowDefaultSmartQuotesBehavior:(BOOL)allowDefaultBehavior; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTypist.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTypist.h 3 | // KIF 4 | // 5 | // Created by Pete Hodgson on 8/12/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | 11 | @interface KIFTypist : NSObject 12 | 13 | + (void)registerForNotifications; 14 | + (BOOL)keyboardHidden; 15 | + (BOOL)enterCharacter:(NSString *)characterString; 16 | 17 | + (NSTimeInterval)keystrokeDelay; 18 | + (void)setKeystrokeDelay:(NSTimeInterval)delay; 19 | 20 | + (BOOL)hasHardwareKeyboard; 21 | + (BOOL)hasKeyInputResponder; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFUIObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFUIObject.h 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 1/26/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface KIFUIObject : NSObject 12 | 13 | @property (nonatomic, weak, readonly) UIView *view; 14 | @property (nonatomic, weak, readonly) UIAccessibilityElement *element; 15 | 16 | - (instancetype)initWithElement:(UIAccessibilityElement *)element view:(UIView *)view; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFUIObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFUIObject.m 3 | // KIF 4 | // 5 | // Created by Alex Odawa on 1/26/15. 6 | // 7 | // 8 | 9 | #import "KIFUIObject.h" 10 | 11 | 12 | @implementation KIFUIObject 13 | 14 | - (instancetype)initWithElement:(UIAccessibilityElement *)element view:(UIView *)view; 15 | { 16 | self = [super init]; 17 | if (self) { 18 | _element = element; 19 | _view = view; 20 | } 21 | return self; 22 | } 23 | 24 | - (NSString *)description; 25 | { 26 | return [NSString stringWithFormat:@"<%@;\n| element=%@;\n| | view=%@>", [super description], self.element, self.view]; 27 | } 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFUITestActor_Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFUITestActor_Private.h 3 | // KIF 4 | // 5 | // Created by Sebastian Edward Shanus on 6/23/17. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface KIFUITestActor() 12 | 13 | /*! 14 | @abstract Selects an item from a currently visible picker view in specified component and in the specified order to search the value it selects. 15 | @discussion With a picker view already visible, this step will find an item with the given title in given component, according to the search order specified, select that item, and tap the Done button. This is helpful when it is important to select values from specific location. Example: if minimum date is set, values from the start will be invalid for selection and result will be unexpected. KIFPickerSearchOrder helps solving this by specifing the search order. 16 | @param title The title of the row to select. 17 | @param component The component tester inteds to select the title in. 18 | @param picker The picker (if exists) found on predicate search 19 | @param searchOrder The order in which the values are being searched for selection in each compotent. 20 | */ 21 | - (void)selectPickerViewRowWithTitle:(NSString *)title inComponent:(NSInteger)component fromPicker:(UIPickerView *)picker withSearchOrder:(KIFPickerSearchOrder)searchOrder; 22 | 23 | /*! 24 | @abstract Selects a value from a currently visible date picker view, according to the search order specified. 25 | @discussion With a date picker view already visible, this step will select the different rotating wheel values in order of how the array parameter is passed in. Each value will be searched according to the search order provided. After it is done it will hide the date picker. It works with all 4 UIDatePickerMode* modes. The input parameter of type NSArray has to match in what order the date picker is displaying the values/columns. So if the locale is changing the input parameter has to be adjusted. Example: Mode: UIDatePickerModeDate, Locale: en_US, Input param: NSArray *date = @[@"June", @"17", @"1965"];. Example: Mode: UIDatePickerModeDate, Locale: de_DE, Input param: NSArray *date = @[@"17.", @"Juni", @"1965". 26 | @param datePickerColumnValues Each element in the NSArray represents a rotating wheel in the date picker control. Elements from 0 - n are listed in the order of the rotating wheels, left to right. 27 | @param picker The picker (if exists) found on predicate search 28 | @param searchOrder The order in which the values are being searched for selection in each compotent. 29 | */ 30 | - (void)selectDatePickerValue:(NSArray *)datePickerColumnValues fromPicker:(UIPickerView *)picker withSearchOrder:(KIFPickerSearchOrder)searchOrder; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/UIAutomationHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIAutomationHelper.h 3 | // KIF 4 | // 5 | // Created by Joe Masilotti on 12/1/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | 12 | @class KIFTestActor; 13 | 14 | @interface UIAutomationHelper : NSObject 15 | 16 | + (BOOL)acknowledgeSystemAlert; 17 | 18 | + (BOOL)acknowledgeSystemAlertWithIndex:(NSUInteger)index; 19 | 20 | + (void)deactivateAppForDuration:(NSNumber *)duration; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/KIF/LICENSE: -------------------------------------------------------------------------------- 1 | KIF 2 | Copyright 2011-2016 Square, Inc. 3 | A full list of contributors is available at https://github.com/square/KIF/contributors 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - KIF (3.7.3): 3 | - KIF/Core (= 3.7.3) 4 | - KIF/Core (3.7.3) 5 | - SDWebImage (4.3.3): 6 | - SDWebImage/Core (= 4.3.3) 7 | - SDWebImage/Core (4.3.3) 8 | - Smooch (6.9.1) 9 | 10 | DEPENDENCIES: 11 | - KIF (~> 3.7) 12 | - SDWebImage (~> 4.3) 13 | - Smooch (~> 6.9) 14 | 15 | SPEC CHECKSUMS: 16 | KIF: 4c23b5d24dba24d3cb6dbb9c7d325b31e526ba4a 17 | SDWebImage: de4d90b5bff3571eae7bd16202b1f43135409fa5 18 | Smooch: 0aa7c588ac85c80c17c2d1ca7db16ffe5bea22a8 19 | 20 | PODFILE CHECKSUM: f8265f35653d23938a72b81f9e7852efd5acac3b 21 | 22 | COCOAPODS: 1.2.1 23 | -------------------------------------------------------------------------------- /Pods/SDWebImage/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2017 Olivier Poitrey rs@dailymotion.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Fabrice Aneche 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import 11 | #import "SDWebImageCompat.h" 12 | 13 | typedef NS_ENUM(NSInteger, SDImageFormat) { 14 | SDImageFormatUndefined = -1, 15 | SDImageFormatJPEG = 0, 16 | SDImageFormatPNG, 17 | SDImageFormatGIF, 18 | SDImageFormatTIFF, 19 | SDImageFormatWebP, 20 | SDImageFormatHEIC 21 | }; 22 | 23 | @interface NSData (ImageContentType) 24 | 25 | /** 26 | * Return image format 27 | * 28 | * @param data the input image data 29 | * 30 | * @return the image format as `SDImageFormat` (enum) 31 | */ 32 | + (SDImageFormat)sd_imageFormatForImageData:(nullable NSData *)data; 33 | 34 | /** 35 | Convert SDImageFormat to UTType 36 | 37 | @param format Format as SDImageFormat 38 | @return The UTType as CFStringRef 39 | */ 40 | + (nonnull CFStringRef)sd_UTTypeFromSDImageFormat:(SDImageFormat)format; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/NSImage+WebCache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | 11 | #if SD_MAC 12 | 13 | #import 14 | 15 | @interface NSImage (WebCache) 16 | 17 | - (CGImageRef)CGImage; 18 | - (NSArray *)images; 19 | - (BOOL)isGIF; 20 | 21 | @end 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/NSImage+WebCache.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "NSImage+WebCache.h" 10 | 11 | #if SD_MAC 12 | 13 | @implementation NSImage (WebCache) 14 | 15 | - (CGImageRef)CGImage { 16 | NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height); 17 | CGImageRef cgImage = [self CGImageForProposedRect:&imageRect context:NULL hints:nil]; 18 | return cgImage; 19 | } 20 | 21 | - (NSArray *)images { 22 | return nil; 23 | } 24 | 25 | - (BOOL)isGIF { 26 | BOOL isGIF = NO; 27 | for (NSImageRep *rep in self.representations) { 28 | if ([rep isKindOfClass:[NSBitmapImageRep class]]) { 29 | NSBitmapImageRep *bitmapRep = (NSBitmapImageRep *)rep; 30 | NSUInteger frameCount = [[bitmapRep valueForProperty:NSImageFrameCount] unsignedIntegerValue]; 31 | isGIF = frameCount > 1 ? YES : NO; 32 | break; 33 | } 34 | } 35 | return isGIF; 36 | } 37 | 38 | @end 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDAnimatedImageRep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | 11 | #if SD_MAC 12 | 13 | // A subclass of `NSBitmapImageRep` to fix that GIF loop count issue because `NSBitmapImageRep` will reset `NSImageCurrentFrameDuration` by using `kCGImagePropertyGIFDelayTime` but not `kCGImagePropertyGIFUnclampedDelayTime`. 14 | // Built in GIF coder use this instead of `NSBitmapImageRep` for better GIF rendering. If you do not want this, only enable `SDWebImageImageIOCoder`, which just call `NSImage` API and actually use `NSBitmapImageRep` for GIF image. 15 | 16 | @interface SDAnimatedImageRep : NSBitmapImageRep 17 | 18 | @end 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDAnimatedImageRep.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDAnimatedImageRep.h" 10 | 11 | #if SD_MAC 12 | 13 | #import "SDWebImageGIFCoder.h" 14 | 15 | @interface SDWebImageGIFCoder () 16 | 17 | - (float)sd_frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source; 18 | 19 | @end 20 | 21 | @interface SDAnimatedImageRep () 22 | 23 | @property (nonatomic, assign, readonly, nullable) CGImageSourceRef imageSource; 24 | 25 | @end 26 | 27 | @implementation SDAnimatedImageRep 28 | 29 | // `NSBitmapImageRep` will use `kCGImagePropertyGIFDelayTime` whenever you call `setProperty:withValue:` with `NSImageCurrentFrame` to change the current frame. We override it and use the actual `kCGImagePropertyGIFUnclampedDelayTime` if need. 30 | - (void)setProperty:(NSBitmapImageRepPropertyKey)property withValue:(id)value { 31 | [super setProperty:property withValue:value]; 32 | if ([property isEqualToString:NSImageCurrentFrame]) { 33 | // Access the image source 34 | CGImageSourceRef imageSource = self.imageSource; 35 | if (!imageSource) { 36 | return; 37 | } 38 | // Check format type 39 | CFStringRef type = CGImageSourceGetType(imageSource); 40 | if (!type) { 41 | return; 42 | } 43 | NSUInteger index = [value unsignedIntegerValue]; 44 | float frameDuration = 0; 45 | // Through we currently process GIF only, in the 5.x we support APNG so we keep the extensibility 46 | if (CFStringCompare(type, kUTTypeGIF, 0) == kCFCompareEqualTo) { 47 | frameDuration = [[SDWebImageGIFCoder sharedCoder] sd_frameDurationAtIndex:index source:imageSource]; 48 | } 49 | if (!frameDuration) { 50 | return; 51 | } 52 | // Reset super frame duration with the actual frame duration 53 | [super setProperty:NSImageCurrentFrameDuration withValue:@(frameDuration)]; 54 | } 55 | } 56 | 57 | - (CGImageSourceRef)imageSource { 58 | if (_tiffData) { 59 | return (__bridge CGImageSourceRef)(_tiffData); 60 | } 61 | return NULL; 62 | } 63 | 64 | @end 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDImageCacheConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageCompat.h" 11 | 12 | @interface SDImageCacheConfig : NSObject 13 | 14 | /** 15 | * Decompressing images that are downloaded and cached can improve performance but can consume lot of memory. 16 | * Defaults to YES. Set this to NO if you are experiencing a crash due to excessive memory consumption. 17 | */ 18 | @property (assign, nonatomic) BOOL shouldDecompressImages; 19 | 20 | /** 21 | * disable iCloud backup [defaults to YES] 22 | */ 23 | @property (assign, nonatomic) BOOL shouldDisableiCloud; 24 | 25 | /** 26 | * use memory cache [defaults to YES] 27 | */ 28 | @property (assign, nonatomic) BOOL shouldCacheImagesInMemory; 29 | 30 | /** 31 | * The reading options while reading cache from disk. 32 | * Defaults to 0. You can set this to `NSDataReadingMappedIfSafe` to improve performance. 33 | */ 34 | @property (assign, nonatomic) NSDataReadingOptions diskCacheReadingOptions; 35 | 36 | /** 37 | * The writing options while writing cache to disk. 38 | * Defaults to `NSDataWritingAtomic`. You can set this to `NSDataWritingWithoutOverwriting` to prevent overwriting an existing file. 39 | */ 40 | @property (assign, nonatomic) NSDataWritingOptions diskCacheWritingOptions; 41 | 42 | /** 43 | * The maximum length of time to keep an image in the cache, in seconds. 44 | */ 45 | @property (assign, nonatomic) NSInteger maxCacheAge; 46 | 47 | /** 48 | * The maximum size of the cache, in bytes. 49 | */ 50 | @property (assign, nonatomic) NSUInteger maxCacheSize; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDImageCacheConfig.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDImageCacheConfig.h" 10 | 11 | static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week 12 | 13 | @implementation SDImageCacheConfig 14 | 15 | - (instancetype)init { 16 | if (self = [super init]) { 17 | _shouldDecompressImages = YES; 18 | _shouldDisableiCloud = YES; 19 | _shouldCacheImagesInMemory = YES; 20 | _diskCacheReadingOptions = 0; 21 | _diskCacheWritingOptions = NSDataWritingAtomic; 22 | _maxCacheAge = kDefaultCacheMaxCacheAge; 23 | _maxCacheSize = 0; 24 | } 25 | return self; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageCoder.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCoder.h" 10 | 11 | NSString * const SDWebImageCoderScaleDownLargeImagesKey = @"scaleDownLargeImages"; 12 | 13 | CGColorSpaceRef SDCGColorSpaceGetDeviceRGB(void) { 14 | static CGColorSpaceRef colorSpace; 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | colorSpace = CGColorSpaceCreateDeviceRGB(); 18 | }); 19 | return colorSpace; 20 | } 21 | 22 | BOOL SDCGImageRefContainsAlpha(CGImageRef imageRef) { 23 | if (!imageRef) { 24 | return NO; 25 | } 26 | CGImageAlphaInfo alphaInfo = CGImageGetAlphaInfo(imageRef); 27 | BOOL hasAlpha = !(alphaInfo == kCGImageAlphaNone || 28 | alphaInfo == kCGImageAlphaNoneSkipFirst || 29 | alphaInfo == kCGImageAlphaNoneSkipLast); 30 | return hasAlpha; 31 | } 32 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageCoderHelper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageCompat.h" 11 | #import "SDWebImageFrame.h" 12 | 13 | @interface SDWebImageCoderHelper : NSObject 14 | 15 | /** 16 | Return an animated image with frames array. 17 | For UIKit, this will apply the patch and then create animated UIImage. The patch is because that `+[UIImage animatedImageWithImages:duration:]` just use the average of duration for each image. So it will not work if different frame has different duration. Therefore we repeat the specify frame for specify times to let it work. 18 | For AppKit, NSImage does not support animates other than GIF. This will try to encode the frames to GIF format and then create an animated NSImage for rendering. Attention the animated image may loss some detail if the input frames contain full alpha channel because GIF only supports 1 bit alpha channel. (For 1 pixel, either transparent or not) 19 | 20 | @param frames The frames array. If no frames or frames is empty, return nil 21 | @return A animated image for rendering on UIImageView(UIKit) or NSImageView(AppKit) 22 | */ 23 | + (UIImage * _Nullable)animatedImageWithFrames:(NSArray * _Nullable)frames; 24 | 25 | /** 26 | Return frames array from an animated image. 27 | For UIKit, this will unapply the patch for the description above and then create frames array. This will also work for normal animated UIImage. 28 | For AppKit, NSImage does not support animates other than GIF. This will try to decode the GIF imageRep and then create frames array. 29 | 30 | @param animatedImage A animated image. If it's not animated, return nil 31 | @return The frames array 32 | */ 33 | + (NSArray * _Nullable)framesFromAnimatedImage:(UIImage * _Nullable)animatedImage; 34 | 35 | #if SD_UIKIT || SD_WATCH 36 | /** 37 | Convert an EXIF image orientation to an iOS one. 38 | 39 | @param exifOrientation EXIF orientation 40 | @return iOS orientation 41 | */ 42 | + (UIImageOrientation)imageOrientationFromEXIFOrientation:(NSInteger)exifOrientation; 43 | /** 44 | Convert an iOS orientation to an EXIF image orientation. 45 | 46 | @param imageOrientation iOS orientation 47 | @return EXIF orientation 48 | */ 49 | + (NSInteger)exifOrientationFromImageOrientation:(UIImageOrientation)imageOrientation; 50 | #endif 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageCodersManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageCoder.h" 11 | 12 | /** 13 | Global object holding the array of coders, so that we avoid passing them from object to object. 14 | Uses a priority queue behind scenes, which means the latest added coders have the highest priority. 15 | This is done so when encoding/decoding something, we go through the list and ask each coder if they can handle the current data. 16 | That way, users can add their custom coders while preserving our existing prebuilt ones 17 | 18 | Note: the `coders` getter will return the coders in their reversed order 19 | Example: 20 | - by default we internally set coders = `IOCoder`, `WebPCoder`. (`GIFCoder` is not recommended to add only if you want to get GIF support without `FLAnimatedImage`) 21 | - calling `coders` will return `@[WebPCoder, IOCoder]` 22 | - call `[addCoder:[MyCrazyCoder new]]` 23 | - calling `coders` now returns `@[MyCrazyCoder, WebPCoder, IOCoder]` 24 | 25 | Coders 26 | ------ 27 | A coder must conform to the `SDWebImageCoder` protocol or even to `SDWebImageProgressiveCoder` if it supports progressive decoding 28 | Conformance is important because that way, they will implement `canDecodeFromData` or `canEncodeToFormat` 29 | Those methods are called on each coder in the array (using the priority order) until one of them returns YES. 30 | That means that coder can decode that data / encode to that format 31 | */ 32 | @interface SDWebImageCodersManager : NSObject 33 | 34 | /** 35 | Shared reusable instance 36 | */ 37 | + (nonnull instancetype)sharedInstance; 38 | 39 | /** 40 | All coders in coders manager. The coders array is a priority queue, which means the later added coder will have the highest priority 41 | */ 42 | @property (nonatomic, strong, readwrite, nullable) NSArray* coders; 43 | 44 | /** 45 | Add a new coder to the end of coders array. Which has the highest priority. 46 | 47 | @param coder coder 48 | */ 49 | - (void)addCoder:(nonnull id)coder; 50 | 51 | /** 52 | Remove a coder in the coders array. 53 | 54 | @param coder coder 55 | */ 56 | - (void)removeCoder:(nonnull id)coder; 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Jamie Pinkham 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import 11 | 12 | #ifdef __OBJC_GC__ 13 | #error SDWebImage does not support Objective-C Garbage Collection 14 | #endif 15 | 16 | // Apple's defines from TargetConditionals.h are a bit weird. 17 | // Seems like TARGET_OS_MAC is always defined (on all platforms). 18 | // To determine if we are running on OSX, we can only rely on TARGET_OS_IPHONE=0 and all the other platforms 19 | #if !TARGET_OS_IPHONE && !TARGET_OS_IOS && !TARGET_OS_TV && !TARGET_OS_WATCH 20 | #define SD_MAC 1 21 | #else 22 | #define SD_MAC 0 23 | #endif 24 | 25 | // iOS and tvOS are very similar, UIKit exists on both platforms 26 | // Note: watchOS also has UIKit, but it's very limited 27 | #if TARGET_OS_IOS || TARGET_OS_TV 28 | #define SD_UIKIT 1 29 | #else 30 | #define SD_UIKIT 0 31 | #endif 32 | 33 | #if TARGET_OS_IOS 34 | #define SD_IOS 1 35 | #else 36 | #define SD_IOS 0 37 | #endif 38 | 39 | #if TARGET_OS_TV 40 | #define SD_TV 1 41 | #else 42 | #define SD_TV 0 43 | #endif 44 | 45 | #if TARGET_OS_WATCH 46 | #define SD_WATCH 1 47 | #else 48 | #define SD_WATCH 0 49 | #endif 50 | 51 | 52 | #if SD_MAC 53 | #import 54 | #ifndef UIImage 55 | #define UIImage NSImage 56 | #endif 57 | #ifndef UIImageView 58 | #define UIImageView NSImageView 59 | #endif 60 | #ifndef UIView 61 | #define UIView NSView 62 | #endif 63 | #else 64 | #if __IPHONE_OS_VERSION_MIN_REQUIRED != 20000 && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0 65 | #error SDWebImage doesn't support Deployment Target version < 5.0 66 | #endif 67 | 68 | #if SD_UIKIT 69 | #import 70 | #endif 71 | #if SD_WATCH 72 | #import 73 | #endif 74 | #endif 75 | 76 | #ifndef NS_ENUM 77 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type 78 | #endif 79 | 80 | #ifndef NS_OPTIONS 81 | #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type 82 | #endif 83 | 84 | FOUNDATION_EXPORT UIImage *SDScaledImageForKey(NSString *key, UIImage *image); 85 | 86 | typedef void(^SDWebImageNoParamsBlock)(void); 87 | 88 | FOUNDATION_EXPORT NSString *const SDWebImageErrorDomain; 89 | 90 | #ifndef dispatch_queue_async_safe 91 | #define dispatch_queue_async_safe(queue, block)\ 92 | if (strcmp(dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL), dispatch_queue_get_label(queue)) == 0) {\ 93 | block();\ 94 | } else {\ 95 | dispatch_async(queue, block);\ 96 | } 97 | #endif 98 | 99 | #ifndef dispatch_main_async_safe 100 | #define dispatch_main_async_safe(block) dispatch_queue_async_safe(dispatch_get_main_queue(), block) 101 | #endif 102 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageCompat.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | #import "UIImage+MultiFormat.h" 11 | 12 | #if !__has_feature(objc_arc) 13 | #error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag 14 | #endif 15 | 16 | #if !OS_OBJECT_USE_OBJC 17 | #error SDWebImage need ARC for dispatch object 18 | #endif 19 | 20 | inline UIImage *SDScaledImageForKey(NSString * _Nullable key, UIImage * _Nullable image) { 21 | if (!image) { 22 | return nil; 23 | } 24 | 25 | #if SD_MAC 26 | return image; 27 | #elif SD_UIKIT || SD_WATCH 28 | if ((image.images).count > 0) { 29 | NSMutableArray *scaledImages = [NSMutableArray array]; 30 | 31 | for (UIImage *tempImage in image.images) { 32 | [scaledImages addObject:SDScaledImageForKey(key, tempImage)]; 33 | } 34 | 35 | UIImage *animatedImage = [UIImage animatedImageWithImages:scaledImages duration:image.duration]; 36 | if (animatedImage) { 37 | animatedImage.sd_imageLoopCount = image.sd_imageLoopCount; 38 | } 39 | return animatedImage; 40 | } else { 41 | #if SD_WATCH 42 | if ([[WKInterfaceDevice currentDevice] respondsToSelector:@selector(screenScale)]) { 43 | #elif SD_UIKIT 44 | if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { 45 | #endif 46 | CGFloat scale = 1; 47 | if (key.length >= 8) { 48 | NSRange range = [key rangeOfString:@"@2x."]; 49 | if (range.location != NSNotFound) { 50 | scale = 2.0; 51 | } 52 | 53 | range = [key rangeOfString:@"@3x."]; 54 | if (range.location != NSNotFound) { 55 | scale = 3.0; 56 | } 57 | } 58 | 59 | UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation]; 60 | image = scaledImage; 61 | } 62 | return image; 63 | } 64 | #endif 65 | } 66 | 67 | NSString *const SDWebImageErrorDomain = @"SDWebImageErrorDomain"; 68 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageFrame.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageCompat.h" 11 | 12 | @interface SDWebImageFrame : NSObject 13 | 14 | // This class is used for creating animated images via `animatedImageWithFrames` in `SDWebImageCoderHelper`. Attention if you need to specify animated images loop count, use `sd_imageLoopCount` property in `UIImage+MultiFormat`. 15 | 16 | /** 17 | The image of current frame. You should not set an animated image. 18 | */ 19 | @property (nonatomic, strong, readonly, nonnull) UIImage *image; 20 | /** 21 | The duration of current frame to be displayed. The number is seconds but not milliseconds. You should not set this to zero. 22 | */ 23 | @property (nonatomic, readonly, assign) NSTimeInterval duration; 24 | 25 | /** 26 | Create a frame instance with specify image and duration 27 | 28 | @param image current frame's image 29 | @param duration current frame's duration 30 | @return frame instance 31 | */ 32 | + (instancetype _Nonnull)frameWithImage:(UIImage * _Nonnull)image duration:(NSTimeInterval)duration; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageFrame.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageFrame.h" 10 | 11 | @interface SDWebImageFrame () 12 | 13 | @property (nonatomic, strong, readwrite, nonnull) UIImage *image; 14 | @property (nonatomic, readwrite, assign) NSTimeInterval duration; 15 | 16 | @end 17 | 18 | @implementation SDWebImageFrame 19 | 20 | + (instancetype)frameWithImage:(UIImage *)image duration:(NSTimeInterval)duration { 21 | SDWebImageFrame *frame = [[SDWebImageFrame alloc] init]; 22 | frame.image = image; 23 | frame.duration = duration; 24 | 25 | return frame; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageGIFCoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageCoder.h" 11 | 12 | /** 13 | Built in coder using ImageIO that supports GIF encoding/decoding 14 | @note `SDWebImageIOCoder` supports GIF but only as static (will use the 1st frame). 15 | @note Use `SDWebImageGIFCoder` for fully animated GIFs - less performant than `FLAnimatedImage` 16 | @note If you decide to make all `UIImageView`(including `FLAnimatedImageView`) instance support GIF. You should add this coder to `SDWebImageCodersManager` and make sure that it has a higher priority than `SDWebImageIOCoder` 17 | @note The recommended approach for animated GIFs is using `FLAnimatedImage`. It's more performant than `UIImageView` for GIF displaying 18 | */ 19 | @interface SDWebImageGIFCoder : NSObject 20 | 21 | + (nonnull instancetype)sharedCoder; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageImageIOCoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageCoder.h" 11 | 12 | /** 13 | Built in coder that supports PNG, JPEG, TIFF, includes support for progressive decoding. 14 | 15 | GIF 16 | Also supports static GIF (meaning will only handle the 1st frame). 17 | For a full GIF support, we recommend `FLAnimatedImage` or our less performant `SDWebImageGIFCoder` 18 | 19 | HEIC 20 | This coder also supports HEIC format because ImageIO supports it natively. But it depends on the system capabilities, so it won't work on all devices, see: https://devstreaming-cdn.apple.com/videos/wwdc/2017/511tj33587vdhds/511/511_working_with_heif_and_hevc.pdf 21 | Decode(Software): !Simulator && (iOS 11 || tvOS 11 || macOS 10.13) 22 | Decode(Hardware): !Simulator && ((iOS 11 && A9Chip) || (macOS 10.13 && 6thGenerationIntelCPU)) 23 | Encode(Software): macOS 10.13 24 | Encode(Hardware): !Simulator && ((iOS 11 && A10FusionChip) || (macOS 10.13 && 6thGenerationIntelCPU)) 25 | */ 26 | @interface SDWebImageImageIOCoder : NSObject 27 | 28 | + (nonnull instancetype)sharedCoder; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | 11 | @protocol SDWebImageOperation 12 | 13 | - (void)cancel; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIImage+ForceDecode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | 11 | @interface UIImage (ForceDecode) 12 | 13 | + (nullable UIImage *)decodedImageWithImage:(nullable UIImage *)image; 14 | 15 | + (nullable UIImage *)decodedAndScaledDownImageWithImage:(nullable UIImage *)image; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIImage+ForceDecode.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "UIImage+ForceDecode.h" 10 | #import "SDWebImageCodersManager.h" 11 | 12 | @implementation UIImage (ForceDecode) 13 | 14 | + (UIImage *)decodedImageWithImage:(UIImage *)image { 15 | if (!image) { 16 | return nil; 17 | } 18 | NSData *tempData; 19 | return [[SDWebImageCodersManager sharedInstance] decompressedImageWithImage:image data:&tempData options:@{SDWebImageCoderScaleDownLargeImagesKey: @(NO)}]; 20 | } 21 | 22 | + (UIImage *)decodedAndScaledDownImageWithImage:(UIImage *)image { 23 | if (!image) { 24 | return nil; 25 | } 26 | NSData *tempData; 27 | return [[SDWebImageCodersManager sharedInstance] decompressedImageWithImage:image data:&tempData options:@{SDWebImageCoderScaleDownLargeImagesKey: @(YES)}]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Laurin Brandner 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import "SDWebImageCompat.h" 11 | 12 | @interface UIImage (GIF) 13 | 14 | /** 15 | * Creates an animated UIImage from an NSData. 16 | * For static GIF, will create an UIImage with `images` array set to nil. For animated GIF, will create an UIImage with valid `images` array. 17 | */ 18 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data; 19 | 20 | /** 21 | * Checks if an UIImage instance is a GIF. Will use the `images` array. 22 | */ 23 | - (BOOL)isGIF; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIImage+GIF.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Laurin Brandner 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import "UIImage+GIF.h" 11 | #import "SDWebImageGIFCoder.h" 12 | #import "NSImage+WebCache.h" 13 | 14 | @implementation UIImage (GIF) 15 | 16 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data { 17 | if (!data) { 18 | return nil; 19 | } 20 | return [[SDWebImageGIFCoder sharedCoder] decodedImageWithData:data]; 21 | } 22 | 23 | - (BOOL)isGIF { 24 | return (self.images != nil); 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | #import "NSData+ImageContentType.h" 11 | 12 | @interface UIImage (MultiFormat) 13 | 14 | /** 15 | * UIKit: 16 | * For static image format, this value is always 0. 17 | * For animated image format, 0 means infinite looping. 18 | * Note that because of the limitations of categories this property can get out of sync if you create another instance with CGImage or other methods. 19 | * AppKit: 20 | * NSImage currently only support animated via GIF imageRep unlike UIImage. 21 | * The getter of this property will get the loop count from GIF imageRep 22 | * The setter of this property will set the loop count from GIF imageRep 23 | */ 24 | @property (nonatomic, assign) NSUInteger sd_imageLoopCount; 25 | 26 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data; 27 | - (nullable NSData *)sd_imageData; 28 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "UIImage+MultiFormat.h" 10 | 11 | #import "objc/runtime.h" 12 | #import "SDWebImageCodersManager.h" 13 | 14 | @implementation UIImage (MultiFormat) 15 | 16 | #if SD_MAC 17 | - (NSUInteger)sd_imageLoopCount { 18 | NSUInteger imageLoopCount = 0; 19 | for (NSImageRep *rep in self.representations) { 20 | if ([rep isKindOfClass:[NSBitmapImageRep class]]) { 21 | NSBitmapImageRep *bitmapRep = (NSBitmapImageRep *)rep; 22 | imageLoopCount = [[bitmapRep valueForProperty:NSImageLoopCount] unsignedIntegerValue]; 23 | break; 24 | } 25 | } 26 | return imageLoopCount; 27 | } 28 | 29 | - (void)setSd_imageLoopCount:(NSUInteger)sd_imageLoopCount { 30 | for (NSImageRep *rep in self.representations) { 31 | if ([rep isKindOfClass:[NSBitmapImageRep class]]) { 32 | NSBitmapImageRep *bitmapRep = (NSBitmapImageRep *)rep; 33 | [bitmapRep setProperty:NSImageLoopCount withValue:@(sd_imageLoopCount)]; 34 | break; 35 | } 36 | } 37 | } 38 | 39 | #else 40 | 41 | - (NSUInteger)sd_imageLoopCount { 42 | NSUInteger imageLoopCount = 0; 43 | NSNumber *value = objc_getAssociatedObject(self, @selector(sd_imageLoopCount)); 44 | if ([value isKindOfClass:[NSNumber class]]) { 45 | imageLoopCount = value.unsignedIntegerValue; 46 | } 47 | return imageLoopCount; 48 | } 49 | 50 | - (void)setSd_imageLoopCount:(NSUInteger)sd_imageLoopCount { 51 | NSNumber *value = @(sd_imageLoopCount); 52 | objc_setAssociatedObject(self, @selector(sd_imageLoopCount), value, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 53 | } 54 | #endif 55 | 56 | + (nullable UIImage *)sd_imageWithData:(nullable NSData *)data { 57 | return [[SDWebImageCodersManager sharedInstance] decodedImageWithData:data]; 58 | } 59 | 60 | - (nullable NSData *)sd_imageData { 61 | return [self sd_imageDataAsFormat:SDImageFormatUndefined]; 62 | } 63 | 64 | - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat { 65 | NSData *imageData = nil; 66 | if (self) { 67 | imageData = [[SDWebImageCodersManager sharedInstance] encodedDataWithImage:self format:imageFormat]; 68 | } 69 | return imageData; 70 | } 71 | 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "UIImageView+HighlightedWebCache.h" 10 | 11 | #if SD_UIKIT 12 | 13 | #import "UIView+WebCacheOperation.h" 14 | #import "UIView+WebCache.h" 15 | 16 | @implementation UIImageView (HighlightedWebCache) 17 | 18 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url { 19 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil]; 20 | } 21 | 22 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options { 23 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; 24 | } 25 | 26 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock { 27 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock]; 28 | } 29 | 30 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options completed:(nullable SDExternalCompletionBlock)completedBlock { 31 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock]; 32 | } 33 | 34 | - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url 35 | options:(SDWebImageOptions)options 36 | progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock 37 | completed:(nullable SDExternalCompletionBlock)completedBlock { 38 | __weak typeof(self)weakSelf = self; 39 | [self sd_internalSetImageWithURL:url 40 | placeholderImage:nil 41 | options:options 42 | operationKey:@"UIImageViewImageOperationHighlighted" 43 | setImageBlock:^(UIImage *image, NSData *imageData) { 44 | weakSelf.highlightedImage = image; 45 | } 46 | progress:progressBlock 47 | completed:completedBlock]; 48 | } 49 | 50 | @end 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "SDWebImageCompat.h" 10 | 11 | #if SD_UIKIT || SD_MAC 12 | 13 | #import "SDWebImageManager.h" 14 | 15 | // These methods are used to support canceling for UIView image loading, it's designed to be used internal but not external. 16 | // All the stored operations are weak, so it will be dalloced after image loading finished. If you need to store operations, use your own class to keep a strong reference for them. 17 | @interface UIView (WebCacheOperation) 18 | 19 | /** 20 | * Set the image load operation (storage in a UIView based weak map table) 21 | * 22 | * @param operation the operation 23 | * @param key key for storing the operation 24 | */ 25 | - (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key; 26 | 27 | /** 28 | * Cancel all operations for the current UIView and key 29 | * 30 | * @param key key for identifying the operations 31 | */ 32 | - (void)sd_cancelImageLoadOperationWithKey:(nullable NSString *)key; 33 | 34 | /** 35 | * Just remove the operations corresponding to the current UIView and key without cancelling them 36 | * 37 | * @param key key for identifying the operations 38 | */ 39 | - (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key; 40 | 41 | @end 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "UIView+WebCacheOperation.h" 10 | 11 | #if SD_UIKIT || SD_MAC 12 | 13 | #import "objc/runtime.h" 14 | 15 | static char loadOperationKey; 16 | 17 | // key is copy, value is weak because operation instance is retained by SDWebImageManager's runningOperations property 18 | // we should use lock to keep thread-safe because these method may not be acessed from main queue 19 | typedef NSMapTable> SDOperationsDictionary; 20 | 21 | @implementation UIView (WebCacheOperation) 22 | 23 | - (SDOperationsDictionary *)sd_operationDictionary { 24 | @synchronized(self) { 25 | SDOperationsDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey); 26 | if (operations) { 27 | return operations; 28 | } 29 | operations = [[NSMapTable alloc] initWithKeyOptions:NSPointerFunctionsStrongMemory valueOptions:NSPointerFunctionsWeakMemory capacity:0]; 30 | objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 31 | return operations; 32 | } 33 | } 34 | 35 | - (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key { 36 | if (key) { 37 | [self sd_cancelImageLoadOperationWithKey:key]; 38 | if (operation) { 39 | SDOperationsDictionary *operationDictionary = [self sd_operationDictionary]; 40 | @synchronized (self) { 41 | [operationDictionary setObject:operation forKey:key]; 42 | } 43 | } 44 | } 45 | } 46 | 47 | - (void)sd_cancelImageLoadOperationWithKey:(nullable NSString *)key { 48 | // Cancel in progress downloader from queue 49 | SDOperationsDictionary *operationDictionary = [self sd_operationDictionary]; 50 | id operation; 51 | @synchronized (self) { 52 | operation = [operationDictionary objectForKey:key]; 53 | } 54 | if (operation) { 55 | if ([operation conformsToProtocol:@protocol(SDWebImageOperation)]){ 56 | [operation cancel]; 57 | } 58 | @synchronized (self) { 59 | [operationDictionary removeObjectForKey:key]; 60 | } 61 | } 62 | } 63 | 64 | - (void)sd_removeImageLoadOperationWithKey:(nullable NSString *)key { 65 | if (key) { 66 | SDOperationsDictionary *operationDictionary = [self sd_operationDictionary]; 67 | @synchronized (self) { 68 | [operationDictionary removeObjectForKey:key]; 69 | } 70 | } 71 | } 72 | 73 | @end 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/Headers/SKTConversationActivity.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTConversationActivity.h 3 | // Smooch 4 | // 5 | 6 | #import 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | /** 11 | * @abstract An activity type indicating that the appMaker started typing a response 12 | */ 13 | extern NSString const *SKTConversationActivityTypeTypingStart; 14 | 15 | /** 16 | * @abstract An activity type indicating that the appMaker stopped typing a response 17 | */ 18 | extern NSString const *SKTConversationActivityTypeTypingStop; 19 | 20 | /** 21 | * @abstract An activity type indicating that the appMaker recently read the user message 22 | */ 23 | extern NSString const *SKTConversationActivityTypeConversationRead; 24 | 25 | /** 26 | * @abstract A key whose value is an NSString representing the appMaker name. 27 | * 28 | * @discussion This key is used in the SKTConversationActivity data object. 29 | */ 30 | extern NSString const *SKTConversationActivityDataNameKey; 31 | 32 | /** 33 | * @abstract A key whose value is an NSString representing the URL of the appMaker avatar. 34 | * 35 | * @discussion This key is used in the SKTConversationActivity data object. 36 | */ 37 | extern NSString const *SKTConversationActivityDataAvatarUrlKey; 38 | 39 | @interface SKTConversationActivity : NSObject 40 | 41 | /** 42 | * @abstract the role of who is performing the typing activity 43 | */ 44 | @property(readonly) NSString *role; 45 | 46 | /** 47 | * @abstract the type of activity that is being triggered. Could be either SKTConversationActivityTypeTypingStart, SKTConversationActivityTypeTypingStop or SKTConversationActivityTypeConversationRead 48 | */ 49 | @property(readonly) NSString *type; 50 | 51 | /** 52 | * @abstract additional data for this activity. Posible values are the appMaker's 'name' and/or 'avatarUrl' 53 | */ 54 | @property(readonly, nullable) NSDictionary *data; 55 | 56 | /** 57 | * @abstract date when the appMaker last read user messages for activities of type SKTConversationActivityTypeConversationRead 58 | */ 59 | @property(readonly, nullable) NSDate *appMakerLastRead; 60 | 61 | @end 62 | NS_ASSUME_NONNULL_END 63 | -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/Headers/SKTCoordinates.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTCoordinates.h 3 | // Smooch 4 | // 5 | 6 | #import 7 | 8 | @interface SKTCoordinates : NSObject 9 | 10 | /** 11 | * The latitude in degrees. May be nil 12 | */ 13 | @property (nullable) NSNumber *latitude; 14 | 15 | /** 16 | * The longitude in degrees. May be nil 17 | */ 18 | @property (nullable) NSNumber *longitude; 19 | 20 | /** 21 | * @abstract Creates coordinates with the given latitude and longitude 22 | */ 23 | -(nonnull instancetype)initWithLatitude:(double)latitude longitude:(double)longitude; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/Headers/SKTDisplaySettings.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTDisplaySettings.h 3 | // Smooch 4 | // 5 | 6 | #import 7 | 8 | /** 9 | * @abstract horizontal image aspect ratio 10 | */ 11 | extern NSString* _Nonnull const SKTImageAspectRatioHorizontal; 12 | 13 | /** 14 | * @abstract squared image aspect ratio 15 | */ 16 | extern NSString* _Nonnull const SKTImageAspectRatioSquare; 17 | 18 | /** 19 | * @abstract Settings to adjust a carousel layout 20 | */ 21 | @interface SKTDisplaySettings : NSObject 22 | 23 | /* 24 | * @abstract Specifies how to display all carousel images 25 | * 26 | * @discussion Valid values are horizontal and square. May be nil 27 | */ 28 | @property (nullable, copy) NSString *imageAspectRatio; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/Headers/SKTMessageItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTMessageItem.h 3 | // Smooch 4 | // 5 | 6 | #import 7 | 8 | @interface SKTMessageItem : NSObject 9 | 10 | /** 11 | * @abstract The title of the item 12 | */ 13 | @property(copy, nullable) NSString *title; 14 | 15 | /** 16 | * @abstract Array of `SKTMessageAction` buttons 17 | * 18 | * @see SKTMessageAction 19 | */ 20 | @property(nullable) NSArray *actions; 21 | 22 | /** 23 | * @abstract The text description, or subtitle 24 | */ 25 | @property(copy, nullable) NSString *itemDescription; 26 | 27 | /** 28 | * @abstract The image URL to be shown in the item 29 | */ 30 | @property(copy, nullable) NSString *mediaUrl; 31 | 32 | /** 33 | * @abstract The mediaType of the `mediaUrl` 34 | */ 35 | @property(copy, nullable) NSString *mediaType; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/Headers/SKTUser.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKTUser.h 3 | // Smooch 4 | // 5 | 6 | #import 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | @interface SKTUser : NSObject 10 | 11 | /** 12 | * @abstract The object representing the current user. 13 | * 14 | * @discussion Returns nil if +initWithSettings:completionHandler: has not been called yet. 15 | * 16 | * @see Smooch 17 | */ 18 | +(nullable instancetype)currentUser; 19 | 20 | /** 21 | * @abstract Adds custom properties to the user. This info is used to provide more context around who a user is. 22 | * 23 | * @discussion Keys must be of type NSString, and values must be of type NSString, NSNumber, or NSDate; any other type will be converted to NSString using the -description method. 24 | * 25 | * Example: 26 | * 27 | * `[user addProperties:@{ @"nickname" : @"Lil' Big Daddy Slim", @"weight" : @650, @"premiumUser" : @YES }];` 28 | * 29 | * Changes to user properties are uploaded in batches at regular intervals, when the app is sent to the background, or when a message is sent. 30 | * 31 | * This API is additive, and subsequent calls will override values for the provided keys. 32 | * 33 | * @param properties The properties to set for the current user. 34 | */ 35 | -(void)addProperties:(NSDictionary*)properties; 36 | 37 | /** 38 | * @abstract The assigned appUserId for this user. 39 | * 40 | * @discussion Unlike `userId`, this property is set automatically by Smooch, and is not configurable. This is analogous to `appUser._id` in the REST API response. A user is assigned an `appUserId` once they start a conversation or when an existing user is logged in by calling +login:jwt:completionHandler:. 41 | * 42 | * @see Smooch 43 | */ 44 | @property(readonly, nullable) NSString* appUserId; 45 | 46 | /** 47 | * @abstract The assigned userId for this user. 48 | * 49 | * @discussion This property is set by calling +login:jwt:completionHandler:. 50 | * 51 | * Unlike `appUserId`, this value is assigned and managed by the developer, and is used to identify a user across devices and app installations. 52 | * 53 | * @see SKTSettings 54 | * @see Smooch 55 | */ 56 | @property(readonly, nullable) NSString* userId; 57 | 58 | /** 59 | * @abstract The user's first name, to be used as part of the display name when sending messages. 60 | */ 61 | @property(copy, nullable) NSString* firstName; 62 | 63 | /** 64 | * @abstract The user's custom properties. 65 | */ 66 | @property(copy, readonly) NSDictionary *properties; 67 | 68 | /** 69 | * @abstract The user's last name, to be used as part of the display name when sending messages. 70 | */ 71 | @property(copy, nullable) NSString* lastName; 72 | 73 | /** 74 | * @abstract The user's email, to be used to display a gravatar. 75 | */ 76 | @property(copy, nullable) NSString* email; 77 | 78 | /** 79 | * @abstract The date the user started using your service. 80 | */ 81 | @property(copy, nullable) NSDate* signedUpAt; 82 | 83 | @end 84 | NS_ASSUME_NONNULL_END 85 | -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/Info.plist -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Smooch { 2 | umbrella header "Smooch.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/Smooch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/Smooch -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/ar.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/ar.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/backArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/backArrow.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/backArrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/backArrow@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/backArrow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/backArrow@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/de.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/de.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/defaultAvatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/defaultAvatar.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/defaultAvatar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/defaultAvatar@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/defaultAvatar@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/defaultAvatar@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/en.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/en.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/es.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/es.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/fa.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/fa.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/fi.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/fi.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/fr.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/fr.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/ios7-icon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/ios7-icon.ttf -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/it.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/it.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/ja.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/ja.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/ko.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/ko.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/locationIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/locationIcon.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/locationIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/locationIcon@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/locationIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/locationIcon@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/mediaButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/mediaButton.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/mediaButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/mediaButton@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/mediaButton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/mediaButton@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/nl.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/nl.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/paperClip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/paperClip.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/paperClip@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/paperClip@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/paperClip@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/paperClip@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/pt-BR.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/pt-BR.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/pt.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/pt.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/ru.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/ru.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/sl.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/sl.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_amex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_amex.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_amex@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_amex@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_amex@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_amex@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_cvc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_cvc.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_cvc@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_cvc@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_cvc@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_cvc@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_cvc_amex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_cvc_amex.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_cvc_amex@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_cvc_amex@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_cvc_amex@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_cvc_amex@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_diners.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_diners.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_diners@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_diners@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_diners@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_diners@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_discover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_discover.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_discover@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_discover@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_discover@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_discover@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_jcb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_jcb.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_jcb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_jcb@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_jcb@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_jcb@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_mastercard.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_mastercard@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_mastercard@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_mastercard@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_mastercard@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_placeholder.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_placeholder@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_placeholder@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_placeholder@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_placeholder@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_placeholder_template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_placeholder_template.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_placeholder_template@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_placeholder_template@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_placeholder_template@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_placeholder_template@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_visa.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_visa@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_visa@2x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/stp_card_visa@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/stp_card_visa@3x.png -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/sv.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/sv.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/uk.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/uk.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/zh-Hans.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/zh-Hans.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/Smooch.framework/zh-Hant.lproj/SmoochLocalizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Pods/Smooch/Smooch.framework/zh-Hant.lproj/SmoochLocalizable.strings -------------------------------------------------------------------------------- /Pods/Smooch/readme.md: -------------------------------------------------------------------------------- 1 | # [Smooch](http://www.smooch.io) 2 | 3 | [![Pod Version](http://img.shields.io/cocoapods/v/Smooch.svg)](http://cocoadocs.org/docsets/Smooch/) 4 | [![Platform](http://img.shields.io/cocoapods/p/Smooch.svg)](http://cocoadocs.org/docsets/Smooch/) 5 | [![License](http://img.shields.io/cocoapods/l/Smooch.svg)](http://smooch.io/terms.html) 6 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | 8 | Smooch is the best way to have personal, rich conversations with people on your website or customers on any device. Our features, integrations and developer-friendly APIs empower companies to connect with their customers in a whole new way. 9 | 10 | The Smooch iOS SDK will add [in-app messaging](https://smooch.io/in-app-messaging/) to your iOS app. Customers will be able to talk to you from your app, while you manage conversations using your favorite business apps. 11 | 12 | - Maximize development productivity with a single codebase across platforms and [add more channels](https://smooch.io/cross-channel-messaging/) anytime. 13 | - Build better relationships with messaging that feels and looks native to your app. 14 | - Delight your customers with the most engaging conversational experience using [rich messaging](https://smooch.io/rich-messaging/). 15 | - Sync conversations across every device and channel your customers use. 16 | - Bring every conversation into your existing business apps. No new tool to learn. [See all integrations](https://smooch.io/integrations/). 17 | 18 | Sign up and get an app id: [https://app.smooch.io/signup](https://app.smooch.io/signup). 19 | 20 | CocoaPods: 21 | 22 | pod 'Smooch' 23 | pod update 24 | 25 | Carthage: 26 | 27 | github "smooch/smooch-ios" 28 | carthage update 29 | 30 | Obj-C: 31 | 32 | ```objc 33 | [Smooch initWithSettings:[SKTSettings settingsWithAppId:@"YOUR_APP_ID"] completionHandler:^(NSError * _Nullable error, NSDictionary * _Nullable userInfo) { 34 | // Your code after init is complete 35 | }]; 36 | [Smooch show]; 37 | ``` 38 | 39 | Swift: 40 | 41 | ```Swift 42 | Smooch.initWith(SKTSettings(appId: "YOUR_APP_ID")) { (error: Error?, userInfo: [AnyHashable : Any]?) in 43 | // Your code after init is complete 44 | } 45 | Smooch.show() 46 | ``` 47 | 48 | Our [Docs and full install guide](http://docs.smooch.io). 49 | 50 | Also, check out [Smooch Help Kit](https://github.com/smooch/smooch-helpkit-ios) for even more features! 51 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.7.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_KIF : NSObject 3 | @end 4 | @implementation PodsDummy_KIF 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import 14 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "IOHIDEvent+KIF.h" 14 | #import "KIF.h" 15 | #import "KIFAccessibilityEnabler.h" 16 | #import "KIFSystemTestActor.h" 17 | #import "KIFTestActor.h" 18 | #import "KIFTestActor_Private.h" 19 | #import "KIFTestCase.h" 20 | #import "KIFTestStepValidation.h" 21 | #import "KIFTextInputTraitsOverrides.h" 22 | #import "KIFTypist.h" 23 | #import "KIFUIObject.h" 24 | #import "KIFUITestActor-ConditionalTests.h" 25 | #import "KIFUITestActor.h" 26 | #import "KIFUITestActor_Private.h" 27 | #import "KIFUIViewTestActor.h" 28 | #import "UIAutomationHelper.h" 29 | #import "CAAnimation+KIFAdditions.h" 30 | #import "CALayer-KIFAdditions.h" 31 | #import "CGGeometry-KIFAdditions.h" 32 | #import "NSBundle-KIFAdditions.h" 33 | #import "NSError-KIFAdditions.h" 34 | #import "NSException-KIFAdditions.h" 35 | #import "NSFileManager-KIFAdditions.h" 36 | #import "NSPredicate+KIFAdditions.h" 37 | #import "NSString+KIFAdditions.h" 38 | #import "UIAccessibilityElement-KIFAdditions.h" 39 | #import "UIApplication-KIFAdditions.h" 40 | #import "UIEvent+KIFAdditions.h" 41 | #import "UIScreen+KIFAdditions.h" 42 | #import "UIScrollView-KIFAdditions.h" 43 | #import "UITableView-KIFAdditions.h" 44 | #import "UITouch-KIFAdditions.h" 45 | #import "UIView-KIFAdditions.h" 46 | #import "UIWindow-KIFAdditions.h" 47 | #import "XCTestCase-KIFAdditions.h" 48 | #import "UIView-Debugging.h" 49 | 50 | FOUNDATION_EXPORT double KIFVersionNumber; 51 | FOUNDATION_EXPORT const unsigned char KIFVersionString[]; 52 | 53 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF.modulemap: -------------------------------------------------------------------------------- 1 | framework module KIF { 2 | umbrella header "KIF-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/KIF 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Smooch" 6 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "IOKit" -framework "QuartzCore" -framework "XCTest" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/KIF 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKit/Pods-ReceptionKit-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SDWebImage 5 | 6 | Copyright (c) 2009-2017 Olivier Poitrey rs@dailymotion.com 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is furnished 13 | to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | 28 | ## Smooch 29 | 30 | Smooch Technologies Inc. All rights reserved. 31 | Generated by CocoaPods - https://cocoapods.org 32 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKit/Pods-ReceptionKit-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2009-2017 Olivier Poitrey rs@dailymotion.com 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is furnished 24 | to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in all 27 | copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | 38 | License 39 | MIT 40 | Title 41 | SDWebImage 42 | Type 43 | PSGroupSpecifier 44 | 45 | 46 | FooterText 47 | Smooch Technologies Inc. All rights reserved. 48 | License 49 | Commercial 50 | Title 51 | Smooch 52 | Type 53 | PSGroupSpecifier 54 | 55 | 56 | FooterText 57 | Generated by CocoaPods - https://cocoapods.org 58 | Title 59 | 60 | Type 61 | PSGroupSpecifier 62 | 63 | 64 | StringsTable 65 | Acknowledgements 66 | Title 67 | Acknowledgements 68 | 69 | 70 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKit/Pods-ReceptionKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ReceptionKit : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ReceptionKit 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKit/Pods-ReceptionKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ReceptionKitVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ReceptionKitVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKit/Pods-ReceptionKit.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PODS_ROOT)/Smooch "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage" "${PODS_ROOT}/Smooch" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Smooch" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage/SDWebImage.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Smooch" 6 | OTHER_LDFLAGS = $(inherited) -l"icucore" -framework "AVFoundation" -framework "AssetsLibrary" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Smooch" -framework "SystemConfiguration" -framework "UIKit" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKit/Pods-ReceptionKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ReceptionKit { 2 | umbrella header "Pods-ReceptionKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKit/Pods-ReceptionKit.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PODS_ROOT)/Smooch "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage" "${PODS_ROOT}/Smooch" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Smooch" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SDWebImage/SDWebImage.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Smooch" 6 | OTHER_LDFLAGS = $(inherited) -l"icucore" -framework "AVFoundation" -framework "AssetsLibrary" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "Photos" -framework "QuartzCore" -framework "SDWebImage" -framework "Smooch" -framework "SystemConfiguration" -framework "UIKit" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKitTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKitTests/Pods-ReceptionKitTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Smooch 5 | 6 | Smooch Technologies Inc. All rights reserved. 7 | 8 | ## KIF 9 | 10 | KIF 11 | Copyright 2011-2016 Square, Inc. 12 | A full list of contributors is available at https://github.com/square/KIF/contributors 13 | 14 | Licensed under the Apache License, Version 2.0 (the "License"); 15 | you may not use this file except in compliance with the License. 16 | You may obtain a copy of the License at 17 | 18 | http://www.apache.org/licenses/LICENSE-2.0 19 | 20 | Unless required by applicable law or agreed to in writing, software 21 | distributed under the License is distributed on an "AS IS" BASIS, 22 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | See the License for the specific language governing permissions and 24 | limitations under the License. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKitTests/Pods-ReceptionKitTests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Smooch Technologies Inc. All rights reserved. 18 | License 19 | Commercial 20 | Title 21 | Smooch 22 | Type 23 | PSGroupSpecifier 24 | 25 | 26 | FooterText 27 | KIF 28 | Copyright 2011-2016 Square, Inc. 29 | A full list of contributors is available at https://github.com/square/KIF/contributors 30 | 31 | Licensed under the Apache License, Version 2.0 (the "License"); 32 | you may not use this file except in compliance with the License. 33 | You may obtain a copy of the License at 34 | 35 | http://www.apache.org/licenses/LICENSE-2.0 36 | 37 | Unless required by applicable law or agreed to in writing, software 38 | distributed under the License is distributed on an "AS IS" BASIS, 39 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 40 | See the License for the specific language governing permissions and 41 | limitations under the License. 42 | 43 | License 44 | Apache 2.0 45 | Title 46 | KIF 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | FooterText 52 | Generated by CocoaPods - https://cocoapods.org 53 | Title 54 | 55 | Type 56 | PSGroupSpecifier 57 | 58 | 59 | StringsTable 60 | Acknowledgements 61 | Title 62 | Acknowledgements 63 | 64 | 65 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKitTests/Pods-ReceptionKitTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ReceptionKitTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ReceptionKitTests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKitTests/Pods-ReceptionKitTests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ReceptionKitTestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ReceptionKitTestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKitTests/Pods-ReceptionKitTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PODS_ROOT)/Smooch $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/KIF" "${PODS_ROOT}/Smooch" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Smooch" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/KIF/KIF.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Smooch" 6 | OTHER_LDFLAGS = $(inherited) -l"icucore" -framework "AVFoundation" -framework "AssetsLibrary" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "KIF" -framework "Photos" -framework "QuartzCore" -framework "Smooch" -framework "SystemConfiguration" -framework "UIKit" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKitTests/Pods-ReceptionKitTests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ReceptionKitTests { 2 | umbrella header "Pods-ReceptionKitTests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-ReceptionKitTests/Pods-ReceptionKitTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PODS_ROOT)/Smooch "${PODS_ROOT}/Smooch" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Smooch" 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Smooch" 6 | OTHER_LDFLAGS = $(inherited) -l"icucore" -framework "AVFoundation" -framework "AssetsLibrary" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "Photos" -framework "QuartzCore" -framework "Smooch" -framework "SystemConfiguration" -framework "UIKit" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.3.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SDWebImage : NSObject 3 | @end 4 | @implementation PodsDummy_SDWebImage 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "NSButton+WebCache.h" 14 | #import "NSData+ImageContentType.h" 15 | #import "NSImage+WebCache.h" 16 | #import "SDAnimatedImageRep.h" 17 | #import "SDImageCache.h" 18 | #import "SDImageCacheConfig.h" 19 | #import "SDWebImageCoder.h" 20 | #import "SDWebImageCoderHelper.h" 21 | #import "SDWebImageCodersManager.h" 22 | #import "SDWebImageCompat.h" 23 | #import "SDWebImageDownloader.h" 24 | #import "SDWebImageDownloaderOperation.h" 25 | #import "SDWebImageFrame.h" 26 | #import "SDWebImageGIFCoder.h" 27 | #import "SDWebImageImageIOCoder.h" 28 | #import "SDWebImageManager.h" 29 | #import "SDWebImageOperation.h" 30 | #import "SDWebImagePrefetcher.h" 31 | #import "SDWebImageTransition.h" 32 | #import "UIButton+WebCache.h" 33 | #import "UIImage+ForceDecode.h" 34 | #import "UIImage+GIF.h" 35 | #import "UIImage+MultiFormat.h" 36 | #import "UIImageView+HighlightedWebCache.h" 37 | #import "UIImageView+WebCache.h" 38 | #import "UIView+WebCache.h" 39 | #import "UIView+WebCacheOperation.h" 40 | 41 | FOUNDATION_EXPORT double SDWebImageVersionNumber; 42 | FOUNDATION_EXPORT const unsigned char SDWebImageVersionString[]; 43 | 44 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage.modulemap: -------------------------------------------------------------------------------- 1 | framework module SDWebImage { 2 | umbrella header "SDWebImage-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SDWebImage 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Smooch" 4 | OTHER_LDFLAGS = -framework "ImageIO" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SDWebImage 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /ReceptionKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ReceptionKit.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ReceptionKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ReceptionKit/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-23. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | var messageSender: MessageSender! 12 | var camera: Camera! 13 | var doorbell = DoorBell() 14 | 15 | @UIApplicationMain 16 | class AppDelegate: UIResponder, UIApplicationDelegate { 17 | 18 | var window: UIWindow? 19 | 20 | // swiftlint:disable weak_delegate 21 | let conversationDelegate = ConversationDelegate() 22 | 23 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 24 | 25 | // Smooch Settings 26 | let smoochSettings = SKTSettings(appId: Config.Smooch.AppID) 27 | Smooch.initWith(smoochSettings) { error, _ in 28 | guard error == nil else { 29 | Logger.error("Could not initialize Smooch") 30 | print(error as Any) 31 | return 32 | } 33 | // Setup Smooch 34 | Smooch.conversation()?.delegate = self.conversationDelegate 35 | Smooch.setUserFirstName(Config.Slack.Name, lastName: "") 36 | SKTUser.current()?.email = Config.Slack.Email 37 | } 38 | 39 | // App-wide styles 40 | UIApplication.shared.isStatusBarHidden = true 41 | UINavigationBar.appearance().barTintColor = UIColor(hex: Config.Colour.NavigationBar) 42 | 43 | // Create an instance of the Camera 44 | // Cannot create this as a declaration above since the camera will not start 45 | // recording in that case 46 | camera = Camera() 47 | 48 | // Used to send messages to Smooch 49 | messageSender = SmoochMessageSender() 50 | 51 | return true 52 | } 53 | 54 | } 55 | 56 | // Extensions for tests 57 | extension AppDelegate { 58 | 59 | /** 60 | Reset the application before starting a test 61 | */ 62 | func reset() { 63 | guard let rootVC = self.window?.rootViewController as? UINavigationController else { 64 | Logger.error("Could not get the root view controller") 65 | return 66 | } 67 | rootVC.popToRootViewController(animated: false) 68 | } 69 | 70 | /** 71 | Replace the message sender being used with the provided one 72 | Used to provide a mock message sender 73 | 74 | - parameter newMessageSender: The message sender to use 75 | */ 76 | func replaceMessageSender(_ newMessageSender: MessageSender) { 77 | messageSender = newMessageSender 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /ReceptionKit/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ReceptionKit/Config.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Config.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-29. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | class Config { 10 | 11 | class Smooch { 12 | /// Replace the token with App ID you get from app.smooch.io 13 | static let AppID = "554185264e2b5d25009b0c80" 14 | } 15 | 16 | class General { 17 | /// Change to false if the logo at the top should not show 18 | static let ShowLogo = true 19 | 20 | /// Change to false if the language toggle in the top right should not be displayed 21 | static let ShowLanguageToggle = true 22 | 23 | /// Time in seconds for when to reset back to the main screen 24 | static let Timeout = 30.0 25 | 26 | /// Change to false if the doorbell sound should not play 27 | static let PlayDoorbell = true 28 | } 29 | 30 | class Colour { 31 | /// Colour of the navigation bar 32 | static let NavigationBar = 0xB71C1C 33 | 34 | /// Colour of the background 35 | static let Background = 0xB71C1C 36 | } 37 | 38 | class Slack { 39 | /// Name of the receptionist that appears in Slack 40 | static let Name = "Receptionist" 41 | 42 | /// If you want a profile picture for the receptionist in Slack, 43 | /// set a Gravatar for an email and replace the following 44 | static let Email = "receptionist@example.com" 45 | } 46 | 47 | class Photos { 48 | /// Enable sending a photo when someone interacts with the iPad 49 | static let SendOnInteraction = true 50 | /// Enable using the ImageCaptureCommand in a message to take a photo from the iPad 51 | static let EnableCommand = true 52 | /// Text of the image command - type this in Slack to get an image from the camera 53 | static let ImageCaptureCommand = "#image" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ReceptionKit/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/FontAwesome.otf -------------------------------------------------------------------------------- /ReceptionKit/Helpers/ButtonFormatter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ButtonFormatter.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-05-01. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // Creates attributed strings using a provided key for buttons 12 | class ButtonFormatter { 13 | 14 | // Fonts used to display the buttons 15 | // If these are missing, the app should crash 16 | private static let IconFont = UIFont(name: "FontAwesome", size: 300.0)! 17 | private static let TextFont = UIFont(name: "Futura-Medium", size: 48.0)! 18 | 19 | static func getAttributedString(icon: Icons, text: Text) -> NSAttributedString { 20 | let attributedString = NSMutableAttributedString() 21 | 22 | // Center align the text 23 | let paragraphStyle = NSMutableParagraphStyle() 24 | paragraphStyle.alignment = .center 25 | paragraphStyle.lineBreakMode = .byWordWrapping 26 | // Add the text 27 | attributedString.append(NSAttributedString(string: icon.unicode() + "\n", 28 | attributes: [NSAttributedStringKey.font: IconFont])) 29 | attributedString.append(NSAttributedString(string: text.get(), attributes: [NSAttributedStringKey.font: TextFont])) 30 | // Set the style 31 | attributedString.addAttributes([ 32 | NSAttributedStringKey.paragraphStyle: paragraphStyle, 33 | NSAttributedStringKey.foregroundColor: UIColor.white 34 | ], range: NSRange(location: 0, length: attributedString.length)) 35 | 36 | return attributedString 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /ReceptionKit/Helpers/Colour.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Colour.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-29. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | extension UIColor { 10 | 11 | // From Rudolf Adamkovic 12 | convenience init(hex: Int) { 13 | let components = ( 14 | R: CGFloat((hex >> 16) & 0xff) / 255, 15 | G: CGFloat((hex >> 08) & 0xff) / 255, 16 | B: CGFloat((hex >> 00) & 0xff) / 255 17 | ) 18 | self.init(red: components.R, green: components.G, blue: components.B, alpha: 1) 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /ReceptionKit/Helpers/DoorBell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DoorBell.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2018-05-02. 6 | // Copyright © 2018 Andy Cho. All rights reserved. 7 | // 8 | 9 | import AVFoundation 10 | 11 | class DoorBell { 12 | var player: AVAudioPlayer? 13 | 14 | init() { 15 | guard let url = Bundle.main.url(forResource: "doorbell", withExtension: "mp3") else { 16 | Logger.error("Could not locate the doorbell MP3 file") 17 | return 18 | } 19 | 20 | do { 21 | try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback) 22 | try AVAudioSession.sharedInstance().setActive(true) 23 | player = try AVAudioPlayer(contentsOf: url, fileTypeHint: AVFileType.mp3.rawValue) 24 | } catch let error { 25 | Logger.error("Could not instantiate AVAudioPlayer") 26 | Logger.error(error.localizedDescription) 27 | } 28 | } 29 | 30 | func play() { 31 | if Config.General.PlayDoorbell { 32 | player?.play() 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ReceptionKit/Helpers/Icons.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Icons.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-05-01. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // Used to get icons from Font Awesome for buttons 12 | enum Icons { 13 | case delivery 14 | case signature 15 | case leftAtReception 16 | case visitor 17 | case iKnow 18 | case iDontKnow 19 | 20 | // The unicode in FontAwesome for the icons 21 | func unicode() -> String { 22 | switch self { 23 | case .delivery: 24 | return "\u{f0d1}" 25 | case .signature: 26 | return "\u{f044}" 27 | case .leftAtReception: 28 | return "\u{f187}" 29 | case .visitor: 30 | return "\u{f007}" 31 | case .iKnow: 32 | return "\u{f02d}" 33 | case .iDontKnow: 34 | return "\u{f059}" 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ReceptionKit/Helpers/Logger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Logger.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-08-03. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct Logger { 12 | 13 | /** 14 | Print a debug message 15 | 16 | - parameter message: The message to print 17 | */ 18 | static func debug(_ message: String) { 19 | print("DEBUG: \(message)") 20 | } 21 | 22 | /** 23 | Print an error message 24 | 25 | - parameter message: The message to print 26 | */ 27 | static func error(_ message: String) { 28 | print("ERROR: \(message)") 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /ReceptionKit/Helpers/MessageSender.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageSender.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-12-31. 6 | // Copyright © 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | /** 10 | * Protocol used for a service that can send messages 11 | */ 12 | protocol MessageSender { 13 | func send(message: SlackMessage) // Text + Image 14 | func send(text: SlackMessage) 15 | func send(image: UIImage) 16 | } 17 | 18 | class SmoochMessageSender: MessageSender { 19 | /** 20 | Send a message through Smooch 21 | Also send an image if SendOnInteraction is enabled 22 | 23 | - parameter message: The text of the message to send 24 | */ 25 | func send(message: SlackMessage) { 26 | send(text: message) 27 | if let photo = camera.takePhoto(), Config.Photos.SendOnInteraction { 28 | send(image: photo) 29 | } 30 | } 31 | 32 | /** 33 | Send a text message through Smooch 34 | 35 | - parameter text: The text of the message to send 36 | */ 37 | func send(text: SlackMessage) { 38 | let message = SKTMessage(text: text.text()) 39 | Smooch.conversation()?.sendMessage(message) 40 | } 41 | 42 | /** 43 | Send an image through Smooch 44 | 45 | - parameter image: The image to send 46 | */ 47 | func send(image: UIImage) { 48 | Smooch.conversation()?.send(image, withProgress: nil, completion: nil) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/AppIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/AppIcon.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "ipad", 5 | "size" : "20x20", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "ipad", 10 | "size" : "20x20", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "ipad", 16 | "filename" : "Icon-Small.png", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "ipad", 22 | "filename" : "Icon-Small@2x.png", 23 | "scale" : "2x" 24 | }, 25 | { 26 | "size" : "40x40", 27 | "idiom" : "ipad", 28 | "filename" : "Icon-Spotlight-40.png", 29 | "scale" : "1x" 30 | }, 31 | { 32 | "size" : "40x40", 33 | "idiom" : "ipad", 34 | "filename" : "Icon-Spotlight-40@2x.png", 35 | "scale" : "2x" 36 | }, 37 | { 38 | "size" : "50x50", 39 | "idiom" : "ipad", 40 | "filename" : "Icon-Small-50.png", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "size" : "50x50", 45 | "idiom" : "ipad", 46 | "filename" : "Icon-Small-50@2x.png", 47 | "scale" : "2x" 48 | }, 49 | { 50 | "size" : "72x72", 51 | "idiom" : "ipad", 52 | "filename" : "Icon-72.png", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "size" : "72x72", 57 | "idiom" : "ipad", 58 | "filename" : "Icon-72@2x.png", 59 | "scale" : "2x" 60 | }, 61 | { 62 | "size" : "76x76", 63 | "idiom" : "ipad", 64 | "filename" : "Icon-76.png", 65 | "scale" : "1x" 66 | }, 67 | { 68 | "size" : "76x76", 69 | "idiom" : "ipad", 70 | "filename" : "Icon-76@2x.png", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "size" : "83.5x83.5", 75 | "idiom" : "ipad", 76 | "filename" : "Icon-iPadPro@2x.png", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "size" : "1024x1024", 81 | "idiom" : "ios-marketing", 82 | "filename" : "AppIcon.png", 83 | "scale" : "1x" 84 | } 85 | ], 86 | "info" : { 87 | "version" : 1, 88 | "author" : "xcode" 89 | } 90 | } -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-72.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-iPadPro@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/AppIcon.appiconset/Icon-iPadPro@2x.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/CompanyLogo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "Logo.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/CompanyLogo.imageset/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/CompanyLogo.imageset/Logo.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryCanadaPost.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "DeliveryLogos.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryCanadaPost.imageset/DeliveryLogos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryCanadaPost.imageset/DeliveryLogos.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryFedEx.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "fedex.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryFedEx.imageset/fedex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryFedEx.imageset/fedex.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryUPS.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "ups.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryUPS.imageset/ups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/Delivery Logos/IconDeliveryUPS.imageset/ups.png -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/UnknownContact.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "UnknownContact.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ReceptionKit/Images.xcassets/UnknownContact.imageset/UnknownContact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/Images.xcassets/UnknownContact.imageset/UnknownContact.png -------------------------------------------------------------------------------- /ReceptionKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSCameraUsageDescription 6 | A picture of the visitor can be taken when they check in 7 | UIAppFonts 8 | 9 | FontAwesome.otf 10 | 11 | CFBundleDevelopmentRegion 12 | en 13 | CFBundleDisplayName 14 | ReceptionKit 15 | CFBundleExecutable 16 | $(EXECUTABLE_NAME) 17 | CFBundleIdentifier 18 | $(PRODUCT_BUNDLE_IDENTIFIER) 19 | CFBundleInfoDictionaryVersion 20 | 6.0 21 | CFBundleName 22 | $(PRODUCT_NAME) 23 | CFBundlePackageType 24 | APPL 25 | CFBundleShortVersionString 26 | 1.0 27 | CFBundleSignature 28 | ???? 29 | CFBundleVersion 30 | 1 31 | LSRequiresIPhoneOS 32 | 33 | UILaunchStoryboardName 34 | LaunchScreen 35 | UIMainStoryboardFile 36 | Main 37 | UIRequiredDeviceCapabilities 38 | 39 | armv7 40 | 41 | UIStatusBarHidden~ipad 42 | 43 | UISupportedInterfaceOrientations 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UISupportedInterfaceOrientations~ipad 50 | 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | UIInterfaceOrientationPortrait 54 | UIInterfaceOrientationPortraitUpsideDown 55 | 56 | UIViewControllerBasedStatusBarAppearance 57 | 58 | NSContactsUsageDescription 59 | The visitor can search the contacts on the iPad to pick the person that they are visiting 60 | 61 | 62 | -------------------------------------------------------------------------------- /ReceptionKit/Models/DeliveryCompany.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeliveryCompany.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-08-29. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | enum DeliveryCompany { 12 | case ups 13 | case fedEx 14 | case canadaPost 15 | case other 16 | 17 | /** 18 | Used to get the text used in messages for the companies 19 | Method used instead of having a String enum since the other button's text is calculated 20 | 21 | - returns: The string to use in messages 22 | */ 23 | func text() -> String { 24 | switch self { 25 | case .ups: 26 | return "UPS" 27 | case .fedEx: 28 | return "FedEx" 29 | case .canadaPost: 30 | return "Canada Post" 31 | case .other: 32 | return Text.other.get() 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ReceptionKit/Models/SlackMessage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SlackMessage.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-08-30. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | enum SlackMessage { 12 | case knownVisitorKnownVisitee(visitorName: String, visiteeName: String) 13 | case knownVisitorUnknownVisitee(visitorName: String) 14 | case unknownVisitorKnownVisitee(visiteeName: String) 15 | case unknownVisitorUnknownVisitee() 16 | case requiresSignature(deliveryCompany: DeliveryCompany) 17 | case leftAtReception(deliveryCompany: DeliveryCompany) 18 | 19 | func text() -> String { 20 | switch self { 21 | case .knownVisitorKnownVisitee(let visitorName, let visiteeName): 22 | return "\(visitorName) is at the reception looking for \(visiteeName)!" 23 | case .knownVisitorUnknownVisitee(let visitorName): 24 | return "\(visitorName) is at the reception!" 25 | case .unknownVisitorKnownVisitee(let visiteeName): 26 | return "Someone is at the reception looking for \(visiteeName)!" 27 | case .unknownVisitorUnknownVisitee: 28 | return "Someone is at the reception!" 29 | case .requiresSignature(let deliveryCompany): 30 | return makeDeliveryFromText(deliveryCompany) + " that requires a signature!" 31 | case .leftAtReception(let deliveryCompany): 32 | return makeDeliveryFromText(deliveryCompany) + " that has been left at the reception!" 33 | } 34 | } 35 | 36 | // Exclude the "from" if the delivery company is unknown 37 | private func makeDeliveryFromText(_ deliveryCompany: DeliveryCompany) -> String { 38 | var messageText = "There is a delivery" 39 | if deliveryCompany != .other { 40 | messageText += " from " + deliveryCompany.text() 41 | } 42 | return messageText 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ReceptionKit/ReceptionKit-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // ReceptionKit-Bridging-Header.h 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-23. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | #ifndef ReceptionKit_ReceptionKit_Bridging_Header_h 10 | #define ReceptionKit_ReceptionKit_Bridging_Header_h 11 | 12 | #import 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Delivery/DeliveryCompanyViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeliveryCompanyViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-23. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DeliveryCompanyViewController: ReturnToHomeViewController { 12 | 13 | var deliveryCompany: DeliveryCompany? 14 | static let deliverySelectedSegue = "DeliveryCompanySelectedSegue" 15 | 16 | @IBOutlet weak var upsButton: UIButton! 17 | @IBOutlet weak var fedExButton: UIButton! 18 | @IBOutlet weak var canadaPostButton: UIButton! 19 | @IBOutlet weak var otherButton: UIButton! 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | 24 | // Set the language 25 | otherButton.setTitle(Text.other.get(), for: UIControlState()) 26 | otherButton.accessibilityLabel = Text.other.accessibility() 27 | 28 | // Make sure that the button images are not skewed 29 | upsButton.imageView!.contentMode = UIViewContentMode.scaleAspectFit 30 | upsButton.accessibilityLabel = DeliveryCompany.ups.text() 31 | fedExButton.imageView!.contentMode = UIViewContentMode.scaleAspectFit 32 | fedExButton.accessibilityLabel = DeliveryCompany.fedEx.text() 33 | canadaPostButton.imageView!.contentMode = UIViewContentMode.scaleAspectFit 34 | canadaPostButton.accessibilityLabel = DeliveryCompany.canadaPost.text() 35 | otherButton.accessibilityLabel = DeliveryCompany.other.text() 36 | } 37 | 38 | // 39 | // Delivery company button taps 40 | // 41 | 42 | @IBAction func upsButtonTapped(_ sender: AnyObject) { 43 | deliveryCompany = .ups 44 | performSegue(withIdentifier: DeliveryCompanyViewController.deliverySelectedSegue, sender: self) 45 | } 46 | 47 | @IBAction func fedExButtonTapped(_ sender: AnyObject) { 48 | deliveryCompany = .fedEx 49 | performSegue(withIdentifier: DeliveryCompanyViewController.deliverySelectedSegue, sender: self) 50 | } 51 | 52 | @IBAction func canadaPostButtonTapped(_ sender: AnyObject) { 53 | deliveryCompany = .canadaPost 54 | performSegue(withIdentifier: DeliveryCompanyViewController.deliverySelectedSegue, sender: self) 55 | } 56 | 57 | @IBAction func otherButtonTapped(_ sender: AnyObject) { 58 | deliveryCompany = .other 59 | performSegue(withIdentifier: DeliveryCompanyViewController.deliverySelectedSegue, sender: self) 60 | } 61 | 62 | // MARK: - Navigation 63 | 64 | // In a storyboard-based application, you will often want to do a little preparation before navigation 65 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 66 | let deliveryMethodViewController = segue.destination as? DeliveryMethodViewController 67 | guard let deliveryVC = deliveryMethodViewController, let deliveryCompany = deliveryCompany else { 68 | return 69 | } 70 | deliveryVC.configure(DeliveryMethodViewModel(deliveryCompany: deliveryCompany)) 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/HomeViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HomeViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-23. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class HomeViewController: UIViewController, Themed, StackViewOrientable { 12 | 13 | @IBOutlet weak var languageButton: UIBarButtonItem! 14 | @IBOutlet weak var stackView: UIStackView! 15 | @IBOutlet weak var deliveryButton: UIButton! 16 | @IBOutlet weak var visitorButton: UIButton! 17 | 18 | static let toggleEnglish = "English" 19 | static let toggleFrench = "français" 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | 24 | // Set the logo if ShowLogo is enabled 25 | if Config.General.ShowLogo { 26 | navigationItem.titleView = UIImageView(image: UIImage(named: "CompanyLogo")) 27 | } 28 | 29 | // Hide the language toggle if ShowLanguageToggle is disabled 30 | if !Config.General.ShowLanguageToggle { 31 | navigationItem.rightBarButtonItem = nil 32 | } 33 | 34 | setTheme() 35 | updateButtons() 36 | } 37 | 38 | override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { 39 | super.viewWillTransition(to: size, with: coordinator) 40 | setButtonVerticalAlignment(withDeviceDimensions: size) 41 | } 42 | 43 | @IBAction func languageButtonTapped(_ sender: AnyObject) { 44 | Text.swapLanguage() 45 | languageButton.title = Text.languageToggle.get() 46 | languageButton.accessibilityLabel = Text.languageToggle.accessibility() 47 | 48 | // The text on this view has to be manually updated 49 | updateButtons() 50 | navigationItem.backBarButtonItem = UIBarButtonItem(title: Text.back.get(), style: UIBarButtonItemStyle.plain, target: nil, action: nil) 51 | } 52 | 53 | private func updateButtons() { 54 | deliveryButton.setAttributedTitle(ButtonFormatter.getAttributedString(icon: .delivery, text: .delivery), for: UIControlState()) 55 | deliveryButton.accessibilityLabel = Text.delivery.accessibility() 56 | 57 | visitorButton.setAttributedTitle(ButtonFormatter.getAttributedString(icon: .visitor, text: .visitor), for: UIControlState()) 58 | visitorButton.accessibilityLabel = Text.visitor.accessibility() 59 | 60 | setButtonVerticalAlignment(withDeviceDimensions: view.frame.size) 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/OrientationNavigationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OrientationNavigationController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-05-01. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class OrientationNavigationController: UINavigationController { 12 | 13 | // Ensure that the orientation change triggers an Auto Layout change on the iPad 14 | // Otherwise, the iPad dimensions are always Regular x Regular 15 | override func overrideTraitCollection(forChildViewController childViewController: UIViewController) -> UITraitCollection? { 16 | if view.bounds.width < view.bounds.height { 17 | return UITraitCollection(horizontalSizeClass: .compact) 18 | } 19 | return UITraitCollection(horizontalSizeClass: .regular) 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Received Messages/ReceivedMessageViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReceivedMessageViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-24. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SDWebImage 11 | 12 | struct ReceivedMessageViewModel { 13 | let name: String 14 | let message: String 15 | let picture: String 16 | } 17 | 18 | class ReceivedMessageViewController: UIViewController { 19 | 20 | @IBOutlet weak var contactPicture: UIImageView! 21 | @IBOutlet weak var contactTitle: UILabel! 22 | @IBOutlet weak var contactMessage: UITextView! 23 | 24 | static let nibName = String(describing: ReceivedMessageViewController.self) 25 | 26 | var viewModel: ReceivedMessageViewModel? 27 | 28 | func configure(_ viewModel: ReceivedMessageViewModel) { 29 | self.viewModel = viewModel 30 | modalPresentationStyle = UIModalPresentationStyle.formSheet 31 | preferredContentSize = CGSize(width: 600.0, height: 500.0) 32 | } 33 | 34 | override func viewDidLoad() { 35 | super.viewDidLoad() 36 | 37 | // Set the text 38 | let name = viewModel?.name.uppercased() ?? "UNKNOWN" 39 | contactTitle.text = name 40 | contactTitle.accessibilityLabel = name 41 | 42 | let message = viewModel?.message 43 | contactMessage.text = message 44 | contactMessage.accessibilityLabel = message 45 | 46 | // Set a default image 47 | contactPicture.image = UIImage(named: "UnknownContact") 48 | contactPicture.layer.cornerRadius = 75.0 49 | contactPicture.layer.masksToBounds = true 50 | contactPicture.accessibilityLabel = "\(name) Picture" 51 | 52 | // Load the image 53 | guard let picture = viewModel?.picture, let URL = URL(string: picture) else { return } 54 | contactPicture.sd_setImage(with: URL) 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Template/ReturnToHomeTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReturnToHomeTableViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-29. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ReturnToHomeTableViewController: UITableViewController, Themed, ReturnsToHome { 12 | 13 | var backToHomeTimer: Timer? 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | setTheme() 18 | } 19 | 20 | override func viewWillAppear(_ animated: Bool) { 21 | super.viewWillAppear(animated) 22 | backToHomeTimer = startTimer() 23 | } 24 | 25 | override func viewWillDisappear(_ animated: Bool) { 26 | super.viewWillDisappear(animated) 27 | stopTimer(timer: backToHomeTimer) 28 | backToHomeTimer = nil 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Template/ReturnToHomeViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReturnToHomeViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-29. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ReturnToHomeViewController: UIViewController, Themed, ReturnsToHome { 12 | 13 | var backToHomeTimer: Timer? 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | setTheme() 18 | } 19 | 20 | override func viewWillAppear(_ animated: Bool) { 21 | super.viewWillAppear(animated) 22 | backToHomeTimer = startTimer() 23 | } 24 | 25 | override func viewWillDisappear(_ animated: Bool) { 26 | super.viewWillDisappear(animated) 27 | stopTimer(timer: backToHomeTimer) 28 | backToHomeTimer = nil 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Template/UIViewController+ReturnsToHome.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+ReturnsToHome.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-10-01. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// Protocol for UIViewControllers that return to the home view after a period of inactivity 12 | protocol ReturnsToHome { 13 | var backToHomeTimer: Timer? { get set } 14 | } 15 | 16 | extension ReturnsToHome where Self: UIViewController { 17 | 18 | func startTimer() -> Timer { 19 | // Start a timer to return back to the first view 20 | return Timer.scheduledTimer(timeInterval: Config.General.Timeout, target: self, selector: #selector(UIViewController.returnToHomeScreen), userInfo: nil, repeats: false) 21 | } 22 | 23 | func stopTimer(timer: Timer?) { 24 | // Stop the timer 25 | timer?.invalidate() 26 | } 27 | 28 | } 29 | 30 | extension UIViewController { 31 | 32 | // Go back to the home screen, which is the root view controller 33 | @objc func returnToHomeScreen() { 34 | _ = self.navigationController?.popToRootViewController(animated: true) 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Template/UIViewController+StackViewOrientable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+StackViewOrientable.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-10-01. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /** 12 | * Protocol for view controllers that have UIStackViews containing buttons 13 | * that needs to be aligned differently depending on the orientation 14 | */ 15 | protocol StackViewOrientable { 16 | 17 | var stackView: UIStackView! { get set } 18 | 19 | } 20 | 21 | extension StackViewOrientable where Self: UIViewController { 22 | 23 | // Change the direction of the stack view given the dimensions of the device 24 | func setButtonVerticalAlignment(withDeviceDimensions size: CGSize) { 25 | if size.width < size.height { 26 | stackView.axis = .vertical 27 | } else { 28 | stackView.axis = .horizontal 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Template/UIViewController+Themed.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+Themed.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-10-01. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// Protocol for UIViewControllers that set the background colour theme 12 | protocol Themed { 13 | 14 | } 15 | 16 | extension Themed where Self: UIViewController { 17 | 18 | /// Set the configured theme 19 | func setTheme() { 20 | // Set the background colour 21 | view.backgroundColor = UIColor(hex: Config.Colour.Background) 22 | 23 | // Set the back button 24 | navigationItem.backBarButtonItem = UIBarButtonItem(title: Text.back.get(), style: .plain, target: nil, action: nil) 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Visitor/ContactTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContactTableViewCell.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-23. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ContactTableViewCell: UITableViewCell { 12 | 13 | static let reuseIdentifier = String(describing: ContactTableViewCell.self) 14 | 15 | @IBOutlet weak var contactImage: UIImageView! 16 | @IBOutlet weak var contactNameLabel: UILabel! 17 | @IBOutlet weak var contactPhoneLabel: UILabel! 18 | 19 | func configure(_ contact: Contact) { 20 | let name = contact.name 21 | contactNameLabel.text = name 22 | contactNameLabel.accessibilityLabel = name 23 | 24 | let phone = formatPhoneString(contact.phones) 25 | contactPhoneLabel.text = phone 26 | contactPhoneLabel.accessibilityLabel = phone 27 | 28 | if let picture = contact.picture { 29 | contactImage.image = picture 30 | } else { 31 | contactImage.image = UIImage(named: "UnknownContact") 32 | } 33 | contactImage.accessibilityLabel = "\(contact.name) Phone" 34 | contactImage.layer.cornerRadius = 42.0 35 | contactImage.layer.masksToBounds = true 36 | } 37 | 38 | // Take the phone numbers and create a descriptive string for it 39 | private func formatPhoneString(_ phones: [ContactPhone]) -> String { 40 | var mainPhones = [String]() 41 | var mobilePhones = [String]() 42 | 43 | let separator = "\t\t" 44 | var formattedString = "" 45 | 46 | phones.forEach { phone in 47 | if phone.type == .main { 48 | mainPhones.append(phone.number) 49 | } else if phone.type == .mobile { 50 | mobilePhones.append(phone.number) 51 | } 52 | } 53 | 54 | if !mainPhones.isEmpty { 55 | formattedString += "Main: " + mainPhones.joined(separator: separator) 56 | } 57 | if !mobilePhones.isEmpty { 58 | formattedString += "Mobile: " + mobilePhones.joined(separator: separator) 59 | } 60 | 61 | return formattedString.isEmpty ? "No contact info" : formattedString 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Visitor/VisitorAskNameViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VisitorAskNameViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-23. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class VisitorAskNameViewController: ReturnToHomeViewController, UITextFieldDelegate { 12 | 13 | @IBOutlet weak var yourNameLabel: UILabel! 14 | @IBOutlet weak var nameTextField: UITextField! 15 | 16 | static let visitorEnteredNameSegue = "VisitorEnteredNameSegue" 17 | static let nameTextFieldAccessibilityLabel = "Name text field" 18 | static let yourNameLabelAccessibilityLabel = "Your name label" 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | 23 | nameTextField.delegate = self 24 | nameTextField.borderStyle = UITextBorderStyle.roundedRect 25 | nameTextField.accessibilityLabel = VisitorAskNameViewController.nameTextFieldAccessibilityLabel 26 | yourNameLabel.text = Text.yourName.get() 27 | } 28 | 29 | override func viewDidAppear(_ animated: Bool) { 30 | super.viewDidAppear(animated) 31 | 32 | // Not doing this in viewDidLoad() as that raises the keyboard before the segue 33 | nameTextField.becomeFirstResponder() 34 | } 35 | 36 | // MARK: - UITextViewDelegate 37 | 38 | // Segue to the VisitorViewController when the name is entered 39 | func textFieldShouldReturn(_ textField: UITextField) -> Bool { 40 | performSegue(withIdentifier: VisitorAskNameViewController.visitorEnteredNameSegue, sender: self) 41 | return false 42 | } 43 | 44 | // MARK: - Navigation 45 | 46 | // Set the visitor's name before the segue 47 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 48 | guard let visitorViewController = segue.destination as? VisitorViewController else { 49 | return 50 | } 51 | visitorViewController.visitorName = nameTextField.text 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Visitor/VisitorSearchResultsTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VisitorSearchResultsTableViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-23. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct VisitorSearchResultsViewModel { 12 | var visitorName: String? 13 | var searchQuery: String? 14 | var searchResults: [Contact]? 15 | } 16 | 17 | class VisitorSearchResultsTableViewController: ReturnToHomeTableViewController { 18 | private var viewModel: VisitorSearchResultsViewModel? 19 | 20 | static let selectedContactSegue = "SelectedContact" 21 | 22 | func configure(_ viewModel: VisitorSearchResultsViewModel) { 23 | self.viewModel = viewModel 24 | } 25 | 26 | override func viewDidLoad() { 27 | super.viewDidLoad() 28 | 29 | // Overwrite the theme - table should be white 30 | view.backgroundColor = UIColor.white 31 | } 32 | 33 | // MARK: - Table view data source 34 | 35 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 36 | return viewModel?.searchResults?.count ?? 0 37 | } 38 | 39 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> ContactTableViewCell { 40 | guard let cell = tableView.dequeueReusableCell(withIdentifier: ContactTableViewCell.reuseIdentifier, for: indexPath) as? ContactTableViewCell else { 41 | Logger.error("Could not dequeue contact cell in VisitorSearchResultsTableViewController") 42 | return ContactTableViewCell() 43 | } 44 | 45 | guard let searchResults = viewModel?.searchResults, indexPath.row < searchResults.count else { 46 | Logger.error("Search results not specified in VisitorSearchResultsTableViewController") 47 | return ContactTableViewCell() 48 | } 49 | 50 | let contact = searchResults[indexPath.row] 51 | cell.configure(contact) 52 | return cell 53 | } 54 | 55 | override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 56 | // No search results 57 | guard let searchResults = viewModel?.searchResults, indexPath.row < searchResults.count else { 58 | return 59 | } 60 | let contactName = searchResults[indexPath.row].name 61 | 62 | // No visitor name 63 | guard let visitorName = viewModel?.visitorName, !visitorName.isEmpty else { 64 | messageSender.send(message: .unknownVisitorKnownVisitee(visiteeName: contactName)) 65 | doorbell.play() 66 | performSelectedContactSegue() 67 | return 68 | } 69 | 70 | messageSender.send(message: .knownVisitorKnownVisitee(visitorName: visitorName, visiteeName: contactName)) 71 | doorbell.play() 72 | performSelectedContactSegue() 73 | } 74 | 75 | private func performSelectedContactSegue() { 76 | performSegue(withIdentifier: VisitorSearchResultsTableViewController.selectedContactSegue, sender: self) 77 | } 78 | 79 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 80 | guard let waitingViewController = segue.destination as? WaitingViewController else { 81 | return 82 | } 83 | 84 | // Configure the view model 85 | let waitingViewModel = WaitingViewModel(shouldAskToWait: true) 86 | waitingViewController.configure(waitingViewModel) 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/Visitor/VisitorViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VisitorViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-24. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class VisitorViewController: ReturnToHomeViewController, StackViewOrientable { 12 | 13 | // Name of the visitor set by VisitorAskNameViewController 14 | var visitorName: String? 15 | 16 | @IBOutlet weak var stackView: UIStackView! 17 | @IBOutlet weak var knowButton: UIButton! 18 | @IBOutlet weak var notKnowButton: UIButton! 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | 23 | knowButton.setAttributedTitle(ButtonFormatter.getAttributedString(icon: .iKnow, text: .iKnow), for: UIControlState()) 24 | knowButton.accessibilityLabel = Text.iKnow.accessibility() 25 | knowButton.titleLabel?.textAlignment = NSTextAlignment.center 26 | knowButton.titleEdgeInsets = UIEdgeInsets(top: 8, left: 16, bottom: 8, right: 16) 27 | 28 | notKnowButton.setAttributedTitle(ButtonFormatter.getAttributedString(icon: .iDontKnow, text: .iDontKnow), for: UIControlState()) 29 | notKnowButton.accessibilityLabel = Text.iDontKnow.accessibility() 30 | notKnowButton.titleLabel?.textAlignment = NSTextAlignment.center 31 | notKnowButton.titleEdgeInsets = UIEdgeInsets(top: 8, left: 16, bottom: 8, right: 16) 32 | 33 | setButtonVerticalAlignment(withDeviceDimensions: view.bounds.size) 34 | } 35 | 36 | // Reset the alignment of the text on rotation 37 | override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { 38 | setButtonVerticalAlignment(withDeviceDimensions: size) 39 | } 40 | 41 | // MARK: - Navigation 42 | 43 | // Should post message if the visitor does not know who they are looking for 44 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 45 | if let waitingViewController = segue.destination as? WaitingViewController { 46 | // Configure the view model 47 | let waitingViewModel = WaitingViewModel(shouldAskToWait: true) 48 | waitingViewController.configure(waitingViewModel) 49 | 50 | // We don't know the name of the person who just checked in 51 | guard let visitorName = visitorName, !visitorName.isEmpty else { 52 | messageSender.send(message: .unknownVisitorUnknownVisitee()) 53 | doorbell.play() 54 | return 55 | } 56 | 57 | // We know the visitor's name but they don't know the person they're looking for 58 | messageSender.send(message: .knownVisitorUnknownVisitee(visitorName: visitorName)) 59 | doorbell.play() 60 | } else if let visitorSearchViewController = segue.destination as? VisitorSearchViewController { 61 | visitorSearchViewController.configure(VisitorSearchViewModel(visitorName: visitorName)) 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /ReceptionKit/View Controllers/WaitingViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WaitingViewController.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2015-04-23. 6 | // Copyright (c) 2015 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct WaitingViewModel { 12 | // Set to false if the message below thank you should ask the person to wait 13 | var shouldAskToWait: Bool 14 | } 15 | 16 | class WaitingViewController: ReturnToHomeViewController { 17 | var viewModel: WaitingViewModel? 18 | 19 | @IBOutlet weak var thankYouLabel: UILabel! 20 | @IBOutlet weak var thankYouMessageText: UITextView! 21 | 22 | func configure(_ viewModel: WaitingViewModel) { 23 | self.viewModel = viewModel 24 | } 25 | 26 | override func viewDidLoad() { 27 | super.viewDidLoad() 28 | guard let `viewModel` = viewModel else { 29 | Logger.error("View model was not set on WaitingViewController") 30 | return 31 | } 32 | 33 | thankYouMessageText.isSelectable = true 34 | if viewModel.shouldAskToWait { 35 | thankYouLabel.text = Text.pleaseWait.get() 36 | thankYouLabel.accessibilityLabel = Text.pleaseWait.accessibility() 37 | 38 | thankYouMessageText.text = Text.pleaseWaitMessage.get() 39 | thankYouMessageText.accessibilityLabel = Text.pleaseWaitMessage.accessibility() 40 | } else { 41 | thankYouLabel.text = Text.thankYou.get() 42 | thankYouLabel.accessibilityLabel = Text.thankYou.accessibility() 43 | 44 | thankYouMessageText.text = Text.niceDay.get() 45 | thankYouMessageText.accessibilityLabel = Text.niceDay.accessibility() 46 | } 47 | thankYouMessageText.isSelectable = false 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /ReceptionKit/doorbell.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/ReceptionKit/doorbell.mp3 -------------------------------------------------------------------------------- /ReceptionKitTests/DeliveryTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeliveryTests.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-08-29. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import KIF 11 | @testable import ReceptionKit 12 | 13 | class DeliveryTests: KIFTestCase { 14 | 15 | var mockMessageSender = MockMessageSender() 16 | 17 | override func setUp() { 18 | super.setUp() 19 | continueAfterFailure = false 20 | reset() 21 | mockMessageSender = mockOutMessageSender() 22 | } 23 | 24 | func testUPSDeliveryRequiresSignature() { 25 | tapDelivery() 26 | tapUPS() 27 | tapSignatureRequired() 28 | assertPleaseWaitMessageExists() 29 | assertMessage(.requiresSignature(deliveryCompany: .ups)) 30 | 31 | } 32 | 33 | func testCanadaPostDeliveryDoesNotRequireSignature() { 34 | tapDelivery() 35 | tapCanadaPost() 36 | tapLeftAtReception() 37 | assertThankYouMessageExists() 38 | assertMessage(.leftAtReception(deliveryCompany: .canadaPost)) 39 | } 40 | 41 | func testOtherCompanyOption() { 42 | tapDelivery() 43 | tapOther() 44 | tapLeftAtReception() 45 | assertThankYouMessageExists() 46 | assertMessage(.leftAtReception(deliveryCompany: .other)) 47 | } 48 | 49 | } 50 | 51 | private extension DeliveryTests { 52 | 53 | // MARK: Helpers - Main page 54 | 55 | func tapDelivery() { 56 | tester.tapView(withAccessibilityLabel: Text.delivery.accessibility()) 57 | } 58 | 59 | // MARK: Helpers - Delivery companies 60 | 61 | func tapUPS() { 62 | tester.tapView(withAccessibilityLabel: DeliveryCompany.ups.text()) 63 | } 64 | 65 | func tapCanadaPost() { 66 | tester.tapView(withAccessibilityLabel: DeliveryCompany.canadaPost.text()) 67 | } 68 | 69 | func tapOther() { 70 | tester.tapView(withAccessibilityLabel: DeliveryCompany.other.text()) 71 | } 72 | 73 | // MARK: Helpers - Type of delivery 74 | 75 | func tapSignatureRequired() { 76 | tester.tapView(withAccessibilityLabel: Text.signature.accessibility()) 77 | } 78 | 79 | func tapLeftAtReception() { 80 | tester.tapView(withAccessibilityLabel: Text.leftAtReception.accessibility()) 81 | } 82 | 83 | // MARK: Helpers - Successfully sent message 84 | 85 | /// Check that we see the please wait screen 86 | func assertPleaseWaitMessageExists() { 87 | tester.waitForView(withAccessibilityLabel: Text.pleaseWait.accessibility()) 88 | tester.waitForView(withAccessibilityLabel: Text.pleaseWaitMessage.accessibility()) 89 | } 90 | 91 | /// Check that we see the thank you screen 92 | func assertThankYouMessageExists() { 93 | tester.waitForView(withAccessibilityLabel: Text.thankYou.accessibility()) 94 | tester.waitForView(withAccessibilityLabel: Text.niceDay.accessibility()) 95 | } 96 | 97 | /** 98 | Helper to check sent message 99 | 100 | - parameter sentMessage: The message that should have been sent 101 | */ 102 | func assertMessage(_ sentMessage: SlackMessage) { 103 | assertMessageSent(mockMessageSender, message: sentMessage) 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /ReceptionKitTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ReceptionKitTests/KIFTestCase+Helpers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestCase+Helpers.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-08-29. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import KIF 10 | @testable import ReceptionKit 11 | 12 | extension KIFTestCase { 13 | 14 | func reset() { 15 | getAppDelegate().reset() 16 | } 17 | 18 | func getAppDelegate() -> AppDelegate { 19 | guard let delegate = UIApplication.shared.delegate as? AppDelegate else { 20 | Logger.error("Could not get the app delegate") 21 | return AppDelegate() 22 | } 23 | return delegate 24 | } 25 | 26 | func mockOutMessageSender() -> MockMessageSender { 27 | let mockMessageSender = MockMessageSender() 28 | getAppDelegate().replaceMessageSender(mockMessageSender) 29 | return mockMessageSender 30 | } 31 | 32 | func assertMessageSent(_ messageSender: MockMessageSender, message: SlackMessage) { 33 | if !messageSender.wasMessageSent(message) { 34 | XCTFail("Message: \(message.text()) was expected to be sent but was not") 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /ReceptionKitTests/MockMessageSender.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MockMessageSender.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-08-30. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | @testable import ReceptionKit 11 | 12 | class MockMessageSender: MessageSender { 13 | 14 | var textSent = [SlackMessage]() 15 | var imagesSent = [UIImage]() 16 | 17 | func send(message: SlackMessage) { 18 | send(text: message) 19 | if let photo = camera.takePhoto(), Config.Photos.SendOnInteraction { 20 | send(image: photo) 21 | } 22 | } 23 | 24 | func send(text: SlackMessage) { 25 | textSent.append(text) 26 | } 27 | 28 | func send(image: UIImage) { 29 | imagesSent.append(image) 30 | } 31 | 32 | func wasMessageSent(_ slackMessage: SlackMessage) -> Bool { 33 | let message = slackMessage.text() 34 | for sentText in textSent { 35 | if sentText.text() == message { 36 | return true 37 | } 38 | } 39 | return false 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ReceptionKitTests/ReceptionKitTests-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | -------------------------------------------------------------------------------- /ReceptionKitTests/XCTestCase+KIF.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XCTestCase+KIF.swift 3 | // ReceptionKit 4 | // 5 | // Created by Andy Cho on 2016-08-29. 6 | // Copyright © 2016 Andy Cho. All rights reserved. 7 | // 8 | 9 | import KIF 10 | 11 | extension XCTestCase { 12 | 13 | var tester: KIFUITestActor { return tester() } 14 | var system: KIFSystemTestActor { return system() } 15 | 16 | private func tester(_ file: String = #file, _ line: Int = #line) -> KIFUITestActor { 17 | return KIFUITestActor(inFile: file, atLine: line, delegate: self) 18 | } 19 | 20 | private func system(_ file: String = #file, _ line: Int = #line) -> KIFSystemTestActor { 21 | return KIFSystemTestActor(inFile: file, atLine: line, delegate: self) 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Screenshots/colours.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Screenshots/colours.png -------------------------------------------------------------------------------- /Screenshots/contacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Screenshots/contacts.png -------------------------------------------------------------------------------- /Screenshots/french.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Screenshots/french.png -------------------------------------------------------------------------------- /Screenshots/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Screenshots/home.png -------------------------------------------------------------------------------- /Screenshots/reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Screenshots/reply.png -------------------------------------------------------------------------------- /Screenshots/slack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AcroMace/receptionkit/ee13bb12627d9fc3e34a27afaffe611de6853d4f/Screenshots/slack.png -------------------------------------------------------------------------------- /Scripts/install_swiftlint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # From https://alexplescan.com/posts/2016/03/03/setting-up-swiftlint-on-travis-ci/ 4 | # Installs the SwiftLint package. 5 | # Tries to get the precompiled .pkg file from Github, but if that 6 | # fails just recompiles from source. 7 | 8 | set -e 9 | 10 | SWIFTLINT_PKG_PATH="/tmp/SwiftLint.pkg" 11 | SWIFTLINT_PKG_URL="https://github.com/realm/SwiftLint/releases/download/0.25.1/SwiftLint.pkg" 12 | 13 | wget --output-document=$SWIFTLINT_PKG_PATH $SWIFTLINT_PKG_URL 14 | 15 | if [ -f $SWIFTLINT_PKG_PATH ]; then 16 | echo "SwiftLint package exists! Installing it..." 17 | sudo installer -pkg $SWIFTLINT_PKG_PATH -target / 18 | else 19 | echo "SwiftLint package doesn't exist. Compiling from source..." && 20 | git clone https://github.com/realm/SwiftLint.git /tmp/SwiftLint && 21 | cd /tmp/SwiftLint && 22 | git submodule update --init --recursive && 23 | sudo make install 24 | fi 25 | --------------------------------------------------------------------------------