# SuperDelegate [![CI Status](https://travis-ci.org/square/SuperDelegate.svg?branch=master)](https://travis-ci.org/square/SuperDelegate) [![Carthage Compatibility](https://img.shields.io/badge/carthage-✓-e2c245.svg)](https://github.com/Carthage/Carthage/) [![Version](https://img.shields.io/cocoapods/v/SuperDelegate.svg)](https://cocoapods.org/pods/SuperDelegate) [![License](https://img.shields.io/cocoapods/l/SuperDelegate.svg)](https://cocoapods.org/pods/SuperDelegate) [![Platform](https://img.shields.io/cocoapods/p/SuperDelegate.svg)](https://cocoapods.org/pods/SuperDelegate) SuperDelegate provides a consistent App Delegate API across all iOS SDKs while protecting you from bugs in the application lifecycle. ## Purpose **Consolidate tribal knowledge about and workarounds for eccentricities in the UIApplicationDelegate API contract.** Example: in iOS 8.4, `application(_:handleWatchKitExtensionRequest:reply:)` is called before `application(_:didFinishLaunchingWithOptions:)`; this is not the case in iOS 8.0-8.3. SuperDelegate protects you against such changes in the API contract. **Create a clean UIApplicationDelegate API that meets your needs.** Example: `application(_:didFinishLaunchingWithOptions:)` and `application(_:didReceiveRemoteNotification:fetchCompletionHandler:)` will tell you when you receive a push notification (sometimes they tell you twice!), but they don't differentiate between delivery due to a customer tapping on notification or delivery due to the `content-available=1` flag being set in the APNS dictionary. SuperDelegate is designed to give you the information you need when you need it. ## Installation ### CocoaPods To install SuperDelegate in your iOS project running Xcode 7 with [CocoaPods](http://cocoapods.org), add the following to your `Podfile`: ``` platform :ios, '8.0' pod 'SuperDelegate', '~> 0.9.0' ``` Xcode 7 and Swift 2 projects should use 0.7.0 ### Carthage To install SuperDelegate in your iOS project with [Carthage](https://github.com/Carthage/Carthage), add the following to your `Cartfile`: ```ogdl github "Square/SuperDelegate" ``` Run `carthage` to build the framework and drag the built `SuperDelegate.framework` into your Xcode project. ### Swift Package Manager To install SuperDelegate in your iOS project with [Swift Package Manager](https://github.com/apple/swift-package-manager), the following definition can be added to the dependencies of your `Project`: ```swift .Package( url: "https://github.com/square/SuperDelegate.git", versions: Version(0,9,0)..