├── .gitignore ├── CRNotifications.podspec ├── CRNotifications ├── Assets │ └── CRNotificationsMedia.xcassets │ │ ├── .DS_Store │ │ ├── Contents.json │ │ ├── error.imageset │ │ ├── Contents.json │ │ └── error.pdf │ │ ├── info.imageset │ │ ├── Contents.json │ │ └── info.pdf │ │ └── success.imageset │ │ ├── Contents.json │ │ └── success.pdf └── Classes │ ├── CRNotification.swift │ ├── CRNotificationType.swift │ ├── CRNotifications.swift │ ├── Colors.swift │ └── DeviceManager.swift ├── CRNotificationsExample.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── CRNotificationsExample.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings ├── CRNotificationsExample ├── AppDelegate.swift ├── Assets.xcassets │ ├── .DS_Store │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-40.png │ │ ├── Icon-40@2x.png │ │ ├── Icon-40@3x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-72.png │ │ ├── Icon-72@2x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-83.5@2x.png │ │ ├── Icon-Small-50.png │ │ ├── Icon-Small-50@2x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ ├── Icon.png │ │ ├── Icon@2x.png │ │ ├── NotificationIcon@2x.png │ │ ├── NotificationIcon@3x.png │ │ ├── NotificationIcon~ipad.png │ │ └── NotificationIcon~ipad@2x.png │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── PushViewController.swift └── ViewController.swift ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── CRNotifications │ ├── CRNotifications │ │ ├── Assets │ │ │ └── CRNotificationsMedia.xcassets │ │ │ │ ├── .DS_Store │ │ │ │ ├── Contents.json │ │ │ │ ├── error.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── error.pdf │ │ │ │ ├── info.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── info.pdf │ │ │ │ └── success.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── success.pdf │ │ └── Classes │ │ │ ├── CRNotification.swift │ │ │ ├── CRNotificationType.swift │ │ │ ├── CRNotifications.swift │ │ │ ├── Colors.swift │ │ │ └── DeviceManager.swift │ ├── LICENSE │ └── README.md ├── Local Podspecs │ └── CRNotifications.podspec.json ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj └── Target Support Files │ ├── CRNotifications │ ├── Assets │ │ └── CRNotificationsMedia.xcassets │ │ │ ├── Contents.json │ │ │ ├── error.imageset │ │ │ ├── Contents.json │ │ │ └── error.pdf │ │ │ ├── info.imageset │ │ │ ├── Contents.json │ │ │ └── info.pdf │ │ │ └── success.imageset │ │ │ ├── Contents.json │ │ │ └── success.pdf │ ├── CRNotifications-dummy.m │ ├── CRNotifications-prefix.pch │ ├── CRNotifications-umbrella.h │ ├── CRNotifications.modulemap │ ├── CRNotifications.xcconfig │ ├── Classes │ │ ├── CRNotification.swift │ │ ├── CRNotificationType.swift │ │ ├── CRNotifications.swift │ │ ├── Colors.swift │ │ └── DeviceManager.swift │ ├── Info.plist │ ├── LICENSE │ ├── README.md │ └── ResourceBundle-CRNotifications-Info.plist │ └── Pods-CRNotificationsExample │ ├── Info.plist │ ├── Pods-CRNotificationsExample-acknowledgements.markdown │ ├── Pods-CRNotificationsExample-acknowledgements.plist │ ├── Pods-CRNotificationsExample-dummy.m │ ├── Pods-CRNotificationsExample-frameworks.sh │ ├── Pods-CRNotificationsExample-resources.sh │ ├── Pods-CRNotificationsExample-umbrella.h │ ├── Pods-CRNotificationsExample.debug.xcconfig │ ├── Pods-CRNotificationsExample.modulemap │ └── Pods-CRNotificationsExample.release.xcconfig ├── README.md ├── cr-error.png ├── cr-info.png └── cr-success.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | CRNotificationsExample/.DS_Store 69 | CRNotifications/Classes/.DS_Store 70 | CRNotifications/Assets/.DS_Store 71 | CRNotifications/.DS_Store 72 | .DS_Store 73 | -------------------------------------------------------------------------------- /CRNotifications.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'CRNotifications' 3 | s.version = '1.2.1' 4 | s.summary = 'Custom in-app notifications.' 5 | 6 | s.description = <<-DESC 7 | CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide when they are clicked on or with an automatic dismissal. 8 | DESC 9 | 10 | s.homepage = 'https://github.com/dkcas11/CRNotifications' 11 | s.screenshots = 'https://camo.githubusercontent.com/8bb3b0d4e643c0adb2a048814c5319bf8a6aa413/687474703a2f2f693833312e70686f746f6275636b65742e636f6d2f616c62756d732f7a7a3233372f646b63617331312f737563636573732e6a7067', 'https://camo.githubusercontent.com/4b560687cb85b5a0dbc7945c4f15bf79b19db730/687474703a2f2f693833312e70686f746f6275636b65742e636f6d2f616c62756d732f7a7a3233372f646b63617331312f6572726f722e6a7067', 'https://camo.githubusercontent.com/5d60f3db58199f8fc5909e341c0233b38343e2aa/687474703a2f2f693833312e70686f746f6275636b65742e636f6d2f616c62756d732f7a7a3233372f646b63617331312f696e666f2e6a7067' 12 | s.license = { :type => 'MIT', :file => 'LICENSE' } 13 | s.author = { 'Casper Riboe & Herrick Wolber as contributor' => 'wolbereric@yahoo.fr' } 14 | s.source = { :git => 'https://github.com/dkcas11/CRNotifications.git', :tag => s.version.to_s } 15 | s.social_media_url = 'https://twitter.com/dkcas11' 16 | 17 | s.ios.deployment_target = '9.0' 18 | s.swift_version = '5.0' 19 | 20 | s.source_files = 'CRNotifications/Classes/**/*' 21 | s.resources = "CRNotifications/Assets/*.xcassets" 22 | 23 | s.frameworks = 'UIKit' 24 | end 25 | -------------------------------------------------------------------------------- /CRNotifications/Assets/CRNotificationsMedia.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotifications/Assets/CRNotificationsMedia.xcassets/.DS_Store -------------------------------------------------------------------------------- /CRNotifications/Assets/CRNotificationsMedia.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "error.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/error.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/error.pdf -------------------------------------------------------------------------------- /CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "info.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/info.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/info.pdf -------------------------------------------------------------------------------- /CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "success.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/success.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/success.pdf -------------------------------------------------------------------------------- /CRNotifications/Classes/CRNotification.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotification.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol CRNotification { 12 | func hide() -> Void 13 | } 14 | 15 | public class CRNotificationView: UIView, CRNotification { 16 | 17 | private let imageView: UIImageView = { 18 | let view = UIImageView() 19 | view.translatesAutoresizingMaskIntoConstraints = false 20 | view.tintColor = .white 21 | return view 22 | }() 23 | 24 | private let titleLabel: UILabel = { 25 | let label = UILabel() 26 | label.translatesAutoresizingMaskIntoConstraints = false 27 | label.font = UIFont.systemFont(ofSize: 15, weight: .bold) 28 | label.textColor = .white 29 | return label 30 | }() 31 | 32 | private let messageLabel: UILabel = { 33 | let label = UILabel() 34 | label.translatesAutoresizingMaskIntoConstraints = false 35 | label.font = UIFont.systemFont(ofSize: 13, weight: .semibold) 36 | label.textColor = .white 37 | label.numberOfLines = 2 38 | return label 39 | }() 40 | 41 | private var completion: () -> () = {} 42 | private var type: CRNotificationType 43 | public var delegate: CRNotificationDelegate? 44 | 45 | // MARK: - Init 46 | 47 | required internal init?(coder aDecoder:NSCoder) { fatalError("Not implemented.") } 48 | 49 | internal init(type: CRNotificationType) { 50 | let deviceWidth = min(UIScreen.main.bounds.width, UIScreen.main.bounds.height) 51 | let widthFactor: CGFloat = DeviceManager.value(iPhone35: 0.9, iPhone40: 0.9, iPhone47: 0.9, iPhone55: 0.85, iPhone58: 0.9, iPhone61: 0.9, iPadSmall: 0.5, iPadMedium: 0.45, iPadBig: 0.4) 52 | let heightFactor: CGFloat = DeviceManager.value(iPhone35: 0.22, iPhone40: 0.22, iPhone47: 0.2, iPhone55: 0.2, iPhone58: 0.18, iPhone61: 0.18, iPadSmall: 0.18, iPadMedium: 0.17, iPadBig: 0.17) 53 | 54 | let width = deviceWidth * widthFactor 55 | let height = width * heightFactor 56 | self.type = type 57 | 58 | super.init(frame: CGRect(x: 0, y: -height, width: width, height: height)) 59 | center.x = UIScreen.main.bounds.width/2 60 | setupLayer() 61 | setupSubviews() 62 | setupConstraints() 63 | setupTargets() 64 | 65 | // setup type attributes 66 | self.setBackgroundColor(color: type.backgroundColor) 67 | self.setTextColor(color: type.textColor) 68 | self.setImage(image: type.image) 69 | } 70 | 71 | 72 | // MARK: - Setup 73 | 74 | private func setupLayer() { 75 | layer.cornerRadius = 5 76 | layer.shadowRadius = 5 77 | layer.shadowOpacity = 0.25 78 | layer.shadowColor = UIColor.lightGray.cgColor 79 | } 80 | 81 | private func setupSubviews() { 82 | addSubview(imageView) 83 | addSubview(titleLabel) 84 | addSubview(messageLabel) 85 | } 86 | 87 | private func setupConstraints() { 88 | NSLayoutConstraint.activate([ 89 | imageView.topAnchor.constraint(equalTo: imageView.superview!.topAnchor, constant: 12), 90 | imageView.leadingAnchor.constraint(equalTo: imageView.superview!.leadingAnchor, constant: 12), 91 | imageView.bottomAnchor.constraint(equalTo: imageView.superview!.bottomAnchor, constant: -12), 92 | imageView.widthAnchor.constraint(equalTo: imageView.heightAnchor) 93 | ]) 94 | 95 | NSLayoutConstraint.activate([ 96 | titleLabel.topAnchor.constraint(lessThanOrEqualTo: titleLabel.superview!.topAnchor, constant: 8), 97 | titleLabel.leadingAnchor.constraint(equalTo: imageView.trailingAnchor, constant: 8), 98 | titleLabel.trailingAnchor.constraint(equalTo: titleLabel.superview!.trailingAnchor, constant: -8) 99 | ]) 100 | 101 | NSLayoutConstraint.activate([ 102 | messageLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 2), 103 | messageLabel.leadingAnchor.constraint(equalTo: titleLabel.leadingAnchor), 104 | messageLabel.trailingAnchor.constraint(equalTo: titleLabel.trailingAnchor), 105 | messageLabel.bottomAnchor.constraint(lessThanOrEqualTo: messageLabel.superview!.bottomAnchor, constant: -5) 106 | ]) 107 | } 108 | 109 | private func setupTargets() { 110 | NotificationCenter.default.addObserver(self, selector: #selector(didRotate), name: UIDevice.orientationDidChangeNotification, object: nil) 111 | let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.dismissNotificationOnTap)) 112 | let swipeRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(self.dismissNotification)) 113 | swipeRecognizer.direction = .up 114 | 115 | addGestureRecognizer(tapRecognizer) 116 | addGestureRecognizer(swipeRecognizer) 117 | } 118 | 119 | 120 | // MARK: - Helpers 121 | 122 | @objc internal func didRotate() { 123 | UIView.animate(withDuration: 0.2) { 124 | self.center.x = UIScreen.main.bounds.width / 2 125 | self.center.y = self.topInset() + 10 + self.frame.height / 2 126 | } 127 | } 128 | 129 | /** Sets the background color of the notification **/ 130 | internal func setBackgroundColor(color: UIColor) { 131 | backgroundColor = color 132 | } 133 | 134 | /** Sets the background color of the notification **/ 135 | internal func setTextColor(color: UIColor) { 136 | titleLabel.textColor = color 137 | messageLabel.textColor = color 138 | } 139 | 140 | /** Sets the title of the notification **/ 141 | internal func setTitle(title: String) { 142 | titleLabel.text = title 143 | } 144 | 145 | /** Sets the message of the notification **/ 146 | internal func setMessage(message: String) { 147 | messageLabel.text = message 148 | } 149 | 150 | /** Sets the image of the notification **/ 151 | internal func setImage(image: UIImage?) { 152 | imageView.image = image 153 | } 154 | 155 | /** Sets the completion block of the notification for when it is dismissed **/ 156 | internal func setCompletionBlock(_ completion: @escaping () -> ()) { 157 | self.completion = completion 158 | } 159 | 160 | /** Dismisses the notification with a delay > 0 **/ 161 | internal func setDismisTimer(delay: TimeInterval) { 162 | if delay > 0 { 163 | Timer.scheduledTimer(timeInterval: Double(delay), target: self, selector: #selector(dismissNotification), userInfo: nil, repeats: false) 164 | } 165 | } 166 | 167 | /** Animates in the notification **/ 168 | internal func showNotification() { 169 | UIView.animate(withDuration: 0.3, delay: 0.0, usingSpringWithDamping: 0.68, initialSpringVelocity: 0.1, options: UIView.AnimationOptions(), animations: { 170 | self.frame.origin.y = self.topInset() + 10 171 | }) 172 | } 173 | 174 | @objc internal func dismissNotificationOnTap() { 175 | delegate?.onNotificationTap(type: type,title: titleLabel.text, message: messageLabel.text) 176 | self.dismissNotification() 177 | } 178 | 179 | /** Animates out the notification **/ 180 | @objc internal func dismissNotification() { 181 | hide() 182 | } 183 | 184 | private func topInset() -> CGFloat { 185 | let iPhoneXInset: CGFloat 186 | switch UIApplication.shared.statusBarOrientation { 187 | case .landscapeLeft, .landscapeRight: 188 | iPhoneXInset = 0 189 | case .portrait, .portraitUpsideDown, .unknown: 190 | iPhoneXInset = 44 191 | @unknown default: 192 | iPhoneXInset = 0 193 | } 194 | 195 | let statusBarHeight: CGFloat = UIApplication.shared.statusBarFrame.height 196 | return DeviceManager.value(iPhoneX: statusBarHeight == 0 ? iPhoneXInset : statusBarHeight, other: statusBarHeight) 197 | } 198 | 199 | 200 | // MARK: - Public 201 | 202 | public func hide() { 203 | UIView.animate(withDuration: 0.1, animations: { 204 | self.frame.origin.y = self.frame.origin.y + 5 205 | }, completion: { 206 | (complete: Bool) in 207 | UIView.animate(withDuration: 0.25, animations: { 208 | self.center.y = -self.frame.height 209 | }, completion: { [weak self] (complete) in 210 | self?.completion() 211 | self?.removeFromSuperview() 212 | }) 213 | }) 214 | } 215 | 216 | } 217 | -------------------------------------------------------------------------------- /CRNotifications/Classes/CRNotificationType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotificationType.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 14/09/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import Foundation 10 | 11 | /** Protocol for defining a CRNotification style **/ 12 | public protocol CRNotificationType { 13 | var textColor: UIColor { get } 14 | var backgroundColor: UIColor { get } 15 | var image: UIImage? { get } 16 | } 17 | -------------------------------------------------------------------------------- /CRNotifications/Classes/CRNotifications.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotifications.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol CRNotificationDelegate { 12 | func onNotificationTap(type: CRNotificationType, title: String?, message: String?) 13 | } 14 | 15 | public class CRNotifications { 16 | 17 | // MARK: - Static notification types 18 | 19 | public static let success: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatGreen, image: UIImage(named: "success", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 20 | public static let error: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatRed, image: UIImage(named: "error", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 21 | public static let info: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatGray, image: UIImage(named: "info", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 22 | 23 | 24 | // MARK: - Init 25 | 26 | public init(){} 27 | 28 | 29 | // MARK: - Helpers 30 | 31 | /** Shows a CRNotification. 32 | Returns the CRNotification that is displayed. Returns nil if the keyWindow is not present. 33 | **/ 34 | @discardableResult 35 | public static func showNotification(textColor: UIColor, backgroundColor: UIColor, image: UIImage?, title: String, message: String, dismissDelay: TimeInterval, delegate: CRNotificationDelegate? = nil, completion: @escaping () -> () = {}) -> CRNotification? { 36 | let notificationDefinition = CRNotificationTypeDefinition(textColor: textColor, backgroundColor: backgroundColor, image: image) 37 | return showNotification(type: notificationDefinition, title: title, message: message, dismissDelay: dismissDelay, delegate: delegate, completion: completion) 38 | } 39 | 40 | /** Shows a CRNotification from a CRNotificationType. 41 | Returns the CRNotification that is displayed. Returns nil if the keyWindow is not present. 42 | **/ 43 | @discardableResult 44 | public static func showNotification(type: CRNotificationType, title: String, message: String, dismissDelay: TimeInterval, delegate: CRNotificationDelegate? = nil, completion: @escaping () -> () = {}) -> CRNotification? { 45 | let view = CRNotificationView(type: type) 46 | 47 | view.setTitle(title: title) 48 | view.setMessage(message: message) 49 | view.setDismisTimer(delay: dismissDelay) 50 | view.setCompletionBlock(completion) 51 | view.delegate = delegate 52 | 53 | guard let window = UIApplication.shared.keyWindow else { 54 | print("Failed to show CRNotification. No keywindow available.") 55 | return nil 56 | } 57 | 58 | window.addSubview(view) 59 | view.showNotification() 60 | 61 | return view 62 | } 63 | } 64 | 65 | fileprivate struct CRNotificationTypeDefinition: CRNotificationType { 66 | var textColor: UIColor 67 | var backgroundColor: UIColor 68 | var image: UIImage? 69 | } 70 | -------------------------------------------------------------------------------- /CRNotifications/Classes/Colors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Colors.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIColor { 12 | 13 | /// Flat Colors 14 | static let flatGreen = UIColor(red: 46/255, green: 204/255, blue: 113/255, alpha: 1.0) 15 | static let flatRed = UIColor(red: 231/255, green: 76/255, blue: 60/255, alpha: 1.0) 16 | static let flatGray = UIColor(red: 149/255, green: 165/255, blue: 166/255, alpha: 1.0) 17 | 18 | } 19 | -------------------------------------------------------------------------------- /CRNotifications/Classes/DeviceManager.swift: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------- 2 | // DeviceManager.swift 3 | // ---------------------------------------------------- 4 | // 5 | // Complete list of devices sorted by resolution. 6 | // Device return by the method 'Device' is based on the height of the device. 7 | // 8 | // iPad Small 9 | // 1536x2048 / 768x1024 (768x1024 / 384x512) 10 | // - iPad Retina 11 | // - iPad 3 12 | // - iPad Mini Retina 13 | // - iPad Mini 4 14 | // - iPad Air 15 | // - iPad Air 2 16 | // - iPad Pro 9.7" 17 | // 18 | // iPad Medium 19 | // 1668x2224 (834x1112) 20 | // iPad Pro 10.5" 21 | // 22 | // iPad Big 23 | // 2048x2732 (1024x1366) 24 | // - iPad Pro 12.9" 25 | // 26 | // iPhone35 27 | // 640x960 (320x480) 28 | // - iPhone 4 29 | // 30 | // iPhone40 31 | // 640x1136 (320x568) 32 | // - iPhone 5 33 | // 34 | // iPhone47 35 | // 750x1334 (375x667) 36 | // - iPhone 6 37 | // - iPhone 7 38 | // - iPhone 8 39 | // 40 | // iPhone55 41 | // 1080x1920 / 1242x2208 (540x960 / 621x1104 / 414x736) 42 | // - iPhone 6 Plus 43 | // - iPhone 7 Plus 44 | // - iPhone 8 Plus 45 | // 46 | // iPhone58 47 | // 1125x2436 (375x812) 48 | // - iPhone X 49 | // - iPhone XS 50 | // 51 | // iPhone61 52 | // 828x1792 (414x896) 53 | // - iPhone XR 54 | // 55 | // iPhone 65 56 | // 1242x2688 (414x896) 57 | // - iPhone XS Max 58 | // 59 | // 60 | // ---------------------------------------------------- 61 | // Created by Casper Riboe on 21/07/2017. 62 | // Copyright © 2017 Casper Riboe. All rights reserved. 63 | // ---------------------------------------------------- 64 | 65 | import UIKit 66 | 67 | internal class DeviceManager { 68 | 69 | private init() {} 70 | 71 | /// Returns the current device in use. 72 | internal static func device() -> Device { 73 | let size = CGSize(width: min(UIScreen.main.bounds.width, UIScreen.main.bounds.height), 74 | height: max(UIScreen.main.bounds.width, UIScreen.main.bounds.height)) 75 | 76 | switch size { 77 | case CGSize(width: 320.0, height: 480.0): 78 | return .iPhone35 79 | case CGSize(width: 320.0, height: 568.0): 80 | return .iPhone40 81 | case CGSize(width: 375.0, height: 667.0): 82 | return .iPhone47 83 | case CGSize(width: 375.0, height: 812.0): 84 | return .iPhone58 85 | case CGSize(width: 414.0, height: 736.0): 86 | return .iPhone55 87 | case CGSize(width: 540.0, height: 960.0): 88 | return .iPhone55 89 | case CGSize(width: 621.0, height: 1104.0): 90 | return .iPhone55 91 | case CGSize(width: 562.5, height: 1218.0): 92 | return .iPhone58 93 | case CGSize(width: 414.0, height: 896.0): 94 | return .iPhone61 95 | case CGSize(width: 384.0, height: 512.0): 96 | return .iPadSmall 97 | case CGSize(width: 768.0, height: 1024.0): 98 | return .iPadSmall 99 | case CGSize(width: 834.0, height: 1112.0): 100 | return .iPadMedium 101 | case CGSize(width: 1024.0, height: 1366.0): 102 | return .iPadBig 103 | default: 104 | return .unknown 105 | } 106 | } 107 | 108 | /// Returns a value based on the current iPhone device. 109 | internal static func value(iPhone35: T, iPhone40: T, iPhone47: T, iPhone55: T, iPhone58: T, iPhone61: T) -> T { 110 | switch device() { 111 | case .iPhone35: 112 | return iPhone35 113 | case .iPhone40: 114 | return iPhone40 115 | case .iPhone47: 116 | return iPhone47 117 | case .iPhone55: 118 | return iPhone55 119 | case .iPhone61: 120 | return iPhone61 121 | default: 122 | return iPhone58 123 | } 124 | } 125 | 126 | /// Returns a value based on the current iPad device. 127 | internal static func value(iPadSmall: T, iPadMedium: T, iPadBig: T) -> T { 128 | switch device() { 129 | case .iPadSmall: 130 | return iPadSmall 131 | case .iPadMedium: 132 | return iPadMedium 133 | default: 134 | return iPadBig 135 | } 136 | } 137 | 138 | /// Returns a value based on the current iPhone or iPad device. 139 | internal static func value(iPhone35: T, iPhone40: T, iPhone47: T, iPhone55: T, iPhone58: T, iPhone61: T, iPadSmall: T, iPadMedium: T, iPadBig: T) -> T { 140 | switch device() { 141 | case .iPhone35: 142 | return iPhone35 143 | case .iPhone40: 144 | return iPhone40 145 | case .iPhone47: 146 | return iPhone47 147 | case .iPhone55: 148 | return iPhone55 149 | case .iPhone58: 150 | return iPhone58 151 | case .iPhone61: 152 | return iPhone61 153 | case .iPadSmall: 154 | return iPadSmall 155 | case .iPadMedium: 156 | return iPadMedium 157 | case .iPadBig: 158 | return iPadBig 159 | default: 160 | if UIDevice.current.userInterfaceIdiom == .pad { 161 | return iPadBig 162 | } else { 163 | return iPhone55 164 | } 165 | } 166 | } 167 | 168 | /// Returns a value based on the current iPhone or iPad device. 169 | internal static func value(iPhone: T, iPad: T) -> T { 170 | return value(iPhone35: iPhone, iPhone40: iPhone, iPhone47: iPhone, iPhone55: iPhone, iPhone58: iPhone, iPhone61: iPhone, iPadSmall: iPad, iPadMedium: iPad, iPadBig: iPad) 171 | } 172 | 173 | internal static func value(iPhoneX: T, other: T) -> T { 174 | return value(iPhone35: other, iPhone40: other, iPhone47: other, iPhone55: other, iPhone58: iPhoneX, iPhone61: iPhoneX, iPadSmall: other, iPadMedium: other, iPadBig: other) 175 | } 176 | 177 | } 178 | 179 | 180 | internal enum Device { 181 | case iPhone35 182 | case iPhone40 183 | case iPhone47 184 | case iPhone55 185 | case iPhone58 186 | case iPhone61 187 | 188 | case iPadSmall 189 | case iPadMedium 190 | case iPadBig 191 | 192 | case unknown 193 | } 194 | -------------------------------------------------------------------------------- /CRNotificationsExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | AF3C46C71F0EB36300CA7DE8 /* PushViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF3C46C61F0EB36300CA7DE8 /* PushViewController.swift */; }; 11 | AF9017931E817E2600F4D8F8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF9017921E817E2600F4D8F8 /* AppDelegate.swift */; }; 12 | AF9017951E817E2600F4D8F8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF9017941E817E2600F4D8F8 /* ViewController.swift */; }; 13 | AF9017981E817E2600F4D8F8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AF9017961E817E2600F4D8F8 /* Main.storyboard */; }; 14 | AF90179A1E817E2600F4D8F8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AF9017991E817E2600F4D8F8 /* Assets.xcassets */; }; 15 | AF90179D1E817E2600F4D8F8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AF90179B1E817E2600F4D8F8 /* LaunchScreen.storyboard */; }; 16 | D90AEE06CBB9C4139E66E352 /* Pods_CRNotificationsExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D27ADE23DCD735C2E86A31F /* Pods_CRNotificationsExample.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 24193BC70B4C0025A0146E19 /* Pods-CRNotificationsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CRNotificationsExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample.release.xcconfig"; sourceTree = ""; }; 21 | 3D27ADE23DCD735C2E86A31F /* Pods_CRNotificationsExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CRNotificationsExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | AF3C46C61F0EB36300CA7DE8 /* PushViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PushViewController.swift; sourceTree = ""; }; 23 | AF90178F1E817E2600F4D8F8 /* CRNotificationsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CRNotificationsExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | AF9017921E817E2600F4D8F8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 25 | AF9017941E817E2600F4D8F8 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 26 | AF9017971E817E2600F4D8F8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 27 | AF9017991E817E2600F4D8F8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | AF90179C1E817E2600F4D8F8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 29 | AF90179E1E817E2600F4D8F8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | D2CAA818C0A3DE60568E5D2C /* Pods-CRNotificationsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CRNotificationsExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample.debug.xcconfig"; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | AF90178C1E817E2600F4D8F8 /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | D90AEE06CBB9C4139E66E352 /* Pods_CRNotificationsExample.framework in Frameworks */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 78F32DF0E667DFF8F84F5FA3 /* Frameworks */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | 3D27ADE23DCD735C2E86A31F /* Pods_CRNotificationsExample.framework */, 49 | ); 50 | name = Frameworks; 51 | sourceTree = ""; 52 | }; 53 | AF9017861E817E2600F4D8F8 = { 54 | isa = PBXGroup; 55 | children = ( 56 | AF9017911E817E2600F4D8F8 /* CRNotificationsExample */, 57 | AF9017901E817E2600F4D8F8 /* Products */, 58 | D2707F3046572918B8625C2D /* Pods */, 59 | 78F32DF0E667DFF8F84F5FA3 /* Frameworks */, 60 | ); 61 | sourceTree = ""; 62 | }; 63 | AF9017901E817E2600F4D8F8 /* Products */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | AF90178F1E817E2600F4D8F8 /* CRNotificationsExample.app */, 67 | ); 68 | name = Products; 69 | sourceTree = ""; 70 | }; 71 | AF9017911E817E2600F4D8F8 /* CRNotificationsExample */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | AF9017921E817E2600F4D8F8 /* AppDelegate.swift */, 75 | AF9017941E817E2600F4D8F8 /* ViewController.swift */, 76 | AF3C46C61F0EB36300CA7DE8 /* PushViewController.swift */, 77 | AF9017961E817E2600F4D8F8 /* Main.storyboard */, 78 | AF9017991E817E2600F4D8F8 /* Assets.xcassets */, 79 | AF90179B1E817E2600F4D8F8 /* LaunchScreen.storyboard */, 80 | AF90179E1E817E2600F4D8F8 /* Info.plist */, 81 | ); 82 | path = CRNotificationsExample; 83 | sourceTree = ""; 84 | }; 85 | D2707F3046572918B8625C2D /* Pods */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | D2CAA818C0A3DE60568E5D2C /* Pods-CRNotificationsExample.debug.xcconfig */, 89 | 24193BC70B4C0025A0146E19 /* Pods-CRNotificationsExample.release.xcconfig */, 90 | ); 91 | name = Pods; 92 | sourceTree = ""; 93 | }; 94 | /* End PBXGroup section */ 95 | 96 | /* Begin PBXNativeTarget section */ 97 | AF90178E1E817E2600F4D8F8 /* CRNotificationsExample */ = { 98 | isa = PBXNativeTarget; 99 | buildConfigurationList = AF9017A11E817E2600F4D8F8 /* Build configuration list for PBXNativeTarget "CRNotificationsExample" */; 100 | buildPhases = ( 101 | 61B22BA6B5319D40E885C837 /* [CP] Check Pods Manifest.lock */, 102 | AF90178B1E817E2600F4D8F8 /* Sources */, 103 | AF90178C1E817E2600F4D8F8 /* Frameworks */, 104 | AF90178D1E817E2600F4D8F8 /* Resources */, 105 | 3E3E8CA4FFE01341935D484E /* [CP] Embed Pods Frameworks */, 106 | 177AA681854FBAA1E77B5C0B /* [CP] Copy Pods Resources */, 107 | ); 108 | buildRules = ( 109 | ); 110 | dependencies = ( 111 | ); 112 | name = CRNotificationsExample; 113 | productName = CRNotificationsExample; 114 | productReference = AF90178F1E817E2600F4D8F8 /* CRNotificationsExample.app */; 115 | productType = "com.apple.product-type.application"; 116 | }; 117 | /* End PBXNativeTarget section */ 118 | 119 | /* Begin PBXProject section */ 120 | AF9017871E817E2600F4D8F8 /* Project object */ = { 121 | isa = PBXProject; 122 | attributes = { 123 | LastSwiftUpdateCheck = 0820; 124 | LastUpgradeCheck = 1010; 125 | ORGANIZATIONNAME = Criboe; 126 | TargetAttributes = { 127 | AF90178E1E817E2600F4D8F8 = { 128 | CreatedOnToolsVersion = 8.2.1; 129 | LastSwiftMigration = 1020; 130 | ProvisioningStyle = Automatic; 131 | }; 132 | }; 133 | }; 134 | buildConfigurationList = AF90178A1E817E2600F4D8F8 /* Build configuration list for PBXProject "CRNotificationsExample" */; 135 | compatibilityVersion = "Xcode 3.2"; 136 | developmentRegion = en; 137 | hasScannedForEncodings = 0; 138 | knownRegions = ( 139 | en, 140 | Base, 141 | ); 142 | mainGroup = AF9017861E817E2600F4D8F8; 143 | productRefGroup = AF9017901E817E2600F4D8F8 /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | AF90178E1E817E2600F4D8F8 /* CRNotificationsExample */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | AF90178D1E817E2600F4D8F8 /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | AF90179D1E817E2600F4D8F8 /* LaunchScreen.storyboard in Resources */, 158 | AF90179A1E817E2600F4D8F8 /* Assets.xcassets in Resources */, 159 | AF9017981E817E2600F4D8F8 /* Main.storyboard in Resources */, 160 | ); 161 | runOnlyForDeploymentPostprocessing = 0; 162 | }; 163 | /* End PBXResourcesBuildPhase section */ 164 | 165 | /* Begin PBXShellScriptBuildPhase section */ 166 | 177AA681854FBAA1E77B5C0B /* [CP] Copy Pods Resources */ = { 167 | isa = PBXShellScriptBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | ); 171 | inputPaths = ( 172 | "${SRCROOT}/Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-resources.sh", 173 | $PODS_CONFIGURATION_BUILD_DIR/CRNotifications/CRNotifications.bundle, 174 | ); 175 | name = "[CP] Copy Pods Resources"; 176 | outputPaths = ( 177 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}", 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | shellPath = /bin/sh; 181 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-resources.sh\"\n"; 182 | showEnvVarsInLog = 0; 183 | }; 184 | 3E3E8CA4FFE01341935D484E /* [CP] Embed Pods Frameworks */ = { 185 | isa = PBXShellScriptBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | ); 189 | inputPaths = ( 190 | "${SRCROOT}/Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-frameworks.sh", 191 | "${BUILT_PRODUCTS_DIR}/CRNotifications/CRNotifications.framework", 192 | ); 193 | name = "[CP] Embed Pods Frameworks"; 194 | outputPaths = ( 195 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CRNotifications.framework", 196 | ); 197 | runOnlyForDeploymentPostprocessing = 0; 198 | shellPath = /bin/sh; 199 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-frameworks.sh\"\n"; 200 | showEnvVarsInLog = 0; 201 | }; 202 | 61B22BA6B5319D40E885C837 /* [CP] Check Pods Manifest.lock */ = { 203 | isa = PBXShellScriptBuildPhase; 204 | buildActionMask = 2147483647; 205 | files = ( 206 | ); 207 | inputPaths = ( 208 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 209 | "${PODS_ROOT}/Manifest.lock", 210 | ); 211 | name = "[CP] Check Pods Manifest.lock"; 212 | outputPaths = ( 213 | "$(DERIVED_FILE_DIR)/Pods-CRNotificationsExample-checkManifestLockResult.txt", 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | shellPath = /bin/sh; 217 | 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"; 218 | showEnvVarsInLog = 0; 219 | }; 220 | /* End PBXShellScriptBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | AF90178B1E817E2600F4D8F8 /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | AF9017951E817E2600F4D8F8 /* ViewController.swift in Sources */, 228 | AF9017931E817E2600F4D8F8 /* AppDelegate.swift in Sources */, 229 | AF3C46C71F0EB36300CA7DE8 /* PushViewController.swift in Sources */, 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | /* End PBXSourcesBuildPhase section */ 234 | 235 | /* Begin PBXVariantGroup section */ 236 | AF9017961E817E2600F4D8F8 /* Main.storyboard */ = { 237 | isa = PBXVariantGroup; 238 | children = ( 239 | AF9017971E817E2600F4D8F8 /* Base */, 240 | ); 241 | name = Main.storyboard; 242 | sourceTree = ""; 243 | }; 244 | AF90179B1E817E2600F4D8F8 /* LaunchScreen.storyboard */ = { 245 | isa = PBXVariantGroup; 246 | children = ( 247 | AF90179C1E817E2600F4D8F8 /* Base */, 248 | ); 249 | name = LaunchScreen.storyboard; 250 | sourceTree = ""; 251 | }; 252 | /* End PBXVariantGroup section */ 253 | 254 | /* Begin XCBuildConfiguration section */ 255 | AF90179F1E817E2600F4D8F8 /* Debug */ = { 256 | isa = XCBuildConfiguration; 257 | buildSettings = { 258 | ALWAYS_SEARCH_USER_PATHS = NO; 259 | CLANG_ANALYZER_NONNULL = YES; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_COMMA = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 271 | CLANG_WARN_EMPTY_BODY = YES; 272 | CLANG_WARN_ENUM_CONVERSION = YES; 273 | CLANG_WARN_INFINITE_RECURSION = YES; 274 | CLANG_WARN_INT_CONVERSION = YES; 275 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 276 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 277 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 278 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 279 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 280 | CLANG_WARN_STRICT_PROTOTYPES = YES; 281 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 282 | CLANG_WARN_UNREACHABLE_CODE = YES; 283 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 284 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 285 | COPY_PHASE_STRIP = NO; 286 | DEBUG_INFORMATION_FORMAT = dwarf; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | ENABLE_TESTABILITY = YES; 289 | GCC_C_LANGUAGE_STANDARD = gnu99; 290 | GCC_DYNAMIC_NO_PIC = NO; 291 | GCC_NO_COMMON_BLOCKS = YES; 292 | GCC_OPTIMIZATION_LEVEL = 0; 293 | GCC_PREPROCESSOR_DEFINITIONS = ( 294 | "DEBUG=1", 295 | "$(inherited)", 296 | ); 297 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 298 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 299 | GCC_WARN_UNDECLARED_SELECTOR = YES; 300 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 301 | GCC_WARN_UNUSED_FUNCTION = YES; 302 | GCC_WARN_UNUSED_VARIABLE = YES; 303 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 304 | MTL_ENABLE_DEBUG_INFO = YES; 305 | ONLY_ACTIVE_ARCH = YES; 306 | SDKROOT = iphoneos; 307 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 308 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 309 | }; 310 | name = Debug; 311 | }; 312 | AF9017A01E817E2600F4D8F8 /* Release */ = { 313 | isa = XCBuildConfiguration; 314 | buildSettings = { 315 | ALWAYS_SEARCH_USER_PATHS = NO; 316 | CLANG_ANALYZER_NONNULL = YES; 317 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 318 | CLANG_CXX_LIBRARY = "libc++"; 319 | CLANG_ENABLE_MODULES = YES; 320 | CLANG_ENABLE_OBJC_ARC = YES; 321 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 322 | CLANG_WARN_BOOL_CONVERSION = YES; 323 | CLANG_WARN_COMMA = YES; 324 | CLANG_WARN_CONSTANT_CONVERSION = YES; 325 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 326 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 327 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 328 | CLANG_WARN_EMPTY_BODY = YES; 329 | CLANG_WARN_ENUM_CONVERSION = YES; 330 | CLANG_WARN_INFINITE_RECURSION = YES; 331 | CLANG_WARN_INT_CONVERSION = YES; 332 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 333 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 334 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 335 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 336 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 337 | CLANG_WARN_STRICT_PROTOTYPES = YES; 338 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 339 | CLANG_WARN_UNREACHABLE_CODE = YES; 340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 342 | COPY_PHASE_STRIP = NO; 343 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 344 | ENABLE_NS_ASSERTIONS = NO; 345 | ENABLE_STRICT_OBJC_MSGSEND = YES; 346 | GCC_C_LANGUAGE_STANDARD = gnu99; 347 | GCC_NO_COMMON_BLOCKS = YES; 348 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 349 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 350 | GCC_WARN_UNDECLARED_SELECTOR = YES; 351 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 352 | GCC_WARN_UNUSED_FUNCTION = YES; 353 | GCC_WARN_UNUSED_VARIABLE = YES; 354 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 355 | MTL_ENABLE_DEBUG_INFO = NO; 356 | SDKROOT = iphoneos; 357 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 358 | VALIDATE_PRODUCT = YES; 359 | }; 360 | name = Release; 361 | }; 362 | AF9017A21E817E2600F4D8F8 /* Debug */ = { 363 | isa = XCBuildConfiguration; 364 | baseConfigurationReference = D2CAA818C0A3DE60568E5D2C /* Pods-CRNotificationsExample.debug.xcconfig */; 365 | buildSettings = { 366 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 367 | DEVELOPMENT_TEAM = ""; 368 | INFOPLIST_FILE = CRNotificationsExample/Info.plist; 369 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 370 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 371 | MARKETING_VERSION = 1.2.1; 372 | PRODUCT_BUNDLE_IDENTIFIER = com.casperriboe.CRNotificationsExample; 373 | PRODUCT_NAME = "$(TARGET_NAME)"; 374 | SWIFT_VERSION = 5.0; 375 | TARGETED_DEVICE_FAMILY = "1,2"; 376 | }; 377 | name = Debug; 378 | }; 379 | AF9017A31E817E2600F4D8F8 /* Release */ = { 380 | isa = XCBuildConfiguration; 381 | baseConfigurationReference = 24193BC70B4C0025A0146E19 /* Pods-CRNotificationsExample.release.xcconfig */; 382 | buildSettings = { 383 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 384 | DEVELOPMENT_TEAM = ""; 385 | INFOPLIST_FILE = CRNotificationsExample/Info.plist; 386 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 388 | MARKETING_VERSION = 1.2.1; 389 | PRODUCT_BUNDLE_IDENTIFIER = com.casperriboe.CRNotificationsExample; 390 | PRODUCT_NAME = "$(TARGET_NAME)"; 391 | SWIFT_VERSION = 5.0; 392 | TARGETED_DEVICE_FAMILY = "1,2"; 393 | }; 394 | name = Release; 395 | }; 396 | /* End XCBuildConfiguration section */ 397 | 398 | /* Begin XCConfigurationList section */ 399 | AF90178A1E817E2600F4D8F8 /* Build configuration list for PBXProject "CRNotificationsExample" */ = { 400 | isa = XCConfigurationList; 401 | buildConfigurations = ( 402 | AF90179F1E817E2600F4D8F8 /* Debug */, 403 | AF9017A01E817E2600F4D8F8 /* Release */, 404 | ); 405 | defaultConfigurationIsVisible = 0; 406 | defaultConfigurationName = Release; 407 | }; 408 | AF9017A11E817E2600F4D8F8 /* Build configuration list for PBXNativeTarget "CRNotificationsExample" */ = { 409 | isa = XCConfigurationList; 410 | buildConfigurations = ( 411 | AF9017A21E817E2600F4D8F8 /* Debug */, 412 | AF9017A31E817E2600F4D8F8 /* Release */, 413 | ); 414 | defaultConfigurationIsVisible = 0; 415 | defaultConfigurationName = Release; 416 | }; 417 | /* End XCConfigurationList section */ 418 | }; 419 | rootObject = AF9017871E817E2600F4D8F8 /* Project object */; 420 | } 421 | -------------------------------------------------------------------------------- /CRNotificationsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CRNotificationsExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CRNotificationsExample.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /CRNotificationsExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CRNotificationsExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /CRNotificationsExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /CRNotificationsExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CRNotificationsExample 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | func applicationWillResignActive(_ application: UIApplication) { 22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 23 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 24 | } 25 | 26 | func applicationDidEnterBackground(_ application: UIApplication) { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | func applicationWillEnterForeground(_ application: UIApplication) { 32 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 33 | } 34 | 35 | func applicationDidBecomeActive(_ application: UIApplication) { 36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 37 | } 38 | 39 | func applicationWillTerminate(_ application: UIApplication) { 40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 41 | } 42 | 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "images" : [ 7 | { 8 | "filename" : "Icon-40.png", 9 | "size" : "40x40", 10 | "idiom" : "ipad", 11 | "scale" : "1x" 12 | }, 13 | { 14 | "filename" : "Icon-40@2x.png", 15 | "size" : "40x40", 16 | "idiom" : "ipad", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "filename" : "Icon-60@2x.png", 21 | "size" : "60x60", 22 | "idiom" : "iphone", 23 | "scale" : "2x" 24 | }, 25 | { 26 | "filename" : "Icon-72.png", 27 | "size" : "72x72", 28 | "idiom" : "ipad", 29 | "scale" : "1x" 30 | }, 31 | { 32 | "filename" : "Icon-72@2x.png", 33 | "size" : "72x72", 34 | "idiom" : "ipad", 35 | "scale" : "2x" 36 | }, 37 | { 38 | "filename" : "Icon-76.png", 39 | "size" : "76x76", 40 | "idiom" : "ipad", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "filename" : "Icon-76@2x.png", 45 | "size" : "76x76", 46 | "idiom" : "ipad", 47 | "scale" : "2x" 48 | }, 49 | { 50 | "filename" : "Icon-Small-50.png", 51 | "size" : "50x50", 52 | "idiom" : "ipad", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "filename" : "Icon-Small-50@2x.png", 57 | "size" : "50x50", 58 | "idiom" : "ipad", 59 | "scale" : "2x" 60 | }, 61 | { 62 | "filename" : "Icon-Small.png", 63 | "size" : "29x29", 64 | "idiom" : "iphone", 65 | "scale" : "1x" 66 | }, 67 | { 68 | "filename" : "Icon-Small@2x.png", 69 | "size" : "29x29", 70 | "idiom" : "iphone", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "filename" : "Icon.png", 75 | "size" : "57x57", 76 | "idiom" : "iphone", 77 | "scale" : "1x" 78 | }, 79 | { 80 | "filename" : "Icon@2x.png", 81 | "size" : "57x57", 82 | "idiom" : "iphone", 83 | "scale" : "2x" 84 | }, 85 | { 86 | "filename" : "Icon-Small@3x.png", 87 | "size" : "29x29", 88 | "idiom" : "iphone", 89 | "scale" : "3x" 90 | }, 91 | { 92 | "filename" : "Icon-40@3x.png", 93 | "size" : "40x40", 94 | "idiom" : "iphone", 95 | "scale" : "3x" 96 | }, 97 | { 98 | "filename" : "Icon-60@3x.png", 99 | "size" : "60x60", 100 | "idiom" : "iphone", 101 | "scale" : "3x" 102 | }, 103 | { 104 | "filename" : "Icon-40@2x.png", 105 | "size" : "40x40", 106 | "idiom" : "iphone", 107 | "scale" : "2x" 108 | }, 109 | { 110 | "filename" : "Icon-Small.png", 111 | "size" : "29x29", 112 | "idiom" : "ipad", 113 | "scale" : "1x" 114 | }, 115 | { 116 | "filename" : "Icon-Small@2x.png", 117 | "size" : "29x29", 118 | "idiom" : "ipad", 119 | "scale" : "2x" 120 | }, 121 | { 122 | "filename" : "Icon-83.5@2x.png", 123 | "size" : "83.5x83.5", 124 | "idiom" : "ipad", 125 | "scale" : "2x" 126 | }, 127 | { 128 | "filename" : "NotificationIcon@2x.png", 129 | "size" : "20x20", 130 | "idiom" : "iphone", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "filename" : "NotificationIcon@3x.png", 135 | "size" : "20x20", 136 | "idiom" : "iphone", 137 | "scale" : "3x" 138 | }, 139 | { 140 | "filename" : "NotificationIcon~ipad.png", 141 | "size" : "20x20", 142 | "idiom" : "ipad", 143 | "scale" : "1x" 144 | }, 145 | { 146 | "filename" : "NotificationIcon~ipad@2x.png", 147 | "size" : "20x20", 148 | "idiom" : "ipad", 149 | "scale" : "2x" 150 | } 151 | ] 152 | } -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-72.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-72@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small-50.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/Icon@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/NotificationIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/NotificationIcon@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/NotificationIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/NotificationIcon@3x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/CRNotificationsExample/Assets.xcassets/AppIcon.appiconset/NotificationIcon~ipad@2x.png -------------------------------------------------------------------------------- /CRNotificationsExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CRNotificationsExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /CRNotificationsExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 34 | 44 | 54 | 61 | 71 | 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 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /CRNotificationsExample/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 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /CRNotificationsExample/PushViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PushViewController.swift 3 | // CRNotificationsExample 4 | // 5 | // Created by Casper Riboe on 06/07/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | import CRNotifications 11 | 12 | class PushViewController: UIViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | view.backgroundColor = UIColor.groupTableViewBackground 17 | } 18 | 19 | override func viewDidAppear(_ animated: Bool) { 20 | super.viewDidAppear(animated) 21 | 22 | CRNotifications.showNotification(type: CRNotifications.success, title: "Pushed through!", message: "I'm right here.", dismissDelay: 3) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /CRNotificationsExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | import CRNotifications 11 | 12 | class ViewController: UIViewController { 13 | 14 | /// Test buttons 15 | @IBAction func showSuccess(_ sender: Any) { 16 | CRNotifications.showNotification(type: CRNotifications.success, title: "Success!", message: "You successfully showed this notification.", dismissDelay: 3, completion: { 17 | print("Successfully executed this print when the notification disappeared.") 18 | }) 19 | } 20 | 21 | @IBAction func showError(_ sender: Any) { 22 | CRNotifications.showNotification(type: CRNotifications.error, title: "Error", message: "This notification does not have a green background.", dismissDelay: 3) 23 | } 24 | 25 | @IBAction func showInfo(_ sender: Any) { 26 | CRNotifications.showNotification(type: CRNotifications.info, title: "Did you know?", message: "This notification will dismiss itself in 3 seconds.", dismissDelay: 3) 27 | } 28 | 29 | @IBAction func showCustom(_ sender: Any) { 30 | let customNotification = CustomCRNotification(textColor: UIColor.green, backgroundColor: UIColor.brown, image: UIImage()) 31 | CRNotifications.showNotification(type: customNotification, title: "Did you know?", message: "This notification is very long and resizes itself in order to fit the size of the view. These last words exceed the limit.", dismissDelay: 3) 32 | } 33 | 34 | @IBAction func showWithOnTapFeature(_ sender: Any) { 35 | CRNotifications.showNotification(type: CRNotifications.info, title: "Did you know?", message: "Tap on this notification to show another notification", dismissDelay: 3, delegate: self) 36 | } 37 | 38 | @IBAction func nextViewControllerButton(_ sender: Any) { 39 | navigationController?.pushViewController(PushViewController(), animated: true) 40 | } 41 | } 42 | 43 | fileprivate struct CustomCRNotification: CRNotificationType { 44 | var textColor: UIColor 45 | var backgroundColor: UIColor 46 | var image: UIImage? 47 | } 48 | 49 | extension ViewController: CRNotificationDelegate { 50 | func onNotificationTap(type: CRNotificationType, title: String?, message: String?) { 51 | CRNotifications.showNotification(type: CRNotifications.success, title: "Success!", message: "You successfully tapped on the previous notification. Title was \(title ?? "no title")", dismissDelay: 3, completion: { 52 | print("Successfully executed this print when the notification disappeared.") 53 | }) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) <2017> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '9.0' 3 | 4 | target 'CRNotificationsExample' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for CRNotificationsExample 9 | pod 'CRNotifications', :git => 'https://github.com/dkcas11/CRNotifications.git' 10 | end 11 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CRNotifications (1.0.4) 3 | 4 | DEPENDENCIES: 5 | - CRNotifications (from `https://github.com/rico237/CRNotifications.git`) 6 | 7 | EXTERNAL SOURCES: 8 | CRNotifications: 9 | :git: https://github.com/rico237/CRNotifications.git 10 | 11 | CHECKOUT OPTIONS: 12 | CRNotifications: 13 | :commit: 0a3e3080fc6af2ca6b92abad38344a76fd732738 14 | :git: https://github.com/rico237/CRNotifications.git 15 | 16 | SPEC CHECKSUMS: 17 | CRNotifications: b32509334780b418455cdad73e8241fa2ff1be18 18 | 19 | PODFILE CHECKSUM: 7600043081d9a2f56d54c2619665adf2fdf7ee6c 20 | 21 | COCOAPODS: 1.3.1 22 | -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/.DS_Store -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "error.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/error.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/error.pdf -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "info.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/info.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/info.pdf -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "success.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/success.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/Pods/CRNotifications/CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/success.pdf -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Classes/CRNotification.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotification.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol CRNotification { 12 | func hide() -> Void 13 | } 14 | 15 | public class CRNotificationView: UIView, CRNotification { 16 | 17 | private let imageView: UIImageView = { 18 | let view = UIImageView() 19 | view.translatesAutoresizingMaskIntoConstraints = false 20 | view.tintColor = .white 21 | return view 22 | }() 23 | 24 | private let titleLabel: UILabel = { 25 | let label = UILabel() 26 | label.translatesAutoresizingMaskIntoConstraints = false 27 | label.font = UIFont.systemFont(ofSize: 15, weight: .bold) 28 | label.textColor = .white 29 | return label 30 | }() 31 | 32 | private let messageLabel: UILabel = { 33 | let label = UILabel() 34 | label.translatesAutoresizingMaskIntoConstraints = false 35 | label.font = UIFont.systemFont(ofSize: 13, weight: .semibold) 36 | label.textColor = .white 37 | label.numberOfLines = 2 38 | return label 39 | }() 40 | 41 | private var completion: () -> () = {} 42 | private var type: CRNotificationType 43 | public var delegate: CRNotificationDelegate? 44 | 45 | // MARK: - Init 46 | 47 | required internal init?(coder aDecoder:NSCoder) { fatalError("Not implemented.") } 48 | 49 | internal init(type: CRNotificationType) { 50 | let deviceWidth = min(UIScreen.main.bounds.width, UIScreen.main.bounds.height) 51 | let widthFactor: CGFloat = DeviceManager.value(iPhone35: 0.9, iPhone40: 0.9, iPhone47: 0.9, iPhone55: 0.85, iPhone58: 0.9, iPhone61: 0.9, iPadSmall: 0.5, iPadMedium: 0.45, iPadBig: 0.4) 52 | let heightFactor: CGFloat = DeviceManager.value(iPhone35: 0.22, iPhone40: 0.22, iPhone47: 0.2, iPhone55: 0.2, iPhone58: 0.18, iPhone61: 0.18, iPadSmall: 0.18, iPadMedium: 0.17, iPadBig: 0.17) 53 | 54 | let width = deviceWidth * widthFactor 55 | let height = width * heightFactor 56 | self.type = type 57 | 58 | super.init(frame: CGRect(x: 0, y: -height, width: width, height: height)) 59 | center.x = UIScreen.main.bounds.width/2 60 | setupLayer() 61 | setupSubviews() 62 | setupConstraints() 63 | setupTargets() 64 | 65 | // setup type attributes 66 | self.setBackgroundColor(color: type.backgroundColor) 67 | self.setTextColor(color: type.textColor) 68 | self.setImage(image: type.image) 69 | } 70 | 71 | 72 | // MARK: - Setup 73 | 74 | private func setupLayer() { 75 | layer.cornerRadius = 5 76 | layer.shadowRadius = 5 77 | layer.shadowOpacity = 0.25 78 | layer.shadowColor = UIColor.lightGray.cgColor 79 | } 80 | 81 | private func setupSubviews() { 82 | addSubview(imageView) 83 | addSubview(titleLabel) 84 | addSubview(messageLabel) 85 | } 86 | 87 | private func setupConstraints() { 88 | NSLayoutConstraint.activate([ 89 | imageView.topAnchor.constraint(equalTo: imageView.superview!.topAnchor, constant: 12), 90 | imageView.leadingAnchor.constraint(equalTo: imageView.superview!.leadingAnchor, constant: 12), 91 | imageView.bottomAnchor.constraint(equalTo: imageView.superview!.bottomAnchor, constant: -12), 92 | imageView.widthAnchor.constraint(equalTo: imageView.heightAnchor) 93 | ]) 94 | 95 | NSLayoutConstraint.activate([ 96 | titleLabel.topAnchor.constraint(lessThanOrEqualTo: titleLabel.superview!.topAnchor, constant: 8), 97 | titleLabel.leadingAnchor.constraint(equalTo: imageView.trailingAnchor, constant: 8), 98 | titleLabel.trailingAnchor.constraint(equalTo: titleLabel.superview!.trailingAnchor, constant: -8) 99 | ]) 100 | 101 | NSLayoutConstraint.activate([ 102 | messageLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 2), 103 | messageLabel.leadingAnchor.constraint(equalTo: titleLabel.leadingAnchor), 104 | messageLabel.trailingAnchor.constraint(equalTo: titleLabel.trailingAnchor), 105 | messageLabel.bottomAnchor.constraint(lessThanOrEqualTo: messageLabel.superview!.bottomAnchor, constant: -5) 106 | ]) 107 | } 108 | 109 | private func setupTargets() { 110 | NotificationCenter.default.addObserver(self, selector: #selector(didRotate), name: UIDevice.orientationDidChangeNotification, object: nil) 111 | let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.dismissNotificationOnTap)) 112 | let swipeRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(self.dismissNotification)) 113 | swipeRecognizer.direction = .up 114 | 115 | addGestureRecognizer(tapRecognizer) 116 | addGestureRecognizer(swipeRecognizer) 117 | } 118 | 119 | 120 | // MARK: - Helpers 121 | 122 | @objc internal func didRotate() { 123 | UIView.animate(withDuration: 0.2) { 124 | self.center.x = UIScreen.main.bounds.width / 2 125 | self.center.y = self.topInset() + 10 + self.frame.height / 2 126 | } 127 | } 128 | 129 | /** Sets the background color of the notification **/ 130 | internal func setBackgroundColor(color: UIColor) { 131 | backgroundColor = color 132 | } 133 | 134 | /** Sets the background color of the notification **/ 135 | internal func setTextColor(color: UIColor) { 136 | titleLabel.textColor = color 137 | messageLabel.textColor = color 138 | } 139 | 140 | /** Sets the title of the notification **/ 141 | internal func setTitle(title: String) { 142 | titleLabel.text = title 143 | } 144 | 145 | /** Sets the message of the notification **/ 146 | internal func setMessage(message: String) { 147 | messageLabel.text = message 148 | } 149 | 150 | /** Sets the image of the notification **/ 151 | internal func setImage(image: UIImage?) { 152 | imageView.image = image 153 | } 154 | 155 | /** Sets the completion block of the notification for when it is dismissed **/ 156 | internal func setCompletionBlock(_ completion: @escaping () -> ()) { 157 | self.completion = completion 158 | } 159 | 160 | /** Dismisses the notification with a delay > 0 **/ 161 | internal func setDismisTimer(delay: TimeInterval) { 162 | if delay > 0 { 163 | Timer.scheduledTimer(timeInterval: Double(delay), target: self, selector: #selector(dismissNotification), userInfo: nil, repeats: false) 164 | } 165 | } 166 | 167 | /** Animates in the notification **/ 168 | internal func showNotification() { 169 | UIView.animate(withDuration: 0.3, delay: 0.0, usingSpringWithDamping: 0.68, initialSpringVelocity: 0.1, options: UIView.AnimationOptions(), animations: { 170 | self.frame.origin.y = self.topInset() + 10 171 | }) 172 | } 173 | 174 | @objc internal func dismissNotificationOnTap() { 175 | delegate?.onNotificationTap(type: type,title: titleLabel.text, message: messageLabel.text) 176 | self.dismissNotification() 177 | } 178 | 179 | /** Animates out the notification **/ 180 | @objc internal func dismissNotification() { 181 | hide() 182 | } 183 | 184 | private func topInset() -> CGFloat { 185 | let iPhoneXInset: CGFloat 186 | switch UIApplication.shared.statusBarOrientation { 187 | case .landscapeLeft, .landscapeRight: 188 | iPhoneXInset = 0 189 | case .portrait, .portraitUpsideDown, .unknown: 190 | iPhoneXInset = 44 191 | @unknown default: 192 | iPhoneXInset = 0 193 | } 194 | 195 | let statusBarHeight: CGFloat = UIApplication.shared.statusBarFrame.height 196 | return DeviceManager.value(iPhoneX: statusBarHeight == 0 ? iPhoneXInset : statusBarHeight, other: statusBarHeight) 197 | } 198 | 199 | 200 | // MARK: - Public 201 | 202 | public func hide() { 203 | UIView.animate(withDuration: 0.1, animations: { 204 | self.frame.origin.y = self.frame.origin.y + 5 205 | }, completion: { 206 | (complete: Bool) in 207 | UIView.animate(withDuration: 0.25, animations: { 208 | self.center.y = -self.frame.height 209 | }, completion: { [weak self] (complete) in 210 | self?.completion() 211 | self?.removeFromSuperview() 212 | }) 213 | }) 214 | } 215 | 216 | } 217 | -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Classes/CRNotificationType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotificationType.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 14/09/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import Foundation 10 | 11 | /** Protocol for defining a CRNotification style **/ 12 | public protocol CRNotificationType { 13 | var textColor: UIColor { get } 14 | var backgroundColor: UIColor { get } 15 | var image: UIImage? { get } 16 | } 17 | -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Classes/CRNotifications.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotifications.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol CRNotificationDelegate { 12 | func onNotificationTap(type: CRNotificationType, title: String?, message: String?) 13 | } 14 | 15 | public class CRNotifications { 16 | 17 | // MARK: - Static notification types 18 | 19 | public static let success: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatGreen, image: UIImage(named: "success", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 20 | public static let error: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatRed, image: UIImage(named: "error", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 21 | public static let info: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatGray, image: UIImage(named: "info", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 22 | 23 | 24 | // MARK: - Init 25 | 26 | public init(){} 27 | 28 | 29 | // MARK: - Helpers 30 | 31 | /** Shows a CRNotification. 32 | Returns the CRNotification that is displayed. Returns nil if the keyWindow is not present. 33 | **/ 34 | @discardableResult 35 | public static func showNotification(textColor: UIColor, backgroundColor: UIColor, image: UIImage?, title: String, message: String, dismissDelay: TimeInterval, delegate: CRNotificationDelegate? = nil, completion: @escaping () -> () = {}) -> CRNotification? { 36 | let notificationDefinition = CRNotificationTypeDefinition(textColor: textColor, backgroundColor: backgroundColor, image: image) 37 | return showNotification(type: notificationDefinition, title: title, message: message, dismissDelay: dismissDelay, delegate: delegate, completion: completion) 38 | } 39 | 40 | /** Shows a CRNotification from a CRNotificationType. 41 | Returns the CRNotification that is displayed. Returns nil if the keyWindow is not present. 42 | **/ 43 | @discardableResult 44 | public static func showNotification(type: CRNotificationType, title: String, message: String, dismissDelay: TimeInterval, delegate: CRNotificationDelegate? = nil, completion: @escaping () -> () = {}) -> CRNotification? { 45 | let view = CRNotificationView(type: type) 46 | 47 | view.setTitle(title: title) 48 | view.setMessage(message: message) 49 | view.setDismisTimer(delay: dismissDelay) 50 | view.setCompletionBlock(completion) 51 | view.delegate = delegate 52 | 53 | guard let window = UIApplication.shared.keyWindow else { 54 | print("Failed to show CRNotification. No keywindow available.") 55 | return nil 56 | } 57 | 58 | window.addSubview(view) 59 | view.showNotification() 60 | 61 | return view 62 | } 63 | } 64 | 65 | fileprivate struct CRNotificationTypeDefinition: CRNotificationType { 66 | var textColor: UIColor 67 | var backgroundColor: UIColor 68 | var image: UIImage? 69 | } 70 | -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Classes/Colors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Colors.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIColor { 12 | 13 | /// Flat Colors 14 | static let flatGreen = UIColor(red: 46/255, green: 204/255, blue: 113/255, alpha: 1.0) 15 | static let flatRed = UIColor(red: 231/255, green: 76/255, blue: 60/255, alpha: 1.0) 16 | static let flatGray = UIColor(red: 149/255, green: 165/255, blue: 166/255, alpha: 1.0) 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Pods/CRNotifications/CRNotifications/Classes/DeviceManager.swift: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------- 2 | // DeviceManager.swift 3 | // ---------------------------------------------------- 4 | // 5 | // Complete list of devices sorted by resolution. 6 | // Device return by the method 'Device' is based on the height of the device. 7 | // 8 | // iPad Small 9 | // 1536x2048 / 768x1024 (768x1024 / 384x512) 10 | // - iPad Retina 11 | // - iPad 3 12 | // - iPad Mini Retina 13 | // - iPad Mini 4 14 | // - iPad Air 15 | // - iPad Air 2 16 | // - iPad Pro 9.7" 17 | // 18 | // iPad Medium 19 | // 1668x2224 (834x1112) 20 | // iPad Pro 10.5" 21 | // 22 | // iPad Big 23 | // 2048x2732 (1024x1366) 24 | // - iPad Pro 12.9" 25 | // 26 | // iPhone35 27 | // 640x960 (320x480) 28 | // - iPhone 4 29 | // 30 | // iPhone40 31 | // 640x1136 (320x568) 32 | // - iPhone 5 33 | // 34 | // iPhone47 35 | // 750x1334 (375x667) 36 | // - iPhone 6 37 | // - iPhone 7 38 | // - iPhone 8 39 | // 40 | // iPhone55 41 | // 1080x1920 / 1242x2208 (540x960 / 621x1104 / 414x736) 42 | // - iPhone 6 Plus 43 | // - iPhone 7 Plus 44 | // - iPhone 8 Plus 45 | // 46 | // iPhone58 47 | // 1125x2436 (375x812) 48 | // - iPhone X 49 | // - iPhone XS 50 | // 51 | // iPhone61 52 | // 828x1792 (414x896) 53 | // - iPhone XR 54 | // 55 | // iPhone 65 56 | // 1242x2688 (414x896) 57 | // - iPhone XS Max 58 | // 59 | // 60 | // ---------------------------------------------------- 61 | // Created by Casper Riboe on 21/07/2017. 62 | // Copyright © 2017 Casper Riboe. All rights reserved. 63 | // ---------------------------------------------------- 64 | 65 | import UIKit 66 | 67 | internal class DeviceManager { 68 | 69 | private init() {} 70 | 71 | /// Returns the current device in use. 72 | internal static func device() -> Device { 73 | let size = CGSize(width: min(UIScreen.main.bounds.width, UIScreen.main.bounds.height), 74 | height: max(UIScreen.main.bounds.width, UIScreen.main.bounds.height)) 75 | 76 | switch size { 77 | case CGSize(width: 320.0, height: 480.0): 78 | return .iPhone35 79 | case CGSize(width: 320.0, height: 568.0): 80 | return .iPhone40 81 | case CGSize(width: 375.0, height: 667.0): 82 | return .iPhone47 83 | case CGSize(width: 375.0, height: 812.0): 84 | return .iPhone58 85 | case CGSize(width: 414.0, height: 736.0): 86 | return .iPhone55 87 | case CGSize(width: 540.0, height: 960.0): 88 | return .iPhone55 89 | case CGSize(width: 621.0, height: 1104.0): 90 | return .iPhone55 91 | case CGSize(width: 562.5, height: 1218.0): 92 | return .iPhone58 93 | case CGSize(width: 414.0, height: 896.0): 94 | return .iPhone61 95 | case CGSize(width: 384.0, height: 512.0): 96 | return .iPadSmall 97 | case CGSize(width: 768.0, height: 1024.0): 98 | return .iPadSmall 99 | case CGSize(width: 834.0, height: 1112.0): 100 | return .iPadMedium 101 | case CGSize(width: 1024.0, height: 1366.0): 102 | return .iPadBig 103 | default: 104 | return .unknown 105 | } 106 | } 107 | 108 | /// Returns a value based on the current iPhone device. 109 | internal static func value(iPhone35: T, iPhone40: T, iPhone47: T, iPhone55: T, iPhone58: T, iPhone61: T) -> T { 110 | switch device() { 111 | case .iPhone35: 112 | return iPhone35 113 | case .iPhone40: 114 | return iPhone40 115 | case .iPhone47: 116 | return iPhone47 117 | case .iPhone55: 118 | return iPhone55 119 | case .iPhone61: 120 | return iPhone61 121 | default: 122 | return iPhone58 123 | } 124 | } 125 | 126 | /// Returns a value based on the current iPad device. 127 | internal static func value(iPadSmall: T, iPadMedium: T, iPadBig: T) -> T { 128 | switch device() { 129 | case .iPadSmall: 130 | return iPadSmall 131 | case .iPadMedium: 132 | return iPadMedium 133 | default: 134 | return iPadBig 135 | } 136 | } 137 | 138 | /// Returns a value based on the current iPhone or iPad device. 139 | internal static func value(iPhone35: T, iPhone40: T, iPhone47: T, iPhone55: T, iPhone58: T, iPhone61: T, iPadSmall: T, iPadMedium: T, iPadBig: T) -> T { 140 | switch device() { 141 | case .iPhone35: 142 | return iPhone35 143 | case .iPhone40: 144 | return iPhone40 145 | case .iPhone47: 146 | return iPhone47 147 | case .iPhone55: 148 | return iPhone55 149 | case .iPhone58: 150 | return iPhone58 151 | case .iPhone61: 152 | return iPhone61 153 | case .iPadSmall: 154 | return iPadSmall 155 | case .iPadMedium: 156 | return iPadMedium 157 | case .iPadBig: 158 | return iPadBig 159 | default: 160 | if UIDevice.current.userInterfaceIdiom == .pad { 161 | return iPadBig 162 | } else { 163 | return iPhone55 164 | } 165 | } 166 | } 167 | 168 | /// Returns a value based on the current iPhone or iPad device. 169 | internal static func value(iPhone: T, iPad: T) -> T { 170 | return value(iPhone35: iPhone, iPhone40: iPhone, iPhone47: iPhone, iPhone55: iPhone, iPhone58: iPhone, iPhone61: iPhone, iPadSmall: iPad, iPadMedium: iPad, iPadBig: iPad) 171 | } 172 | 173 | internal static func value(iPhoneX: T, other: T) -> T { 174 | return value(iPhone35: other, iPhone40: other, iPhone47: other, iPhone55: other, iPhone58: iPhoneX, iPhone61: iPhoneX, iPadSmall: other, iPadMedium: other, iPadBig: other) 175 | } 176 | 177 | } 178 | 179 | 180 | internal enum Device { 181 | case iPhone35 182 | case iPhone40 183 | case iPhone47 184 | case iPhone55 185 | case iPhone58 186 | case iPhone61 187 | 188 | case iPadSmall 189 | case iPadMedium 190 | case iPadBig 191 | 192 | case unknown 193 | } 194 | -------------------------------------------------------------------------------- /Pods/CRNotifications/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) <2017> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/CRNotifications/README.md: -------------------------------------------------------------------------------- 1 | # CRNotifications 2 | CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide when they are clicked on or with an automatic dismissal. 3 | 4 | ### Screenshots 5 | ------- 6 | 7 | 8 | ##### Notifications types 9 | 10 | | Success | Error |Info | 11 | | --- | --- | --- | 12 | | ![alt text](http://i831.photobucket.com/albums/zz237/dkcas11/success.jpg "Success") | ![alt text](http://i831.photobucket.com/albums/zz237/dkcas11/error.jpg "Error") | ![alt text](http://i831.photobucket.com/albums/zz237/dkcas11/info.jpg "Info")| 13 | 14 | 15 | 16 | ### How to use 17 | ------- 18 | 19 | Call ``CRNotifications.showNotification`` with a title, message, notification type and a time for how long the notification should appear. Should the notification not disappear automatically use a time of ``0``. 20 | 21 | Notification types are 22 | ```.success``` 23 | ```.error``` 24 | ```.info``` 25 | 26 | ### Installation 27 | ------- 28 | 29 | #### [Cocoapods install](https://cocoapods.org/?q=CRNotifications "Visit website") 30 | 31 | ``` 32 | pod 'CRNotifications' 33 | ``` 34 | #### Manual install 35 | Drag the *CRNotifications* folder into your project and you are good to go. 36 | 37 | ### Author & Contributors 38 | ------- 39 | 40 | **Casper Riboe** (Author) 41 | > Facebook : [Casper Riboe](http://facebook.com/dkcas11)
42 | > Twitter : [dkcas11](http://twitter.com/dkcas11)
43 | > Mail : [casper2602@hotmail.com](mailto:casper260@hotmail.com) 44 | 45 | **Herrick Wolber** (Contribution) 46 | > Twitter : [estar2005](http://twitter.com/estar2005)
47 | > Github : [Rico237](https://github.com/rico237)
48 | > Mail : [wolbereric@yahoo.fr](mailto:wolbereric@yahoo.fr) 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Pods/Local Podspecs/CRNotifications.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CRNotifications", 3 | "version": "1.1.5", 4 | "summary": "Custom in-app notifications.", 5 | "description": "Custom in-app notifications.", 6 | "homepage": "https://github.com/dkcas11/CRNotifications", 7 | "screenshots": [ 8 | "https://camo.githubusercontent.com/8bb3b0d4e643c0adb2a048814c5319bf8a6aa413/687474703a2f2f693833312e70686f746f6275636b65742e636f6d2f616c62756d732f7a7a3233372f646b63617331312f737563636573732e6a7067", 9 | "https://camo.githubusercontent.com/4b560687cb85b5a0dbc7945c4f15bf79b19db730/687474703a2f2f693833312e70686f746f6275636b65742e636f6d2f616c62756d732f7a7a3233372f646b63617331312f6572726f722e6a7067", 10 | "https://camo.githubusercontent.com/5d60f3db58199f8fc5909e341c0233b38343e2aa/687474703a2f2f693833312e70686f746f6275636b65742e636f6d2f616c62756d732f7a7a3233372f646b63617331312f696e666f2e6a7067" 11 | ], 12 | "license": { 13 | "type": "MIT", 14 | "file": "LICENSE" 15 | }, 16 | "authors": { 17 | "Casper Riboe & Herrick Wolber as contributor": "wolbereric@yahoo.fr" 18 | }, 19 | "source": { 20 | "git": "https://github.com/dkcas11/CRNotifications.git", 21 | "tag": "1.0.4" 22 | }, 23 | "social_media_url": "https://twitter.com/dkcas11", 24 | "platforms": { 25 | "ios": "9.0" 26 | }, 27 | "source_files": "CRNotifications/Classes/**/*", 28 | "resource_bundles": { 29 | "CRNotifications": [ 30 | "CRNotifications/Assets/*.xcassets" 31 | ] 32 | }, 33 | "frameworks": "UIKit" 34 | } 35 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CRNotifications (1.0.4) 3 | 4 | DEPENDENCIES: 5 | - CRNotifications (from `https://github.com/rico237/CRNotifications.git`) 6 | 7 | EXTERNAL SOURCES: 8 | CRNotifications: 9 | :git: https://github.com/rico237/CRNotifications.git 10 | 11 | CHECKOUT OPTIONS: 12 | CRNotifications: 13 | :commit: 0a3e3080fc6af2ca6b92abad38344a76fd732738 14 | :git: https://github.com/rico237/CRNotifications.git 15 | 16 | SPEC CHECKSUMS: 17 | CRNotifications: b32509334780b418455cdad73e8241fa2ff1be18 18 | 19 | PODFILE CHECKSUM: 7600043081d9a2f56d54c2619665adf2fdf7ee6c 20 | 21 | COCOAPODS: 1.3.1 22 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0383532B8F1824534FE64113696BD355 /* Pods-CRNotificationsExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E6249BBBD159D90AE712697955E2328D /* Pods-CRNotificationsExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 1CF59D16B6DB992E8CBBC4573C84614B /* CRNotifications-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A51EA0B4B203423A9F6D9F709D6960C6 /* CRNotifications-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 38AAC7EFC4FBC5D6EB3FF646667CE36F /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E16BBC431E75504EC0B40A5EB1B0146 /* Colors.swift */; }; 13 | 8811B43B3E69AF7F14F488D80ED55D77 /* CRNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4271710AF201A83A4CFC8F4C80180425 /* CRNotification.swift */; }; 14 | 9C71B70FEB9750F34D2FDA40A7E5E867 /* Pods-CRNotificationsExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E43EE78DA3145551D7EECF8378340E9 /* Pods-CRNotificationsExample-dummy.m */; }; 15 | AF65C1D11F8565FF00E4ECFC /* CRNotificationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF65C1CF1F8565FF00E4ECFC /* CRNotificationType.swift */; }; 16 | AF65C1D21F8565FF00E4ECFC /* DeviceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF65C1D01F8565FF00E4ECFC /* DeviceManager.swift */; }; 17 | AF6FD2871F6A56F9009CF338 /* CRNotificationsMedia.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C82AC89F2905AF9CD68C1FC9A17DAAC2 /* CRNotificationsMedia.xcassets */; }; 18 | B4669038A572C637D4D06559E4D18A10 /* CRNotifications-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 26E07E5825F636876B724F606287DC7E /* CRNotifications-dummy.m */; }; 19 | E90B90C932A1834C85D09A439072B022 /* CRNotifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79068477E02843D1947263C31C4FCEBE /* CRNotifications.swift */; }; 20 | F5BA21874CA4227E394D6693ED88759D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; 21 | FA28AB769C6997E6060836EEA7F48BDE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */; }; 22 | FAB3FA9012670279F42387A9153B55AD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; 23 | FE7F9EB58D992A6F01477E82489761D0 /* CRNotifications.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 816810701BAAFD2BA5EB627DC57CD35E /* CRNotifications.bundle */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 880D96D9BFC20B8DA181E8A59A56974F /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = DDE425C9A167EBCB9AB1A3E6C92370B7; 32 | remoteInfo = CRNotifications; 33 | }; 34 | F0C3E56016220DFAF76BB5858B099E08 /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = FC4F6E4D9D4EEB75F7D851CC41D781AE; 39 | remoteInfo = "CRNotifications-CRNotifications"; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 047703CB9B2832341964B06FB050FFFF /* Pods_CRNotificationsExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CRNotificationsExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 0E569C799D3074BFFBBCCC00E50FA524 /* CRNotifications-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CRNotifications-prefix.pch"; sourceTree = ""; }; 46 | 0FA1BC1FCCA2F43E1F3B1CEE7AA08317 /* Pods-CRNotificationsExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-CRNotificationsExample-frameworks.sh"; sourceTree = ""; }; 47 | 26E07E5825F636876B724F606287DC7E /* CRNotifications-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CRNotifications-dummy.m"; sourceTree = ""; }; 48 | 4271710AF201A83A4CFC8F4C80180425 /* CRNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CRNotification.swift; path = CRNotifications/Classes/CRNotification.swift; sourceTree = ""; }; 49 | 5B8B250FE4095BF3991124AC555E3711 /* Pods-CRNotificationsExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CRNotificationsExample-acknowledgements.plist"; sourceTree = ""; }; 50 | 5E43EE78DA3145551D7EECF8378340E9 /* Pods-CRNotificationsExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-CRNotificationsExample-dummy.m"; sourceTree = ""; }; 51 | 603DBC359F4470675D6AFE2288D33CCF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 62D06758BEC55CFAF8354101161AF27D /* CRNotifications.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CRNotifications.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 79068477E02843D1947263C31C4FCEBE /* CRNotifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CRNotifications.swift; path = CRNotifications/Classes/CRNotifications.swift; sourceTree = ""; }; 54 | 816810701BAAFD2BA5EB627DC57CD35E /* CRNotifications.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CRNotifications.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 8E16BBC431E75504EC0B40A5EB1B0146 /* Colors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Colors.swift; path = CRNotifications/Classes/Colors.swift; sourceTree = ""; }; 56 | 92B9ED81EEE4C40B38978711722687B2 /* CRNotifications.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = CRNotifications.modulemap; sourceTree = ""; }; 57 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 58 | 97C6C6F62138883113B8138976DB3831 /* Pods-CRNotificationsExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-CRNotificationsExample-acknowledgements.markdown"; sourceTree = ""; }; 59 | 99496B351F41B00E1A682B5EE39CC524 /* Pods-CRNotificationsExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-CRNotificationsExample-resources.sh"; sourceTree = ""; }; 60 | A2752BE51FE8EAE21AA6C2D737180030 /* ResourceBundle-CRNotifications-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-CRNotifications-Info.plist"; sourceTree = ""; }; 61 | A51EA0B4B203423A9F6D9F709D6960C6 /* CRNotifications-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CRNotifications-umbrella.h"; sourceTree = ""; }; 62 | AF65C1CF1F8565FF00E4ECFC /* CRNotificationType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CRNotificationType.swift; path = CRNotifications/Classes/CRNotificationType.swift; sourceTree = ""; }; 63 | AF65C1D01F8565FF00E4ECFC /* DeviceManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DeviceManager.swift; path = CRNotifications/Classes/DeviceManager.swift; sourceTree = ""; }; 64 | B4DAF76AD88565B9A679A469A4FDF922 /* Pods-CRNotificationsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CRNotificationsExample.release.xcconfig"; sourceTree = ""; }; 65 | B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 66 | C82AC89F2905AF9CD68C1FC9A17DAAC2 /* CRNotificationsMedia.xcassets */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = folder.assetcatalog; name = CRNotificationsMedia.xcassets; path = CRNotifications/Assets/CRNotificationsMedia.xcassets; sourceTree = ""; }; 67 | D22FF58ABCEE4768A39D470434ED56D4 /* Pods-CRNotificationsExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-CRNotificationsExample.modulemap"; sourceTree = ""; }; 68 | D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 69 | E0EB017FE68266E1C0CF4A83985A2999 /* CRNotifications.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CRNotifications.xcconfig; sourceTree = ""; }; 70 | E3912B68C48820B2761C6465F2F535FB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | E6249BBBD159D90AE712697955E2328D /* Pods-CRNotificationsExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-CRNotificationsExample-umbrella.h"; sourceTree = ""; }; 72 | ECEC35329B6303941BBAACFA0CEEE64D /* Pods-CRNotificationsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CRNotificationsExample.debug.xcconfig"; sourceTree = ""; }; 73 | /* End PBXFileReference section */ 74 | 75 | /* Begin PBXFrameworksBuildPhase section */ 76 | 12649554FFEB2D8B8E773600DACBE662 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | 79040555F7F1130D0CE99FC64226C11F /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | FAB3FA9012670279F42387A9153B55AD /* Foundation.framework in Frameworks */, 88 | FA28AB769C6997E6060836EEA7F48BDE /* UIKit.framework in Frameworks */, 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | D9137E6DA909C9C316C917674687DECB /* Frameworks */ = { 93 | isa = PBXFrameworksBuildPhase; 94 | buildActionMask = 2147483647; 95 | files = ( 96 | F5BA21874CA4227E394D6693ED88759D /* Foundation.framework in Frameworks */, 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | /* End PBXFrameworksBuildPhase section */ 101 | 102 | /* Begin PBXGroup section */ 103 | 1A1F759F5A535128FC0D9E195FEFB21F /* Resources */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | C82AC89F2905AF9CD68C1FC9A17DAAC2 /* CRNotificationsMedia.xcassets */, 107 | ); 108 | name = Resources; 109 | sourceTree = ""; 110 | }; 111 | 209628E3E37E6C9815854A4E1754A85F /* Pods-CRNotificationsExample */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | E3912B68C48820B2761C6465F2F535FB /* Info.plist */, 115 | D22FF58ABCEE4768A39D470434ED56D4 /* Pods-CRNotificationsExample.modulemap */, 116 | 97C6C6F62138883113B8138976DB3831 /* Pods-CRNotificationsExample-acknowledgements.markdown */, 117 | 5B8B250FE4095BF3991124AC555E3711 /* Pods-CRNotificationsExample-acknowledgements.plist */, 118 | 5E43EE78DA3145551D7EECF8378340E9 /* Pods-CRNotificationsExample-dummy.m */, 119 | 0FA1BC1FCCA2F43E1F3B1CEE7AA08317 /* Pods-CRNotificationsExample-frameworks.sh */, 120 | 99496B351F41B00E1A682B5EE39CC524 /* Pods-CRNotificationsExample-resources.sh */, 121 | E6249BBBD159D90AE712697955E2328D /* Pods-CRNotificationsExample-umbrella.h */, 122 | ECEC35329B6303941BBAACFA0CEEE64D /* Pods-CRNotificationsExample.debug.xcconfig */, 123 | B4DAF76AD88565B9A679A469A4FDF922 /* Pods-CRNotificationsExample.release.xcconfig */, 124 | ); 125 | name = "Pods-CRNotificationsExample"; 126 | path = "Target Support Files/Pods-CRNotificationsExample"; 127 | sourceTree = ""; 128 | }; 129 | 33BD4209EBD88AFD866A98F2A6A95A0B /* CRNotifications */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 8E16BBC431E75504EC0B40A5EB1B0146 /* Colors.swift */, 133 | 4271710AF201A83A4CFC8F4C80180425 /* CRNotification.swift */, 134 | 79068477E02843D1947263C31C4FCEBE /* CRNotifications.swift */, 135 | AF65C1CF1F8565FF00E4ECFC /* CRNotificationType.swift */, 136 | AF65C1D01F8565FF00E4ECFC /* DeviceManager.swift */, 137 | 1A1F759F5A535128FC0D9E195FEFB21F /* Resources */, 138 | A7A504B55F7892B4024008B433EA6C5A /* Support Files */, 139 | ); 140 | path = CRNotifications; 141 | sourceTree = ""; 142 | }; 143 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 438B396F6B4147076630CAEFE34282C1 /* iOS */, 147 | ); 148 | name = Frameworks; 149 | sourceTree = ""; 150 | }; 151 | 438B396F6B4147076630CAEFE34282C1 /* iOS */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */, 155 | B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */, 156 | ); 157 | name = iOS; 158 | sourceTree = ""; 159 | }; 160 | 4FB46610D86A0130622D9DC243D64D02 /* Pods */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 33BD4209EBD88AFD866A98F2A6A95A0B /* CRNotifications */, 164 | ); 165 | name = Pods; 166 | sourceTree = ""; 167 | }; 168 | 7DB346D0F39D3F0E887471402A8071AB = { 169 | isa = PBXGroup; 170 | children = ( 171 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 172 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, 173 | 4FB46610D86A0130622D9DC243D64D02 /* Pods */, 174 | FA75CD590D73DC5F54DB9968A14A02FE /* Products */, 175 | CF89D101E7F90271595E3A670E87B566 /* Targets Support Files */, 176 | ); 177 | sourceTree = ""; 178 | }; 179 | A7A504B55F7892B4024008B433EA6C5A /* Support Files */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 92B9ED81EEE4C40B38978711722687B2 /* CRNotifications.modulemap */, 183 | E0EB017FE68266E1C0CF4A83985A2999 /* CRNotifications.xcconfig */, 184 | 26E07E5825F636876B724F606287DC7E /* CRNotifications-dummy.m */, 185 | 0E569C799D3074BFFBBCCC00E50FA524 /* CRNotifications-prefix.pch */, 186 | A51EA0B4B203423A9F6D9F709D6960C6 /* CRNotifications-umbrella.h */, 187 | 603DBC359F4470675D6AFE2288D33CCF /* Info.plist */, 188 | A2752BE51FE8EAE21AA6C2D737180030 /* ResourceBundle-CRNotifications-Info.plist */, 189 | ); 190 | name = "Support Files"; 191 | path = "../Target Support Files/CRNotifications"; 192 | sourceTree = ""; 193 | }; 194 | CF89D101E7F90271595E3A670E87B566 /* Targets Support Files */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | 209628E3E37E6C9815854A4E1754A85F /* Pods-CRNotificationsExample */, 198 | ); 199 | name = "Targets Support Files"; 200 | sourceTree = ""; 201 | }; 202 | FA75CD590D73DC5F54DB9968A14A02FE /* Products */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | 816810701BAAFD2BA5EB627DC57CD35E /* CRNotifications.bundle */, 206 | 62D06758BEC55CFAF8354101161AF27D /* CRNotifications.framework */, 207 | 047703CB9B2832341964B06FB050FFFF /* Pods_CRNotificationsExample.framework */, 208 | ); 209 | name = Products; 210 | sourceTree = ""; 211 | }; 212 | /* End PBXGroup section */ 213 | 214 | /* Begin PBXHeadersBuildPhase section */ 215 | 11EEC7EDE0B95647569BAE3D088D1C9E /* Headers */ = { 216 | isa = PBXHeadersBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | 1CF59D16B6DB992E8CBBC4573C84614B /* CRNotifications-umbrella.h in Headers */, 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | }; 223 | B9F43776827E108474CFD39C95B328A3 /* Headers */ = { 224 | isa = PBXHeadersBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 0383532B8F1824534FE64113696BD355 /* Pods-CRNotificationsExample-umbrella.h in Headers */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXHeadersBuildPhase section */ 232 | 233 | /* Begin PBXNativeTarget section */ 234 | 13A7B8A058B734E687DF9FC23CB76C22 /* Pods-CRNotificationsExample */ = { 235 | isa = PBXNativeTarget; 236 | buildConfigurationList = 180C3611CFA7596F8585070C2F54F2DB /* Build configuration list for PBXNativeTarget "Pods-CRNotificationsExample" */; 237 | buildPhases = ( 238 | CC96A9105B08F607973D933FE94DAEC2 /* Sources */, 239 | D9137E6DA909C9C316C917674687DECB /* Frameworks */, 240 | B9F43776827E108474CFD39C95B328A3 /* Headers */, 241 | ); 242 | buildRules = ( 243 | ); 244 | dependencies = ( 245 | F63DA2D445589F1537CC469F5DDF4E2E /* PBXTargetDependency */, 246 | ); 247 | name = "Pods-CRNotificationsExample"; 248 | productName = "Pods-CRNotificationsExample"; 249 | productReference = 047703CB9B2832341964B06FB050FFFF /* Pods_CRNotificationsExample.framework */; 250 | productType = "com.apple.product-type.framework"; 251 | }; 252 | DDE425C9A167EBCB9AB1A3E6C92370B7 /* CRNotifications */ = { 253 | isa = PBXNativeTarget; 254 | buildConfigurationList = F370DF727B089D8E29A09BD7F89DAC6B /* Build configuration list for PBXNativeTarget "CRNotifications" */; 255 | buildPhases = ( 256 | AC1B4F9ECCA7552DA00C30F4DEA61AB4 /* Sources */, 257 | 79040555F7F1130D0CE99FC64226C11F /* Frameworks */, 258 | BBE91BEA49E8555CD8979D913EF6E82C /* Resources */, 259 | 11EEC7EDE0B95647569BAE3D088D1C9E /* Headers */, 260 | ); 261 | buildRules = ( 262 | ); 263 | dependencies = ( 264 | E1DD6D329ED00C1640BB3E04F2E7F2D9 /* PBXTargetDependency */, 265 | ); 266 | name = CRNotifications; 267 | productName = CRNotifications; 268 | productReference = 62D06758BEC55CFAF8354101161AF27D /* CRNotifications.framework */; 269 | productType = "com.apple.product-type.framework"; 270 | }; 271 | FC4F6E4D9D4EEB75F7D851CC41D781AE /* CRNotifications-CRNotifications */ = { 272 | isa = PBXNativeTarget; 273 | buildConfigurationList = 47300B2087C179C58DD99937A3590BE5 /* Build configuration list for PBXNativeTarget "CRNotifications-CRNotifications" */; 274 | buildPhases = ( 275 | 4069E077AD220C425CBA12C731C127D1 /* Sources */, 276 | 12649554FFEB2D8B8E773600DACBE662 /* Frameworks */, 277 | 7B85742EE376C91E7B5666FF433438DB /* Resources */, 278 | ); 279 | buildRules = ( 280 | ); 281 | dependencies = ( 282 | ); 283 | name = "CRNotifications-CRNotifications"; 284 | productName = "CRNotifications-CRNotifications"; 285 | productReference = 816810701BAAFD2BA5EB627DC57CD35E /* CRNotifications.bundle */; 286 | productType = "com.apple.product-type.bundle"; 287 | }; 288 | /* End PBXNativeTarget section */ 289 | 290 | /* Begin PBXProject section */ 291 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 292 | isa = PBXProject; 293 | attributes = { 294 | LastSwiftUpdateCheck = 0830; 295 | LastUpgradeCheck = 0700; 296 | TargetAttributes = { 297 | DDE425C9A167EBCB9AB1A3E6C92370B7 = { 298 | LastSwiftMigration = 1020; 299 | }; 300 | }; 301 | }; 302 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 303 | compatibilityVersion = "Xcode 3.2"; 304 | developmentRegion = en; 305 | hasScannedForEncodings = 0; 306 | knownRegions = ( 307 | en, 308 | Base, 309 | ); 310 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 311 | productRefGroup = FA75CD590D73DC5F54DB9968A14A02FE /* Products */; 312 | projectDirPath = ""; 313 | projectRoot = ""; 314 | targets = ( 315 | DDE425C9A167EBCB9AB1A3E6C92370B7 /* CRNotifications */, 316 | FC4F6E4D9D4EEB75F7D851CC41D781AE /* CRNotifications-CRNotifications */, 317 | 13A7B8A058B734E687DF9FC23CB76C22 /* Pods-CRNotificationsExample */, 318 | ); 319 | }; 320 | /* End PBXProject section */ 321 | 322 | /* Begin PBXResourcesBuildPhase section */ 323 | 7B85742EE376C91E7B5666FF433438DB /* Resources */ = { 324 | isa = PBXResourcesBuildPhase; 325 | buildActionMask = 2147483647; 326 | files = ( 327 | ); 328 | runOnlyForDeploymentPostprocessing = 0; 329 | }; 330 | BBE91BEA49E8555CD8979D913EF6E82C /* Resources */ = { 331 | isa = PBXResourcesBuildPhase; 332 | buildActionMask = 2147483647; 333 | files = ( 334 | AF6FD2871F6A56F9009CF338 /* CRNotificationsMedia.xcassets in Resources */, 335 | FE7F9EB58D992A6F01477E82489761D0 /* CRNotifications.bundle in Resources */, 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | }; 339 | /* End PBXResourcesBuildPhase section */ 340 | 341 | /* Begin PBXSourcesBuildPhase section */ 342 | 4069E077AD220C425CBA12C731C127D1 /* Sources */ = { 343 | isa = PBXSourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | runOnlyForDeploymentPostprocessing = 0; 348 | }; 349 | AC1B4F9ECCA7552DA00C30F4DEA61AB4 /* Sources */ = { 350 | isa = PBXSourcesBuildPhase; 351 | buildActionMask = 2147483647; 352 | files = ( 353 | 38AAC7EFC4FBC5D6EB3FF646667CE36F /* Colors.swift in Sources */, 354 | AF65C1D21F8565FF00E4ECFC /* DeviceManager.swift in Sources */, 355 | 8811B43B3E69AF7F14F488D80ED55D77 /* CRNotification.swift in Sources */, 356 | B4669038A572C637D4D06559E4D18A10 /* CRNotifications-dummy.m in Sources */, 357 | E90B90C932A1834C85D09A439072B022 /* CRNotifications.swift in Sources */, 358 | AF65C1D11F8565FF00E4ECFC /* CRNotificationType.swift in Sources */, 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | }; 362 | CC96A9105B08F607973D933FE94DAEC2 /* Sources */ = { 363 | isa = PBXSourcesBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | 9C71B70FEB9750F34D2FDA40A7E5E867 /* Pods-CRNotificationsExample-dummy.m in Sources */, 367 | ); 368 | runOnlyForDeploymentPostprocessing = 0; 369 | }; 370 | /* End PBXSourcesBuildPhase section */ 371 | 372 | /* Begin PBXTargetDependency section */ 373 | E1DD6D329ED00C1640BB3E04F2E7F2D9 /* PBXTargetDependency */ = { 374 | isa = PBXTargetDependency; 375 | name = "CRNotifications-CRNotifications"; 376 | target = FC4F6E4D9D4EEB75F7D851CC41D781AE /* CRNotifications-CRNotifications */; 377 | targetProxy = F0C3E56016220DFAF76BB5858B099E08 /* PBXContainerItemProxy */; 378 | }; 379 | F63DA2D445589F1537CC469F5DDF4E2E /* PBXTargetDependency */ = { 380 | isa = PBXTargetDependency; 381 | name = CRNotifications; 382 | target = DDE425C9A167EBCB9AB1A3E6C92370B7 /* CRNotifications */; 383 | targetProxy = 880D96D9BFC20B8DA181E8A59A56974F /* PBXContainerItemProxy */; 384 | }; 385 | /* End PBXTargetDependency section */ 386 | 387 | /* Begin XCBuildConfiguration section */ 388 | 2FFAC917DA68A3B51265DD9B75C0C1CE /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | baseConfigurationReference = E0EB017FE68266E1C0CF4A83985A2999 /* CRNotifications.xcconfig */; 391 | buildSettings = { 392 | CODE_SIGN_IDENTITY = ""; 393 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 394 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 395 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 396 | CURRENT_PROJECT_VERSION = 1; 397 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 398 | DEFINES_MODULE = YES; 399 | DYLIB_COMPATIBILITY_VERSION = 1; 400 | DYLIB_CURRENT_VERSION = 1; 401 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | GCC_NO_COMMON_BLOCKS = YES; 404 | GCC_PREFIX_HEADER = "Target Support Files/CRNotifications/CRNotifications-prefix.pch"; 405 | INFOPLIST_FILE = "Target Support Files/CRNotifications/Info.plist"; 406 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 407 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 408 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 409 | MODULEMAP_FILE = "Target Support Files/CRNotifications/CRNotifications.modulemap"; 410 | MTL_ENABLE_DEBUG_INFO = NO; 411 | PRODUCT_NAME = CRNotifications; 412 | SDKROOT = iphoneos; 413 | SKIP_INSTALL = YES; 414 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 415 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 416 | SWIFT_VERSION = 5.0; 417 | TARGETED_DEVICE_FAMILY = "1,2"; 418 | VERSIONING_SYSTEM = "apple-generic"; 419 | VERSION_INFO_PREFIX = ""; 420 | }; 421 | name = Release; 422 | }; 423 | 499D6D50BB80612090D5160E3D036A0B /* Debug */ = { 424 | isa = XCBuildConfiguration; 425 | baseConfigurationReference = E0EB017FE68266E1C0CF4A83985A2999 /* CRNotifications.xcconfig */; 426 | buildSettings = { 427 | CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/CRNotifications"; 428 | ENABLE_STRICT_OBJC_MSGSEND = YES; 429 | GCC_NO_COMMON_BLOCKS = YES; 430 | INFOPLIST_FILE = "Target Support Files/CRNotifications/ResourceBundle-CRNotifications-Info.plist"; 431 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 432 | PRODUCT_NAME = CRNotifications; 433 | SDKROOT = iphoneos; 434 | SKIP_INSTALL = YES; 435 | TARGETED_DEVICE_FAMILY = "1,2"; 436 | WRAPPER_EXTENSION = bundle; 437 | }; 438 | name = Debug; 439 | }; 440 | 5C27AECF3777349CA077CC212D63FACB /* Release */ = { 441 | isa = XCBuildConfiguration; 442 | baseConfigurationReference = E0EB017FE68266E1C0CF4A83985A2999 /* CRNotifications.xcconfig */; 443 | buildSettings = { 444 | CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/CRNotifications"; 445 | ENABLE_STRICT_OBJC_MSGSEND = YES; 446 | GCC_NO_COMMON_BLOCKS = YES; 447 | INFOPLIST_FILE = "Target Support Files/CRNotifications/ResourceBundle-CRNotifications-Info.plist"; 448 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 449 | PRODUCT_NAME = CRNotifications; 450 | SDKROOT = iphoneos; 451 | SKIP_INSTALL = YES; 452 | TARGETED_DEVICE_FAMILY = "1,2"; 453 | WRAPPER_EXTENSION = bundle; 454 | }; 455 | name = Release; 456 | }; 457 | 889ADCE55151CBF8E967FC3C3B15DF48 /* Release */ = { 458 | isa = XCBuildConfiguration; 459 | baseConfigurationReference = B4DAF76AD88565B9A679A469A4FDF922 /* Pods-CRNotificationsExample.release.xcconfig */; 460 | buildSettings = { 461 | CODE_SIGN_IDENTITY = ""; 462 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 463 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 464 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 465 | CURRENT_PROJECT_VERSION = 1; 466 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 467 | DEFINES_MODULE = YES; 468 | DYLIB_COMPATIBILITY_VERSION = 1; 469 | DYLIB_CURRENT_VERSION = 1; 470 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 471 | ENABLE_STRICT_OBJC_MSGSEND = YES; 472 | GCC_NO_COMMON_BLOCKS = YES; 473 | INFOPLIST_FILE = "Target Support Files/Pods-CRNotificationsExample/Info.plist"; 474 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 475 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 476 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 477 | MACH_O_TYPE = staticlib; 478 | MODULEMAP_FILE = "Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample.modulemap"; 479 | MTL_ENABLE_DEBUG_INFO = NO; 480 | OTHER_LDFLAGS = ""; 481 | OTHER_LIBTOOLFLAGS = ""; 482 | PODS_ROOT = "$(SRCROOT)"; 483 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 484 | PRODUCT_NAME = Pods_CRNotificationsExample; 485 | SDKROOT = iphoneos; 486 | SKIP_INSTALL = YES; 487 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 488 | SWIFT_VERSION = 3.0; 489 | TARGETED_DEVICE_FAMILY = "1,2"; 490 | VERSIONING_SYSTEM = "apple-generic"; 491 | VERSION_INFO_PREFIX = ""; 492 | }; 493 | name = Release; 494 | }; 495 | 97803B46811A9BDB5E70FA1303AFBFFE /* Debug */ = { 496 | isa = XCBuildConfiguration; 497 | buildSettings = { 498 | ALWAYS_SEARCH_USER_PATHS = NO; 499 | CLANG_ANALYZER_NONNULL = YES; 500 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 501 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 502 | CLANG_CXX_LIBRARY = "libc++"; 503 | CLANG_ENABLE_MODULES = YES; 504 | CLANG_ENABLE_OBJC_ARC = YES; 505 | CLANG_WARN_BOOL_CONVERSION = YES; 506 | CLANG_WARN_CONSTANT_CONVERSION = YES; 507 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 508 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 509 | CLANG_WARN_EMPTY_BODY = YES; 510 | CLANG_WARN_ENUM_CONVERSION = YES; 511 | CLANG_WARN_INFINITE_RECURSION = YES; 512 | CLANG_WARN_INT_CONVERSION = YES; 513 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 514 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 515 | CLANG_WARN_UNREACHABLE_CODE = YES; 516 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 517 | CODE_SIGNING_REQUIRED = NO; 518 | COPY_PHASE_STRIP = NO; 519 | ENABLE_TESTABILITY = YES; 520 | GCC_C_LANGUAGE_STANDARD = gnu99; 521 | GCC_DYNAMIC_NO_PIC = NO; 522 | GCC_OPTIMIZATION_LEVEL = 0; 523 | GCC_PREPROCESSOR_DEFINITIONS = ( 524 | "POD_CONFIGURATION_DEBUG=1", 525 | "DEBUG=1", 526 | "$(inherited)", 527 | ); 528 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 529 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 530 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 531 | GCC_WARN_UNDECLARED_SELECTOR = YES; 532 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 533 | GCC_WARN_UNUSED_FUNCTION = YES; 534 | GCC_WARN_UNUSED_VARIABLE = YES; 535 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 536 | ONLY_ACTIVE_ARCH = YES; 537 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 538 | STRIP_INSTALLED_PRODUCT = NO; 539 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 540 | SYMROOT = "${SRCROOT}/../build"; 541 | }; 542 | name = Debug; 543 | }; 544 | BDD0139D6EB93FA375F887ABD62DAB2E /* Release */ = { 545 | isa = XCBuildConfiguration; 546 | buildSettings = { 547 | ALWAYS_SEARCH_USER_PATHS = NO; 548 | CLANG_ANALYZER_NONNULL = YES; 549 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 550 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 551 | CLANG_CXX_LIBRARY = "libc++"; 552 | CLANG_ENABLE_MODULES = YES; 553 | CLANG_ENABLE_OBJC_ARC = YES; 554 | CLANG_WARN_BOOL_CONVERSION = YES; 555 | CLANG_WARN_CONSTANT_CONVERSION = YES; 556 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 557 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 558 | CLANG_WARN_EMPTY_BODY = YES; 559 | CLANG_WARN_ENUM_CONVERSION = YES; 560 | CLANG_WARN_INFINITE_RECURSION = YES; 561 | CLANG_WARN_INT_CONVERSION = YES; 562 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 563 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 564 | CLANG_WARN_UNREACHABLE_CODE = YES; 565 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 566 | CODE_SIGNING_REQUIRED = NO; 567 | COPY_PHASE_STRIP = YES; 568 | ENABLE_NS_ASSERTIONS = NO; 569 | GCC_C_LANGUAGE_STANDARD = gnu99; 570 | GCC_PREPROCESSOR_DEFINITIONS = ( 571 | "POD_CONFIGURATION_RELEASE=1", 572 | "$(inherited)", 573 | ); 574 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 575 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 576 | GCC_WARN_UNDECLARED_SELECTOR = YES; 577 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 578 | GCC_WARN_UNUSED_FUNCTION = YES; 579 | GCC_WARN_UNUSED_VARIABLE = YES; 580 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 581 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 582 | STRIP_INSTALLED_PRODUCT = NO; 583 | SYMROOT = "${SRCROOT}/../build"; 584 | VALIDATE_PRODUCT = YES; 585 | }; 586 | name = Release; 587 | }; 588 | F1F61D90D19DCD9D9D4D4C00BE70DE43 /* Debug */ = { 589 | isa = XCBuildConfiguration; 590 | baseConfigurationReference = ECEC35329B6303941BBAACFA0CEEE64D /* Pods-CRNotificationsExample.debug.xcconfig */; 591 | buildSettings = { 592 | CODE_SIGN_IDENTITY = ""; 593 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 594 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 595 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 596 | CURRENT_PROJECT_VERSION = 1; 597 | DEBUG_INFORMATION_FORMAT = dwarf; 598 | DEFINES_MODULE = YES; 599 | DYLIB_COMPATIBILITY_VERSION = 1; 600 | DYLIB_CURRENT_VERSION = 1; 601 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 602 | ENABLE_STRICT_OBJC_MSGSEND = YES; 603 | GCC_NO_COMMON_BLOCKS = YES; 604 | INFOPLIST_FILE = "Target Support Files/Pods-CRNotificationsExample/Info.plist"; 605 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 606 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 607 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 608 | MACH_O_TYPE = staticlib; 609 | MODULEMAP_FILE = "Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample.modulemap"; 610 | MTL_ENABLE_DEBUG_INFO = YES; 611 | OTHER_LDFLAGS = ""; 612 | OTHER_LIBTOOLFLAGS = ""; 613 | PODS_ROOT = "$(SRCROOT)"; 614 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 615 | PRODUCT_NAME = Pods_CRNotificationsExample; 616 | SDKROOT = iphoneos; 617 | SKIP_INSTALL = YES; 618 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 619 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 620 | SWIFT_VERSION = 3.0; 621 | TARGETED_DEVICE_FAMILY = "1,2"; 622 | VERSIONING_SYSTEM = "apple-generic"; 623 | VERSION_INFO_PREFIX = ""; 624 | }; 625 | name = Debug; 626 | }; 627 | F709E037A7DCD919A5BC57E691990FC3 /* Debug */ = { 628 | isa = XCBuildConfiguration; 629 | baseConfigurationReference = E0EB017FE68266E1C0CF4A83985A2999 /* CRNotifications.xcconfig */; 630 | buildSettings = { 631 | CODE_SIGN_IDENTITY = ""; 632 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 633 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 634 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 635 | CURRENT_PROJECT_VERSION = 1; 636 | DEBUG_INFORMATION_FORMAT = dwarf; 637 | DEFINES_MODULE = YES; 638 | DYLIB_COMPATIBILITY_VERSION = 1; 639 | DYLIB_CURRENT_VERSION = 1; 640 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 641 | ENABLE_STRICT_OBJC_MSGSEND = YES; 642 | GCC_NO_COMMON_BLOCKS = YES; 643 | GCC_PREFIX_HEADER = "Target Support Files/CRNotifications/CRNotifications-prefix.pch"; 644 | INFOPLIST_FILE = "Target Support Files/CRNotifications/Info.plist"; 645 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 646 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 647 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 648 | MODULEMAP_FILE = "Target Support Files/CRNotifications/CRNotifications.modulemap"; 649 | MTL_ENABLE_DEBUG_INFO = YES; 650 | PRODUCT_NAME = CRNotifications; 651 | SDKROOT = iphoneos; 652 | SKIP_INSTALL = YES; 653 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 654 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 655 | SWIFT_VERSION = 5.0; 656 | TARGETED_DEVICE_FAMILY = "1,2"; 657 | VERSIONING_SYSTEM = "apple-generic"; 658 | VERSION_INFO_PREFIX = ""; 659 | }; 660 | name = Debug; 661 | }; 662 | /* End XCBuildConfiguration section */ 663 | 664 | /* Begin XCConfigurationList section */ 665 | 180C3611CFA7596F8585070C2F54F2DB /* Build configuration list for PBXNativeTarget "Pods-CRNotificationsExample" */ = { 666 | isa = XCConfigurationList; 667 | buildConfigurations = ( 668 | F1F61D90D19DCD9D9D4D4C00BE70DE43 /* Debug */, 669 | 889ADCE55151CBF8E967FC3C3B15DF48 /* Release */, 670 | ); 671 | defaultConfigurationIsVisible = 0; 672 | defaultConfigurationName = Release; 673 | }; 674 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 675 | isa = XCConfigurationList; 676 | buildConfigurations = ( 677 | 97803B46811A9BDB5E70FA1303AFBFFE /* Debug */, 678 | BDD0139D6EB93FA375F887ABD62DAB2E /* Release */, 679 | ); 680 | defaultConfigurationIsVisible = 0; 681 | defaultConfigurationName = Release; 682 | }; 683 | 47300B2087C179C58DD99937A3590BE5 /* Build configuration list for PBXNativeTarget "CRNotifications-CRNotifications" */ = { 684 | isa = XCConfigurationList; 685 | buildConfigurations = ( 686 | 499D6D50BB80612090D5160E3D036A0B /* Debug */, 687 | 5C27AECF3777349CA077CC212D63FACB /* Release */, 688 | ); 689 | defaultConfigurationIsVisible = 0; 690 | defaultConfigurationName = Release; 691 | }; 692 | F370DF727B089D8E29A09BD7F89DAC6B /* Build configuration list for PBXNativeTarget "CRNotifications" */ = { 693 | isa = XCConfigurationList; 694 | buildConfigurations = ( 695 | F709E037A7DCD919A5BC57E691990FC3 /* Debug */, 696 | 2FFAC917DA68A3B51265DD9B75C0C1CE /* Release */, 697 | ); 698 | defaultConfigurationIsVisible = 0; 699 | defaultConfigurationName = Release; 700 | }; 701 | /* End XCConfigurationList section */ 702 | }; 703 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 704 | } 705 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "error.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/error.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/error.imageset/error.pdf -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "info.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/info.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/info.imageset/info.pdf -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "success.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "template" 14 | } 15 | } -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/success.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/Pods/Target Support Files/CRNotifications/Assets/CRNotificationsMedia.xcassets/success.imageset/success.pdf -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/CRNotifications-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CRNotifications : NSObject 3 | @end 4 | @implementation PodsDummy_CRNotifications 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/CRNotifications-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/CRNotifications-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 CRNotificationsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char CRNotificationsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/CRNotifications.modulemap: -------------------------------------------------------------------------------- 1 | framework module CRNotifications { 2 | umbrella header "CRNotifications-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/CRNotifications.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/CRNotifications 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "UIKit" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CRNotifications 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Classes/CRNotification.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotification.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol CRNotification { 12 | func hide() -> Void 13 | } 14 | 15 | public class CRNotificationView: UIView, CRNotification { 16 | 17 | private let imageView: UIImageView = { 18 | let view = UIImageView() 19 | view.translatesAutoresizingMaskIntoConstraints = false 20 | view.tintColor = .white 21 | return view 22 | }() 23 | 24 | private let titleLabel: UILabel = { 25 | let label = UILabel() 26 | label.translatesAutoresizingMaskIntoConstraints = false 27 | label.font = UIFont.systemFont(ofSize: 15, weight: .bold) 28 | label.textColor = .white 29 | return label 30 | }() 31 | 32 | private let messageLabel: UILabel = { 33 | let label = UILabel() 34 | label.translatesAutoresizingMaskIntoConstraints = false 35 | label.font = UIFont.systemFont(ofSize: 13, weight: .semibold) 36 | label.textColor = .white 37 | label.numberOfLines = 2 38 | return label 39 | }() 40 | 41 | private var completion: () -> () = {} 42 | private var type: CRNotificationType 43 | public var delegate: CRNotificationDelegate? 44 | 45 | // MARK: - Init 46 | 47 | required internal init?(coder aDecoder:NSCoder) { fatalError("Not implemented.") } 48 | 49 | internal init(type: CRNotificationType) { 50 | let deviceWidth = min(UIScreen.main.bounds.width, UIScreen.main.bounds.height) 51 | let widthFactor: CGFloat = DeviceManager.value(iPhone35: 0.9, iPhone40: 0.9, iPhone47: 0.9, iPhone55: 0.85, iPhone58: 0.9, iPhone61: 0.9, iPadSmall: 0.5, iPadMedium: 0.45, iPadBig: 0.4) 52 | let heightFactor: CGFloat = DeviceManager.value(iPhone35: 0.22, iPhone40: 0.22, iPhone47: 0.2, iPhone55: 0.2, iPhone58: 0.18, iPhone61: 0.18, iPadSmall: 0.18, iPadMedium: 0.17, iPadBig: 0.17) 53 | 54 | let width = deviceWidth * widthFactor 55 | let height = width * heightFactor 56 | self.type = type 57 | 58 | super.init(frame: CGRect(x: 0, y: -height, width: width, height: height)) 59 | center.x = UIScreen.main.bounds.width/2 60 | setupLayer() 61 | setupSubviews() 62 | setupConstraints() 63 | setupTargets() 64 | 65 | // setup type attributes 66 | self.setBackgroundColor(color: type.backgroundColor) 67 | self.setTextColor(color: type.textColor) 68 | self.setImage(image: type.image) 69 | } 70 | 71 | 72 | // MARK: - Setup 73 | 74 | private func setupLayer() { 75 | layer.cornerRadius = 5 76 | layer.shadowRadius = 5 77 | layer.shadowOpacity = 0.25 78 | layer.shadowColor = UIColor.lightGray.cgColor 79 | } 80 | 81 | private func setupSubviews() { 82 | addSubview(imageView) 83 | addSubview(titleLabel) 84 | addSubview(messageLabel) 85 | } 86 | 87 | private func setupConstraints() { 88 | NSLayoutConstraint.activate([ 89 | imageView.topAnchor.constraint(equalTo: imageView.superview!.topAnchor, constant: 12), 90 | imageView.leadingAnchor.constraint(equalTo: imageView.superview!.leadingAnchor, constant: 12), 91 | imageView.bottomAnchor.constraint(equalTo: imageView.superview!.bottomAnchor, constant: -12), 92 | imageView.widthAnchor.constraint(equalTo: imageView.heightAnchor) 93 | ]) 94 | 95 | NSLayoutConstraint.activate([ 96 | titleLabel.topAnchor.constraint(lessThanOrEqualTo: titleLabel.superview!.topAnchor, constant: 8), 97 | titleLabel.leadingAnchor.constraint(equalTo: imageView.trailingAnchor, constant: 8), 98 | titleLabel.trailingAnchor.constraint(equalTo: titleLabel.superview!.trailingAnchor, constant: -8) 99 | ]) 100 | 101 | NSLayoutConstraint.activate([ 102 | messageLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 2), 103 | messageLabel.leadingAnchor.constraint(equalTo: titleLabel.leadingAnchor), 104 | messageLabel.trailingAnchor.constraint(equalTo: titleLabel.trailingAnchor), 105 | messageLabel.bottomAnchor.constraint(lessThanOrEqualTo: messageLabel.superview!.bottomAnchor, constant: -5) 106 | ]) 107 | } 108 | 109 | private func setupTargets() { 110 | NotificationCenter.default.addObserver(self, selector: #selector(didRotate), name: UIDevice.orientationDidChangeNotification, object: nil) 111 | let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.dismissNotificationOnTap)) 112 | let swipeRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(self.dismissNotification)) 113 | swipeRecognizer.direction = .up 114 | 115 | addGestureRecognizer(tapRecognizer) 116 | addGestureRecognizer(swipeRecognizer) 117 | } 118 | 119 | 120 | // MARK: - Helpers 121 | 122 | @objc internal func didRotate() { 123 | UIView.animate(withDuration: 0.2) { 124 | self.center.x = UIScreen.main.bounds.width / 2 125 | self.center.y = self.topInset() + 10 + self.frame.height / 2 126 | } 127 | } 128 | 129 | /** Sets the background color of the notification **/ 130 | internal func setBackgroundColor(color: UIColor) { 131 | backgroundColor = color 132 | } 133 | 134 | /** Sets the background color of the notification **/ 135 | internal func setTextColor(color: UIColor) { 136 | titleLabel.textColor = color 137 | messageLabel.textColor = color 138 | } 139 | 140 | /** Sets the title of the notification **/ 141 | internal func setTitle(title: String) { 142 | titleLabel.text = title 143 | } 144 | 145 | /** Sets the message of the notification **/ 146 | internal func setMessage(message: String) { 147 | messageLabel.text = message 148 | } 149 | 150 | /** Sets the image of the notification **/ 151 | internal func setImage(image: UIImage?) { 152 | imageView.image = image 153 | } 154 | 155 | /** Sets the completion block of the notification for when it is dismissed **/ 156 | internal func setCompletionBlock(_ completion: @escaping () -> ()) { 157 | self.completion = completion 158 | } 159 | 160 | /** Dismisses the notification with a delay > 0 **/ 161 | internal func setDismisTimer(delay: TimeInterval) { 162 | if delay > 0 { 163 | Timer.scheduledTimer(timeInterval: Double(delay), target: self, selector: #selector(dismissNotification), userInfo: nil, repeats: false) 164 | } 165 | } 166 | 167 | /** Animates in the notification **/ 168 | internal func showNotification() { 169 | UIView.animate(withDuration: 0.3, delay: 0.0, usingSpringWithDamping: 0.68, initialSpringVelocity: 0.1, options: UIView.AnimationOptions(), animations: { 170 | self.frame.origin.y = self.topInset() + 10 171 | }) 172 | } 173 | 174 | @objc internal func dismissNotificationOnTap() { 175 | delegate?.onNotificationTap(type: type,title: titleLabel.text, message: messageLabel.text) 176 | self.dismissNotification() 177 | } 178 | 179 | /** Animates out the notification **/ 180 | @objc internal func dismissNotification() { 181 | hide() 182 | } 183 | 184 | private func topInset() -> CGFloat { 185 | let iPhoneXInset: CGFloat 186 | switch UIApplication.shared.statusBarOrientation { 187 | case .landscapeLeft, .landscapeRight: 188 | iPhoneXInset = 0 189 | case .portrait, .portraitUpsideDown, .unknown: 190 | iPhoneXInset = 44 191 | @unknown default: 192 | iPhoneXInset = 0 193 | } 194 | 195 | let statusBarHeight: CGFloat = UIApplication.shared.statusBarFrame.height 196 | return DeviceManager.value(iPhoneX: statusBarHeight == 0 ? iPhoneXInset : statusBarHeight, other: statusBarHeight) 197 | } 198 | 199 | 200 | // MARK: - Public 201 | 202 | public func hide() { 203 | UIView.animate(withDuration: 0.1, animations: { 204 | self.frame.origin.y = self.frame.origin.y + 5 205 | }, completion: { 206 | (complete: Bool) in 207 | UIView.animate(withDuration: 0.25, animations: { 208 | self.center.y = -self.frame.height 209 | }, completion: { [weak self] (complete) in 210 | self?.completion() 211 | self?.removeFromSuperview() 212 | }) 213 | }) 214 | } 215 | 216 | } 217 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Classes/CRNotificationType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotificationType.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 14/09/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import Foundation 10 | 11 | /** Protocol for defining a CRNotification style **/ 12 | public protocol CRNotificationType { 13 | var textColor: UIColor { get } 14 | var backgroundColor: UIColor { get } 15 | var image: UIImage? { get } 16 | } 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Classes/CRNotifications.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CRNotifications.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol CRNotificationDelegate { 12 | func onNotificationTap(type: CRNotificationType, title: String?, message: String?) 13 | } 14 | 15 | public class CRNotifications { 16 | 17 | // MARK: - Static notification types 18 | 19 | public static let success: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatGreen, image: UIImage(named: "success", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 20 | public static let error: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatRed, image: UIImage(named: "error", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 21 | public static let info: CRNotificationType = CRNotificationTypeDefinition(textColor: UIColor.white, backgroundColor: UIColor.flatGray, image: UIImage(named: "info", in: Bundle(for: CRNotifications.self), compatibleWith: nil)) 22 | 23 | 24 | // MARK: - Init 25 | 26 | public init(){} 27 | 28 | 29 | // MARK: - Helpers 30 | 31 | /** Shows a CRNotification. 32 | Returns the CRNotification that is displayed. Returns nil if the keyWindow is not present. 33 | **/ 34 | @discardableResult 35 | public static func showNotification(textColor: UIColor, backgroundColor: UIColor, image: UIImage?, title: String, message: String, dismissDelay: TimeInterval, delegate: CRNotificationDelegate? = nil, completion: @escaping () -> () = {}) -> CRNotification? { 36 | let notificationDefinition = CRNotificationTypeDefinition(textColor: textColor, backgroundColor: backgroundColor, image: image) 37 | return showNotification(type: notificationDefinition, title: title, message: message, dismissDelay: dismissDelay, delegate: delegate, completion: completion) 38 | } 39 | 40 | /** Shows a CRNotification from a CRNotificationType. 41 | Returns the CRNotification that is displayed. Returns nil if the keyWindow is not present. 42 | **/ 43 | @discardableResult 44 | public static func showNotification(type: CRNotificationType, title: String, message: String, dismissDelay: TimeInterval, delegate: CRNotificationDelegate? = nil, completion: @escaping () -> () = {}) -> CRNotification? { 45 | let view = CRNotificationView(type: type) 46 | 47 | view.setTitle(title: title) 48 | view.setMessage(message: message) 49 | view.setDismisTimer(delay: dismissDelay) 50 | view.setCompletionBlock(completion) 51 | view.delegate = delegate 52 | 53 | guard let window = UIApplication.shared.keyWindow else { 54 | print("Failed to show CRNotification. No keywindow available.") 55 | return nil 56 | } 57 | 58 | window.addSubview(view) 59 | view.showNotification() 60 | 61 | return view 62 | } 63 | } 64 | 65 | fileprivate struct CRNotificationTypeDefinition: CRNotificationType { 66 | var textColor: UIColor 67 | var backgroundColor: UIColor 68 | var image: UIImage? 69 | } 70 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Classes/Colors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Colors.swift 3 | // CRNotifications 4 | // 5 | // Created by Casper Riboe on 21/03/2017. 6 | // LICENSE : MIT 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIColor { 12 | 13 | /// Flat Colors 14 | static let flatGreen = UIColor(red: 46/255, green: 204/255, blue: 113/255, alpha: 1.0) 15 | static let flatRed = UIColor(red: 231/255, green: 76/255, blue: 60/255, alpha: 1.0) 16 | static let flatGray = UIColor(red: 149/255, green: 165/255, blue: 166/255, alpha: 1.0) 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/Classes/DeviceManager.swift: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------- 2 | // DeviceManager.swift 3 | // ---------------------------------------------------- 4 | // 5 | // Complete list of devices sorted by resolution. 6 | // Device return by the method 'Device' is based on the height of the device. 7 | // 8 | // iPad Small 9 | // 1536x2048 / 768x1024 (768x1024 / 384x512) 10 | // - iPad Retina 11 | // - iPad 3 12 | // - iPad Mini Retina 13 | // - iPad Mini 4 14 | // - iPad Air 15 | // - iPad Air 2 16 | // - iPad Pro 9.7" 17 | // 18 | // iPad Medium 19 | // 1668x2224 (834x1112) 20 | // iPad Pro 10.5" 21 | // 22 | // iPad Big 23 | // 2048x2732 (1024x1366) 24 | // - iPad Pro 12.9" 25 | // 26 | // iPhone35 27 | // 640x960 (320x480) 28 | // - iPhone 4 29 | // 30 | // iPhone40 31 | // 640x1136 (320x568) 32 | // - iPhone 5 33 | // 34 | // iPhone47 35 | // 750x1334 (375x667) 36 | // - iPhone 6 37 | // - iPhone 7 38 | // - iPhone 8 39 | // 40 | // iPhone55 41 | // 1080x1920 / 1242x2208 (540x960 / 621x1104 / 414x736) 42 | // - iPhone 6 Plus 43 | // - iPhone 7 Plus 44 | // - iPhone 8 Plus 45 | // 46 | // iPhone58 47 | // 1125x2436 (375x812) 48 | // - iPhone X 49 | // - iPhone XS 50 | // 51 | // iPhone61 52 | // 828x1792 (414x896) 53 | // - iPhone XR 54 | // 55 | // iPhone 65 56 | // 1242x2688 (414x896) 57 | // - iPhone XS Max 58 | // 59 | // 60 | // ---------------------------------------------------- 61 | // Created by Casper Riboe on 21/07/2017. 62 | // Copyright © 2017 Casper Riboe. All rights reserved. 63 | // ---------------------------------------------------- 64 | 65 | import UIKit 66 | 67 | internal class DeviceManager { 68 | 69 | private init() {} 70 | 71 | /// Returns the current device in use. 72 | internal static func device() -> Device { 73 | let size = CGSize(width: min(UIScreen.main.bounds.width, UIScreen.main.bounds.height), 74 | height: max(UIScreen.main.bounds.width, UIScreen.main.bounds.height)) 75 | 76 | switch size { 77 | case CGSize(width: 320.0, height: 480.0): 78 | return .iPhone35 79 | case CGSize(width: 320.0, height: 568.0): 80 | return .iPhone40 81 | case CGSize(width: 375.0, height: 667.0): 82 | return .iPhone47 83 | case CGSize(width: 375.0, height: 812.0): 84 | return .iPhone58 85 | case CGSize(width: 414.0, height: 736.0): 86 | return .iPhone55 87 | case CGSize(width: 540.0, height: 960.0): 88 | return .iPhone55 89 | case CGSize(width: 621.0, height: 1104.0): 90 | return .iPhone55 91 | case CGSize(width: 562.5, height: 1218.0): 92 | return .iPhone58 93 | case CGSize(width: 414.0, height: 896.0): 94 | return .iPhone61 95 | case CGSize(width: 384.0, height: 512.0): 96 | return .iPadSmall 97 | case CGSize(width: 768.0, height: 1024.0): 98 | return .iPadSmall 99 | case CGSize(width: 834.0, height: 1112.0): 100 | return .iPadMedium 101 | case CGSize(width: 1024.0, height: 1366.0): 102 | return .iPadBig 103 | default: 104 | return .unknown 105 | } 106 | } 107 | 108 | /// Returns a value based on the current iPhone device. 109 | internal static func value(iPhone35: T, iPhone40: T, iPhone47: T, iPhone55: T, iPhone58: T, iPhone61: T) -> T { 110 | switch device() { 111 | case .iPhone35: 112 | return iPhone35 113 | case .iPhone40: 114 | return iPhone40 115 | case .iPhone47: 116 | return iPhone47 117 | case .iPhone55: 118 | return iPhone55 119 | case .iPhone61: 120 | return iPhone61 121 | default: 122 | return iPhone58 123 | } 124 | } 125 | 126 | /// Returns a value based on the current iPad device. 127 | internal static func value(iPadSmall: T, iPadMedium: T, iPadBig: T) -> T { 128 | switch device() { 129 | case .iPadSmall: 130 | return iPadSmall 131 | case .iPadMedium: 132 | return iPadMedium 133 | default: 134 | return iPadBig 135 | } 136 | } 137 | 138 | /// Returns a value based on the current iPhone or iPad device. 139 | internal static func value(iPhone35: T, iPhone40: T, iPhone47: T, iPhone55: T, iPhone58: T, iPhone61: T, iPadSmall: T, iPadMedium: T, iPadBig: T) -> T { 140 | switch device() { 141 | case .iPhone35: 142 | return iPhone35 143 | case .iPhone40: 144 | return iPhone40 145 | case .iPhone47: 146 | return iPhone47 147 | case .iPhone55: 148 | return iPhone55 149 | case .iPhone58: 150 | return iPhone58 151 | case .iPhone61: 152 | return iPhone61 153 | case .iPadSmall: 154 | return iPadSmall 155 | case .iPadMedium: 156 | return iPadMedium 157 | case .iPadBig: 158 | return iPadBig 159 | default: 160 | if UIDevice.current.userInterfaceIdiom == .pad { 161 | return iPadBig 162 | } else { 163 | return iPhone55 164 | } 165 | } 166 | } 167 | 168 | /// Returns a value based on the current iPhone or iPad device. 169 | internal static func value(iPhone: T, iPad: T) -> T { 170 | return value(iPhone35: iPhone, iPhone40: iPhone, iPhone47: iPhone, iPhone55: iPhone, iPhone58: iPhone, iPhone61: iPhone, iPadSmall: iPad, iPadMedium: iPad, iPadBig: iPad) 171 | } 172 | 173 | internal static func value(iPhoneX: T, other: T) -> T { 174 | return value(iPhone35: other, iPhone40: other, iPhone47: other, iPhone55: other, iPhone58: iPhoneX, iPhone61: iPhoneX, iPadSmall: other, iPadMedium: other, iPadBig: other) 175 | } 176 | 177 | } 178 | 179 | 180 | internal enum Device { 181 | case iPhone35 182 | case iPhone40 183 | case iPhone47 184 | case iPhone55 185 | case iPhone58 186 | case iPhone61 187 | 188 | case iPadSmall 189 | case iPadMedium 190 | case iPadBig 191 | 192 | case unknown 193 | } 194 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/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.1.7 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) <2017> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/README.md: -------------------------------------------------------------------------------- 1 | # CRNotifications 2 | CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide when they are clicked on or with an automatic dismissal. 3 | 4 | ### Screenshots 5 | ------- 6 | 7 | 8 | ##### Notifications types 9 | 10 | | Success | Error |Info | 11 | | --- | --- | --- | 12 | | ![alt text](http://i831.photobucket.com/albums/zz237/dkcas11/success.jpg "Success") | ![alt text](http://i831.photobucket.com/albums/zz237/dkcas11/error.jpg "Error") | ![alt text](http://i831.photobucket.com/albums/zz237/dkcas11/info.jpg "Info")| 13 | 14 | 15 | 16 | ### How to use 17 | ------- 18 | 19 | Call ``CRNotifications.showNotification`` with a title, message, notification type and a time for how long the notification should appear. Should the notification not disappear automatically use a time of ``0``. 20 | 21 | Notification types are 22 | ```.success``` 23 | ```.error``` 24 | ```.info``` 25 | 26 | ### Installation 27 | ------- 28 | 29 | #### [Cocoapods install](https://cocoapods.org/?q=CRNotifications "Visit website") 30 | 31 | ``` 32 | pod 'CRNotifications' 33 | ``` 34 | #### Manual install 35 | Drag the *CRNotifications* folder into your project and you are good to go. 36 | 37 | ### Author & Contributors 38 | ------- 39 | 40 | **Casper Riboe** (Author) 41 | > Facebook : [Casper Riboe](http://facebook.com/dkcas11)
42 | > Twitter : [dkcas11](http://twitter.com/dkcas11)
43 | > Mail : [casper2602@hotmail.com](mailto:casper260@hotmail.com) 44 | 45 | **Herrick Wolber** (Contribution) 46 | > Twitter : [estar2005](http://twitter.com/estar2005)
47 | > Github : [Rico237](https://github.com/rico237)
48 | > Mail : [wolbereric@yahoo.fr](mailto:wolbereric@yahoo.fr) 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Pods/Target Support Files/CRNotifications/ResourceBundle-CRNotifications-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.1.5 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## CRNotifications 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) <2017> 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | Generated by CocoaPods - https://cocoapods.org 16 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-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 | The MIT License (MIT) 18 | 19 | Copyright (c) <2017> <Casper Riboe casper2602@hotmail.com> 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | License 27 | MIT 28 | Title 29 | CRNotifications 30 | Type 31 | PSGroupSpecifier 32 | 33 | 34 | FooterText 35 | Generated by CocoaPods - https://cocoapods.org 36 | Title 37 | 38 | Type 39 | PSGroupSpecifier 40 | 41 | 42 | StringsTable 43 | Acknowledgements 44 | Title 45 | Acknowledgements 46 | 47 | 48 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CRNotificationsExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CRNotificationsExample 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 10 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 11 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 12 | 13 | install_framework() 14 | { 15 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 16 | local source="${BUILT_PRODUCTS_DIR}/$1" 17 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 18 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 19 | elif [ -r "$1" ]; then 20 | local source="$1" 21 | fi 22 | 23 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | 25 | if [ -L "${source}" ]; then 26 | echo "Symlinked..." 27 | source="$(readlink "${source}")" 28 | fi 29 | 30 | # Use filter instead of exclude so missing patterns don't throw errors. 31 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 32 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 33 | 34 | local basename 35 | basename="$(basename -s .framework "$1")" 36 | binary="${destination}/${basename}.framework/${basename}" 37 | if ! [ -r "$binary" ]; then 38 | binary="${destination}/${basename}" 39 | fi 40 | 41 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 42 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 43 | strip_invalid_archs "$binary" 44 | fi 45 | 46 | # Resign the code if required by the build settings to avoid unstable apps 47 | code_sign_if_enabled "${destination}/$(basename "$1")" 48 | 49 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 50 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 51 | local swift_runtime_libs 52 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 53 | for lib in $swift_runtime_libs; do 54 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 55 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 56 | code_sign_if_enabled "${destination}/${lib}" 57 | done 58 | fi 59 | } 60 | 61 | # Copies the dSYM of a vendored framework 62 | install_dsym() { 63 | local source="$1" 64 | if [ -r "$source" ]; then 65 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" 66 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" 67 | fi 68 | } 69 | 70 | # Signs a framework with the provided identity 71 | code_sign_if_enabled() { 72 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 73 | # Use the current code_sign_identitiy 74 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 75 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 76 | 77 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 78 | code_sign_cmd="$code_sign_cmd &" 79 | fi 80 | echo "$code_sign_cmd" 81 | eval "$code_sign_cmd" 82 | fi 83 | } 84 | 85 | # Strip invalid architectures 86 | strip_invalid_archs() { 87 | binary="$1" 88 | # Get architectures for current file 89 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 90 | stripped="" 91 | for arch in $archs; do 92 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 93 | # Strip non-valid architectures in-place 94 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 95 | stripped="$stripped $arch" 96 | fi 97 | done 98 | if [[ "$stripped" ]]; then 99 | echo "Stripped $binary of architectures:$stripped" 100 | fi 101 | } 102 | 103 | 104 | if [[ "$CONFIGURATION" == "Debug" ]]; then 105 | install_framework "${BUILT_PRODUCTS_DIR}/CRNotifications/CRNotifications.framework" 106 | fi 107 | if [[ "$CONFIGURATION" == "Release" ]]; then 108 | install_framework "${BUILT_PRODUCTS_DIR}/CRNotifications/CRNotifications.framework" 109 | fi 110 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 111 | wait 112 | fi 113 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 12 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 13 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 14 | 15 | case "${TARGETED_DEVICE_FAMILY}" in 16 | 1,2) 17 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 18 | ;; 19 | 1) 20 | TARGET_DEVICE_ARGS="--target-device iphone" 21 | ;; 22 | 2) 23 | TARGET_DEVICE_ARGS="--target-device ipad" 24 | ;; 25 | 3) 26 | TARGET_DEVICE_ARGS="--target-device tv" 27 | ;; 28 | 4) 29 | TARGET_DEVICE_ARGS="--target-device watch" 30 | ;; 31 | *) 32 | TARGET_DEVICE_ARGS="--target-device mac" 33 | ;; 34 | esac 35 | 36 | install_resource() 37 | { 38 | if [[ "$1" = /* ]] ; then 39 | RESOURCE_PATH="$1" 40 | else 41 | RESOURCE_PATH="${PODS_ROOT}/$1" 42 | fi 43 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 44 | cat << EOM 45 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 46 | EOM 47 | exit 1 48 | fi 49 | case $RESOURCE_PATH in 50 | *.storyboard) 51 | 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 52 | 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} 53 | ;; 54 | *.xib) 55 | 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 56 | 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} 57 | ;; 58 | *.framework) 59 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 60 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 61 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 62 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 63 | ;; 64 | *.xcdatamodel) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 67 | ;; 68 | *.xcdatamodeld) 69 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 70 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 71 | ;; 72 | *.xcmappingmodel) 73 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 74 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 75 | ;; 76 | *.xcassets) 77 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 78 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 79 | ;; 80 | *) 81 | echo "$RESOURCE_PATH" || true 82 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 83 | ;; 84 | esac 85 | } 86 | 87 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 89 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 90 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 91 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 92 | fi 93 | rm -f "$RESOURCES_TO_COPY" 94 | 95 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 96 | then 97 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 98 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 99 | while read line; do 100 | if [[ $line != "${PODS_ROOT}*" ]]; then 101 | XCASSET_FILES+=("$line") 102 | fi 103 | done <<<"$OTHER_XCASSETS" 104 | 105 | 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}" 106 | fi 107 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample-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_CRNotificationsExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_CRNotificationsExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/CRNotifications" 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/CRNotifications/CRNotifications.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "CRNotifications" 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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_CRNotificationsExample { 2 | umbrella header "Pods-CRNotificationsExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CRNotificationsExample/Pods-CRNotificationsExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/CRNotifications" 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/CRNotifications/CRNotifications.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "CRNotifications" 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CRNotifications 2 | CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide when they are clicked on or with an automatic dismissal. 3 | 4 | ### Screenshots 5 | ------- 6 | 7 | 8 | ##### Notifications types 9 | 10 | | Success | Error |Info | 11 | | --- | --- | --- | 12 | | ![alt text](cr-success.png "Success") | ![alt text](cr-error.png "Error") | ![alt text](cr-info.png "Info")| 13 | 14 | 15 | 16 | ### How to use 17 | ------- 18 | 19 | Call ``CRNotifications.showNotification`` with a title, message, notification type and a time for how long the notification should appear. Should the notification not disappear automatically use a time of ``0``. You may also pass a completion block that is executed once the notification disappears. 20 | 21 | Built-in notification types are : 22 | ```.success``` 23 | ```.error``` 24 | ```.info``` 25 | 26 | Example: 27 | 28 | ```swift 29 | CRNotifications.showNotification(type: CRNotifications.success, title: "Success!", message: "You successfully showed this notification.", dismissDelay: 3) 30 | ``` 31 | 32 | It is also possible to customize the notifications and provide your own custom style either by the method 33 | ```swift 34 | showNotification(textColor:, backgroundColor: UIColor, image: UIImage?, title: String, message: String, dismissDelay: TimeInterval) 35 | ``` 36 | or by conforming to the ``CRNotificationType`` protocol: 37 | ```swift 38 | protocol CRNotificationType { 39 | var textColor: UIColor { get } 40 | var backgroundColor: UIColor { get } 41 | var image: UIImage? { get } 42 | } 43 | ``` 44 | 45 | ### Installation 46 | ------- 47 | 48 | #### Cocoapods install 49 | 50 | ##### Swift 5 51 | ``` 52 | pod 'CRNotifications' 53 | ``` 54 | ##### Swift 4.2 55 | ``` 56 | pod 'CRNotifications', :git => 'https://github.com/dkcas11/CRNotifications.git', :branch => 'swift4-2' 57 | ``` 58 | ##### Swift 3 59 | ``` 60 | pod 'CRNotifications', :git => 'https://github.com/dkcas11/CRNotifications.git', :branch => 'swift3' 61 | ``` 62 | 63 | #### Manual install 64 | Drag the *CRNotifications* folder into your project and you are good to go. 65 | 66 | ### Author & Contributors 67 | ------- 68 | 69 | **Casper Riboe** (Author) 70 | > Facebook : [Casper Riboe](http://facebook.com/dkcas11)
71 | > Twitter : [dkcas11](http://twitter.com/dkcas11)
72 | > Mail : [casper2602@hotmail.com](mailto:casper260@hotmail.com) 73 | 74 | **Herrick Wolber** (Contribution) 75 | > Twitter : [estar2005](http://twitter.com/estar2005)
76 | > Github : [Rico237](https://github.com/rico237)
77 | > Mail : [wolbereric@yahoo.fr](mailto:wolbereric@yahoo.fr) 78 | -------------------------------------------------------------------------------- /cr-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/cr-error.png -------------------------------------------------------------------------------- /cr-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/cr-info.png -------------------------------------------------------------------------------- /cr-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dkcas11/CRNotifications/3e188b4818c43dd285bdf286a7eba490a6709136/cr-success.png --------------------------------------------------------------------------------