├── .gitignore ├── .swiftlint.yml ├── .travis.yml ├── CHANGELOG.md ├── Cheats.podspec ├── Cheats ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── Model │ ├── CheatCode.swift │ ├── CheatCodeAction.swift │ ├── CheatCodeState.swift │ └── CheatCodeSwipeDirection.swift │ └── UI │ ├── CheatCodeGestureRecognizer.swift │ ├── KeyboardResponder.swift │ └── ShakeResponder.swift ├── Example ├── Cheats.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Cheats-Example.xcscheme ├── Cheats.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Cheats │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── Cheats.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Cheats.xcscheme │ ├── SVProgressHUD │ │ ├── LICENSE │ │ ├── README.md │ │ └── SVProgressHUD │ │ │ ├── SVIndefiniteAnimatedView.h │ │ │ ├── SVIndefiniteAnimatedView.m │ │ │ ├── SVProgressAnimatedView.h │ │ │ ├── SVProgressAnimatedView.m │ │ │ ├── SVProgressHUD.bundle │ │ │ ├── angle-mask.png │ │ │ ├── angle-mask@2x.png │ │ │ ├── angle-mask@3x.png │ │ │ ├── error.png │ │ │ ├── error@2x.png │ │ │ ├── error@3x.png │ │ │ ├── info.png │ │ │ ├── info@2x.png │ │ │ ├── info@3x.png │ │ │ ├── success.png │ │ │ ├── success@2x.png │ │ │ └── success@3x.png │ │ │ ├── SVProgressHUD.h │ │ │ ├── SVProgressHUD.m │ │ │ ├── SVRadialGradientLayer.h │ │ │ └── SVRadialGradientLayer.m │ └── Target Support Files │ │ ├── Cheats │ │ ├── Cheats-dummy.m │ │ ├── Cheats-prefix.pch │ │ ├── Cheats-umbrella.h │ │ ├── Cheats.modulemap │ │ ├── Cheats.xcconfig │ │ └── Info.plist │ │ ├── Pods-Cheats_Example │ │ ├── Info.plist │ │ ├── Pods-Cheats_Example-acknowledgements.markdown │ │ ├── Pods-Cheats_Example-acknowledgements.plist │ │ ├── Pods-Cheats_Example-dummy.m │ │ ├── Pods-Cheats_Example-frameworks.sh │ │ ├── Pods-Cheats_Example-resources.sh │ │ ├── Pods-Cheats_Example-umbrella.h │ │ ├── Pods-Cheats_Example.debug.xcconfig │ │ ├── Pods-Cheats_Example.modulemap │ │ └── Pods-Cheats_Example.release.xcconfig │ │ ├── Pods-Cheats_Tests │ │ ├── Info.plist │ │ ├── Pods-Cheats_Tests-acknowledgements.markdown │ │ ├── Pods-Cheats_Tests-acknowledgements.plist │ │ ├── Pods-Cheats_Tests-dummy.m │ │ ├── Pods-Cheats_Tests-frameworks.sh │ │ ├── Pods-Cheats_Tests-resources.sh │ │ ├── Pods-Cheats_Tests-umbrella.h │ │ ├── Pods-Cheats_Tests.debug.xcconfig │ │ ├── Pods-Cheats_Tests.modulemap │ │ └── Pods-Cheats_Tests.release.xcconfig │ │ └── SVProgressHUD │ │ ├── Info.plist │ │ ├── SVProgressHUD-dummy.m │ │ ├── SVProgressHUD-prefix.pch │ │ ├── SVProgressHUD-umbrella.h │ │ ├── SVProgressHUD.modulemap │ │ └── SVProgressHUD.xcconfig └── Tests │ ├── Info.plist │ ├── PressStart2P.ttf │ └── Tests.swift ├── LICENSE ├── Package.swift ├── README.md ├── _Pods.xcodeproj ├── docs └── images │ ├── cheats-banner.png │ ├── cheats-large-logo.png │ ├── cheats-logo.png │ └── example.gif └── install_swiftlint.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | *.afdesign 22 | *.key 23 | # Bundler 24 | .bundle 25 | 26 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 27 | # Carthage/Checkouts 28 | 29 | Carthage/Build 30 | 31 | # We recommend against adding the Pods directory to your .gitignore. However 32 | # you should judge for yourself, the pros and cons are mentioned at: 33 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 34 | # 35 | # Note: if you ignore the Pods directory, make sure to uncomment 36 | # `pod install` in .travis.yml 37 | # 38 | # Pods/ 39 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - trailing_whitespace 3 | - identifier_name 4 | opt_in_rules: 5 | - empty_count 6 | excluded: 7 | reporter: "xcode" 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode10.2 3 | before_install: 4 | - gem install cocoapods -v '1.5.0' 5 | install: 6 | - ./install_swiftlint.sh 7 | script: 8 | - gem install travis 9 | - travis lint .travis.yml --no-interactive 10 | - swiftlint 11 | - xcodebuild clean build test -workspace Example/Cheats.xcworkspace -scheme Cheats-Example -destination "platform=iOS Simulator,name=iPhone X" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO 12 | - pod lib lint --allow-warnings 13 | - swift build # Check Swift Package Manager module compiles -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [3.0.0] - 2023-03-06 8 | ### Changed 9 | - Fixed links in README.md after renaming `master` -> `main`. 10 | 11 | ## [2.0.0] - 2019-07-25 12 | ### Changed 13 | - Updated to Swift 5.0. 14 | 15 | ## [1.2.2] - 2019-02-04 16 | ### Changed 17 | - Improvements to example app UI. 18 | 19 | ## [1.2.1] - 2019-01-24 20 | ### Changed 21 | - Updated the `tap(_)` action to `tap(times:)`. 22 | 23 | ## [1.2.0] - 2019-01-20 24 | ### Added 25 | - Added support for taps as part of a cheat's action sequence. 26 | 27 | ## [1.1.1] - 2019-01-18 28 | ### Changed 29 | - Fixed an issue with shake actions not being counted towards the cheat sequence correctly. 30 | 31 | ## [1.1.0] - 2019-01-17 32 | ### Added 33 | - Added a new state `reset` for the case whereby the cheat code sequence has not yet begun or has been reset. 34 | ### Changed 35 | - Removed unneeded to call `reset()` from `ViewController` as the gesture recognizer will reset for us. 36 | 37 | ## [1.0.0] - 2019-01-16 38 | ### Added 39 | - Added significant project documentation. 40 | - Added support for screen shake actions. 41 | ### Changed 42 | - Resolved warnings raised by SwiftLint. 43 | 44 | ## [0.0.2] - 2019-01-16 45 | ### Changed 46 | - Made `Cheats` scheme shared for Carthage compatibility. 47 | 48 | ## [0.0.1] - 2019-01-16 49 | ### Added 50 | - Initial release. -------------------------------------------------------------------------------- /Cheats.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'Cheats' 3 | s.version = '2.0.0' 4 | s.swift_version = '5.0' 5 | s.summary = 'Retro cheat codes for modern iOS apps.' 6 | s.description = <<-DESC 7 | Cheats is an implementation of retro-style cheat codes (such as the Konami code) for iOS apps. Combine a sequence of actions consisting of swipes, shake gestures, taps and key presses to create a cheat code for unlocking features or Easter eggs in your app. 8 | DESC 9 | s.homepage = 'https://github.com/rwbutler/Cheats' 10 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | s.author = { 'rwbutler' => 'github@rwbutler.com' } 13 | s.source = { :git => 'https://github.com/rwbutler/Cheats.git', :tag => s.version.to_s } 14 | s.social_media_url = 'https://twitter.com/ross_w_butler' 15 | 16 | s.ios.deployment_target = '8.0' 17 | 18 | s.source_files = 'Cheats/Classes/**/*' 19 | 20 | # s.resource_bundles = { 21 | # 'Cheats' => ['Cheats/Assets/*.png'] 22 | # } 23 | 24 | # s.public_header_files = 'Pod/Classes/**/*.h' 25 | # s.frameworks = 'UIKit', 'MapKit' 26 | # s.dependency 'AFNetworking', '~> 2.3' 27 | end 28 | -------------------------------------------------------------------------------- /Cheats/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Cheats/Assets/.gitkeep -------------------------------------------------------------------------------- /Cheats/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Cheats/Classes/.gitkeep -------------------------------------------------------------------------------- /Cheats/Classes/Model/CheatCode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheatCodeState.swift 3 | // Cheats 4 | // 5 | // Created by Ross Butler on 1/16/19. 6 | // 7 | 8 | import Foundation 9 | 10 | /// State machine implementation of a cheat code sequence. 11 | public class CheatCode { 12 | 13 | public typealias Action = CheatCodeAction 14 | public typealias State = CheatCodeState 15 | 16 | /// Actions to be performed to complete cheat code sequence. 17 | private let actions: [CheatCodeAction] 18 | 19 | /// Callback for informing observers of completion progress as actions are performed. 20 | private let onStateChanged: ((CheatCode) -> Void)? 21 | 22 | /// Actions that have been performed by the user up until this point. 23 | private var performed: [CheatCodeAction] 24 | 25 | public init(actions: [CheatCodeAction], onStateChanged: ((CheatCode) -> Void)? = nil) { 26 | self.actions = actions 27 | self.onStateChanged = onStateChanged 28 | self.performed = [] 29 | } 30 | 31 | /// The next action to be performed in the cheat code sequence where the sequence has not yet been matched. 32 | public func nextAction() -> Action? { 33 | guard state() == .matching || state() == .reset else { return nil } 34 | if actions.count > performed.count { 35 | let nextAction = actions[performed.count] 36 | return nextAction 37 | } 38 | return nil 39 | } 40 | 41 | /// Adds an action to the sequence of actions the user has performed so far. 42 | public func performed(_ action: CheatCodeAction) { 43 | performed.append(action) 44 | unowned let unownedSelf = self 45 | onStateChanged?(unownedSelf) 46 | } 47 | 48 | public func previousAction() -> Action? { 49 | return performed.last 50 | } 51 | 52 | /// Resets the sequence of actions of performed to allow the user to try again. 53 | public func reset() { 54 | self.performed = [] 55 | unowned let unownedSelf = self 56 | onStateChanged?(unownedSelf) 57 | } 58 | 59 | /// Determines whether or not the cheat code has been matched by the performed actions, 60 | /// is matching so far or does not match the required actions. 61 | /// returns: State of cheat code progress so far. 62 | public func state() -> State { 63 | var result: State = .matching 64 | if performed.isEmpty { 65 | result = .reset 66 | } 67 | for counter in 0.. Bool { 20 | switch(lhs, rhs) { 21 | case (.keyPress(let lhsKey), .keyPress(let rhsKey)): 22 | return lhsKey == rhsKey 23 | case (.swipe(let lhsDirection), .swipe(let rhsDirection)): 24 | return lhsDirection == rhsDirection 25 | case (.shake, .shake): 26 | return true 27 | case (.tap( let lhsTaps), .tap(let rhsTaps)): 28 | return lhsTaps == rhsTaps 29 | default: 30 | return false 31 | } 32 | } 33 | } 34 | 35 | extension CheatCodeAction: CustomStringConvertible { 36 | public var description: String { 37 | switch self { 38 | case .keyPress(let key): 39 | return "key press: \(key)" 40 | case .shake: 41 | return "shake" 42 | case .swipe(let direction): 43 | return "swipe \(direction)" 44 | case .tap(let numberOfTaps): 45 | switch numberOfTaps { 46 | case 1: 47 | return "single tap" 48 | case 2: 49 | return "double tap" 50 | case 3: 51 | return "triple tap" 52 | case 4: 53 | return "quadruple tap" 54 | default: 55 | return "tap \(numberOfTaps) times" 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Cheats/Classes/Model/CheatCodeState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheatCodeState.swift 3 | // Cheats 4 | // 5 | // Created by Ross Butler on 1/16/19. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum CheatCodeState { 11 | /// Cheat code sequence has been performed correctly. 12 | case matched 13 | 14 | /// Cheat code sequence has been performed correctly so far with further actions required to complete the sequence. 15 | case matching 16 | 17 | /// Cheat code sequence has been performed incorrectly. 18 | case notMatched 19 | 20 | /// Cheat code at the beginning / reset - no recognized actions have been performed. 21 | case reset 22 | } 23 | 24 | extension CheatCodeState: Equatable { 25 | public static func == (lhs: CheatCodeState, rhs: CheatCodeState) -> Bool { 26 | switch(lhs, rhs) { 27 | case (.matched, .matched), (.matching, .matching), (.notMatched, .notMatched), (.reset, .reset): 28 | return true 29 | default: 30 | return false 31 | } 32 | } 33 | } 34 | 35 | extension CheatCodeState: CustomStringConvertible { 36 | public var description: String { 37 | switch self { 38 | case .matched: 39 | return "matched" 40 | case .matching: 41 | return "matching" 42 | case .notMatched: 43 | return "not matched" 44 | case .reset: 45 | return "reset" 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Cheats/Classes/Model/CheatCodeSwipeDirection.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheatCodeSwipeDirection.swift 3 | // Cheats 4 | // 5 | // Created by Ross Butler on 1/16/19. 6 | // 7 | 8 | import Foundation 9 | 10 | public enum CheatCodeSwipeDirection { 11 | // swiftlint:disable:next identifier_name 12 | case up 13 | case down 14 | case left 15 | case right 16 | } 17 | 18 | extension CheatCodeSwipeDirection: Equatable { 19 | public static func == (lhs: CheatCodeSwipeDirection, rhs: CheatCodeSwipeDirection) -> Bool { 20 | switch(lhs, rhs) { 21 | case (.up, .up), (.down, .down), (.left, .left), (.right, .right): 22 | return true 23 | default: 24 | return false 25 | } 26 | } 27 | } 28 | 29 | extension CheatCodeSwipeDirection: CustomStringConvertible { 30 | public var description: String { 31 | switch self { 32 | case .up: 33 | return "up" 34 | case .down: 35 | return "down" 36 | case .left: 37 | return "left" 38 | case .right: 39 | return "right" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Cheats/Classes/UI/CheatCodeGestureRecognizer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheatCodeRecognizer.swift 3 | // Cheats 4 | // 5 | // Created by Ross Butler on 1/16/19. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | public class CheatCodeGestureRecognizer: UIGestureRecognizer { 12 | public let cheatCode: CheatCode? 13 | public var movementDelta: CGFloat = 50 14 | private var previousTouchPoint: CGPoint = CGPoint.zero 15 | private var observation: NSKeyValueObservation? 16 | internal var keyboardResponder: KeyboardResponder = KeyboardResponder() 17 | internal var shakeResponder: ShakeResponder = ShakeResponder() 18 | 19 | public init(cheatCode: CheatCode, target: Any?, action: Selector?) { 20 | self.cheatCode = cheatCode 21 | super.init(target: target, action: action) 22 | keyboardResponder.associatedGestureRecogizer = self 23 | shakeResponder.associatedGestureRecogizer = self 24 | observation = self.observe(\.view, options: [.new]) { _, _ in 25 | self.addResponders() 26 | } 27 | } 28 | 29 | deinit { 30 | observation = nil 31 | } 32 | 33 | private func addKeyboardResponder() { 34 | if keyboardResponder.superview == nil { 35 | view?.addSubview(keyboardResponder) 36 | } 37 | } 38 | 39 | private func addResponders() { 40 | addKeyboardResponder() 41 | addShakeResponder() 42 | configureForNextAction() 43 | } 44 | 45 | private func addShakeResponder() { 46 | if shakeResponder.superview == nil { 47 | shakeResponder.frame = CGRect(x: 0, y: 0, width: 1, height: 1) 48 | shakeResponder.backgroundColor = UIColor.red 49 | view?.addSubview(shakeResponder) 50 | shakeResponder.frame = CGRect(x: 0, y: 0, width: 1, height: 1) 51 | } 52 | } 53 | 54 | override public func reset() { 55 | super.reset() 56 | cheatCode?.reset() 57 | configureForNextAction() 58 | } 59 | 60 | override public func touchesBegan(_ touches: Set, with event: UIEvent) { 61 | guard touches.count == 1 else { // We only support swipes currently. 62 | state = .failed 63 | return 64 | } 65 | if let touchPoint = touches.first?.location(in: view) { 66 | previousTouchPoint = touchPoint 67 | state = .began 68 | } 69 | } 70 | 71 | override public func touchesEnded(_ touches: Set, with event: UIEvent) { 72 | guard let touch = touches.first?.location(in: view) else { return } 73 | let deltaX = touch.x - previousTouchPoint.x 74 | let deltaY = touch.y - previousTouchPoint.y 75 | 76 | if deltaY > movementDelta { 77 | cheatCode?.performed(.swipe(.down)) 78 | } 79 | if deltaX < -movementDelta { 80 | cheatCode?.performed(.swipe(.left)) 81 | } 82 | if deltaX > movementDelta { 83 | cheatCode?.performed(.swipe(.right)) 84 | } 85 | if deltaY < -movementDelta { 86 | cheatCode?.performed(.swipe(.up)) 87 | } 88 | if pointsWithinTolerance(point1: previousTouchPoint, point2: touch), 89 | let nextAction = cheatCode?.nextAction(), 90 | let tapCount = touches.first?.tapCount, 91 | case .tap(let numberOfTaps) = nextAction, 92 | tapCount == numberOfTaps { 93 | cheatCode?.performed(nextAction) 94 | } 95 | 96 | configureForNextAction() 97 | } 98 | 99 | /// Checks two points to determine whether they are within an acceptable distance of one another. 100 | private func pointsWithinTolerance(point1: CGPoint, point2: CGPoint) -> Bool { 101 | let tolerance: CGFloat = 10 102 | let deltaX = abs(point1.x - point2.x) 103 | let deltaY = abs(point1.y - point2.y) 104 | return deltaX < tolerance && deltaY < tolerance 105 | } 106 | 107 | public func configureForNextAction() { 108 | updateGestureRecognizerState() 109 | guard let nextAction = cheatCode?.nextAction() else { return } 110 | switch nextAction { 111 | case .keyPress: 112 | keyboardResponder.becomeFirstResponder() 113 | case .shake: 114 | shakeResponder.becomeFirstResponder() 115 | case .swipe, .tap: 116 | keyboardResponder.resignFirstResponder() 117 | shakeResponder.resignFirstResponder() 118 | } 119 | } 120 | 121 | override public func touchesMoved(_ touches: Set, with event: UIEvent) { 122 | } 123 | 124 | internal func updateGestureRecognizerState() { 125 | guard let cheatCodeState = cheatCode?.state() else { return } 126 | switch cheatCodeState { 127 | case .matched: 128 | state = .recognized 129 | case .matching: 130 | state = .changed 131 | case .notMatched: 132 | state = .failed 133 | case .reset: 134 | state = .possible 135 | } 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /Cheats/Classes/UI/KeyboardResponder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Responder.swift 3 | // Cheats 4 | // 5 | // Created by Ross Butler on 1/16/19. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | class KeyboardResponder: UIControl, UIKeyInput, UITextInputTraits { 12 | 13 | /// For retrieval of state information 14 | weak var associatedGestureRecogizer: CheatCodeGestureRecognizer? 15 | 16 | /// For UIKeyInput conformance 17 | var hasText: Bool = false 18 | 19 | override var canBecomeFirstResponder: Bool { 20 | return true 21 | } 22 | 23 | func deleteBackward() { // Do nothing 24 | } 25 | 26 | func insertText(_ text: String) { 27 | guard let cheatCode = associatedGestureRecogizer?.cheatCode else { return } 28 | cheatCode.performed(.keyPress(text)) 29 | if cheatCode.state() != .matching { 30 | resignFirstResponder() 31 | } 32 | configureForNextAction() 33 | } 34 | 35 | override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { 36 | guard let cheatCode = associatedGestureRecogizer?.cheatCode else { return } 37 | if motion == .motionShake { 38 | cheatCode.performed(.shake) 39 | configureForNextAction() 40 | } 41 | } 42 | 43 | private func configureForNextAction() { 44 | associatedGestureRecogizer?.configureForNextAction() 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Cheats/Classes/UI/ShakeResponder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ShakeResponder.swift 3 | // Cheats 4 | // 5 | // Created by Ross Butler on 1/16/19. 6 | // 7 | 8 | import Foundation 9 | 10 | class ShakeResponder: UIControl { 11 | 12 | /// For retrieval of state information 13 | weak var associatedGestureRecogizer: CheatCodeGestureRecognizer? 14 | 15 | override var canBecomeFirstResponder: Bool { 16 | return true 17 | } 18 | 19 | override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { 20 | guard let cheatCode = associatedGestureRecogizer?.cheatCode else { return } 21 | if motion == .motionShake { 22 | cheatCode.performed(.shake) 23 | associatedGestureRecogizer?.configureForNextAction() 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /Example/Cheats.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 136DB69922085EAD004DEBBC /* PressStart2P.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 136DB69822085EAD004DEBBC /* PressStart2P.ttf */; }; 11 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 12 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 13 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 14 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 15 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 16 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 17 | 865F2A594F4FC9ECFEAEC5F8 /* Pods_Cheats_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6B2BEE98F3B98E365CBCDFC /* Pods_Cheats_Example.framework */; }; 18 | EFAD1B55AC458855DFD2FCA6 /* Pods_Cheats_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 940E195659F664F8015CB267 /* Pods_Cheats_Tests.framework */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 27 | remoteInfo = Cheats; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 136DB69822085EAD004DEBBC /* PressStart2P.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = PressStart2P.ttf; path = ../Tests/PressStart2P.ttf; sourceTree = ""; }; 33 | 1BE6185A19CA8B9C9C94EDA9 /* Cheats.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Cheats.podspec; path = ../Cheats.podspec; sourceTree = ""; }; 34 | 441A28FEC89BB9C7332D3C69 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 35 | 607FACD01AFB9204008FA782 /* Cheats_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Cheats_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 38 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 39 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 42 | 607FACE51AFB9204008FA782 /* Cheats_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Cheats_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 45 | 66D0DC7445A7A86B58FCF006 /* Pods-Cheats_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Cheats_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example.release.xcconfig"; sourceTree = ""; }; 46 | 682F5BA7BA0C38B400A8F488 /* Pods-Cheats_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Cheats_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests.debug.xcconfig"; sourceTree = ""; }; 47 | 892FF06533772F00C5D22AC7 /* Pods-Cheats_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Cheats_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example.debug.xcconfig"; sourceTree = ""; }; 48 | 8950D254319DD9D973D9D8BD /* Pods-Cheats_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Cheats_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests.release.xcconfig"; sourceTree = ""; }; 49 | 940E195659F664F8015CB267 /* Pods_Cheats_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Cheats_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | B6B2BEE98F3B98E365CBCDFC /* Pods_Cheats_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Cheats_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | CC92E120C7AE2A67A2D93BDC /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 865F2A594F4FC9ECFEAEC5F8 /* Pods_Cheats_Example.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | EFAD1B55AC458855DFD2FCA6 /* Pods_Cheats_Tests.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 607FACC71AFB9204008FA782 = { 75 | isa = PBXGroup; 76 | children = ( 77 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 78 | 607FACD21AFB9204008FA782 /* Example for Cheats */, 79 | 607FACE81AFB9204008FA782 /* Tests */, 80 | 607FACD11AFB9204008FA782 /* Products */, 81 | 685511BCB12F776B07AECE2B /* Pods */, 82 | 7FBAEFE772B4DDB68A595C76 /* Frameworks */, 83 | ); 84 | sourceTree = ""; 85 | }; 86 | 607FACD11AFB9204008FA782 /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 607FACD01AFB9204008FA782 /* Cheats_Example.app */, 90 | 607FACE51AFB9204008FA782 /* Cheats_Tests.xctest */, 91 | ); 92 | name = Products; 93 | sourceTree = ""; 94 | }; 95 | 607FACD21AFB9204008FA782 /* Example for Cheats */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 99 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 100 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 101 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 102 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 103 | 607FACD31AFB9204008FA782 /* Supporting Files */, 104 | ); 105 | name = "Example for Cheats"; 106 | path = Cheats; 107 | sourceTree = ""; 108 | }; 109 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 607FACD41AFB9204008FA782 /* Info.plist */, 113 | 136DB69822085EAD004DEBBC /* PressStart2P.ttf */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | 607FACE81AFB9204008FA782 /* Tests */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 122 | 607FACE91AFB9204008FA782 /* Supporting Files */, 123 | ); 124 | path = Tests; 125 | sourceTree = ""; 126 | }; 127 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 607FACEA1AFB9204008FA782 /* Info.plist */, 131 | ); 132 | name = "Supporting Files"; 133 | sourceTree = ""; 134 | }; 135 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 1BE6185A19CA8B9C9C94EDA9 /* Cheats.podspec */, 139 | CC92E120C7AE2A67A2D93BDC /* README.md */, 140 | 441A28FEC89BB9C7332D3C69 /* LICENSE */, 141 | ); 142 | name = "Podspec Metadata"; 143 | sourceTree = ""; 144 | }; 145 | 685511BCB12F776B07AECE2B /* Pods */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 892FF06533772F00C5D22AC7 /* Pods-Cheats_Example.debug.xcconfig */, 149 | 66D0DC7445A7A86B58FCF006 /* Pods-Cheats_Example.release.xcconfig */, 150 | 682F5BA7BA0C38B400A8F488 /* Pods-Cheats_Tests.debug.xcconfig */, 151 | 8950D254319DD9D973D9D8BD /* Pods-Cheats_Tests.release.xcconfig */, 152 | ); 153 | name = Pods; 154 | sourceTree = ""; 155 | }; 156 | 7FBAEFE772B4DDB68A595C76 /* Frameworks */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | B6B2BEE98F3B98E365CBCDFC /* Pods_Cheats_Example.framework */, 160 | 940E195659F664F8015CB267 /* Pods_Cheats_Tests.framework */, 161 | ); 162 | name = Frameworks; 163 | sourceTree = ""; 164 | }; 165 | /* End PBXGroup section */ 166 | 167 | /* Begin PBXNativeTarget section */ 168 | 607FACCF1AFB9204008FA782 /* Cheats_Example */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Cheats_Example" */; 171 | buildPhases = ( 172 | BD13454D85EE1CA772D8273D /* [CP] Check Pods Manifest.lock */, 173 | 607FACCC1AFB9204008FA782 /* Sources */, 174 | 607FACCD1AFB9204008FA782 /* Frameworks */, 175 | 607FACCE1AFB9204008FA782 /* Resources */, 176 | DDE82A4B8A14045FDFE42039 /* [CP] Embed Pods Frameworks */, 177 | 136DB69A22086019004DEBBC /* SwiftLint */, 178 | ); 179 | buildRules = ( 180 | ); 181 | dependencies = ( 182 | ); 183 | name = Cheats_Example; 184 | productName = Cheats; 185 | productReference = 607FACD01AFB9204008FA782 /* Cheats_Example.app */; 186 | productType = "com.apple.product-type.application"; 187 | }; 188 | 607FACE41AFB9204008FA782 /* Cheats_Tests */ = { 189 | isa = PBXNativeTarget; 190 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Cheats_Tests" */; 191 | buildPhases = ( 192 | 6AAD6A41D1623594B439EB21 /* [CP] Check Pods Manifest.lock */, 193 | 607FACE11AFB9204008FA782 /* Sources */, 194 | 607FACE21AFB9204008FA782 /* Frameworks */, 195 | 607FACE31AFB9204008FA782 /* Resources */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 201 | ); 202 | name = Cheats_Tests; 203 | productName = Tests; 204 | productReference = 607FACE51AFB9204008FA782 /* Cheats_Tests.xctest */; 205 | productType = "com.apple.product-type.bundle.unit-test"; 206 | }; 207 | /* End PBXNativeTarget section */ 208 | 209 | /* Begin PBXProject section */ 210 | 607FACC81AFB9204008FA782 /* Project object */ = { 211 | isa = PBXProject; 212 | attributes = { 213 | LastSwiftUpdateCheck = 0830; 214 | LastUpgradeCheck = 1020; 215 | ORGANIZATIONNAME = CocoaPods; 216 | TargetAttributes = { 217 | 607FACCF1AFB9204008FA782 = { 218 | CreatedOnToolsVersion = 6.3.1; 219 | LastSwiftMigration = 1020; 220 | }; 221 | 607FACE41AFB9204008FA782 = { 222 | CreatedOnToolsVersion = 6.3.1; 223 | LastSwiftMigration = 1020; 224 | TestTargetID = 607FACCF1AFB9204008FA782; 225 | }; 226 | }; 227 | }; 228 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Cheats" */; 229 | compatibilityVersion = "Xcode 3.2"; 230 | developmentRegion = en; 231 | hasScannedForEncodings = 0; 232 | knownRegions = ( 233 | en, 234 | Base, 235 | ); 236 | mainGroup = 607FACC71AFB9204008FA782; 237 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 238 | projectDirPath = ""; 239 | projectRoot = ""; 240 | targets = ( 241 | 607FACCF1AFB9204008FA782 /* Cheats_Example */, 242 | 607FACE41AFB9204008FA782 /* Cheats_Tests */, 243 | ); 244 | }; 245 | /* End PBXProject section */ 246 | 247 | /* Begin PBXResourcesBuildPhase section */ 248 | 607FACCE1AFB9204008FA782 /* Resources */ = { 249 | isa = PBXResourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 253 | 136DB69922085EAD004DEBBC /* PressStart2P.ttf in Resources */, 254 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 255 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | 607FACE31AFB9204008FA782 /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | /* End PBXResourcesBuildPhase section */ 267 | 268 | /* Begin PBXShellScriptBuildPhase section */ 269 | 136DB69A22086019004DEBBC /* SwiftLint */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputFileListPaths = ( 275 | ); 276 | inputPaths = ( 277 | ); 278 | name = SwiftLint; 279 | outputFileListPaths = ( 280 | ); 281 | outputPaths = ( 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | shellPath = /bin/sh; 285 | shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n\n"; 286 | }; 287 | 6AAD6A41D1623594B439EB21 /* [CP] Check Pods Manifest.lock */ = { 288 | isa = PBXShellScriptBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | ); 292 | inputPaths = ( 293 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 294 | "${PODS_ROOT}/Manifest.lock", 295 | ); 296 | name = "[CP] Check Pods Manifest.lock"; 297 | outputPaths = ( 298 | "$(DERIVED_FILE_DIR)/Pods-Cheats_Tests-checkManifestLockResult.txt", 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | shellPath = /bin/sh; 302 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 303 | showEnvVarsInLog = 0; 304 | }; 305 | BD13454D85EE1CA772D8273D /* [CP] Check Pods Manifest.lock */ = { 306 | isa = PBXShellScriptBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | ); 310 | inputPaths = ( 311 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 312 | "${PODS_ROOT}/Manifest.lock", 313 | ); 314 | name = "[CP] Check Pods Manifest.lock"; 315 | outputPaths = ( 316 | "$(DERIVED_FILE_DIR)/Pods-Cheats_Example-checkManifestLockResult.txt", 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | shellPath = /bin/sh; 320 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 321 | showEnvVarsInLog = 0; 322 | }; 323 | DDE82A4B8A14045FDFE42039 /* [CP] Embed Pods Frameworks */ = { 324 | isa = PBXShellScriptBuildPhase; 325 | buildActionMask = 2147483647; 326 | files = ( 327 | ); 328 | inputPaths = ( 329 | "${SRCROOT}/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example-frameworks.sh", 330 | "${BUILT_PRODUCTS_DIR}/Cheats/Cheats.framework", 331 | "${BUILT_PRODUCTS_DIR}/SVProgressHUD/SVProgressHUD.framework", 332 | ); 333 | name = "[CP] Embed Pods Frameworks"; 334 | outputPaths = ( 335 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cheats.framework", 336 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SVProgressHUD.framework", 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | shellPath = /bin/sh; 340 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example-frameworks.sh\"\n"; 341 | showEnvVarsInLog = 0; 342 | }; 343 | /* End PBXShellScriptBuildPhase section */ 344 | 345 | /* Begin PBXSourcesBuildPhase section */ 346 | 607FACCC1AFB9204008FA782 /* Sources */ = { 347 | isa = PBXSourcesBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 351 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 352 | ); 353 | runOnlyForDeploymentPostprocessing = 0; 354 | }; 355 | 607FACE11AFB9204008FA782 /* Sources */ = { 356 | isa = PBXSourcesBuildPhase; 357 | buildActionMask = 2147483647; 358 | files = ( 359 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 360 | ); 361 | runOnlyForDeploymentPostprocessing = 0; 362 | }; 363 | /* End PBXSourcesBuildPhase section */ 364 | 365 | /* Begin PBXTargetDependency section */ 366 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 367 | isa = PBXTargetDependency; 368 | target = 607FACCF1AFB9204008FA782 /* Cheats_Example */; 369 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 370 | }; 371 | /* End PBXTargetDependency section */ 372 | 373 | /* Begin PBXVariantGroup section */ 374 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 375 | isa = PBXVariantGroup; 376 | children = ( 377 | 607FACDA1AFB9204008FA782 /* Base */, 378 | ); 379 | name = Main.storyboard; 380 | sourceTree = ""; 381 | }; 382 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 383 | isa = PBXVariantGroup; 384 | children = ( 385 | 607FACDF1AFB9204008FA782 /* Base */, 386 | ); 387 | name = LaunchScreen.xib; 388 | sourceTree = ""; 389 | }; 390 | /* End PBXVariantGroup section */ 391 | 392 | /* Begin XCBuildConfiguration section */ 393 | 607FACED1AFB9204008FA782 /* Debug */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | ALWAYS_SEARCH_USER_PATHS = NO; 397 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 398 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 399 | CLANG_CXX_LIBRARY = "libc++"; 400 | CLANG_ENABLE_MODULES = YES; 401 | CLANG_ENABLE_OBJC_ARC = YES; 402 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 403 | CLANG_WARN_BOOL_CONVERSION = YES; 404 | CLANG_WARN_COMMA = YES; 405 | CLANG_WARN_CONSTANT_CONVERSION = YES; 406 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 407 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 408 | CLANG_WARN_EMPTY_BODY = YES; 409 | CLANG_WARN_ENUM_CONVERSION = YES; 410 | CLANG_WARN_INFINITE_RECURSION = YES; 411 | CLANG_WARN_INT_CONVERSION = YES; 412 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 413 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 414 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 415 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 416 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 417 | CLANG_WARN_STRICT_PROTOTYPES = YES; 418 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 419 | CLANG_WARN_UNREACHABLE_CODE = YES; 420 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 421 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 422 | COPY_PHASE_STRIP = NO; 423 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 424 | ENABLE_STRICT_OBJC_MSGSEND = YES; 425 | ENABLE_TESTABILITY = YES; 426 | GCC_C_LANGUAGE_STANDARD = gnu99; 427 | GCC_DYNAMIC_NO_PIC = NO; 428 | GCC_NO_COMMON_BLOCKS = YES; 429 | GCC_OPTIMIZATION_LEVEL = 0; 430 | GCC_PREPROCESSOR_DEFINITIONS = ( 431 | "DEBUG=1", 432 | "$(inherited)", 433 | ); 434 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 435 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 436 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 437 | GCC_WARN_UNDECLARED_SELECTOR = YES; 438 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 439 | GCC_WARN_UNUSED_FUNCTION = YES; 440 | GCC_WARN_UNUSED_VARIABLE = YES; 441 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 442 | MTL_ENABLE_DEBUG_INFO = YES; 443 | ONLY_ACTIVE_ARCH = YES; 444 | SDKROOT = iphoneos; 445 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 446 | }; 447 | name = Debug; 448 | }; 449 | 607FACEE1AFB9204008FA782 /* Release */ = { 450 | isa = XCBuildConfiguration; 451 | buildSettings = { 452 | ALWAYS_SEARCH_USER_PATHS = NO; 453 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 454 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 455 | CLANG_CXX_LIBRARY = "libc++"; 456 | CLANG_ENABLE_MODULES = YES; 457 | CLANG_ENABLE_OBJC_ARC = YES; 458 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 459 | CLANG_WARN_BOOL_CONVERSION = YES; 460 | CLANG_WARN_COMMA = YES; 461 | CLANG_WARN_CONSTANT_CONVERSION = YES; 462 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 463 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 464 | CLANG_WARN_EMPTY_BODY = YES; 465 | CLANG_WARN_ENUM_CONVERSION = YES; 466 | CLANG_WARN_INFINITE_RECURSION = YES; 467 | CLANG_WARN_INT_CONVERSION = YES; 468 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 469 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 470 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 471 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 472 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 473 | CLANG_WARN_STRICT_PROTOTYPES = YES; 474 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 475 | CLANG_WARN_UNREACHABLE_CODE = YES; 476 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 477 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 478 | COPY_PHASE_STRIP = NO; 479 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 480 | ENABLE_NS_ASSERTIONS = NO; 481 | ENABLE_STRICT_OBJC_MSGSEND = YES; 482 | GCC_C_LANGUAGE_STANDARD = gnu99; 483 | GCC_NO_COMMON_BLOCKS = YES; 484 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 485 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 486 | GCC_WARN_UNDECLARED_SELECTOR = YES; 487 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 488 | GCC_WARN_UNUSED_FUNCTION = YES; 489 | GCC_WARN_UNUSED_VARIABLE = YES; 490 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 491 | MTL_ENABLE_DEBUG_INFO = NO; 492 | SDKROOT = iphoneos; 493 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 494 | VALIDATE_PRODUCT = YES; 495 | }; 496 | name = Release; 497 | }; 498 | 607FACF01AFB9204008FA782 /* Debug */ = { 499 | isa = XCBuildConfiguration; 500 | baseConfigurationReference = 892FF06533772F00C5D22AC7 /* Pods-Cheats_Example.debug.xcconfig */; 501 | buildSettings = { 502 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 503 | INFOPLIST_FILE = Cheats/Info.plist; 504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 505 | MODULE_NAME = ExampleApp; 506 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 507 | PRODUCT_NAME = "$(TARGET_NAME)"; 508 | SWIFT_VERSION = 5.0; 509 | }; 510 | name = Debug; 511 | }; 512 | 607FACF11AFB9204008FA782 /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | baseConfigurationReference = 66D0DC7445A7A86B58FCF006 /* Pods-Cheats_Example.release.xcconfig */; 515 | buildSettings = { 516 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 517 | INFOPLIST_FILE = Cheats/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 519 | MODULE_NAME = ExampleApp; 520 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | SWIFT_VERSION = 5.0; 523 | }; 524 | name = Release; 525 | }; 526 | 607FACF31AFB9204008FA782 /* Debug */ = { 527 | isa = XCBuildConfiguration; 528 | baseConfigurationReference = 682F5BA7BA0C38B400A8F488 /* Pods-Cheats_Tests.debug.xcconfig */; 529 | buildSettings = { 530 | GCC_PREPROCESSOR_DEFINITIONS = ( 531 | "DEBUG=1", 532 | "$(inherited)", 533 | ); 534 | INFOPLIST_FILE = Tests/Info.plist; 535 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 536 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 537 | PRODUCT_NAME = "$(TARGET_NAME)"; 538 | SWIFT_VERSION = 5.0; 539 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Cheats_Example.app/Cheats_Example"; 540 | }; 541 | name = Debug; 542 | }; 543 | 607FACF41AFB9204008FA782 /* Release */ = { 544 | isa = XCBuildConfiguration; 545 | baseConfigurationReference = 8950D254319DD9D973D9D8BD /* Pods-Cheats_Tests.release.xcconfig */; 546 | buildSettings = { 547 | INFOPLIST_FILE = Tests/Info.plist; 548 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 549 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 550 | PRODUCT_NAME = "$(TARGET_NAME)"; 551 | SWIFT_VERSION = 5.0; 552 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Cheats_Example.app/Cheats_Example"; 553 | }; 554 | name = Release; 555 | }; 556 | /* End XCBuildConfiguration section */ 557 | 558 | /* Begin XCConfigurationList section */ 559 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Cheats" */ = { 560 | isa = XCConfigurationList; 561 | buildConfigurations = ( 562 | 607FACED1AFB9204008FA782 /* Debug */, 563 | 607FACEE1AFB9204008FA782 /* Release */, 564 | ); 565 | defaultConfigurationIsVisible = 0; 566 | defaultConfigurationName = Release; 567 | }; 568 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Cheats_Example" */ = { 569 | isa = XCConfigurationList; 570 | buildConfigurations = ( 571 | 607FACF01AFB9204008FA782 /* Debug */, 572 | 607FACF11AFB9204008FA782 /* Release */, 573 | ); 574 | defaultConfigurationIsVisible = 0; 575 | defaultConfigurationName = Release; 576 | }; 577 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Cheats_Tests" */ = { 578 | isa = XCConfigurationList; 579 | buildConfigurations = ( 580 | 607FACF31AFB9204008FA782 /* Debug */, 581 | 607FACF41AFB9204008FA782 /* Release */, 582 | ); 583 | defaultConfigurationIsVisible = 0; 584 | defaultConfigurationName = Release; 585 | }; 586 | /* End XCConfigurationList section */ 587 | }; 588 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 589 | } 590 | -------------------------------------------------------------------------------- /Example/Cheats.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Cheats.xcodeproj/xcshareddata/xcschemes/Cheats-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/Cheats.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Cheats.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Cheats/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Cheats 4 | // 5 | // Created by Ross Butler on 01/16/2019. 6 | // Copyright (c) 2019 Ross Butler. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, 17 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | return true 19 | } 20 | 21 | func applicationWillResignActive(_ application: UIApplication) { 22 | } 23 | 24 | func applicationDidEnterBackground(_ application: UIApplication) { 25 | } 26 | 27 | func applicationWillEnterForeground(_ application: UIApplication) { 28 | } 29 | 30 | func applicationDidBecomeActive(_ application: UIApplication) { 31 | } 32 | 33 | func applicationWillTerminate(_ application: UIApplication) { 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/Cheats/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | PressStart2P 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Example/Cheats/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | PressStart2P 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 35 | 41 | 49 | 50 | 51 | 52 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 116 | 117 | 118 | 119 | 120 | 121 | This sample app uses the following great fonts & software: 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | Cg 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | Cgo 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | Cgo 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | https://www.fontspace.com/codeman38/press-start-2p) 174 | 175 | SIL Open Font License (OFL) 176 | 177 | Version 1.1 - 26 February 2007 178 | 179 | PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 180 | 181 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 182 | 183 | DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 184 | 185 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s). 186 | 187 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). 188 | 189 | "Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 190 | 191 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 192 | 193 | PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 194 | 195 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 196 | 197 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 198 | 199 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 200 | 201 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 202 | 203 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 204 | 205 | TERMINATION This license becomes null and void if any of the above conditions are not met. 206 | 207 | DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | Cgo 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | Software 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | Cgo 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | MIT License 253 | 254 | Copyright (c) 2011-2018 Sam Vermette, Tobias Tiemerding and contributors. 255 | 256 | Permission is hereby granted, free of charge, to any person obtaining a copy 257 | of this software and associated documentation files (the "Software"), to deal 258 | in the Software without restriction, including without limitation the rights 259 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 260 | copies of the Software, and to permit persons to whom the Software is 261 | furnished to do so, subject to the following conditions: 262 | 263 | The above copyright notice and this permission notice shall be included in all 264 | copies or substantial portions of the Software. 265 | 266 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 267 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 268 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 269 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 270 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 271 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 272 | SOFTWARE. 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | -------------------------------------------------------------------------------- /Example/Cheats/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Cheats/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | UIAppFonts 39 | 40 | PressStart2P.ttf 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Example/Cheats/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Cheats 4 | // 5 | // Created by Ross Butler on 01/16/2019. 6 | // Copyright (c) 2019 Ross Butler. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Cheats 11 | import SVProgressHUD 12 | 13 | enum AlertType { 14 | case success 15 | case failure 16 | case info 17 | } 18 | 19 | class ViewController: UIViewController { 20 | 21 | // MARK: Outlets 22 | @IBOutlet weak var actionView: UIView! 23 | @IBOutlet weak var cheatStateLabel: UILabel! 24 | @IBOutlet weak var nextActionLabel: UILabel! 25 | 26 | // MARK: State 27 | private var gestureRecognizer: CheatCodeGestureRecognizer? 28 | 29 | // MARK: Life Cycle 30 | override func viewDidLoad() { 31 | super.viewDidLoad() 32 | 33 | // Configure SVProgressHUD 34 | SVProgressHUD.setDefaultStyle(.dark) 35 | SVProgressHUD.setMinimumSize(CGSize(width: 300, height: 200)) 36 | 37 | // Define the cheat code as a sequence of actions 38 | let actionSequence: [CheatCode.Action] = [.swipe(.up), .swipe(.down), .swipe(.left), 39 | .swipe(.right), .keyPress("a"), .keyPress("b")] 40 | 41 | // Update the UI as the cheat code sequence progresses 42 | let cheatCode = CheatCode(actions: actionSequence) { [weak self] cheatCode in 43 | self?.updateCheatStateLabel(cheatCode: cheatCode) 44 | self?.updateNextActionLabel(cheatCode: cheatCode) 45 | } 46 | 47 | // Update the label indicating the action to be performed next by the user 48 | updateNextActionLabel(cheatCode: cheatCode) 49 | 50 | // Add the gesture recognizer 51 | let gestureRecognizer = CheatCodeGestureRecognizer(cheatCode: cheatCode, target: self, 52 | action: #selector(actionPerformed(_:))) 53 | self.gestureRecognizer = gestureRecognizer 54 | actionView.addGestureRecognizer(gestureRecognizer) 55 | } 56 | 57 | @IBAction func actionPerformed(_ sender: UIGestureRecognizer) { 58 | print("Gesture recognizer state changed.") 59 | } 60 | 61 | } 62 | 63 | // MARK: Cheat Codes 64 | extension ViewController { 65 | 66 | func showAlert(message: String?, type: AlertType = .success) { 67 | switch type { 68 | case .info: 69 | SVProgressHUD.setFont(UIFont.systemFont(ofSize: 32)) 70 | SVProgressHUD.showInfo(withStatus: message) 71 | case .failure: 72 | if let retroFont = UIFont(name: "PressStart2P", size: 22.0) { 73 | SVProgressHUD.setFont(retroFont) 74 | } 75 | SVProgressHUD.showError(withStatus: message) 76 | case .success: 77 | if let retroFont = UIFont(name: "PressStart2P", size: 22.0) { 78 | SVProgressHUD.setFont(retroFont) 79 | } 80 | SVProgressHUD.showSuccess(withStatus: message) 81 | } 82 | } 83 | 84 | /// Update UI to indicate cheat sequence progress 85 | func updateCheatStateLabel(cheatCode: CheatCode) { 86 | switch cheatCode.state() { 87 | case .matched: 88 | self.cheatStateLabel.text = "Cheat unlocked 🎉" 89 | showAlert(message: self.cheatStateLabel.text) 90 | case .matching: 91 | self.cheatStateLabel.text = "Cheat incomplete" 92 | showAlert(message: "Correct") 93 | case .notMatched: 94 | self.cheatStateLabel.text = "Cheat incorrect 🙅🏻‍♂️" 95 | showAlert(message: self.cheatStateLabel.text, type: .failure) 96 | case .reset: 97 | self.cheatStateLabel.text = "Cheat sequence reset" 98 | } 99 | } 100 | 101 | /// Update UI to indicate the next action to be performed in the sequence 102 | func updateNextActionLabel(cheatCode: CheatCode, delay: Double = 1.0) { 103 | if let nextAction = cheatCode.nextAction() { 104 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + delay) { [weak self] in 105 | self?.showAlert(message: nextAction.description, type: .info) 106 | } 107 | self.nextActionLabel.text = "Next action: \(nextAction.description)" 108 | } else { 109 | self.nextActionLabel.text = "" 110 | } 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'Cheats_Example' do 4 | pod 'Cheats', :path => '../' 5 | pod 'SVProgressHUD' 6 | target 'Cheats_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Cheats (1.2.1) 3 | - SVProgressHUD (2.2.5) 4 | 5 | DEPENDENCIES: 6 | - Cheats (from `../`) 7 | - SVProgressHUD 8 | 9 | SPEC REPOS: 10 | https://github.com/CocoaPods/Specs.git: 11 | - SVProgressHUD 12 | 13 | EXTERNAL SOURCES: 14 | Cheats: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | Cheats: c3829c01b2c78862e84ffb91063aac7fde661df5 19 | SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 20 | 21 | PODFILE CHECKSUM: faceaa71b5ed777e716cb252a7f14d6e519cd8da 22 | 23 | COCOAPODS: 1.5.0 24 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/Cheats.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Cheats", 3 | "version": "1.2.1", 4 | "swift_version": "4.2", 5 | "summary": "Retro cheat codes for modern iOS apps.", 6 | "description": "Cheats is an implementation of retro-style cheat codes (such as the Konami code) for iOS apps. Combine a sequence of actions consisting of swipes, shake gestures, taps and key presses to create a cheat code for unlocking features or Easter eggs in your app.", 7 | "homepage": "https://github.com/rwbutler/Cheats", 8 | "license": { 9 | "type": "MIT", 10 | "file": "LICENSE" 11 | }, 12 | "authors": { 13 | "rwbutler": "github@rwbutler.com" 14 | }, 15 | "source": { 16 | "git": "https://github.com/rwbutler/Cheats.git", 17 | "tag": "1.2.1" 18 | }, 19 | "social_media_url": "https://twitter.com/ross_w_butler", 20 | "platforms": { 21 | "ios": "8.0" 22 | }, 23 | "source_files": "Cheats/Classes/**/*" 24 | } 25 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Cheats (1.2.1) 3 | - SVProgressHUD (2.2.5) 4 | 5 | DEPENDENCIES: 6 | - Cheats (from `../`) 7 | - SVProgressHUD 8 | 9 | SPEC REPOS: 10 | https://github.com/CocoaPods/Specs.git: 11 | - SVProgressHUD 12 | 13 | EXTERNAL SOURCES: 14 | Cheats: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | Cheats: c3829c01b2c78862e84ffb91063aac7fde661df5 19 | SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 20 | 21 | PODFILE CHECKSUM: faceaa71b5ed777e716cb252a7f14d6e519cd8da 22 | 23 | COCOAPODS: 1.5.0 24 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Cheats.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2011-2018 Sam Vermette, Tobias Tiemerding and contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/README.md: -------------------------------------------------------------------------------- 1 | # SVProgressHUD 2 | 3 | ![Pod Version](https://img.shields.io/cocoapods/v/SVProgressHUD.svg?style=flat) 4 | ![Pod Platform](https://img.shields.io/cocoapods/p/SVProgressHUD.svg?style=flat) 5 | ![Pod License](https://img.shields.io/cocoapods/l/SVProgressHUD.svg?style=flat) 6 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-green.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | [![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-green.svg?style=flat)](https://cocoapods.org) 8 | 9 | `SVProgressHUD` is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS. 10 | 11 | ![SVProgressHUD](http://f.cl.ly/items/2G1F1Z0M0k0h2U3V1p39/SVProgressHUD.gif) 12 | 13 | ## Demo 14 | 15 | Try `SVProgressHUD` on [Appetize.io](https://appetize.io/app/p8r2cvy8kq74x7q7tjqf5gyatr). 16 | 17 | ## Installation 18 | 19 | ### From CocoaPods 20 | 21 | [CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like `SVProgressHUD` in your projects. First, add the following line to your [Podfile](http://guides.cocoapods.org/using/using-cocoapods.html): 22 | 23 | ```ruby 24 | pod 'SVProgressHUD' 25 | ``` 26 | 27 | If you want to use the latest features of `SVProgressHUD` use normal external source dependencies. 28 | 29 | ```ruby 30 | pod 'SVProgressHUD', :git => 'https://github.com/SVProgressHUD/SVProgressHUD.git' 31 | ``` 32 | 33 | This pulls from the `master` branch directly. 34 | 35 | Second, install `SVProgressHUD` into your project: 36 | 37 | ```ruby 38 | pod install 39 | ``` 40 | 41 | ### Carthage 42 | 43 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate `SVProgressHUD` into your Xcode project using Carthage, specify it in your `Cartfile`: 44 | 45 | ```ogdl 46 | github "SVProgressHUD/SVProgressHUD" 47 | ``` 48 | 49 | Run `carthage bootstrap` to build the framework in your repository's Carthage directory. You can then include it in your target's `carthage copy-frameworks` build phase. For more information on this, please see [Carthage's documentation](https://github.com/carthage/carthage#if-youre-building-for-ios-tvos-or-watchos). 50 | 51 | ### Manually 52 | 53 | * Drag the `SVProgressHUD/SVProgressHUD` folder into your project. 54 | * Take care that `SVProgressHUD.bundle` is added to `Targets->Build Phases->Copy Bundle Resources`. 55 | * Add the **QuartzCore** framework to your project. 56 | 57 | ## Swift 58 | 59 | Even though `SVProgressHUD` is written in Objective-C, it can be used in Swift with no hassle. If you use [CocoaPods](http://cocoapods.org) add the following line to your [Podfile](http://guides.cocoapods.org/using/using-cocoapods.html): 60 | 61 | ```ruby 62 | use_frameworks! 63 | ``` 64 | 65 | If you added `SVProgressHUD` manually, just add a [bridging header](https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html) file to your project with the `SVProgressHUD` header included. 66 | 67 | ## Usage 68 | 69 | (see sample Xcode project in `/Demo`) 70 | 71 | `SVProgressHUD` is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call `[SVProgressHUD method]`). 72 | 73 | **Use `SVProgressHUD` wisely! Only use it if you absolutely need to perform a task before taking the user forward. Bad use case examples: pull to refresh, infinite scrolling, sending message.** 74 | 75 | Using `SVProgressHUD` in your app will usually look as simple as this (using Grand Central Dispatch): 76 | 77 | ```objective-c 78 | [SVProgressHUD show]; 79 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 80 | // time-consuming task 81 | dispatch_async(dispatch_get_main_queue(), ^{ 82 | [SVProgressHUD dismiss]; 83 | }); 84 | }); 85 | ``` 86 | 87 | ### Showing the HUD 88 | 89 | You can show the status of indeterminate tasks using one of the following: 90 | 91 | ```objective-c 92 | + (void)show; 93 | + (void)showWithStatus:(NSString*)string; 94 | ``` 95 | 96 | If you'd like the HUD to reflect the progress of a task, use one of these: 97 | 98 | ```objective-c 99 | + (void)showProgress:(CGFloat)progress; 100 | + (void)showProgress:(CGFloat)progress status:(NSString*)status; 101 | ``` 102 | 103 | ### Dismissing the HUD 104 | 105 | The HUD can be dismissed using: 106 | 107 | ```objective-c 108 | + (void)dismiss; 109 | + (void)dismissWithDelay:(NSTimeInterval)delay; 110 | ``` 111 | 112 | If you'd like to stack HUDs, you can balance out every show call using: 113 | 114 | ``` 115 | + (void)popActivity; 116 | ``` 117 | 118 | The HUD will get dismissed once the popActivity calls will match the number of show calls. 119 | 120 | Or show a confirmation glyph before before getting dismissed a little bit later. The display time depends on `minimumDismissTimeInterval` and the length of the given string. 121 | 122 | ```objective-c 123 | + (void)showInfoWithStatus:(NSString*)string; 124 | + (void)showSuccessWithStatus:(NSString*)string; 125 | + (void)showErrorWithStatus:(NSString*)string; 126 | + (void)showImage:(UIImage*)image status:(NSString*)string; 127 | ``` 128 | 129 | ## Customization 130 | 131 | `SVProgressHUD` can be customized via the following methods: 132 | 133 | ```objective-c 134 | + (void)setDefaultStyle:(SVProgressHUDStyle)style; // default is SVProgressHUDStyleLight 135 | + (void)setDefaultMaskType:(SVProgressHUDMaskType)maskType; // default is SVProgressHUDMaskTypeNone 136 | + (void)setDefaultAnimationType:(SVProgressHUDAnimationType)type; // default is SVProgressHUDAnimationTypeFlat 137 | + (void)setContainerView:(UIView*)containerView; // default is window level 138 | + (void)setMinimumSize:(CGSize)minimumSize; // default is CGSizeZero, can be used to avoid resizing 139 | + (void)setRingThickness:(CGFloat)width; // default is 2 pt 140 | + (void)setRingRadius:(CGFloat)radius; // default is 18 pt 141 | + (void)setRingNoTextRadius:(CGFloat)radius; // default is 24 pt 142 | + (void)setCornerRadius:(CGFloat)cornerRadius; // default is 14 pt 143 | + (void)setBorderColor:(nonnull UIColor*)color; // default is nil 144 | + (void)setBorderWidth:(CGFloat)width; // default is 0 145 | + (void)setFont:(UIFont*)font; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] 146 | + (void)setForegroundColor:(UIColor*)color; // default is [UIColor blackColor], only used for SVProgressHUDStyleCustom 147 | + (void)setBackgroundColor:(UIColor*)color; // default is [UIColor whiteColor], only used for SVProgressHUDStyleCustom 148 | + (void)setBackgroundLayerColor:(UIColor*)color; // default is [UIColor colorWithWhite:0 alpha:0.4], only used for SVProgressHUDMaskTypeCustom 149 | + (void)setImageViewSize:(CGSize)size; // default is 28x28 pt 150 | + (void)setShouldTintImages:(BOOL)shouldTintImages; // default is YES 151 | + (void)setInfoImage:(UIImage*)image; // default is the bundled info image provided by Freepik 152 | + (void)setSuccessImage:(UIImage*)image; // default is bundled success image from Freepik 153 | + (void)setErrorImage:(UIImage*)image; // default is bundled error image from Freepik 154 | + (void)setViewForExtension:(UIView*)view; // default is nil, only used if #define SV_APP_EXTENSIONS is set 155 | + (void)setGraceTimeInterval:(NSTimeInterval)interval; // default is 0 seconds 156 | + (void)setMinimumDismissTimeInterval:(NSTimeInterval)interval; // default is 5.0 seconds 157 | + (void)setMaximumDismissTimeInterval:(NSTimeInterval)interval; // default is CGFLOAT_MAX 158 | + (void)setFadeInAnimationDuration:(NSTimeInterval)duration; // default is 0.15 seconds 159 | + (void)setFadeOutAnimationDuration:(NSTimeInterval)duration; // default is 0.15 seconds 160 | + (void)setMaxSupportedWindowLevel:(UIWindowLevel)windowLevel; // default is UIWindowLevelNormal 161 | + (void)setHapticsEnabled:(BOOL)hapticsEnabled; // default is NO 162 | ``` 163 | 164 | Additionally `SVProgressHUD` supports the `UIAppearance` protocol for most of the above methods. 165 | 166 | ### Hint 167 | 168 | As standard `SVProgressHUD` offers two preconfigured styles: 169 | 170 | * `SVProgressHUDStyleLight`: White background with black spinner and text 171 | * `SVProgressHUDStyleDark`: Black background with white spinner and text 172 | 173 | If you want to use custom colors use `setForegroundColor` and `setBackgroundColor:`. These implicitly set the HUD's style to `SVProgressHUDStyleCustom`. 174 | 175 | ## Haptic Feedback 176 | 177 | For users with newer devices (starting with the iPhone 7), `SVProgressHUD` can automatically trigger haptic feedback depending on which HUD is being displayed. The feedback maps as follows: 178 | 179 | * `showSuccessWithStatus:` <-> `UINotificationFeedbackTypeSuccess` 180 | * `showInfoWithStatus:` <-> `UINotificationFeedbackTypeWarning` 181 | * `showErrorWithStatus:` <-> `UINotificationFeedbackTypeError` 182 | 183 | To enable this functionality, use `setHapticsEnabled:`. 184 | 185 | Users with devices prior to iPhone 7 will have no change in functionality. 186 | 187 | ## Notifications 188 | 189 | `SVProgressHUD` posts four notifications via `NSNotificationCenter` in response to being shown/dismissed: 190 | * `SVProgressHUDWillAppearNotification` when the show animation starts 191 | * `SVProgressHUDDidAppearNotification` when the show animation completes 192 | * `SVProgressHUDWillDisappearNotification` when the dismiss animation starts 193 | * `SVProgressHUDDidDisappearNotification` when the dismiss animation completes 194 | 195 | Each notification passes a `userInfo` dictionary holding the HUD's status string (if any), retrievable via `SVProgressHUDStatusUserInfoKey`. 196 | 197 | `SVProgressHUD` also posts `SVProgressHUDDidReceiveTouchEventNotification` when users touch on the overall screen or `SVProgressHUDDidTouchDownInsideNotification` when a user touches on the HUD directly. For this notifications `userInfo` is not passed but the object parameter contains the `UIEvent` that related to the touch. 198 | 199 | ## App Extensions 200 | 201 | When using `SVProgressHUD` in an App Extension, `#define SV_APP_EXTENSIONS` to avoid using unavailable APIs. Additionally call `setViewForExtension:` from your extensions view controller with `self.view`. 202 | 203 | ## Contributing to this project 204 | 205 | If you have feature requests or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/SVProgressHUD/SVProgressHUD/issues/new). Please take a moment to 206 | review the guidelines written by [Nicolas Gallagher](https://github.com/necolas): 207 | 208 | * [Bug reports](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#bugs) 209 | * [Feature requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#features) 210 | * [Pull requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#pull-requests) 211 | 212 | ## License 213 | 214 | `SVProgressHUD` is distributed under the terms and conditions of the [MIT license](https://github.com/SVProgressHUD/SVProgressHUD/blob/master/LICENSE.txt). The success, error and info icons are made by [Freepik](http://www.freepik.com) from [Flaticon](http://www.flaticon.com) and are licensed under [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/). 215 | 216 | ## Credits 217 | 218 | `SVProgressHUD` is brought to you by [Sam Vermette](http://samvermette.com), [Tobias Tiemerding](http://tiemerding.com) and [contributors to the project](https://github.com/SVProgressHUD/SVProgressHUD/contributors). If you're using `SVProgressHUD` in your project, attribution would be very appreciated. 219 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVIndefiniteAnimatedView.h 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2014-2018 Guillaume Campagna. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface SVIndefiniteAnimatedView : UIView 11 | 12 | @property (nonatomic, assign) CGFloat strokeThickness; 13 | @property (nonatomic, assign) CGFloat radius; 14 | @property (nonatomic, strong) UIColor *strokeColor; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SVIndefiniteAnimatedView.m 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2014-2018 Guillaume Campagna. All rights reserved. 6 | // 7 | 8 | #import "SVIndefiniteAnimatedView.h" 9 | #import "SVProgressHUD.h" 10 | 11 | @interface SVIndefiniteAnimatedView () 12 | 13 | @property (nonatomic, strong) CAShapeLayer *indefiniteAnimatedLayer; 14 | 15 | @end 16 | 17 | @implementation SVIndefiniteAnimatedView 18 | 19 | - (void)willMoveToSuperview:(UIView*)newSuperview { 20 | if (newSuperview) { 21 | [self layoutAnimatedLayer]; 22 | } else { 23 | [_indefiniteAnimatedLayer removeFromSuperlayer]; 24 | _indefiniteAnimatedLayer = nil; 25 | } 26 | } 27 | 28 | - (void)layoutAnimatedLayer { 29 | CALayer *layer = self.indefiniteAnimatedLayer; 30 | [self.layer addSublayer:layer]; 31 | 32 | CGFloat widthDiff = CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds); 33 | CGFloat heightDiff = CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds); 34 | layer.position = CGPointMake(CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds) / 2 - widthDiff / 2, CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds) / 2 - heightDiff / 2); 35 | } 36 | 37 | - (CAShapeLayer*)indefiniteAnimatedLayer { 38 | if(!_indefiniteAnimatedLayer) { 39 | CGPoint arcCenter = CGPointMake(self.radius+self.strokeThickness/2+5, self.radius+self.strokeThickness/2+5); 40 | UIBezierPath* smoothedPath = [UIBezierPath bezierPathWithArcCenter:arcCenter radius:self.radius startAngle:(CGFloat) (M_PI*3/2) endAngle:(CGFloat) (M_PI/2+M_PI*5) clockwise:YES]; 41 | 42 | _indefiniteAnimatedLayer = [CAShapeLayer layer]; 43 | _indefiniteAnimatedLayer.contentsScale = [[UIScreen mainScreen] scale]; 44 | _indefiniteAnimatedLayer.frame = CGRectMake(0.0f, 0.0f, arcCenter.x*2, arcCenter.y*2); 45 | _indefiniteAnimatedLayer.fillColor = [UIColor clearColor].CGColor; 46 | _indefiniteAnimatedLayer.strokeColor = self.strokeColor.CGColor; 47 | _indefiniteAnimatedLayer.lineWidth = self.strokeThickness; 48 | _indefiniteAnimatedLayer.lineCap = kCALineCapRound; 49 | _indefiniteAnimatedLayer.lineJoin = kCALineJoinBevel; 50 | _indefiniteAnimatedLayer.path = smoothedPath.CGPath; 51 | 52 | CALayer *maskLayer = [CALayer layer]; 53 | 54 | NSBundle *bundle = [NSBundle bundleForClass:[SVProgressHUD class]]; 55 | NSURL *url = [bundle URLForResource:@"SVProgressHUD" withExtension:@"bundle"]; 56 | NSBundle *imageBundle = [NSBundle bundleWithURL:url]; 57 | 58 | NSString *path = [imageBundle pathForResource:@"angle-mask" ofType:@"png"]; 59 | 60 | maskLayer.contents = (__bridge id)[[UIImage imageWithContentsOfFile:path] CGImage]; 61 | maskLayer.frame = _indefiniteAnimatedLayer.bounds; 62 | _indefiniteAnimatedLayer.mask = maskLayer; 63 | 64 | NSTimeInterval animationDuration = 1; 65 | CAMediaTimingFunction *linearCurve = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 66 | 67 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; 68 | animation.fromValue = (id) 0; 69 | animation.toValue = @(M_PI*2); 70 | animation.duration = animationDuration; 71 | animation.timingFunction = linearCurve; 72 | animation.removedOnCompletion = NO; 73 | animation.repeatCount = INFINITY; 74 | animation.fillMode = kCAFillModeForwards; 75 | animation.autoreverses = NO; 76 | [_indefiniteAnimatedLayer.mask addAnimation:animation forKey:@"rotate"]; 77 | 78 | CAAnimationGroup *animationGroup = [CAAnimationGroup animation]; 79 | animationGroup.duration = animationDuration; 80 | animationGroup.repeatCount = INFINITY; 81 | animationGroup.removedOnCompletion = NO; 82 | animationGroup.timingFunction = linearCurve; 83 | 84 | CABasicAnimation *strokeStartAnimation = [CABasicAnimation animationWithKeyPath:@"strokeStart"]; 85 | strokeStartAnimation.fromValue = @0.015; 86 | strokeStartAnimation.toValue = @0.515; 87 | 88 | CABasicAnimation *strokeEndAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; 89 | strokeEndAnimation.fromValue = @0.485; 90 | strokeEndAnimation.toValue = @0.985; 91 | 92 | animationGroup.animations = @[strokeStartAnimation, strokeEndAnimation]; 93 | [_indefiniteAnimatedLayer addAnimation:animationGroup forKey:@"progress"]; 94 | 95 | } 96 | return _indefiniteAnimatedLayer; 97 | } 98 | 99 | - (void)setFrame:(CGRect)frame { 100 | if(!CGRectEqualToRect(frame, super.frame)) { 101 | [super setFrame:frame]; 102 | 103 | if(self.superview) { 104 | [self layoutAnimatedLayer]; 105 | } 106 | } 107 | 108 | } 109 | 110 | - (void)setRadius:(CGFloat)radius { 111 | if(radius != _radius) { 112 | _radius = radius; 113 | 114 | [_indefiniteAnimatedLayer removeFromSuperlayer]; 115 | _indefiniteAnimatedLayer = nil; 116 | 117 | if(self.superview) { 118 | [self layoutAnimatedLayer]; 119 | } 120 | } 121 | } 122 | 123 | - (void)setStrokeColor:(UIColor*)strokeColor { 124 | _strokeColor = strokeColor; 125 | _indefiniteAnimatedLayer.strokeColor = strokeColor.CGColor; 126 | } 127 | 128 | - (void)setStrokeThickness:(CGFloat)strokeThickness { 129 | _strokeThickness = strokeThickness; 130 | _indefiniteAnimatedLayer.lineWidth = _strokeThickness; 131 | } 132 | 133 | - (CGSize)sizeThatFits:(CGSize)size { 134 | return CGSizeMake((self.radius+self.strokeThickness/2+5)*2, (self.radius+self.strokeThickness/2+5)*2); 135 | } 136 | 137 | @end 138 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVProgressAnimatedView.h 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2017-2018 Tobias Tiemerding. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface SVProgressAnimatedView : UIView 11 | 12 | @property (nonatomic, assign) CGFloat radius; 13 | @property (nonatomic, assign) CGFloat strokeThickness; 14 | @property (nonatomic, strong) UIColor *strokeColor; 15 | @property (nonatomic, assign) CGFloat strokeEnd; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SVProgressAnimatedView.m 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2017-2018 Tobias Tiemerding. All rights reserved. 6 | // 7 | 8 | #import "SVProgressAnimatedView.h" 9 | 10 | @interface SVProgressAnimatedView () 11 | 12 | @property (nonatomic, strong) CAShapeLayer *ringAnimatedLayer; 13 | 14 | @end 15 | 16 | @implementation SVProgressAnimatedView 17 | 18 | - (void)willMoveToSuperview:(UIView*)newSuperview { 19 | if (newSuperview) { 20 | [self layoutAnimatedLayer]; 21 | } else { 22 | [_ringAnimatedLayer removeFromSuperlayer]; 23 | _ringAnimatedLayer = nil; 24 | } 25 | } 26 | 27 | - (void)layoutAnimatedLayer { 28 | CALayer *layer = self.ringAnimatedLayer; 29 | [self.layer addSublayer:layer]; 30 | 31 | CGFloat widthDiff = CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds); 32 | CGFloat heightDiff = CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds); 33 | layer.position = CGPointMake(CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds) / 2 - widthDiff / 2, CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds) / 2 - heightDiff / 2); 34 | } 35 | 36 | - (CAShapeLayer*)ringAnimatedLayer { 37 | if(!_ringAnimatedLayer) { 38 | CGPoint arcCenter = CGPointMake(self.radius+self.strokeThickness/2+5, self.radius+self.strokeThickness/2+5); 39 | UIBezierPath* smoothedPath = [UIBezierPath bezierPathWithArcCenter:arcCenter radius:self.radius startAngle:(CGFloat)-M_PI_2 endAngle:(CGFloat) (M_PI + M_PI_2) clockwise:YES]; 40 | 41 | _ringAnimatedLayer = [CAShapeLayer layer]; 42 | _ringAnimatedLayer.contentsScale = [[UIScreen mainScreen] scale]; 43 | _ringAnimatedLayer.frame = CGRectMake(0.0f, 0.0f, arcCenter.x*2, arcCenter.y*2); 44 | _ringAnimatedLayer.fillColor = [UIColor clearColor].CGColor; 45 | _ringAnimatedLayer.strokeColor = self.strokeColor.CGColor; 46 | _ringAnimatedLayer.lineWidth = self.strokeThickness; 47 | _ringAnimatedLayer.lineCap = kCALineCapRound; 48 | _ringAnimatedLayer.lineJoin = kCALineJoinBevel; 49 | _ringAnimatedLayer.path = smoothedPath.CGPath; 50 | } 51 | return _ringAnimatedLayer; 52 | } 53 | 54 | - (void)setFrame:(CGRect)frame { 55 | if(!CGRectEqualToRect(frame, super.frame)) { 56 | [super setFrame:frame]; 57 | 58 | if(self.superview) { 59 | [self layoutAnimatedLayer]; 60 | } 61 | } 62 | } 63 | 64 | - (void)setRadius:(CGFloat)radius { 65 | if(radius != _radius) { 66 | _radius = radius; 67 | 68 | [_ringAnimatedLayer removeFromSuperlayer]; 69 | _ringAnimatedLayer = nil; 70 | 71 | if(self.superview) { 72 | [self layoutAnimatedLayer]; 73 | } 74 | } 75 | } 76 | 77 | - (void)setStrokeColor:(UIColor*)strokeColor { 78 | _strokeColor = strokeColor; 79 | _ringAnimatedLayer.strokeColor = strokeColor.CGColor; 80 | } 81 | 82 | - (void)setStrokeThickness:(CGFloat)strokeThickness { 83 | _strokeThickness = strokeThickness; 84 | _ringAnimatedLayer.lineWidth = _strokeThickness; 85 | } 86 | 87 | - (void)setStrokeEnd:(CGFloat)strokeEnd { 88 | _strokeEnd = strokeEnd; 89 | _ringAnimatedLayer.strokeEnd = _strokeEnd; 90 | } 91 | 92 | - (CGSize)sizeThatFits:(CGSize)size { 93 | return CGSizeMake((self.radius+self.strokeThickness/2+5)*2, (self.radius+self.strokeThickness/2+5)*2); 94 | } 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVProgressHUD.h 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2011-2018 Sam Vermette and contributors. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | extern NSString * _Nonnull const SVProgressHUDDidReceiveTouchEventNotification; 12 | extern NSString * _Nonnull const SVProgressHUDDidTouchDownInsideNotification; 13 | extern NSString * _Nonnull const SVProgressHUDWillDisappearNotification; 14 | extern NSString * _Nonnull const SVProgressHUDDidDisappearNotification; 15 | extern NSString * _Nonnull const SVProgressHUDWillAppearNotification; 16 | extern NSString * _Nonnull const SVProgressHUDDidAppearNotification; 17 | 18 | extern NSString * _Nonnull const SVProgressHUDStatusUserInfoKey; 19 | 20 | typedef NS_ENUM(NSInteger, SVProgressHUDStyle) { 21 | SVProgressHUDStyleLight, // default style, white HUD with black text, HUD background will be blurred 22 | SVProgressHUDStyleDark, // black HUD and white text, HUD background will be blurred 23 | SVProgressHUDStyleCustom // uses the fore- and background color properties 24 | }; 25 | 26 | typedef NS_ENUM(NSUInteger, SVProgressHUDMaskType) { 27 | SVProgressHUDMaskTypeNone = 1, // default mask type, allow user interactions while HUD is displayed 28 | SVProgressHUDMaskTypeClear, // don't allow user interactions with background objects 29 | SVProgressHUDMaskTypeBlack, // don't allow user interactions with background objects and dim the UI in the back of the HUD (as seen in iOS 7 and above) 30 | SVProgressHUDMaskTypeGradient, // don't allow user interactions with background objects and dim the UI with a a-la UIAlertView background gradient (as seen in iOS 6) 31 | SVProgressHUDMaskTypeCustom // don't allow user interactions with background objects and dim the UI in the back of the HUD with a custom color 32 | }; 33 | 34 | typedef NS_ENUM(NSUInteger, SVProgressHUDAnimationType) { 35 | SVProgressHUDAnimationTypeFlat, // default animation type, custom flat animation (indefinite animated ring) 36 | SVProgressHUDAnimationTypeNative // iOS native UIActivityIndicatorView 37 | }; 38 | 39 | typedef void (^SVProgressHUDShowCompletion)(void); 40 | typedef void (^SVProgressHUDDismissCompletion)(void); 41 | 42 | @interface SVProgressHUD : UIView 43 | 44 | #pragma mark - Customization 45 | 46 | @property (assign, nonatomic) SVProgressHUDStyle defaultStyle UI_APPEARANCE_SELECTOR; // default is SVProgressHUDStyleLight 47 | @property (assign, nonatomic) SVProgressHUDMaskType defaultMaskType UI_APPEARANCE_SELECTOR; // default is SVProgressHUDMaskTypeNone 48 | @property (assign, nonatomic) SVProgressHUDAnimationType defaultAnimationType UI_APPEARANCE_SELECTOR; // default is SVProgressHUDAnimationTypeFlat 49 | @property (strong, nonatomic, nullable) UIView *containerView; // if nil then use default window level 50 | @property (assign, nonatomic) CGSize minimumSize UI_APPEARANCE_SELECTOR; // default is CGSizeZero, can be used to avoid resizing for a larger message 51 | @property (assign, nonatomic) CGFloat ringThickness UI_APPEARANCE_SELECTOR; // default is 2 pt 52 | @property (assign, nonatomic) CGFloat ringRadius UI_APPEARANCE_SELECTOR; // default is 18 pt 53 | @property (assign, nonatomic) CGFloat ringNoTextRadius UI_APPEARANCE_SELECTOR; // default is 24 pt 54 | @property (assign, nonatomic) CGFloat cornerRadius UI_APPEARANCE_SELECTOR; // default is 14 pt 55 | @property (strong, nonatomic, nonnull) UIFont *font UI_APPEARANCE_SELECTOR; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] 56 | @property (strong, nonatomic, nonnull) UIColor *backgroundColor UI_APPEARANCE_SELECTOR; // default is [UIColor whiteColor] 57 | @property (strong, nonatomic, nonnull) UIColor *foregroundColor UI_APPEARANCE_SELECTOR; // default is [UIColor blackColor] 58 | @property (strong, nonatomic, nonnull) UIColor *backgroundLayerColor UI_APPEARANCE_SELECTOR;// default is [UIColor colorWithWhite:0 alpha:0.4] 59 | @property (assign, nonatomic) CGSize imageViewSize UI_APPEARANCE_SELECTOR; // default is 28x28 pt 60 | @property (assign, nonatomic) BOOL shouldTintImages UI_APPEARANCE_SELECTOR; // default is YES 61 | @property (strong, nonatomic, nonnull) UIImage *infoImage UI_APPEARANCE_SELECTOR; // default is the bundled info image provided by Freepik 62 | @property (strong, nonatomic, nonnull) UIImage *successImage UI_APPEARANCE_SELECTOR; // default is the bundled success image provided by Freepik 63 | @property (strong, nonatomic, nonnull) UIImage *errorImage UI_APPEARANCE_SELECTOR; // default is the bundled error image provided by Freepik 64 | @property (strong, nonatomic, nonnull) UIView *viewForExtension UI_APPEARANCE_SELECTOR; // default is nil, only used if #define SV_APP_EXTENSIONS is set 65 | @property (assign, nonatomic) NSTimeInterval graceTimeInterval; // default is 0 seconds 66 | @property (assign, nonatomic) NSTimeInterval minimumDismissTimeInterval; // default is 5.0 seconds 67 | @property (assign, nonatomic) NSTimeInterval maximumDismissTimeInterval; // default is CGFLOAT_MAX 68 | 69 | @property (assign, nonatomic) UIOffset offsetFromCenter UI_APPEARANCE_SELECTOR; // default is 0, 0 70 | 71 | @property (assign, nonatomic) NSTimeInterval fadeInAnimationDuration UI_APPEARANCE_SELECTOR; // default is 0.15 72 | @property (assign, nonatomic) NSTimeInterval fadeOutAnimationDuration UI_APPEARANCE_SELECTOR; // default is 0.15 73 | 74 | @property (assign, nonatomic) UIWindowLevel maxSupportedWindowLevel; // default is UIWindowLevelNormal 75 | 76 | @property (assign, nonatomic) BOOL hapticsEnabled; // default is NO 77 | 78 | + (void)setDefaultStyle:(SVProgressHUDStyle)style; // default is SVProgressHUDStyleLight 79 | + (void)setDefaultMaskType:(SVProgressHUDMaskType)maskType; // default is SVProgressHUDMaskTypeNone 80 | + (void)setDefaultAnimationType:(SVProgressHUDAnimationType)type; // default is SVProgressHUDAnimationTypeFlat 81 | + (void)setContainerView:(nullable UIView*)containerView; // default is window level 82 | + (void)setMinimumSize:(CGSize)minimumSize; // default is CGSizeZero, can be used to avoid resizing for a larger message 83 | + (void)setRingThickness:(CGFloat)ringThickness; // default is 2 pt 84 | + (void)setRingRadius:(CGFloat)radius; // default is 18 pt 85 | + (void)setRingNoTextRadius:(CGFloat)radius; // default is 24 pt 86 | + (void)setCornerRadius:(CGFloat)cornerRadius; // default is 14 pt 87 | + (void)setBorderColor:(nonnull UIColor*)color; // default is nil 88 | + (void)setBorderWidth:(CGFloat)width; // default is 0 89 | + (void)setFont:(nonnull UIFont*)font; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] 90 | + (void)setForegroundColor:(nonnull UIColor*)color; // default is [UIColor blackColor], only used for SVProgressHUDStyleCustom 91 | + (void)setBackgroundColor:(nonnull UIColor*)color; // default is [UIColor whiteColor], only used for SVProgressHUDStyleCustom 92 | + (void)setBackgroundLayerColor:(nonnull UIColor*)color; // default is [UIColor colorWithWhite:0 alpha:0.5], only used for SVProgressHUDMaskTypeCustom 93 | + (void)setImageViewSize:(CGSize)size; // default is 28x28 pt 94 | + (void)setShouldTintImages:(BOOL)shouldTintImages; // default is YES 95 | + (void)setInfoImage:(nonnull UIImage*)image; // default is the bundled info image provided by Freepik 96 | + (void)setSuccessImage:(nonnull UIImage*)image; // default is the bundled success image provided by Freepik 97 | + (void)setErrorImage:(nonnull UIImage*)image; // default is the bundled error image provided by Freepik 98 | + (void)setViewForExtension:(nonnull UIView*)view; // default is nil, only used if #define SV_APP_EXTENSIONS is set 99 | + (void)setGraceTimeInterval:(NSTimeInterval)interval; // default is 0 seconds 100 | + (void)setMinimumDismissTimeInterval:(NSTimeInterval)interval; // default is 5.0 seconds 101 | + (void)setMaximumDismissTimeInterval:(NSTimeInterval)interval; // default is infinite 102 | + (void)setFadeInAnimationDuration:(NSTimeInterval)duration; // default is 0.15 seconds 103 | + (void)setFadeOutAnimationDuration:(NSTimeInterval)duration; // default is 0.15 seconds 104 | + (void)setMaxSupportedWindowLevel:(UIWindowLevel)windowLevel; // default is UIWindowLevelNormal 105 | + (void)setHapticsEnabled:(BOOL)hapticsEnabled; // default is NO 106 | 107 | #pragma mark - Show Methods 108 | 109 | + (void)show; 110 | + (void)showWithMaskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use show and setDefaultMaskType: instead."))); 111 | + (void)showWithStatus:(nullable NSString*)status; 112 | + (void)showWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showWithStatus: and setDefaultMaskType: instead."))); 113 | 114 | + (void)showProgress:(float)progress; 115 | + (void)showProgress:(float)progress maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showProgress: and setDefaultMaskType: instead."))); 116 | + (void)showProgress:(float)progress status:(nullable NSString*)status; 117 | + (void)showProgress:(float)progress status:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showProgress:status: and setDefaultMaskType: instead."))); 118 | 119 | + (void)setStatus:(nullable NSString*)status; // change the HUD loading status while it's showing 120 | 121 | // stops the activity indicator, shows a glyph + status, and dismisses the HUD a little bit later 122 | + (void)showInfoWithStatus:(nullable NSString*)status; 123 | + (void)showInfoWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showInfoWithStatus: and setDefaultMaskType: instead."))); 124 | + (void)showSuccessWithStatus:(nullable NSString*)status; 125 | + (void)showSuccessWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showSuccessWithStatus: and setDefaultMaskType: instead."))); 126 | + (void)showErrorWithStatus:(nullable NSString*)status; 127 | + (void)showErrorWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showErrorWithStatus: and setDefaultMaskType: instead."))); 128 | 129 | // shows a image + status, use white PNGs with the imageViewSize (default is 28x28 pt) 130 | + (void)showImage:(nonnull UIImage*)image status:(nullable NSString*)status; 131 | + (void)showImage:(nonnull UIImage*)image status:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showImage:status: and setDefaultMaskType: instead."))); 132 | 133 | + (void)setOffsetFromCenter:(UIOffset)offset; 134 | + (void)resetOffsetFromCenter; 135 | 136 | + (void)popActivity; // decrease activity count, if activity count == 0 the HUD is dismissed 137 | + (void)dismiss; 138 | + (void)dismissWithCompletion:(nullable SVProgressHUDDismissCompletion)completion; 139 | + (void)dismissWithDelay:(NSTimeInterval)delay; 140 | + (void)dismissWithDelay:(NSTimeInterval)delay completion:(nullable SVProgressHUDDismissCompletion)completion; 141 | 142 | + (BOOL)isVisible; 143 | 144 | + (NSTimeInterval)displayDurationForString:(nullable NSString*)string; 145 | 146 | @end 147 | 148 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVRadialGradientLayer.h 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2014-2018 Tobias Tiemerding. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface SVRadialGradientLayer : CALayer 11 | 12 | @property (nonatomic) CGPoint gradientCenter; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Example/Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // SVRadialGradientLayer.m 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2014-2018 Tobias Tiemerding. All rights reserved. 6 | // 7 | 8 | #import "SVRadialGradientLayer.h" 9 | 10 | @implementation SVRadialGradientLayer 11 | 12 | - (void)drawInContext:(CGContextRef)context { 13 | size_t locationsCount = 2; 14 | CGFloat locations[2] = {0.0f, 1.0f}; 15 | CGFloat colors[8] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.75f}; 16 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 17 | CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, colors, locations, locationsCount); 18 | CGColorSpaceRelease(colorSpace); 19 | 20 | float radius = MIN(self.bounds.size.width , self.bounds.size.height); 21 | CGContextDrawRadialGradient (context, gradient, self.gradientCenter, 0, self.gradientCenter, radius, kCGGradientDrawsAfterEndLocation); 22 | CGGradientRelease(gradient); 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Cheats/Cheats-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Cheats : NSObject 3 | @end 4 | @implementation PodsDummy_Cheats 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Cheats/Cheats-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Cheats/Cheats-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 CheatsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char CheatsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Cheats/Cheats.modulemap: -------------------------------------------------------------------------------- 1 | framework module Cheats { 2 | umbrella header "Cheats-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Cheats/Cheats.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Cheats 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Cheats/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 | 2.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Cheats 5 | 6 | Copyright (c) 2019 Ross Butler 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 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all 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 | ## SVProgressHUD 28 | 29 | MIT License 30 | 31 | Copyright (c) 2011-2018 Sam Vermette, Tobias Tiemerding and contributors. 32 | 33 | Permission is hereby granted, free of charge, to any person obtaining a copy 34 | of this software and associated documentation files (the "Software"), to deal 35 | in the Software without restriction, including without limitation the rights 36 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 37 | copies of the Software, and to permit persons to whom the Software is 38 | furnished to do so, subject to the following conditions: 39 | 40 | The above copyright notice and this permission notice shall be included in all 41 | copies or substantial portions of the Software. 42 | 43 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 44 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 45 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 46 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 47 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 48 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 49 | SOFTWARE. 50 | 51 | Generated by CocoaPods - https://cocoapods.org 52 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example-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) 2019 Ross Butler 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 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all 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 | License 38 | MIT 39 | Title 40 | Cheats 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | MIT License 47 | 48 | Copyright (c) 2011-2018 Sam Vermette, Tobias Tiemerding and contributors. 49 | 50 | Permission is hereby granted, free of charge, to any person obtaining a copy 51 | of this software and associated documentation files (the "Software"), to deal 52 | in the Software without restriction, including without limitation the rights 53 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 54 | copies of the Software, and to permit persons to whom the Software is 55 | furnished to do so, subject to the following conditions: 56 | 57 | The above copyright notice and this permission notice shall be included in all 58 | copies or substantial portions of the Software. 59 | 60 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 61 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 62 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 63 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 64 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 65 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 66 | SOFTWARE. 67 | 68 | License 69 | MIT 70 | Title 71 | SVProgressHUD 72 | Type 73 | PSGroupSpecifier 74 | 75 | 76 | FooterText 77 | Generated by CocoaPods - https://cocoapods.org 78 | Title 79 | 80 | Type 81 | PSGroupSpecifier 82 | 83 | 84 | StringsTable 85 | Acknowledgements 86 | Title 87 | Acknowledgements 88 | 89 | 90 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Cheats_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Cheats_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${BUILT_PRODUCTS_DIR}/Cheats/Cheats.framework" 147 | install_framework "${BUILT_PRODUCTS_DIR}/SVProgressHUD/SVProgressHUD.framework" 148 | fi 149 | if [[ "$CONFIGURATION" == "Release" ]]; then 150 | install_framework "${BUILT_PRODUCTS_DIR}/Cheats/Cheats.framework" 151 | install_framework "${BUILT_PRODUCTS_DIR}/SVProgressHUD/SVProgressHUD.framework" 152 | fi 153 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 154 | wait 155 | fi 156 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example-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_Cheats_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Cheats_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Cheats" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Cheats/Cheats.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Cheats" -framework "SVProgressHUD" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Cheats_Example { 2 | umbrella header "Pods-Cheats_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Example/Pods-Cheats_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Cheats" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Cheats/Cheats.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Cheats" -framework "SVProgressHUD" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Cheats_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Cheats_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests-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_Cheats_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Cheats_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Cheats" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Cheats/Cheats.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Cheats_Tests { 2 | umbrella header "Pods-Cheats_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Cheats_Tests/Pods-Cheats_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Cheats" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Cheats/Cheats.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SVProgressHUD/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 | 2.2.5 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SVProgressHUD : NSObject 3 | @end 4 | @implementation PodsDummy_SVProgressHUD 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD-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 "SVIndefiniteAnimatedView.h" 14 | #import "SVProgressAnimatedView.h" 15 | #import "SVProgressHUD.h" 16 | #import "SVRadialGradientLayer.h" 17 | 18 | FOUNDATION_EXPORT double SVProgressHUDVersionNumber; 19 | FOUNDATION_EXPORT const unsigned char SVProgressHUDVersionString[]; 20 | 21 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.modulemap: -------------------------------------------------------------------------------- 1 | framework module SVProgressHUD { 2 | umbrella header "SVProgressHUD-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_LDFLAGS = -framework "QuartzCore" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SVProgressHUD 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Tests/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 | -------------------------------------------------------------------------------- /Example/Tests/PressStart2P.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/Example/Tests/PressStart2P.ttf -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Cheats 3 | 4 | class Tests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | } 9 | 10 | override func tearDown() { 11 | super.tearDown() 12 | } 13 | 14 | func testExample() { 15 | XCTAssert(true, "Pass") 16 | } 17 | 18 | func testPerformanceExample() { 19 | self.measure { 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Ross Butler 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 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all 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 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.2 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "Cheats", 6 | products: [ 7 | .library( 8 | name: "Cheats", 9 | targets: ["Cheats"]) 10 | ], 11 | targets: [ 12 | .target( 13 | name: "Cheats", 14 | path: "Cheats", 15 | exclude: ["Classes/UI"]) 16 | ] 17 | ) 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Cheats](https://raw.githubusercontent.com/rwbutler/Cheats/main/docs/images/cheats-banner.png) 2 | 3 | [![Build Status](https://img.shields.io/bitrise/64d91dc13e6480b1/main?label=build&logo=bitrise&token=Kaa2zM6rBlKdgXAvlxICWw)](https://app.bitrise.io/app/64d91dc13e6480b1?branch=main) 4 | [![Version](https://img.shields.io/cocoapods/v/Cheats.svg?style=flat)](https://cocoapods.org/pods/Cheats) 5 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 6 | [![Maintainability](https://api.codeclimate.com/v1/badges/db29ef6403045460c11b/maintainability)](https://codeclimate.com/github/rwbutler/Cheats/maintainability) 7 | [![License](https://img.shields.io/cocoapods/l/FeatureFlags.svg?style=flat)](http://cocoapods.org/pods/Cheats) 8 | [![Platform](https://img.shields.io/cocoapods/p/FeatureFlags.svg?style=flat)](http://cocoapods.org/pods/Cheats) 9 | [![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat)](https://swift.org/) 10 | [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com) 11 | 12 | Cheats is an implementation of console-style [cheat codes](https://en.wikipedia.org/wiki/Cheating_in_video_games#Cheat_codes) (such as [the Konami code](https://en.wikipedia.org/wiki/Konami_Code)) for iOS apps. It includes a `UIGestureRecognizer` for recognizing cheat codes. Combine a sequence of actions consisting of swipes, shake gestures, taps and key presses to create a cheat code for unlocking features or [Easter eggs](https://en.wikipedia.org/wiki/Easter_egg_(media)) in your app. 13 | 14 | ## Features 15 | 16 | - [x] Combine a sequence of actions to make a [cheat code](https://en.wikipedia.org/wiki/Cheating_in_video_games#Cheat_codes) for unlocking a feature or Easter egg in an iOS app. 17 | - [x] Provides a `UIGestureRecognizer` for ease of integration with `UIViewController`. 18 | - [x] Available for integration through Cocoapods, Carthage or Swift Package Manager. 19 | 20 | ![Cheats](https://raw.githubusercontent.com/rwbutler/Cheats/main/docs/images/example.gif) 21 | 22 | To learn more about how to use Cheats, take a look at the [blog post](https://medium.com/@rwbutler/retro-video-game-cheat-codes-for-ios-apps-82a6e46ea386) or make use of the table of contents below: 23 | 24 | - [Features](#features) 25 | - [Installation](#installation) 26 | - [Cocoapods](#cocoapods) 27 | - [Carthage](#carthage) 28 | - [Swift Package Manager](#swift-package-manager) 29 | - [Usage](#usage) 30 | - [Making a Cheat Code](#making-a-cheat-code) 31 | - [Reset](#reset) 32 | - [Actions](#actions) 33 | - [Gesture Recognizers](#gesture-recognizers) 34 | - [Example](#example) 35 | - [Author](#author) 36 | - [License](#license) 37 | - [Additional Software](#additional-software) 38 | - [Frameworks](#frameworks) 39 | - [Tools](#tools) 40 | 41 | ## Installation 42 | 43 | ### Cocoapods 44 | 45 | [CocoaPods](http://cocoapods.org) is a dependency manager which integrates dependencies into your Xcode workspace. To install it using [RubyGems](https://rubygems.org/) run: 46 | 47 | ```bash 48 | gem install cocoapods 49 | ``` 50 | 51 | To install FeatureFlags using Cocoapods, simply add the following line to your Podfile: 52 | 53 | ```ruby 54 | pod "Cheats" 55 | ``` 56 | 57 | Then run the command: 58 | 59 | ```bash 60 | pod install 61 | ``` 62 | 63 | For more information [see here](https://cocoapods.org/#getstarted). 64 | 65 | ### Carthage 66 | 67 | Carthage is a dependency manager which produces a binary for manual integration into your project. It can be installed via [Homebrew](https://brew.sh/) using the commands: 68 | 69 | ```bash 70 | brew update 71 | brew install carthage 72 | ``` 73 | 74 | In order to integrate Cheats into your project via Carthage, add the following line to your project's Cartfile: 75 | 76 | ```ogdl 77 | github "rwbutler/Cheats" 78 | ``` 79 | 80 | From the macOS Terminal run `carthage update --platform iOS` to build the framework then drag `Cheats.framework` into your Xcode project. 81 | 82 | For more information [see here](https://github.com/Carthage/Carthage#quick-start). 83 | 84 | ### Swift Package Manager 85 | 86 | The [Swift Package Manager](https://swift.org/package-manager/) is a dependency manager for Swift modules and is included as part of the build system as of Swift 3.0. It is used to automate the download, compilation and linking of dependencies. 87 | 88 | To include Cheats as a dependency within a Swift package, add the package to the `dependencies` entry in your `Package.swift` file as follows: 89 | 90 | ```swift 91 | dependencies: [ 92 | .package(url: "https://github.com/rwbutler/Cheats.git", from: "2.0.0") 93 | ] 94 | ``` 95 | 96 | ## Usage 97 | 98 | Cheats consists of a core and UI component - only the core component is available through Swift Package Manager due to the dependency of the UI component on UIKit. 99 | 100 | ### Making a Cheat Code 101 | 102 | Creating a cheat code involves creating a sequence of actions that the user must perform correctly in order to unlock the cheat. Action may consist of swipes or key presses: 103 | 104 | ```swift 105 | let actionSequence: [CheatCode.Action] = [.swipe(.up), .swipe(.down), .swipe(.left), .swipe(.right), .keyPress("a"), .keyPress("b")] 106 | ``` 107 | 108 | Once the sequence of actions has been defined, instantiate a `Cheat` and optionally provide a callback which will be invoked to feedback the user's progress as they complete the sequence of actions required to unlock the cheat: 109 | 110 | 111 | ```swift 112 | let cheat = CheatCode(actions: actionSequence) { [weak self] cheatCode in 113 | switch cheatCode.state() { 114 | case .matched: // correct 115 | print("Cheat unlocked!") 116 | case .matching: // correct *so far* 117 | print("Further actions required to unlock cheat.") 118 | case .notMatched: // incorrect 119 | print("Cheat incorrect.") 120 | case .reset: // initial state / sequence reset 121 | print("Cheat code sequence reset") 122 | } 123 | ``` 124 | 125 | As shown in the above code snippet, it is possible to query the state of the `CheatCode` at any time via the `state()` function on the `CheatCode` instance. The `CheatCode.State` enum is able to take on three states: 126 | 127 | - `matched` - indicates that the user has successfully completed the cheat code. 128 | - `matching` - indicates that the user has partially completed the cheat code with further actions required in order to successfully unlock the cheat. 129 | - `notMatched` - indicates that the user got one of the actions wrong whilst attempting the cheat code action sequence. 130 | - `reset` - indicates that the user has not yet begun to input the cheat code sequence or the sequence has been reset to its initial state. 131 | 132 | #### Reset 133 | 134 | Should the `CheatCode` enter the `.notMatched` state then the user cannot retry the cheat until `reset()` has been invoked to reset the user's sequence of actions. If using the `CheatCodeGestureRecognizer` (see below), this is performed automatically by the gesture recognizer. 135 | 136 | #### Actions 137 | 138 | Actions are the building blocks of cheat code sequences. Available actions are: 139 | 140 | - `keyPress` - For whenever a key on the keyboard is pressed. 141 | - `shake` - When the user shakes the device. 142 | - `swipe` - In the directions `up`, `down`, `left` and `right`. 143 | - `tap` - Specified with the number of taps required. 144 | 145 | If at any time, the next action required to complete the cheat code sequence is needed, this can be retrieve using `nextAction()` which optionally returns a `CheatCode.Action` if any further actions are required in order to complete the sequence. 146 | 147 | Likewise `previousAction()` will return the last action successfully completed by the user as part of the cheat code sequence. 148 | 149 | ### Gesture Recognizers 150 | 151 | Cheats provides the `CheatCodeGestureRecognizer`, a subclass of [`UIGestureRecognizer`](https://developer.apple.com/documentation/uikit/uigesturerecognizer), to make integration with UIViewController / UIView straightforward. 152 | 153 | To make use of the gesture recognizer, instantiate it with a `CheatCode` instance as described above along with the target and action selector (as you would with any other `UIGestureRecognizer`). Then simply add the gesture recognizer to the desired view: 154 | 155 | ```swift 156 | let gestureRecognizer = CheatCodeGestureRecognizer(cheatCode: cheatCode, target: self, action: #selector(actionPerformed(_:))) 157 | view.addGestureRecognizer(gestureRecognizer) 158 | ``` 159 | 160 | ## Example 161 | 162 | An example app can be found in the [Example](./Example/) directory as an illustration of how to use the framework. To run, clone the repo and then open `Cheats.xcworkspace` in Xcode. 163 | 164 | ## Author 165 | 166 | [Ross Butler](https://github.com/rwbutler) 167 | 168 | ## License 169 | 170 | Cheats is available under the MIT license. See the [LICENSE file](./LICENSE) for more info. 171 | 172 | ## Additional Software 173 | 174 | ### Controls 175 | 176 | * [AnimatedGradientView](https://github.com/rwbutler/AnimatedGradientView) - Powerful gradient animations made simple for iOS. 177 | 178 | |[AnimatedGradientView](https://github.com/rwbutler/AnimatedGradientView) | 179 | |:-------------------------:| 180 | |[![AnimatedGradientView](https://raw.githubusercontent.com/rwbutler/AnimatedGradientView/master/docs/images/animated-gradient-view-logo.png)](https://github.com/rwbutler/AnimatedGradientView) 181 | 182 | ### Frameworks 183 | 184 | * [Cheats](https://github.com/rwbutler/Cheats) - Retro cheat codes for modern iOS apps. 185 | * [Connectivity](https://github.com/rwbutler/Connectivity) - Improves on Reachability for determining Internet connectivity in your iOS application. 186 | * [FeatureFlags](https://github.com/rwbutler/FeatureFlags) - Allows developers to configure feature flags, run multiple A/B or MVT tests using a bundled / remotely-hosted JSON configuration file. 187 | * [FlexibleRowHeightGridLayout](https://github.com/rwbutler/FlexibleRowHeightGridLayout) - A UICollectionView grid layout designed to support Dynamic Type by allowing the height of each row to size to fit content. 188 | * [Hash](https://github.com/rwbutler/Hash) - Lightweight means of generating message digests and HMACs using popular hash functions including MD5, SHA-1, SHA-256. 189 | * [Skylark](https://github.com/rwbutler/Skylark) - Fully Swift BDD testing framework for writing Cucumber scenarios using Gherkin syntax. 190 | * [TailorSwift](https://github.com/rwbutler/TailorSwift) - A collection of useful Swift Core Library / Foundation framework extensions. 191 | * [TypographyKit](https://github.com/rwbutler/TypographyKit) - Consistent & accessible visual styling on iOS with Dynamic Type support. 192 | * [Updates](https://github.com/rwbutler/Updates) - Automatically detects app updates and gently prompts users to update. 193 | 194 | |[Cheats](https://github.com/rwbutler/Cheats) |[Connectivity](https://github.com/rwbutler/Connectivity) | [FeatureFlags](https://github.com/rwbutler/FeatureFlags) | [Skylark](https://github.com/rwbutler/Skylark) | [TypographyKit](https://github.com/rwbutler/TypographyKit) | [Updates](https://github.com/rwbutler/Updates) | 195 | |:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:| 196 | |[![Cheats](https://raw.githubusercontent.com/rwbutler/Cheats/master/docs/images/cheats-logo.png)](https://github.com/rwbutler/Cheats) |[![Connectivity](https://github.com/rwbutler/Connectivity/raw/master/ConnectivityLogo.png)](https://github.com/rwbutler/Connectivity) | [![FeatureFlags](https://raw.githubusercontent.com/rwbutler/FeatureFlags/master/docs/images/feature-flags-logo.png)](https://github.com/rwbutler/FeatureFlags) | [![Skylark](https://github.com/rwbutler/Skylark/raw/master/SkylarkLogo.png)](https://github.com/rwbutler/Skylark) | [![TypographyKit](https://raw.githubusercontent.com/rwbutler/TypographyKit/master/docs/images/typography-kit-logo.png)](https://github.com/rwbutler/TypographyKit) | [![Updates](https://raw.githubusercontent.com/rwbutler/Updates/master/docs/images/updates-logo.png)](https://github.com/rwbutler/Updates) 197 | 198 | ### Tools 199 | 200 | * [Clear DerivedData](https://github.com/rwbutler/ClearDerivedData) - Utility to quickly clear your DerivedData directory simply by typing `cdd` from the Terminal. 201 | * [Config Validator](https://github.com/rwbutler/ConfigValidator) - Config Validator validates & uploads your configuration files and cache clears your CDN as part of your CI process. 202 | * [IPA Uploader](https://github.com/rwbutler/IPAUploader) - Uploads your apps to TestFlight & App Store. 203 | * [Palette](https://github.com/rwbutler/TypographyKitPalette) - Makes your [TypographyKit](https://github.com/rwbutler/TypographyKit) color palette available in Xcode Interface Builder. 204 | 205 | |[Config Validator](https://github.com/rwbutler/ConfigValidator) | [IPA Uploader](https://github.com/rwbutler/IPAUploader) | [Palette](https://github.com/rwbutler/TypographyKitPalette)| 206 | |:-------------------------:|:-------------------------:|:-------------------------:| 207 | |[![Config Validator](https://raw.githubusercontent.com/rwbutler/ConfigValidator/master/docs/images/config-validator-logo.png)](https://github.com/rwbutler/ConfigValidator) | [![IPA Uploader](https://raw.githubusercontent.com/rwbutler/IPAUploader/master/docs/images/ipa-uploader-logo.png)](https://github.com/rwbutler/IPAUploader) | [![Palette](https://raw.githubusercontent.com/rwbutler/TypographyKitPalette/master/docs/images/typography-kit-palette-logo.png)](https://github.com/rwbutler/TypographyKitPalette) 208 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /docs/images/cheats-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/docs/images/cheats-banner.png -------------------------------------------------------------------------------- /docs/images/cheats-large-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/docs/images/cheats-large-logo.png -------------------------------------------------------------------------------- /docs/images/cheats-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/docs/images/cheats-logo.png -------------------------------------------------------------------------------- /docs/images/example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rwbutler/Cheats/064ffd62724613b500193564f7519925fdc3b3cb/docs/images/example.gif -------------------------------------------------------------------------------- /install_swiftlint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Installs the SwiftLint package. 4 | # Tries to get the precompiled .pkg file from Github, but if that 5 | # fails just recompiles from source. 6 | 7 | set -e 8 | 9 | SWIFTLINT_PKG_PATH="/tmp/SwiftLint.pkg" 10 | SWIFTLINT_PKG_URL="https://github.com/realm/SwiftLint/releases/download/0.27.0/SwiftLint.pkg" 11 | 12 | wget --output-document=$SWIFTLINT_PKG_PATH $SWIFTLINT_PKG_URL 13 | 14 | if [ -f $SWIFTLINT_PKG_PATH ]; then 15 | echo "SwiftLint package exists! Installing it..." 16 | sudo installer -pkg $SWIFTLINT_PKG_PATH -target / 17 | else 18 | echo "SwiftLint package doesn't exist. Compiling from source..." && 19 | git clone https://github.com/realm/SwiftLint.git /tmp/SwiftLint && 20 | cd /tmp/SwiftLint && 21 | git submodule update --init --recursive && 22 | sudo make install 23 | fi --------------------------------------------------------------------------------