diff --git a/.github/workflows/edXTestSuit.yml b/.github/workflows/edXTestSuit.yml
index fdbd8eb9fe..ccf10d0958 100644
--- a/.github/workflows/edXTestSuit.yml
+++ b/.github/workflows/edXTestSuit.yml
@@ -1,4 +1,4 @@
-name: "edX Test Suit"
+name: "edX Test Suite"
on:
pull_request:
@@ -32,7 +32,16 @@ jobs:
task: "testRTLPreviousOS"
steps:
- name: Git checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v2
+ - name: Cache Pods
+ uses: actions/cache@v3
+ with:
+ path: Pods
+ key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile') }}
+ restore-keys: |
+ ${{ runner.os }}-pods-
+ - name: Install Dependencies
+ run: pod install
- name: "Select Xcode 13.2.1"
run: |
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
@@ -49,4 +58,7 @@ jobs:
DESTINATION_ID=$(xcrun simctl create "$DEVICE, $RUNTIME" $DEVICE_ID $RUNTIME_ID)
xcrun simctl boot $DESTINATION_ID
./gradlew -q $TASK | xcpretty -c
- shell: bash
\ No newline at end of file
+ shell: bash
+
+
+
diff --git a/.gitignore b/.gitignore
index e2038b94df..f6a03d3443 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,11 @@ xcuserdata
.gradle
build
/edx.properties
-default_config/local.yaml
*.gcda
*.swp
+
+Pods/
+Podfile.lock
+$PODS_BUILD_DIR/
+DerivedData/
+Pods/build/
\ No newline at end of file
diff --git a/Podfile b/Podfile
index 485b53de7e..2e0aa8ecd7 100644
--- a/Podfile
+++ b/Podfile
@@ -1,7 +1,7 @@
# Uncomment this line to define a global platform for your project
platform :ios, '13.0'
-source 'https://github.com/CocoaPods/Specs.git'
+source 'https://cdn.cocoapods.org/'
project 'edX.xcodeproj'
diff --git a/Podfile.lock b/Podfile.lock
deleted file mode 100644
index 6f43e86b40..0000000000
--- a/Podfile.lock
+++ /dev/null
@@ -1,342 +0,0 @@
-PODS:
- - Analytics (4.1.8)
- - AppAuth (1.6.2):
- - AppAuth/Core (= 1.6.2)
- - AppAuth/ExternalUserAgent (= 1.6.2)
- - AppAuth/Core (1.6.2)
- - AppAuth/ExternalUserAgent (1.6.2):
- - AppAuth/Core
- - Appboy-iOS-SDK (4.5.4):
- - Appboy-iOS-SDK/UI (= 4.5.4)
- - Appboy-iOS-SDK/ContentCards (4.5.4):
- - Appboy-iOS-SDK/Core
- - SDWebImage (< 6, >= 5.8.2)
- - Appboy-iOS-SDK/Core (4.5.4)
- - Appboy-iOS-SDK/InAppMessage (4.5.4):
- - Appboy-iOS-SDK/Core
- - SDWebImage (< 6, >= 5.8.2)
- - Appboy-iOS-SDK/NewsFeed (4.5.4):
- - Appboy-iOS-SDK/Core
- - SDWebImage (< 6, >= 5.8.2)
- - Appboy-iOS-SDK/UI (4.5.4):
- - Appboy-iOS-SDK/ContentCards
- - Appboy-iOS-SDK/Core
- - Appboy-iOS-SDK/InAppMessage
- - Appboy-iOS-SDK/NewsFeed
- - BranchSDK (2.0.0)
- - DateTools (2.0.0)
- - FBAEMKit (16.0.0):
- - FBSDKCoreKit_Basics (= 16.0.0)
- - FBSDKCoreKit (16.0.0):
- - FBAEMKit (= 16.0.0)
- - FBSDKCoreKit_Basics (= 16.0.0)
- - FBSDKCoreKit_Basics (16.0.0)
- - FBSDKLoginKit (16.0.0):
- - FBSDKCoreKit (= 16.0.0)
- - Firebase (10.5.0):
- - Firebase/Core (= 10.5.0)
- - Firebase/Core (10.5.0):
- - Firebase/CoreOnly
- - FirebaseAnalytics (~> 10.5.0)
- - Firebase/CoreOnly (10.5.0):
- - FirebaseCore (= 10.5.0)
- - FirebaseABTesting (10.11.0):
- - FirebaseCore (~> 10.0)
- - FirebaseAnalytics (10.5.0):
- - FirebaseAnalytics/AdIdSupport (= 10.5.0)
- - FirebaseCore (~> 10.0)
- - FirebaseInstallations (~> 10.0)
- - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- - GoogleUtilities/MethodSwizzler (~> 7.8)
- - GoogleUtilities/Network (~> 7.8)
- - "GoogleUtilities/NSData+zlib (~> 7.8)"
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - FirebaseAnalytics/AdIdSupport (10.5.0):
- - FirebaseCore (~> 10.0)
- - FirebaseInstallations (~> 10.0)
- - GoogleAppMeasurement (= 10.5.0)
- - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- - GoogleUtilities/MethodSwizzler (~> 7.8)
- - GoogleUtilities/Network (~> 7.8)
- - "GoogleUtilities/NSData+zlib (~> 7.8)"
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - FirebaseCore (10.5.0):
- - FirebaseCoreInternal (~> 10.0)
- - GoogleUtilities/Environment (~> 7.8)
- - GoogleUtilities/Logger (~> 7.8)
- - FirebaseCoreInternal (10.5.0):
- - "GoogleUtilities/NSData+zlib (~> 7.8)"
- - FirebaseCrashlytics (10.5.0):
- - FirebaseCore (~> 10.0)
- - FirebaseInstallations (~> 10.0)
- - GoogleDataTransport (~> 9.2)
- - GoogleUtilities/Environment (~> 7.8)
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - PromisesObjC (~> 2.1)
- - FirebaseInAppMessaging (10.5.0-beta):
- - FirebaseABTesting (~> 10.0)
- - FirebaseCore (~> 10.0)
- - FirebaseInstallations (~> 10.0)
- - GoogleUtilities/Environment (~> 7.8)
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - FirebaseInstallations (10.11.0):
- - FirebaseCore (~> 10.0)
- - GoogleUtilities/Environment (~> 7.8)
- - GoogleUtilities/UserDefaults (~> 7.8)
- - PromisesObjC (~> 2.1)
- - FirebaseMessaging (10.5.0):
- - FirebaseCore (~> 10.0)
- - FirebaseInstallations (~> 10.0)
- - GoogleDataTransport (~> 9.2)
- - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- - GoogleUtilities/Environment (~> 7.8)
- - GoogleUtilities/Reachability (~> 7.8)
- - GoogleUtilities/UserDefaults (~> 7.8)
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - FirebasePerformance (10.5.0):
- - FirebaseCore (~> 10.0)
- - FirebaseInstallations (~> 10.0)
- - FirebaseRemoteConfig (~> 10.0)
- - GoogleDataTransport (~> 9.2)
- - GoogleUtilities/Environment (~> 7.8)
- - GoogleUtilities/ISASwizzler (~> 7.8)
- - GoogleUtilities/MethodSwizzler (~> 7.8)
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - FirebaseRemoteConfig (10.11.0):
- - FirebaseABTesting (~> 10.0)
- - FirebaseCore (~> 10.0)
- - FirebaseInstallations (~> 10.0)
- - GoogleUtilities/Environment (~> 7.8)
- - "GoogleUtilities/NSData+zlib (~> 7.8)"
- - GoogleAnalytics (3.21.0)
- - GoogleAppMeasurement (10.5.0):
- - GoogleAppMeasurement/AdIdSupport (= 10.5.0)
- - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- - GoogleUtilities/MethodSwizzler (~> 7.8)
- - GoogleUtilities/Network (~> 7.8)
- - "GoogleUtilities/NSData+zlib (~> 7.8)"
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - GoogleAppMeasurement/AdIdSupport (10.5.0):
- - GoogleAppMeasurement/WithoutAdIdSupport (= 10.5.0)
- - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- - GoogleUtilities/MethodSwizzler (~> 7.8)
- - GoogleUtilities/Network (~> 7.8)
- - "GoogleUtilities/NSData+zlib (~> 7.8)"
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - GoogleAppMeasurement/WithoutAdIdSupport (10.5.0):
- - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- - GoogleUtilities/MethodSwizzler (~> 7.8)
- - GoogleUtilities/Network (~> 7.8)
- - "GoogleUtilities/NSData+zlib (~> 7.8)"
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - GoogleDataTransport (9.2.3):
- - GoogleUtilities/Environment (~> 7.7)
- - nanopb (< 2.30910.0, >= 2.30908.0)
- - PromisesObjC (< 3.0, >= 1.2)
- - GoogleIDFASupport (3.14.0)
- - GoogleSignIn (7.0.0):
- - AppAuth (~> 1.5)
- - GTMAppAuth (< 3.0, >= 1.3)
- - GTMSessionFetcher/Core (< 4.0, >= 1.1)
- - GoogleUtilities (7.11.0):
- - GoogleUtilities/AppDelegateSwizzler (= 7.11.0)
- - GoogleUtilities/Environment (= 7.11.0)
- - GoogleUtilities/ISASwizzler (= 7.11.0)
- - GoogleUtilities/Logger (= 7.11.0)
- - GoogleUtilities/MethodSwizzler (= 7.11.0)
- - GoogleUtilities/Network (= 7.11.0)
- - "GoogleUtilities/NSData+zlib (= 7.11.0)"
- - GoogleUtilities/Reachability (= 7.11.0)
- - GoogleUtilities/SwizzlerTestHelpers (= 7.11.0)
- - GoogleUtilities/UserDefaults (= 7.11.0)
- - GoogleUtilities/AppDelegateSwizzler (7.11.0):
- - GoogleUtilities/Environment
- - GoogleUtilities/Logger
- - GoogleUtilities/Network
- - GoogleUtilities/Environment (7.11.0):
- - PromisesObjC (< 3.0, >= 1.2)
- - GoogleUtilities/ISASwizzler (7.11.0)
- - GoogleUtilities/Logger (7.11.0):
- - GoogleUtilities/Environment
- - GoogleUtilities/MethodSwizzler (7.11.0):
- - GoogleUtilities/Logger
- - GoogleUtilities/Network (7.11.0):
- - GoogleUtilities/Logger
- - "GoogleUtilities/NSData+zlib"
- - GoogleUtilities/Reachability
- - "GoogleUtilities/NSData+zlib (7.11.0)"
- - GoogleUtilities/Reachability (7.11.0):
- - GoogleUtilities/Logger
- - GoogleUtilities/SwizzlerTestHelpers (7.11.0):
- - GoogleUtilities/MethodSwizzler
- - GoogleUtilities/UserDefaults (7.11.0):
- - GoogleUtilities/Logger
- - GTMAppAuth (2.0.0):
- - AppAuth/Core (~> 1.6)
- - GTMSessionFetcher/Core (< 4.0, >= 1.5)
- - GTMSessionFetcher/Core (3.1.1)
- - iOSSnapshotTestCase (6.2.0):
- - iOSSnapshotTestCase/SwiftSupport (= 6.2.0)
- - iOSSnapshotTestCase/Core (6.2.0)
- - iOSSnapshotTestCase/SwiftSupport (6.2.0):
- - iOSSnapshotTestCase/Core
- - Masonry (1.1.0)
- - MSAL (1.2.5):
- - MSAL/app-lib (= 1.2.5)
- - MSAL/app-lib (1.2.5)
- - nanopb (2.30909.0):
- - nanopb/decode (= 2.30909.0)
- - nanopb/encode (= 2.30909.0)
- - nanopb/decode (2.30909.0)
- - nanopb/encode (2.30909.0)
- - NewRelicAgent (7.4.2)
- - OHHTTPStubs (4.8.0):
- - OHHTTPStubs/Default (= 4.8.0)
- - OHHTTPStubs/Core (4.8.0)
- - OHHTTPStubs/Default (4.8.0):
- - OHHTTPStubs/Core
- - OHHTTPStubs/JSON
- - OHHTTPStubs/NSURLSession
- - OHHTTPStubs/OHPathHelpers
- - OHHTTPStubs/JSON (4.8.0):
- - OHHTTPStubs/Core
- - OHHTTPStubs/NSURLSession (4.8.0):
- - OHHTTPStubs/Core
- - OHHTTPStubs/OHPathHelpers (4.8.0)
- - PromisesObjC (2.2.0)
- - SDWebImage (5.16.0):
- - SDWebImage/Core (= 5.16.0)
- - SDWebImage/Core (5.16.0)
- - Segment-Appboy (4.6.0):
- - Analytics
- - Segment-Appboy/Full-SDK (= 4.6.0)
- - Segment-Appboy/Full-SDK (4.6.0):
- - Analytics
- - Appboy-iOS-SDK (~> 4.5.1)
- - Segment-GoogleAnalytics (1.3.3):
- - Analytics
- - Segment-GoogleAnalytics/GoogleIDFASupport (= 1.3.3)
- - Segment-GoogleAnalytics/Core (1.3.3):
- - Analytics
- - GoogleAnalytics (~> 3.14)
- - Segment-GoogleAnalytics/GoogleIDFASupport (1.3.3):
- - Analytics
- - GoogleIDFASupport (~> 3.14)
- - Segment-GoogleAnalytics/Core
- - Smartling.i18n (1.0.14)
- - YoutubePlayer-in-WKWebView (0.3.8)
-
-DEPENDENCIES:
- - Analytics (= 4.1.8)
- - BranchSDK (= 2.0.0)
- - DateTools (= 2.0.0)
- - FBSDKCoreKit (= 16.0.0)
- - FBSDKLoginKit (= 16.0.0)
- - Firebase (= 10.5.0)
- - FirebaseAnalytics (= 10.5.0)
- - FirebaseCore (= 10.5.0)
- - FirebaseCoreInternal (= 10.5.0)
- - FirebaseCrashlytics (= 10.5.0)
- - FirebaseInAppMessaging (= 10.5.0-beta)
- - FirebaseMessaging (= 10.5.0)
- - FirebasePerformance (= 10.5.0)
- - GoogleSignIn (~> 7.0.0)
- - GoogleUtilities (= 7.11.0)
- - iOSSnapshotTestCase (= 6.2.0)
- - Masonry (= 1.1.0)
- - MSAL (= 1.2.5)
- - NewRelicAgent (= 7.4.2)
- - OHHTTPStubs (~> 4.0)
- - Segment-Appboy (= 4.6.0)
- - Segment-GoogleAnalytics (= 1.3.3)
- - Smartling.i18n (~> 1.0.14)
- - YoutubePlayer-in-WKWebView (~> 0.3.8)
-
-SPEC REPOS:
- https://github.com/CocoaPods/Specs.git:
- - Analytics
- - AppAuth
- - Appboy-iOS-SDK
- - BranchSDK
- - DateTools
- - FBAEMKit
- - FBSDKCoreKit
- - FBSDKCoreKit_Basics
- - FBSDKLoginKit
- - Firebase
- - FirebaseABTesting
- - FirebaseAnalytics
- - FirebaseCore
- - FirebaseCoreInternal
- - FirebaseCrashlytics
- - FirebaseInAppMessaging
- - FirebaseInstallations
- - FirebaseMessaging
- - FirebasePerformance
- - FirebaseRemoteConfig
- - GoogleAnalytics
- - GoogleAppMeasurement
- - GoogleDataTransport
- - GoogleIDFASupport
- - GoogleSignIn
- - GoogleUtilities
- - GTMAppAuth
- - GTMSessionFetcher
- - iOSSnapshotTestCase
- - Masonry
- - MSAL
- - nanopb
- - NewRelicAgent
- - OHHTTPStubs
- - PromisesObjC
- - SDWebImage
- - Segment-Appboy
- - Segment-GoogleAnalytics
- - Smartling.i18n
- - YoutubePlayer-in-WKWebView
-
-SPEC CHECKSUMS:
- Analytics: 9655e0e1c71ea98107cfcb2b14891168acc6c6c9
- AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570
- Appboy-iOS-SDK: 2fc5b290fe1caa85718b811a19b303d45caea975
- BranchSDK: dbecf9d1da931c2cf57393b233347b3587d11acb
- DateTools: 933ac9c490f21f92127cf690ccd8c397e0126caf
- FBAEMKit: 7fb5a0b5caf2ed2900e29c3a17de92ea7193a247
- FBSDKCoreKit: 2a77418391aaa5da38ebf57b90b6de42cebcce6a
- FBSDKCoreKit_Basics: 65c5b3146f38705b95338b54f68ea086bcc468dd
- FBSDKLoginKit: 1a0deda07b1136beb0d468bf154393de6c16e291
- Firebase: 3d6637234ab163e31852834617b4fe1df3b7af6d
- FirebaseABTesting: 3f6b711718feb87346dc05f8c964601bc8fb2cf6
- FirebaseAnalytics: 6f7430030cb6b22fe1db2e3bed782e999b76dc00
- FirebaseCore: 324b8d182d9ff7e3f6d1fa2f04b082d1c7a3e366
- FirebaseCoreInternal: e463f41bb935cd049505bf7e9a5bdd7dcea90df6
- FirebaseCrashlytics: ea94bc81f67d5d4702d0c782da13e1483217bac8
- FirebaseInAppMessaging: cefe06111963166daa5f3e54f89b606de1108975
- FirebaseInstallations: 2a2c6859354cbec0a228a863d4daf6de7c74ced4
- FirebaseMessaging: 35ecbbc68ff547fca80f9326c9622e79288c7149
- FirebasePerformance: c39f1ff3cf88604feacc661226ce17d1886d2e58
- FirebaseRemoteConfig: 5f907cd5cf6f64d026c8bfd196a1086cbe1e95e2
- GoogleAnalytics: abbea91ce20faea66c5b2305aa040d3f9992f66a
- GoogleAppMeasurement: 40c70a7d89013f0eca72006c4b9732163ea4cdae
- GoogleDataTransport: f0308f5905a745f94fb91fea9c6cbaf3831cb1bd
- GoogleIDFASupport: aaf8c10bd429abb1c15349d5252244f5eda8ead1
- GoogleSignIn: b232380cf495a429b8095d3178a8d5855b42e842
- GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
- GTMAppAuth: 99fb010047ba3973b7026e45393f51f27ab965ae
- GTMSessionFetcher: e8647203b65cee28c5f73d0f473d096653945e72
- iOSSnapshotTestCase: 9ab44cb5aa62b84d31847f40680112e15ec579a6
- Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
- MSAL: 5149daaa19228c2c27d81987634da15b50981cef
- nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
- NewRelicAgent: dd262d4a723181aa7ffbd7c70ae0762f37c7b85d
- OHHTTPStubs: b393565822317305b87a1440d4c7aff131679f66
- PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
- SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6
- Segment-Appboy: b160f7416f23ffe97632bf2cf61407660a741136
- Segment-GoogleAnalytics: 945eb2548773b816235e97fa42a580b7bcd6ce39
- Smartling.i18n: 0d508b89a2a12f0e070e6369e4dcdcf46ae2d59f
- YoutubePlayer-in-WKWebView: 4fca3b4f6f09940077bfbae7bddb771f2b43aacd
-
-PODFILE CHECKSUM: b7f1d8ca11b178d2bd244aae49a84220a66f01c7
-
-COCOAPODS: 1.12.0
diff --git a/Pods/Analytics/LICENSE b/Pods/Analytics/LICENSE
deleted file mode 100644
index d27e2fb441..0000000000
--- a/Pods/Analytics/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Segment.io, Inc.
-
-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:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-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.
diff --git a/Pods/Analytics/README.md b/Pods/Analytics/README.md
deleted file mode 100644
index 04aeffd91e..0000000000
--- a/Pods/Analytics/README.md
+++ /dev/null
@@ -1,115 +0,0 @@
-
-**The new [Analytics-Swift](https://github.com/segmentio/analytics-swift) library is now available!**
-
-
-# Analytics
-[![Circle CI](https://circleci.com/gh/segmentio/analytics-ios.svg?style=shield&circle-token=31c5b3e5edeb404b30141ead9dcef3eb37d16d4d)](https://circleci.com/gh/segmentio/analytics-ios)
-[![Version](https://img.shields.io/cocoapods/v/Analytics.svg?style=flat)](https://cocoapods.org//pods/Analytics)
-[![License](https://img.shields.io/cocoapods/l/Analytics.svg?style=flat)](http://cocoapods.org/pods/Analytics)
-[![codecov](https://codecov.io/gh/segmentio/analytics-ios/branch/master/graph/badge.svg)](https://codecov.io/gh/segmentio/analytics-ios)
-[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
-[![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-F05138.svg)](https://swift.org/package-manager/)
-
-analytics-ios is an iOS client for Segment.
-
-Special thanks to [Tony Xiao](https://github.com/tonyxiao), [Lee Hasiuk](https://github.com/lhasiuk) and [Cristian Bica](https://github.com/cristianbica) for their contributions to the library!
-
-
-
-
You can't fix what you can't measure
-
-
-Analytics helps you measure your users, product, and business. It unlocks insights into your app's funnel, core business metrics, and whether you have product-market fit.
-
-## How to get started
-1. **Collect analytics data** from your app(s).
- - The top 200 Segment companies collect data from 5+ source types (web, mobile, server, CRM, etc.).
-2. **Send the data to analytics tools** (for example, Google Analytics, Amplitude, Mixpanel).
- - Over 250+ Segment companies send data to eight categories of destinations such as analytics tools, warehouses, email marketing and remarketing systems, session recording, and more.
-3. **Explore your data** by creating metrics (for example, new signups, retention cohorts, and revenue generation).
- - The best Segment companies use retention cohorts to measure product market fit. Netflix has 70% paid retention after 12 months, 30% after 7 years.
-
-[Segment](https://segment.com) collects analytics data and allows you to send it to more than 250 apps (such as Google Analytics, Mixpanel, Optimizely, Facebook Ads, Slack, Sentry) just by flipping a switch. You only need one Segment code snippet, and you can turn integrations on and off at will, with no additional code. [Sign up with Segment today](https://app.segment.com/signup).
-
-### Why?
-1. **Power all your analytics apps with the same data**. Instead of writing code to integrate all of your tools individually, send data to Segment, once.
-
-2. **Install tracking for the last time**. We're the last integration you'll ever need to write. You only need to instrument Segment once. Reduce all of your tracking code and advertising tags into a single set of API calls.
-
-3. **Send data from anywhere**. Send Segment data from any device, and we'll transform and send it on to any tool.
-
-4. **Query your data in SQL**. Slice, dice, and analyze your data in detail with Segment SQL. We'll transform and load your customer behavioral data directly from your apps into Amazon Redshift, Google BigQuery, or Postgres. Save weeks of engineering time by not having to invent your own data warehouse and ETL pipeline.
-
- For example, you can capture data on any app:
- ```js
- analytics.track('Order Completed', { price: 99.84 })
- ```
- Then, query the resulting data in SQL:
- ```sql
- select * from app.order_completed
- order by price desc
- ```
-
-### 🚀 Startup Program
-
-
-
-If you are part of a new startup (<$5M raised, <2 years since founding), we just launched a new startup program for you. You can get a Segment Team plan (up to $25,000 value in Segment credits) for free up to 2 years — apply here!
-
-## Installation
-
-Analytics is available through [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage).
-
-### CocoaPods
-
-```ruby
-pod "Analytics", "3.7.0"
-```
-Note: Segment _strongly_ recommends that you use a dynamic framework to manage your project dependencies. If you prefer static libraries, you can add `use_modular_headers!` or `use_frameworks! :linkage => :static` in your Podfile. However, you must then _manually update_ all of your dependencies on a regular schedule.
-
-### Carthage
-
-```
-github "segmentio/analytics-ios"
-```
-
-### Swift Package Manager (SPM)
-
-To add analytics-ios via Swift Package Mangaer, it is possible to add it one of two ways:
-
-#### Xcode
-![Xcode Add SPM Package](https://user-images.githubusercontent.com/917994/119199146-69765200-ba3f-11eb-9173-93cfb5f3cabd.png)
-
-![ChoosePackageRepository](https://user-images.githubusercontent.com/917994/119199143-68ddbb80-ba3f-11eb-9bf2-5dc11c208abd.png)
-
-![ChoosePackageOptions](https://user-images.githubusercontent.com/917994/119199139-67ac8e80-ba3f-11eb-9941-fc541030f3df.png)
-
-
-#### Package.swift
-```
-import PackageDescription
-
-let package = Package(
- name: "MyApplication",
- dependencies: [
- // Add a package containing Analytics as the name along with the git url
- .package(
- name: "Segment",
- url: "git@github.com:segmentio/analytics-ios.git"
- )
- ],
- targets: [
- name: "MyApplication",
- dependencies: ["Segment"] // Add Analytics as a dependency of your application
- ]
-)
-```
-Note: Segment recommends that you use Xcode to add your package.
-
-## Quickstart
-
-Refer to the Quickstart documentation at [https://segment.com/docs/libraries/ios/quickstart](https://segment.com/docs/libraries/ios/quickstart/).
-
-## Documentation
-
-More detailed documentation is available at [https://segment.com/docs/libraries/ios](https://segment.com/docs/libraries/ios/).
diff --git a/Pods/Analytics/Segment/Classes/SEGAliasPayload.h b/Pods/Analytics/Segment/Classes/SEGAliasPayload.h
deleted file mode 100644
index 8f320048c1..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGAliasPayload.h
+++ /dev/null
@@ -1,17 +0,0 @@
-@import Foundation;
-#import "SEGPayload.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-NS_SWIFT_NAME(AliasPayload)
-@interface SEGAliasPayload : SEGPayload
-
-@property (nonatomic, readonly) NSString *theNewId;
-
-- (instancetype)initWithNewId:(NSString *)newId
- context:(JSON_DICT)context
- integrations:(JSON_DICT)integrations;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGAliasPayload.m b/Pods/Analytics/Segment/Classes/SEGAliasPayload.m
deleted file mode 100644
index cadf769c6a..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGAliasPayload.m
+++ /dev/null
@@ -1,16 +0,0 @@
-#import "SEGAliasPayload.h"
-
-
-@implementation SEGAliasPayload
-
-- (instancetype)initWithNewId:(NSString *)newId
- context:(NSDictionary *)context
- integrations:(NSDictionary *)integrations
-{
- if (self = [super initWithContext:context integrations:integrations]) {
- _theNewId = [newId copy];
- }
- return self;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGAnalytics.h b/Pods/Analytics/Segment/Classes/SEGAnalytics.h
deleted file mode 100644
index faf20a62f9..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGAnalytics.h
+++ /dev/null
@@ -1,231 +0,0 @@
-@import Foundation;
-#import "SEGIntegrationFactory.h"
-#import "SEGCrypto.h"
-#import "SEGAnalyticsConfiguration.h"
-#import "SEGSerializableValue.h"
-#import "SEGMiddleware.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * This object provides an API for recording analytics.
- */
-@class SEGAnalyticsConfiguration;
-
-NS_SWIFT_NAME(Analytics)
-@interface SEGAnalytics : NSObject
-
-/**
- * Used by the analytics client to configure various options.
- */
-@property (nullable, nonatomic, strong, readonly) SEGAnalyticsConfiguration *configuration DEPRECATED_MSG_ATTRIBUTE("One time use object");
-
-/**
- * Setup this analytics client instance.
- *
- * @param configuration The configuration used to setup the client.
- */
-- (instancetype)initWithConfiguration:(SEGAnalyticsConfiguration *)configuration;
-
-/**
- * Setup the analytics client.
- *
- * @param configuration The configuration used to setup the client.
- */
-+ (void)setupWithConfiguration:(SEGAnalyticsConfiguration *)configuration;
-
-/**
- * Enabled/disables debug logging to trace your data going through the SDK.
- *
- * @param showDebugLogs `YES` to enable logging, `NO` otherwise. `NO` by default.
- */
-+ (void)debug:(BOOL)showDebugLogs;
-
-/**
- * Returns the shared analytics client.
- *
- * @see -setupWithConfiguration:
- */
-+ (instancetype)sharedAnalytics;
-
-/*!
- @method
-
- @abstract
- Associate a user with their unique ID and record traits about them.
-
- @param userId A database ID (or email address) for this user. If you don't have a userId
- but want to record traits, you should pass nil. For more information on how we
- generate the UUID and Apple's policies on IDs, see https://segment.io/libraries/ios#ids
-
- @param traits A dictionary of traits you know about the user. Things like: email, name, plan, etc.
-
- @param options A dictionary of options, such as the `@"anonymousId"` key. If no anonymous ID is specified one will be generated for you.
-
- @discussion
- When you learn more about who your user is, you can record that information with identify.
-
- */
-- (void)identify:(NSString *_Nullable)userId traits:(SERIALIZABLE_DICT _Nullable)traits options:(SERIALIZABLE_DICT _Nullable)options;
-- (void)identify:(NSString *_Nullable)userId traits:(SERIALIZABLE_DICT _Nullable)traits;
-- (void)identify:(NSString *_Nullable)userId;
-
-
-/*!
- @method
-
- @abstract
- Record the actions your users perform.
-
- @param event The name of the event you're tracking. We recommend using human-readable names
- like `Played a Song` or `Updated Status`.
-
- @param properties A dictionary of properties for the event. If the event was 'Added to Shopping Cart', it might
- have properties like price, productType, etc.
-
- @discussion
- When a user performs an action in your app, you'll want to track that action for later analysis. Use the event name to say what the user did, and properties to specify any interesting details of the action.
-
- */
-- (void)track:(NSString *)event properties:(SERIALIZABLE_DICT _Nullable)properties options:(SERIALIZABLE_DICT _Nullable)options;
-- (void)track:(NSString *)event properties:(SERIALIZABLE_DICT _Nullable)properties;
-- (void)track:(NSString *)event;
-
-/*!
- @method
-
- @abstract
- Record the screens or views your users see.
-
- @param screenTitle The title of the screen being viewed. We recommend using human-readable names
- like 'Photo Feed' or 'Completed Purchase Screen'.
-
- @param properties A dictionary of properties for the screen view event. If the event was 'Added to Shopping Cart',
- it might have properties like price, productType, etc.
-
- @discussion
- When a user views a screen in your app, you'll want to record that here. For some tools like Google Analytics and Flurry, screen views are treated specially, and are different from "events" kind of like "page views" on the web. For services that don't treat "screen views" specially, we map "screen" straight to "track" with the same parameters. For example, Mixpanel doesn't treat "screen views" any differently. So a call to "screen" will be tracked as a normal event in Mixpanel, but get sent to Google Analytics and Flurry as a "screen".
-
- */
-- (void)screen:(NSString *)screenTitle category:(NSString * _Nullable)category properties:(SERIALIZABLE_DICT _Nullable)properties options:(SERIALIZABLE_DICT _Nullable)options;
-- (void)screen:(NSString *)screenTitle properties:(SERIALIZABLE_DICT _Nullable)properties options:(SERIALIZABLE_DICT _Nullable)options;
-- (void)screen:(NSString *)screenTitle category:(NSString * _Nullable)category properties:(SERIALIZABLE_DICT _Nullable)properties;
-- (void)screen:(NSString *)screenTitle properties:(SERIALIZABLE_DICT _Nullable)properties;
-- (void)screen:(NSString *)screenTitle category:(NSString * _Nullable)category;
-- (void)screen:(NSString *)screenTitle;
-
-
-/*!
- @method
-
- @abstract
- Associate a user with a group, organization, company, project, or w/e *you* call them.
-
- @param groupId A database ID for this group.
- @param traits A dictionary of traits you know about the group. Things like: name, employees, etc.
-
- @discussion
- When you learn more about who the group is, you can record that information with group.
-
- */
-- (void)group:(NSString *)groupId traits:(SERIALIZABLE_DICT _Nullable)traits options:(SERIALIZABLE_DICT _Nullable)options;
-- (void)group:(NSString *)groupId traits:(SERIALIZABLE_DICT _Nullable)traits;
-- (void)group:(NSString *)groupId;
-
-/*!
- @method
-
- @abstract
- Merge two user identities, effectively connecting two sets of user data as one.
- This may not be supported by all integrations.
-
- @param newId The new ID you want to alias the existing ID to. The existing ID will be either the
- previousId if you have called identify, or the anonymous ID.
-
- @discussion
- When you learn more about who the group is, you can record that information with group.
-
- */
-- (void)alias:(NSString *)newId options:(SERIALIZABLE_DICT _Nullable)options;
-- (void)alias:(NSString *)newId;
-
-// todo: docs
-- (void)receivedRemoteNotification:(NSDictionary *)userInfo;
-- (void)failedToRegisterForRemoteNotificationsWithError:(NSError *)error;
-- (void)registeredForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
-- (void)handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo;
-- (void)continueUserActivity:(NSUserActivity *)activity;
-- (void)openURL:(NSURL *)url options:(NSDictionary *)options;
-
-/*!
- @method
-
- @abstract
- Trigger an upload of all queued events.
-
- @discussion
- This is useful when you want to force all messages queued on the device to be uploaded. Please note that not all integrations
- respond to this method.
- */
-- (void)flush;
-
-/*!
- @method
-
- @abstract
- Reset any user state that is cached on the device.
-
- @discussion
- This is useful when a user logs out and you want to clear the identity. It will clear any
- traits or userId's cached on the device.
- */
-- (void)reset;
-
-/*!
- @method
-
- @abstract
- Enable the sending of analytics data. Enabled by default.
-
- @discussion
- Occasionally used in conjunction with disable user opt-out handling.
- */
-- (void)enable;
-
-
-/*!
- @method
-
- @abstract
- Completely disable the sending of any analytics data.
-
- @discussion
- If have a way for users to actively or passively (sometimes based on location) opt-out of
- analytics data collection, you can use this method to turn off all data collection.
- */
-- (void)disable;
-
-
-/**
- * Version of the library.
- */
-+ (NSString *)version;
-
-/**
- * Returns a dictionary of integrations that are bundled. This is an internal Segment API, and may be removed at any time
- * without notice.
- */
-- (NSDictionary *)bundledIntegrations;
-
-/** Returns the anonymous ID of the current user. */
-- (NSString *)getAnonymousId;
-
-/** Returns the registered device token of this device */
-- (NSString *)getDeviceToken;
-
-/** Returns the configured Edge Function value */
-- (nullable id)edgeFunction;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGAnalytics.m b/Pods/Analytics/Segment/Classes/SEGAnalytics.m
deleted file mode 100644
index b82a2eeab6..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGAnalytics.m
+++ /dev/null
@@ -1,600 +0,0 @@
-#import
-#import "SEGAnalyticsUtils.h"
-#import "SEGAnalytics.h"
-#import "SEGIntegrationFactory.h"
-#import "SEGIntegration.h"
-#import "SEGSegmentIntegrationFactory.h"
-#import "UIViewController+SEGScreen.h"
-#import "NSViewController+SEGScreen.h"
-#import "SEGStoreKitTracker.h"
-#import "SEGHTTPClient.h"
-#import "SEGStorage.h"
-#import "SEGFileStorage.h"
-#import "SEGUserDefaultsStorage.h"
-#import "SEGMiddleware.h"
-#import "SEGContext.h"
-#import "SEGIntegrationsManager.h"
-#import "SEGState.h"
-#import "SEGUtils.h"
-
-static SEGAnalytics *__sharedInstance = nil;
-
-
-@interface SEGAnalytics ()
-
-@property (nonatomic, assign) BOOL enabled;
-@property (nonatomic, strong) SEGAnalyticsConfiguration *oneTimeConfiguration;
-@property (nonatomic, strong) SEGStoreKitTracker *storeKitTracker;
-@property (nonatomic, strong) SEGIntegrationsManager *integrationsManager;
-@property (nonatomic, strong) SEGMiddlewareRunner *runner;
-@property (nonatomic, copy) NSString *lastIDFA;
-@end
-
-
-@implementation SEGAnalytics
-
-+ (void)setupWithConfiguration:(SEGAnalyticsConfiguration *)configuration
-{
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- __sharedInstance = [[self alloc] initWithConfiguration:configuration];
- });
-}
-
-- (instancetype)initWithConfiguration:(SEGAnalyticsConfiguration *)configuration
-{
- NSCParameterAssert(configuration != nil);
-
- if (self = [self init]) {
- self.oneTimeConfiguration = configuration;
- self.enabled = YES;
- self.lastIDFA = nil;
-
- // In swift this would not have been OK... But hey.. It's objc
- // TODO: Figure out if this is really the best way to do things here.
- self.integrationsManager = [[SEGIntegrationsManager alloc] initWithAnalytics:self];
-
- self.runner = [[SEGMiddlewareRunner alloc] initWithMiddleware:
- [configuration.sourceMiddleware ?: @[] arrayByAddingObject:self.integrationsManager]];
-
- // Pass through for application state change events
- id application = configuration.application;
- if (application) {
-#if TARGET_OS_IPHONE
- // Attach to application state change hooks
- NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
- for (NSString *name in @[ UIApplicationDidEnterBackgroundNotification,
- UIApplicationDidFinishLaunchingNotification,
- UIApplicationWillEnterForegroundNotification,
- UIApplicationWillTerminateNotification,
- UIApplicationWillResignActiveNotification,
- UIApplicationDidBecomeActiveNotification ]) {
- [nc addObserver:self selector:@selector(handleAppStateNotification:) name:name object:application];
- }
-#elif TARGET_OS_OSX
- // Attach to application state change hooks
- NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
- for (NSString *name in @[ NSApplicationDidResignActiveNotification,
- NSApplicationDidFinishLaunchingNotification,
- NSApplicationWillBecomeActiveNotification,
- NSApplicationWillTerminateNotification,
- NSApplicationWillResignActiveNotification,
- NSApplicationDidBecomeActiveNotification]) {
- [nc addObserver:self selector:@selector(handleAppStateNotification:) name:name object:application];
- }
-#endif
- }
-
-#if TARGET_OS_IPHONE
- if (configuration.recordScreenViews) {
- [UIViewController seg_swizzleViewDidAppear];
- }
-#elif TARGET_OS_OSX
- if (configuration.recordScreenViews) {
- [NSViewController seg_swizzleViewDidAppear];
- }
-#endif
- if (configuration.trackInAppPurchases) {
- _storeKitTracker = [SEGStoreKitTracker trackTransactionsForAnalytics:self];
- }
-
-#if !TARGET_OS_TV
- if (configuration.trackPushNotifications && configuration.launchOptions) {
-#if TARGET_OS_IOS
- NSDictionary *remoteNotification = configuration.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey];
-#else
- NSDictionary *remoteNotification = configuration.launchOptions[NSApplicationLaunchUserNotificationKey];
-#endif
- if (remoteNotification) {
- [self trackPushNotification:remoteNotification fromLaunch:YES];
- }
- }
-#endif
-
- [SEGState sharedInstance].configuration = configuration;
- [[SEGState sharedInstance].context updateStaticContext];
- }
- return self;
-}
-
-- (void)dealloc
-{
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-}
-
-#pragma mark -
-
-NSString *const SEGVersionKey = @"SEGVersionKey";
-NSString *const SEGBuildKeyV1 = @"SEGBuildKey";
-NSString *const SEGBuildKeyV2 = @"SEGBuildKeyV2";
-
-#if TARGET_OS_IPHONE
-- (void)handleAppStateNotification:(NSNotification *)note
-{
- SEGApplicationLifecyclePayload *payload = [[SEGApplicationLifecyclePayload alloc] init];
- payload.notificationName = note.name;
- [self run:SEGEventTypeApplicationLifecycle payload:payload];
-
- if ([note.name isEqualToString:UIApplicationDidFinishLaunchingNotification]) {
- [self _applicationDidFinishLaunchingWithOptions:note.userInfo];
- } else if ([note.name isEqualToString:UIApplicationWillEnterForegroundNotification]) {
- [self _applicationWillEnterForeground];
- } else if ([note.name isEqualToString:UIApplicationDidEnterBackgroundNotification]) {
- [self _applicationDidEnterBackground];
- }
-}
-#elif TARGET_OS_OSX
-- (void)handleAppStateNotification:(NSNotification *)note
-{
- SEGApplicationLifecyclePayload *payload = [[SEGApplicationLifecyclePayload alloc] init];
- payload.notificationName = note.name;
- [self run:SEGEventTypeApplicationLifecycle payload:payload];
-
- if ([note.name isEqualToString:NSApplicationDidFinishLaunchingNotification]) {
- [self _applicationDidFinishLaunchingWithOptions:note.userInfo];
- } else if ([note.name isEqualToString:NSApplicationWillBecomeActiveNotification]) {
- [self _applicationWillEnterForeground];
- } else if ([note.name isEqualToString:NSApplicationDidResignActiveNotification]) {
- [self _applicationDidEnterBackground];
- }
-}
-#endif
-
-- (void)_applicationDidFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
- if (!self.oneTimeConfiguration.trackApplicationLifecycleEvents) {
- return;
- }
- // Previously SEGBuildKey was stored an integer. This was incorrect because the CFBundleVersion
- // can be a string. This migrates SEGBuildKey to be stored as a string.
- NSInteger previousBuildV1 = [[NSUserDefaults standardUserDefaults] integerForKey:SEGBuildKeyV1];
- if (previousBuildV1) {
- [[NSUserDefaults standardUserDefaults] setObject:[@(previousBuildV1) stringValue] forKey:SEGBuildKeyV2];
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:SEGBuildKeyV1];
- }
-
- NSString *previousVersion = [[NSUserDefaults standardUserDefaults] stringForKey:SEGVersionKey];
- NSString *previousBuildV2 = [[NSUserDefaults standardUserDefaults] stringForKey:SEGBuildKeyV2];
-
- NSString *currentVersion = [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"];
- NSString *currentBuild = [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"];
-
- if (!previousBuildV2) {
- [self track:@"Application Installed" properties:@{
- @"version" : currentVersion ?: @"",
- @"build" : currentBuild ?: @"",
- }];
- } else if (![currentBuild isEqualToString:previousBuildV2]) {
- [self track:@"Application Updated" properties:@{
- @"previous_version" : previousVersion ?: @"",
- @"previous_build" : previousBuildV2 ?: @"",
- @"version" : currentVersion ?: @"",
- @"build" : currentBuild ?: @"",
- }];
- }
-
-#if TARGET_OS_IPHONE
- [self track:@"Application Opened" properties:@{
- @"from_background" : @NO,
- @"version" : currentVersion ?: @"",
- @"build" : currentBuild ?: @"",
- @"referring_application" : launchOptions[UIApplicationLaunchOptionsSourceApplicationKey] ?: @"",
- @"url" : launchOptions[UIApplicationLaunchOptionsURLKey] ?: @"",
- }];
-#elif TARGET_OS_OSX
- [self track:@"Application Opened" properties:@{
- @"from_background" : @NO,
- @"version" : currentVersion ?: @"",
- @"build" : currentBuild ?: @"",
- @"default_launch" : launchOptions[NSApplicationLaunchIsDefaultLaunchKey] ?: @(YES),
- }];
-#endif
-
-
- [[NSUserDefaults standardUserDefaults] setObject:currentVersion forKey:SEGVersionKey];
- [[NSUserDefaults standardUserDefaults] setObject:currentBuild forKey:SEGBuildKeyV2];
-
- [[NSUserDefaults standardUserDefaults] synchronize];
-}
-
-- (void)_applicationWillEnterForeground
-{
- if (!self.oneTimeConfiguration.trackApplicationLifecycleEvents) {
- return;
- }
- NSString *currentVersion = [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"];
- NSString *currentBuild = [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"];
- [self track:@"Application Opened" properties:@{
- @"from_background" : @YES,
- @"version" : currentVersion ?: @"",
- @"build" : currentBuild ?: @"",
- }];
-
- [[SEGState sharedInstance].context updateStaticContext];
-}
-
-- (void)_applicationDidEnterBackground
-{
- if (!self.oneTimeConfiguration.trackApplicationLifecycleEvents) {
- return;
- }
- [self track: @"Application Backgrounded"];
-}
-
-
-#pragma mark - Public API
-
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"<%p:%@, %@>", self, [self class], [self dictionaryWithValuesForKeys:@[ @"configuration" ]]];
-}
-
-- (nullable SEGAnalyticsConfiguration *)configuration
-{
- // Remove deprecated configuration on 4.2+
- return nil;
-}
-
-#pragma mark - Identify
-
-- (void)identify:(NSString *)userId
-{
- [self identify:userId traits:nil options:nil];
-}
-
-- (void)identify:(NSString *)userId traits:(NSDictionary *)traits
-{
- [self identify:userId traits:traits options:nil];
-}
-
-- (void)identify:(NSString *)userId traits:(NSDictionary *)traits options:(NSDictionary *)options
-{
- NSCAssert2(userId.length > 0 || traits.count > 0, @"either userId (%@) or traits (%@) must be provided.", userId, traits);
-
- // this is done here to match functionality on android where these are inserted BEFORE being spread out amongst destinations.
- // it will be set globally later when it runs through SEGIntegrationManager.identify.
- NSString *anonId = [options objectForKey:@"anonymousId"];
- if (anonId == nil) {
- anonId = [self getAnonymousId];
- } else {
- [self.integrationsManager saveAnonymousId:anonId];
- }
- // configure traits to match what is seen on android.
- NSMutableDictionary *existingTraitsCopy = [[SEGState sharedInstance].userInfo.traits mutableCopy];
- NSMutableDictionary *traitsCopy = [traits mutableCopy];
- // if no traits were passed in, need to create.
- if (existingTraitsCopy == nil) {
- existingTraitsCopy = [[NSMutableDictionary alloc] init];
- }
- if (traitsCopy == nil) {
- traitsCopy = [[NSMutableDictionary alloc] init];
- }
- traitsCopy[@"anonymousId"] = anonId;
- if (userId != nil) {
- traitsCopy[@"userId"] = userId;
- [SEGState sharedInstance].userInfo.userId = userId;
- }
- // merge w/ existing traits and set them.
- [existingTraitsCopy addEntriesFromDictionary:traitsCopy];
- [SEGState sharedInstance].userInfo.traits = existingTraitsCopy;
-
- [self run:SEGEventTypeIdentify payload:
- [[SEGIdentifyPayload alloc] initWithUserId:userId
- anonymousId:anonId
- traits:SEGCoerceDictionary(existingTraitsCopy)
- context:SEGCoerceDictionary([options objectForKey:@"context"])
- integrations:[options objectForKey:@"integrations"]]];
-}
-
-#pragma mark - Track
-
-- (void)track:(NSString *)event
-{
- [self track:event properties:nil options:nil];
-}
-
-- (void)track:(NSString *)event properties:(NSDictionary *)properties
-{
- [self track:event properties:properties options:nil];
-}
-
-- (void)track:(NSString *)event properties:(NSDictionary *)properties options:(NSDictionary *)options
-{
- NSCAssert1(event.length > 0, @"event (%@) must not be empty.", event);
- [self run:SEGEventTypeTrack payload:
- [[SEGTrackPayload alloc] initWithEvent:event
- properties:SEGCoerceDictionary(properties)
- context:SEGCoerceDictionary([options objectForKey:@"context"])
- integrations:[options objectForKey:@"integrations"]]];
-}
-
-#pragma mark - Screen
-
-- (void)screen:(NSString *)screenTitle
-{
- [self screen:screenTitle category:nil properties:nil options:nil];
-}
-
-- (void)screen:(NSString *)screenTitle category:(NSString *)category
-{
- [self screen:screenTitle category:category properties:nil options:nil];
-}
-
-- (void)screen:(NSString *)screenTitle properties:(NSDictionary *)properties
-{
- [self screen:screenTitle category:nil properties:properties options:nil];
-}
-
-- (void)screen:(NSString *)screenTitle category:(NSString *)category properties:(SERIALIZABLE_DICT _Nullable)properties
-{
- [self screen:screenTitle category:category properties:properties options:nil];
-}
-
-- (void)screen:(NSString *)screenTitle properties:(NSDictionary *)properties options:(NSDictionary *)options
-{
- [self screen:screenTitle category:nil properties:properties options:options];
-}
-
-- (void)screen:(NSString *)screenTitle category:(NSString *)category properties:(SERIALIZABLE_DICT _Nullable)properties options:(SERIALIZABLE_DICT _Nullable)options
-{
- NSCAssert1(screenTitle.length > 0, @"screen name (%@) must not be empty.", screenTitle);
-
- [self run:SEGEventTypeScreen payload:
- [[SEGScreenPayload alloc] initWithName:screenTitle
- category:category
- properties:SEGCoerceDictionary(properties)
- context:SEGCoerceDictionary([options objectForKey:@"context"])
- integrations:[options objectForKey:@"integrations"]]];
-}
-
-#pragma mark - Group
-
-- (void)group:(NSString *)groupId
-{
- [self group:groupId traits:nil options:nil];
-}
-
-- (void)group:(NSString *)groupId traits:(NSDictionary *)traits
-{
- [self group:groupId traits:traits options:nil];
-}
-
-- (void)group:(NSString *)groupId traits:(NSDictionary *)traits options:(NSDictionary *)options
-{
- [self run:SEGEventTypeGroup payload:
- [[SEGGroupPayload alloc] initWithGroupId:groupId
- traits:SEGCoerceDictionary(traits)
- context:SEGCoerceDictionary([options objectForKey:@"context"])
- integrations:[options objectForKey:@"integrations"]]];
-}
-
-#pragma mark - Alias
-
-- (void)alias:(NSString *)newId
-{
- [self alias:newId options:nil];
-}
-
-- (void)alias:(NSString *)newId options:(NSDictionary *)options
-{
- [self run:SEGEventTypeAlias payload:
- [[SEGAliasPayload alloc] initWithNewId:newId
- context:SEGCoerceDictionary([options objectForKey:@"context"])
- integrations:[options objectForKey:@"integrations"]]];
-}
-
-- (void)trackPushNotification:(NSDictionary *)properties fromLaunch:(BOOL)launch
-{
- if (launch) {
- [self track:@"Push Notification Tapped" properties:properties];
- } else {
- [self track:@"Push Notification Received" properties:properties];
- }
-}
-
-- (void)receivedRemoteNotification:(NSDictionary *)userInfo
-{
- if (self.oneTimeConfiguration.trackPushNotifications) {
- [self trackPushNotification:userInfo fromLaunch:NO];
- }
- SEGRemoteNotificationPayload *payload = [[SEGRemoteNotificationPayload alloc] init];
- payload.userInfo = userInfo;
- [self run:SEGEventTypeReceivedRemoteNotification payload:payload];
-}
-
-- (void)failedToRegisterForRemoteNotificationsWithError:(NSError *)error
-{
- SEGRemoteNotificationPayload *payload = [[SEGRemoteNotificationPayload alloc] init];
- payload.error = error;
- [self run:SEGEventTypeFailedToRegisterForRemoteNotifications payload:payload];
-}
-
-- (void)registeredForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
-{
- NSParameterAssert(deviceToken != nil);
- SEGRemoteNotificationPayload *payload = [[SEGRemoteNotificationPayload alloc] init];
- payload.deviceToken = deviceToken;
- [SEGState sharedInstance].context.deviceToken = deviceTokenToString(deviceToken);
- [self run:SEGEventTypeRegisteredForRemoteNotifications payload:payload];
-}
-
-- (void)handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo
-{
- SEGRemoteNotificationPayload *payload = [[SEGRemoteNotificationPayload alloc] init];
- payload.actionIdentifier = identifier;
- payload.userInfo = userInfo;
- [self run:SEGEventTypeHandleActionWithForRemoteNotification payload:payload];
-}
-
-- (void)continueUserActivity:(NSUserActivity *)activity
-{
- SEGContinueUserActivityPayload *payload = [[SEGContinueUserActivityPayload alloc] init];
- payload.activity = activity;
- [self run:SEGEventTypeContinueUserActivity payload:payload];
-
- if (!self.oneTimeConfiguration.trackDeepLinks) {
- return;
- }
-
- if ([activity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
- NSString *urlString = activity.webpageURL.absoluteString;
- [SEGState sharedInstance].context.referrer = @{
- @"url" : urlString,
- };
-
- NSMutableDictionary *properties = [NSMutableDictionary dictionaryWithCapacity:activity.userInfo.count + 2];
- [properties addEntriesFromDictionary:activity.userInfo];
- properties[@"url"] = urlString;
- properties[@"title"] = activity.title ?: @"";
- properties = [SEGUtils traverseJSON:properties
- andReplaceWithFilters:self.oneTimeConfiguration.payloadFilters];
- [self track:@"Deep Link Opened" properties:[properties copy]];
- }
-}
-
-- (void)openURL:(NSURL *)url options:(NSDictionary *)options
-{
- SEGOpenURLPayload *payload = [[SEGOpenURLPayload alloc] init];
- payload.url = [NSURL URLWithString:[SEGUtils traverseJSON:url.absoluteString
- andReplaceWithFilters:self.oneTimeConfiguration.payloadFilters]];
- payload.options = options;
- [self run:SEGEventTypeOpenURL payload:payload];
-
- if (!self.oneTimeConfiguration.trackDeepLinks) {
- return;
- }
-
- NSString *urlString = url.absoluteString;
- [SEGState sharedInstance].context.referrer = @{
- @"url" : urlString,
- };
-
- NSMutableDictionary *properties = [NSMutableDictionary dictionaryWithCapacity:options.count + 2];
- [properties addEntriesFromDictionary:options];
- properties[@"url"] = urlString;
- properties = [SEGUtils traverseJSON:properties
- andReplaceWithFilters:self.oneTimeConfiguration.payloadFilters];
- [self track:@"Deep Link Opened" properties:[properties copy]];
-}
-
-- (void)reset
-{
- [self run:SEGEventTypeReset payload:nil];
-}
-
-- (void)flush
-{
- [self run:SEGEventTypeFlush payload:nil];
-}
-
-- (void)enable
-{
- _enabled = YES;
-}
-
-- (void)disable
-{
- _enabled = NO;
-}
-
-- (NSString *)getAnonymousId
-{
- return [SEGState sharedInstance].userInfo.anonymousId;
-}
-
-- (NSString *)getDeviceToken
-{
- return [SEGState sharedInstance].context.deviceToken;
-}
-
-- (NSDictionary *)bundledIntegrations
-{
- return [self.integrationsManager.registeredIntegrations copy];
-}
-
-#pragma mark - Class Methods
-
-+ (instancetype)sharedAnalytics
-{
- NSCAssert(__sharedInstance != nil, @"library must be initialized before calling this method.");
- return __sharedInstance;
-}
-
-+ (void)debug:(BOOL)showDebugLogs
-{
- SEGSetShowDebugLogs(showDebugLogs);
-}
-
-+ (NSString *)version
-{
- // this has to match the actual version, NOT what's in info.plist
- // because Apple only accepts X.X.X as versions in the review process.
- return @"4.1.8";
-}
-
-#pragma mark - Helpers
-
-- (void)run:(SEGEventType)eventType payload:(SEGPayload *)payload
-{
- if (!self.enabled) {
- return;
- }
-
- if (getAdTrackingEnabled(self.oneTimeConfiguration)) {
- // if idfa has changed since last we looked, we need to rebuild
- // the static context to pick up the change.
- NSString *idfa = self.oneTimeConfiguration.adSupportBlock();
- if (![idfa isEqualToString:self.lastIDFA]) {
- self.lastIDFA = idfa;
- [[SEGState sharedInstance].context updateStaticContext];
- }
- }
-
- if (self.oneTimeConfiguration.experimental.nanosecondTimestamps) {
- payload.timestamp = iso8601NanoFormattedString([NSDate date]);
- } else {
- payload.timestamp = iso8601FormattedString([NSDate date]);
- }
-
- SEGContext *context = [[[SEGContext alloc] initWithAnalytics:self] modify:^(id _Nonnull ctx) {
- ctx.eventType = eventType;
- ctx.payload = payload;
- ctx.payload.messageId = GenerateUUIDString();
- if (ctx.payload.userId == nil) {
- ctx.payload.userId = [SEGState sharedInstance].userInfo.userId;
- }
- if (ctx.payload.anonymousId == nil) {
- ctx.payload.anonymousId = [SEGState sharedInstance].userInfo.anonymousId;
- }
- }];
-
- // Could probably do more things with callback later, but we don't use it yet.
- [self.runner run:context callback:nil];
-}
-
-- (id)edgeFunction
-{
- return _oneTimeConfiguration.edgeFunctionMiddleware;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGAnalyticsConfiguration.h b/Pods/Analytics/Segment/Classes/SEGAnalyticsConfiguration.h
deleted file mode 100644
index bec98c8e40..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGAnalyticsConfiguration.h
+++ /dev/null
@@ -1,273 +0,0 @@
-//
-// SEGIntegrationsManager.h
-// Analytics
-//
-// Created by Tony Xiao on 9/20/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-
-#if TARGET_OS_IPHONE
-@import UIKit;
-#elif TARGET_OS_OSX
-@import Cocoa;
-#endif
-
-NS_SWIFT_NAME(ApplicationProtocol)
-@protocol SEGApplicationProtocol
-
-#if TARGET_OS_IPHONE
-@property (nullable, nonatomic, assign) id delegate;
-#elif TARGET_OS_OSX
-@property (nullable, nonatomic, assign) id delegate;
-#endif
-- (NSUInteger)seg_beginBackgroundTaskWithName:(nullable NSString *)taskName expirationHandler:(void (^__nullable)(void))handler;
-- (void)seg_endBackgroundTask:(NSUInteger)identifier;
-@end
-
-#if TARGET_OS_IOS
-@interface UIApplication (SEGApplicationProtocol)
-@end
-#elif TARGET_OS_OSX
-@interface NSApplication (SEGApplicationProtocol)
-@end
-#endif
-
-
-typedef NSMutableURLRequest *_Nonnull (^SEGRequestFactory)(NSURL *_Nonnull);
-typedef NSString *_Nonnull (^SEGAdSupportBlock)(void);
-
-@protocol SEGIntegrationFactory;
-@protocol SEGCrypto;
-@protocol SEGMiddleware;
-@protocol SEGEdgeFunctionMiddleware;
-
-@class SEGAnalyticsExperimental;
-@class SEGDestinationMiddleware;
-
-/**
- * This object provides a set of properties to control various policies of the analytics client. Other than `writeKey`, these properties can be changed at any time.
- */
-NS_SWIFT_NAME(AnalyticsConfiguration)
-@interface SEGAnalyticsConfiguration : NSObject
-
-/**
- * Creates and returns a configuration with default settings and the given write key.
- * This will use the API host `https://api.segment.io/v1` as the default.
- *
- * @param writeKey Your project's write key from segment.io.
- */
-+ (_Nonnull instancetype)configurationWithWriteKey:(NSString *_Nonnull)writeKey;
-
-/**
- * Creates and returns a configuration with default settings and the given write key.
- *
- * @param writeKey Your project's write key from segment.io.
- * @param defaultAPIHost The default API host to be used if none are supplied from Segment.com
- */
-+ (_Nonnull instancetype)configurationWithWriteKey:(NSString *_Nonnull)writeKey defaultAPIHost:(NSURL *_Nullable)defaultAPIHost;
-
-/**
- * Your project's write key from segment.io.
- *
- * @see +configurationWithWriteKey:
- */
-@property (nonatomic, copy, readonly, nonnull) NSString *writeKey;
-
-/**
- * The API host to be used for network requests to Segment.
- * This value can change based on settings obtained from Segment.com.
- */
-@property (nonatomic, copy, readonly, nullable) NSURL *apiHost;
-
-/**
- * Whether the analytics client should use location services.
- * If `YES` and the host app hasn't asked for permission to use location services then the user will be presented with an alert view asking to do so. `NO` by default.
- * If `YES`, please make sure to add a description for `NSLocationAlwaysUsageDescription` in your `Info.plist` explaining why your app is accessing Location APIs.
- */
-@property (nonatomic, assign) BOOL shouldUseLocationServices;
-
-/**
- * Whether the analytics client should track advertisting info. `YES` by default.
- */
-@property (nonatomic, assign) BOOL enableAdvertisingTracking;
-
-/**
- * The number of queued events that the analytics client should flush at. Setting this to `1` will not queue any events and will use more battery. `20` by default.
- */
-@property (nonatomic, assign) NSUInteger flushAt;
-
-/**
- * The amount of time to wait before each tick of the flush timer.
- * Smaller values will make events delivered in a more real-time manner and also use more battery.
- * A value smaller than 10 seconds will seriously degrade overall performance.
- * 30 seconds by default.
- */
-@property (nonatomic, assign) NSTimeInterval flushInterval;
-
-/**
- * The maximum number of items to queue before starting to drop old ones. This should be a value greater than zero, the behaviour is undefined otherwise. `1000` by default.
- */
-@property (nonatomic, assign) NSUInteger maxQueueSize;
-
-/**
- * Whether the analytics client should automatically make a track call for application lifecycle events, such as "Application Installed", "Application Updated" and "Application Opened".
- */
-@property (nonatomic, assign) BOOL trackApplicationLifecycleEvents;
-
-
-/**
- * Whether the analytics client should record bluetooth information. If `YES`, please make sure to add a description for `NSBluetoothPeripheralUsageDescription` in your `Info.plist` explaining explaining why your app is accessing Bluetooth APIs. `NO` by default.
- */
-@property (nonatomic, assign) BOOL shouldUseBluetooth;
-
-/**
- * Whether the analytics client should automatically make a screen call when a view controller is added to a view hierarchy. Because the underlying implementation uses method swizzling, we recommend initializing the analytics client as early as possible (before any screens are displayed), ideally during the Application delegate's applicationDidFinishLaunching method.
- */
-@property (nonatomic, assign) BOOL recordScreenViews;
-
-/**
- * Whether the analytics client should automatically track in-app purchases from the App Store.
- */
-@property (nonatomic, assign) BOOL trackInAppPurchases;
-
-/**
- * Whether the analytics client should automatically track push notifications.
- */
-@property (nonatomic, assign) BOOL trackPushNotifications;
-
-/**
- * Whether the analytics client should automatically track deep links. You'll still need to call the continueUserActivity and openURL methods on the analytics client.
- */
-@property (nonatomic, assign) BOOL trackDeepLinks;
-
-/**
- * Dictionary indicating the options the app was launched with.
- */
-@property (nonatomic, strong, nullable) NSDictionary *launchOptions;
-
-/**
- * Set a custom request factory.
- */
-@property (nonatomic, strong, nullable) SEGRequestFactory requestFactory;
-
-/**
- * Set a custom crypto
- */
-@property (nonatomic, strong, nullable) id crypto;
-
-
-/**
- * Set the default settings to use if Segment.com cannot be reached.
- * An example configuration can be found here, using your write key: https://cdn-settings.segment.com/v1/projects/YOUR_WRITE_KEY/settings
- */
-@property (nonatomic, strong, nullable) NSDictionary *defaultSettings;
-
-/**
- * Set custom middlewares. Will be run before all integrations.
- * This property is deprecated in favor of the `sourceMiddleware` property.
- */
-@property (nonatomic, strong, nullable) NSArray> *middlewares DEPRECATED_MSG_ATTRIBUTE("Use .sourceMiddleware instead.");
-
-/**
- * Set custom source middleware. Will be run before all integrations
- */
-@property (nonatomic, strong, nullable) NSArray> *sourceMiddleware;
-
-/**
- * Set custom destination middleware. Will be run before the associated integration for a destination.
- */
-@property (nonatomic, strong, nullable) NSArray *destinationMiddleware;
-
-/**
- * Sets edge function middleware. This takes precendence over native middlewares. Any middleware set via `sourceMiddleware`
- * or `destinationMiddleware` will be removed.
- */
-@property (nonatomic, strong, nullable) id edgeFunctionMiddleware;
-
-/**
- * Register a factory that can be used to create an integration.
- */
-- (void)use:(id _Nonnull)factory;
-
-/**
- * Leave this nil for iOS extensions, otherwise set to UIApplication.sharedApplication.
- */
-@property (nonatomic, strong, nullable) id application;
-
-/**
- * A dictionary of filters to redact payloads before they are sent.
- * This is an experimental feature that currently only applies to Deep Links.
- * It is subject to change to allow for more flexible customizations in the future.
- *
- * The key of this dictionary should be a regular expression string pattern,
- * and the value should be a regular expression substitution template.
- *
- * By default, this contains a Facebook auth token filter, configured as such:
- * @code
- * @"(fb\\d+://authorize#access_token=)([^ ]+)": @"$1((redacted/fb-auth-token))"
- * @endcode
- *
- * This will replace any matching occurences to a redacted version:
- * @code
- * "fb123456789://authorize#access_token=secretsecretsecretsecret&some=data"
- * @endcode
- *
- * Becomes:
- * @code
- * "fb123456789://authorize#access_token=((redacted/fb-auth-token))"
- * @endcode
- *
- */
-@property (nonatomic, strong, nonnull) NSDictionary* payloadFilters;
-
-/**
- * An optional delegate that handles NSURLSessionDelegate callbacks
- */
-@property (nonatomic, strong, nullable) id httpSessionDelegate;
-
-/**
- * Sets a block to be called when IDFA / AdSupport identifier is created.
- * This is to allow for apps that do not want ad tracking to pass App Store guidelines in certain categories while
- * still allowing apps that do ad tracking to continue to function.
- *
- * Example:
- * configuration.adSupportBlock = ^{
- * return [[ASIdentifierManager sharedManager] advertisingIdentifier];
- * }
- */
-@property (nonatomic, strong, nullable) SEGAdSupportBlock adSupportBlock;
-
-/**
- Enable experimental features within the Segment Analytics-iOS library.
- */
-@property (nonatomic, readonly, nonnull) SEGAnalyticsExperimental *experimental;
-
-@end
-
-#pragma mark - Experimental
-
-typedef NSDictionary * _Nonnull (^SEGRawModificationBlock)( NSDictionary * _Nonnull rawPayload);
-
-NS_SWIFT_NAME(AnalyticsExperimental)
-@interface SEGAnalyticsExperimental : NSObject
-/**
- Experimental support for nanosecond timestamps. While the segment pipeline doesn't support this yet
- it can be useful where sub-milisecond precision is needed. An example of this is at startup, when many events
- fire at the same time and end up with the same timestamp. The format is "yyyy-MM-ddTHH:mm:ss.SSSSSSSSS:Z".
-
- This will show up only on the originalTimestamp value as seen in the segment debugger. To properly sort this, one
- will need to sort by originalTimestamp as well as timestamp. This should display events in the exact order they were
- received.
- */
-@property (nonatomic, assign) BOOL nanosecondTimestamps;
-/**
- Experimental support for transformation of raw dictionaries prior to being sent to segment.
- This should generally NOT be used, but is a current stop-gap measure for some customers who need to filter
- payload data prior to being received by segment.com. This property will go away in future versions when context
- object data is made available earlier in the event pipeline.
- */
-@property (nonatomic, strong, nullable) SEGRawModificationBlock rawSegmentModificationBlock;
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGAnalyticsConfiguration.m b/Pods/Analytics/Segment/Classes/SEGAnalyticsConfiguration.m
deleted file mode 100644
index b6342b9fd7..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGAnalyticsConfiguration.m
+++ /dev/null
@@ -1,146 +0,0 @@
-//
-// SEGIntegrationsManager.h
-// Analytics
-//
-// Created by Tony Xiao on 9/20/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-#import "SEGAnalyticsConfiguration.h"
-#import "SEGAnalytics.h"
-#import "SEGMiddleware.h"
-#import "SEGCrypto.h"
-#import "SEGHTTPClient.h"
-#import "SEGUtils.h"
-#if TARGET_OS_IPHONE
-@import UIKit;
-#elif TARGET_OS_OSX
-@import Cocoa;
-#endif
-
-#if TARGET_OS_IPHONE
-@implementation UIApplication (SEGApplicationProtocol)
-
-- (UIBackgroundTaskIdentifier)seg_beginBackgroundTaskWithName:(nullable NSString *)taskName expirationHandler:(void (^__nullable)(void))handler
-{
- return [self beginBackgroundTaskWithName:taskName expirationHandler:handler];
-}
-
-- (void)seg_endBackgroundTask:(UIBackgroundTaskIdentifier)identifier
-{
- [self endBackgroundTask:identifier];
-}
-
-@end
-#endif
-
-@implementation SEGAnalyticsExperimental
-@end
-
-@interface SEGAnalyticsConfiguration ()
-
-@property (nonatomic, copy, readwrite) NSString *writeKey;
-@property (nonatomic, strong, readonly) NSMutableArray *factories;
-@property (nonatomic, strong) SEGAnalyticsExperimental *experimental;
-@property (nonatomic, strong) NSString *instanceId;
-
-- (instancetype)initWithWriteKey:(NSString *)writeKey defaultAPIHost:(NSURL * _Nullable)defaultAPIHost;
-
-@end
-
-
-@implementation SEGAnalyticsConfiguration
-
-+ (instancetype)configurationWithWriteKey:(NSString *)writeKey
-{
- return [[SEGAnalyticsConfiguration alloc] initWithWriteKey:writeKey defaultAPIHost:nil];
-}
-
-+ (instancetype)configurationWithWriteKey:(NSString *)writeKey defaultAPIHost:(NSURL * _Nullable)defaultAPIHost
-{
- return [[SEGAnalyticsConfiguration alloc] initWithWriteKey:writeKey defaultAPIHost:defaultAPIHost];
-}
-
-- (instancetype)initWithWriteKey:(NSString *)writeKey defaultAPIHost:(NSURL * _Nullable)defaultAPIHost
-{
- if (self = [self init]) {
- self.writeKey = writeKey;
- self.instanceId = [NSUUID UUID].UUIDString;
-
- // get the host we have stored
- NSString *host = [SEGUtils getAPIHost];
- if ([host isEqualToString:kSegmentAPIBaseHost]) {
- // we're getting the generic host back. have they
- // supplied something other than that?
- if (defaultAPIHost && ![host isEqualToString:defaultAPIHost.absoluteString]) {
- // we should use the supplied default.
- host = defaultAPIHost.absoluteString;
- [SEGUtils saveAPIHost:host];
- }
- }
- }
- return self;
-}
-
-- (instancetype)init
-{
- if (self = [super init]) {
- self.experimental = [[SEGAnalyticsExperimental alloc] init];
- self.shouldUseLocationServices = NO;
- self.enableAdvertisingTracking = YES;
- self.shouldUseBluetooth = NO;
- self.flushAt = 20;
- self.flushInterval = 30;
- self.maxQueueSize = 1000;
- self.payloadFilters = @{
- @"(fb\\d+://authorize#access_token=)([^ ]+)": @"$1((redacted/fb-auth-token))"
- };
- _factories = [NSMutableArray array];
-#if TARGET_OS_IPHONE
- if ([UIApplication respondsToSelector:@selector(sharedApplication)]) {
- _application = [UIApplication performSelector:@selector(sharedApplication)];
- }
-#elif TARGET_OS_OSX
- if ([NSApplication respondsToSelector:@selector(sharedApplication)]) {
- _application = [NSApplication performSelector:@selector(sharedApplication)];
- }
-#endif
- }
- return self;
-}
-
-- (NSURL *)apiHost
-{
- return [SEGUtils getAPIHostURL];
-}
-
-- (void)use:(id)factory
-{
- [self.factories addObject:factory];
-}
-
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"<%p:%@, %@>", self, self.class, [self dictionaryWithValuesForKeys:@[ @"writeKey", @"shouldUseLocationServices", @"flushAt" ]]];
-}
-
-// MARK: remove these when `middlewares` property is removed.
-
-- (void)setMiddlewares:(NSArray> *)middlewares
-{
- self.sourceMiddleware = middlewares;
-}
-
-- (NSArray> *)middlewares
-{
- return self.sourceMiddleware;
-}
-
-- (void)setEdgeFunctionMiddleware:(id)edgeFunctionMiddleware
-{
- _edgeFunctionMiddleware = edgeFunctionMiddleware;
- self.sourceMiddleware = edgeFunctionMiddleware.sourceMiddleware;
- self.destinationMiddleware = edgeFunctionMiddleware.destinationMiddleware;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGAnalyticsUtils.h b/Pods/Analytics/Segment/Classes/SEGAnalyticsUtils.h
deleted file mode 100644
index 233ae37037..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGAnalyticsUtils.h
+++ /dev/null
@@ -1,24 +0,0 @@
-@import Foundation;
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - Logging
-
-void SEGSetShowDebugLogs(BOOL showDebugLogs);
-void SEGLog(NSString *format, ...);
-
-
-#pragma mark - Serialization Extensions
-
-NS_SWIFT_NAME(SegmentSerializable)
-@protocol SEGSerializable
-/**
- Serialize objects to a type supported by NSJSONSerializable. Objects that conform to this protocol should
- return values of type NSArray, NSDictionary, NSString, NSNumber. Useful for extending objects of your own
- such that they can be serialized on the way to Segment and destinations.
- */
-- (id)serializeToAppropriateType;
-@end
-
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGAnalyticsUtils.m b/Pods/Analytics/Segment/Classes/SEGAnalyticsUtils.m
deleted file mode 100644
index 9e77fc8c11..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGAnalyticsUtils.m
+++ /dev/null
@@ -1,49 +0,0 @@
-#import "SEGAnalyticsUtils.h"
-#import "SEGAnalytics.h"
-#import "SEGUtils.h"
-
-static BOOL kAnalyticsLoggerShowLogs = NO;
-
-#pragma mark - Logging
-
-void SEGSetShowDebugLogs(BOOL showDebugLogs)
-{
- kAnalyticsLoggerShowLogs = showDebugLogs;
-}
-
-void SEGLog(NSString *format, ...)
-{
- if (!kAnalyticsLoggerShowLogs)
- return;
-
- va_list args;
- va_start(args, format);
- NSLogv(format, args);
- va_end(args);
-}
-
-#pragma mark - Serialization Extensions
-
-@interface NSDate(SEGSerializable)
-- (id)serializeToAppropriateType;
-@end
-
-@implementation NSDate(SEGSerializable)
-- (id)serializeToAppropriateType
-{
- return iso8601FormattedString(self);
-}
-@end
-
-@interface NSURL(SEGSerializable)
-- (id)serializeToAppropriateType;
-@end
-
-@implementation NSURL(SEGSerializable)
-- (id)serializeToAppropriateType
-{
- return [self absoluteString];
-}
-@end
-
-
diff --git a/Pods/Analytics/Segment/Classes/SEGContext.h b/Pods/Analytics/Segment/Classes/SEGContext.h
deleted file mode 100644
index f2823074f9..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGContext.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// SEGContext.h
-// Analytics
-//
-// Created by Tony Xiao on 9/19/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-#import "SEGIntegration.h"
-
-typedef NS_ENUM(NSInteger, SEGEventType) {
- // Should not happen, but default state
- SEGEventTypeUndefined,
- // Core Tracking Methods
- SEGEventTypeIdentify,
- SEGEventTypeTrack,
- SEGEventTypeScreen,
- SEGEventTypeGroup,
- SEGEventTypeAlias,
-
- // General utility
- SEGEventTypeReset,
- SEGEventTypeFlush,
-
- // Remote Notification
- SEGEventTypeReceivedRemoteNotification,
- SEGEventTypeFailedToRegisterForRemoteNotifications,
- SEGEventTypeRegisteredForRemoteNotifications,
- SEGEventTypeHandleActionWithForRemoteNotification,
-
- // Application Lifecycle
- SEGEventTypeApplicationLifecycle,
- // DidFinishLaunching,
- // SEGEventTypeApplicationDidEnterBackground,
- // SEGEventTypeApplicationWillEnterForeground,
- // SEGEventTypeApplicationWillTerminate,
- // SEGEventTypeApplicationWillResignActive,
- // SEGEventTypeApplicationDidBecomeActive,
-
- // Misc.
- SEGEventTypeContinueUserActivity,
- SEGEventTypeOpenURL,
-
-} NS_SWIFT_NAME(EventType);
-
-@class SEGAnalytics;
-@protocol SEGMutableContext;
-
-
-NS_SWIFT_NAME(Context)
-@interface SEGContext : NSObject
-
-// Loopback reference to the top level SEGAnalytics object.
-// Not sure if it's a good idea to keep this around in the context.
-// since we don't really want people to use it due to the circular
-// reference and logic (Thus prefixing with underscore). But
-// Right now it is required for integrations to work so I guess we'll leave it in.
-@property (nonatomic, readonly, nonnull) SEGAnalytics *_analytics;
-@property (nonatomic, readonly) SEGEventType eventType;
-
-@property (nonatomic, readonly, nullable) NSError *error;
-@property (nonatomic, readonly, nullable) SEGPayload *payload;
-@property (nonatomic, readonly) BOOL debug;
-
-- (instancetype _Nonnull)initWithAnalytics:(SEGAnalytics *_Nonnull)analytics;
-
-- (SEGContext *_Nonnull)modify:(void (^_Nonnull)(id _Nonnull ctx))modify;
-
-@end
-
-@protocol SEGMutableContext
-
-@property (nonatomic) SEGEventType eventType;
-@property (nonatomic, nullable) SEGPayload *payload;
-@property (nonatomic, nullable) NSError *error;
-@property (nonatomic) BOOL debug;
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGContext.m b/Pods/Analytics/Segment/Classes/SEGContext.m
deleted file mode 100644
index 292883be76..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGContext.m
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// SEGContext.m
-// Analytics
-//
-// Created by Tony Xiao on 9/19/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-#import "SEGContext.h"
-
-
-@interface SEGContext ()
-
-@property (nonatomic) SEGEventType eventType;
-@property (nonatomic, nullable) NSString *userId;
-@property (nonatomic, nullable) NSString *anonymousId;
-@property (nonatomic, nullable) SEGPayload *payload;
-@property (nonatomic, nullable) NSError *error;
-@property (nonatomic) BOOL debug;
-
-@end
-
-
-@implementation SEGContext
-
-- (instancetype)init
-{
- @throw [NSException exceptionWithName:@"Bad Initialization"
- reason:@"Please use initWithAnalytics:"
- userInfo:nil];
-}
-
-- (instancetype)initWithAnalytics:(SEGAnalytics *)analytics
-{
- if (self = [super init]) {
- __analytics = analytics;
-// TODO: Have some other way of indicating the debug flag is on too.
-// Also, for logging it'd be damn nice to implement a logging protocol
-// such as CocoalumberJack and allow developers to pipe logs to wherever they want
-// Of course we wouldn't us depend on it. it'd be like a soft dependency where
-// analytics-ios would totally work without it but works even better with it!
-#ifdef DEBUG
- _debug = YES;
-#endif
- }
- return self;
-}
-
-- (SEGContext *_Nonnull)modify:(void (^_Nonnull)(id _Nonnull ctx))modify
-{
- // We're also being a bit clever here by implementing SEGContext actually as a mutable
- // object but hiding that implementation detail from consumer of the API.
- // In production also instead of copying self we simply just return self
- // because the net effect is the same anyways. In the end we get a lot of the benefits
- // of immutable data structure without the cost of having to allocate and reallocate
- // objects over and over again.
- SEGContext *context = self.debug ? [self copy] : self;
- NSString *originalTimestamp = context.payload.timestamp;
- modify(context);
- if (originalTimestamp) {
- context.payload.timestamp = originalTimestamp;
- }
-
- // TODO: We could probably add some validation here that the newly modified context
- // is actualy valid. For example, `eventType` should match `paylaod` class.
- // or anonymousId should never be null.
- return context;
-}
-
-#pragma mark - NSCopying
-
-- (id)copyWithZone:(NSZone *)zone
-{
- SEGContext *ctx = [[SEGContext allocWithZone:zone] initWithAnalytics:self._analytics];
- ctx.eventType = self.eventType;
- ctx.payload = self.payload;
- ctx.error = self.error;
- ctx.debug = self.debug;
- return ctx;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGCrypto.h b/Pods/Analytics/Segment/Classes/SEGCrypto.h
deleted file mode 100644
index cd8ea5d64a..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGCrypto.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// SEGCrypto.h
-// Analytics
-//
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-
-@protocol SEGCrypto
-
-- (NSData *_Nullable)encrypt:(NSData *_Nonnull)data;
-- (NSData *_Nullable)decrypt:(NSData *_Nonnull)data;
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGGroupPayload.h b/Pods/Analytics/Segment/Classes/SEGGroupPayload.h
deleted file mode 100644
index 3ef7e61d18..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGGroupPayload.h
+++ /dev/null
@@ -1,20 +0,0 @@
-@import Foundation;
-#import "SEGPayload.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-NS_SWIFT_NAME(GroupPayload)
-@interface SEGGroupPayload : SEGPayload
-
-@property (nonatomic, readonly) NSString *groupId;
-
-@property (nonatomic, readonly, nullable) JSON_DICT traits;
-
-- (instancetype)initWithGroupId:(NSString *)groupId
- traits:(JSON_DICT _Nullable)traits
- context:(JSON_DICT)context
- integrations:(JSON_DICT)integrations;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGGroupPayload.m b/Pods/Analytics/Segment/Classes/SEGGroupPayload.m
deleted file mode 100644
index ea7056001f..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGGroupPayload.m
+++ /dev/null
@@ -1,18 +0,0 @@
-#import "SEGGroupPayload.h"
-
-
-@implementation SEGGroupPayload
-
-- (instancetype)initWithGroupId:(NSString *)groupId
- traits:(NSDictionary *)traits
- context:(NSDictionary *)context
- integrations:(NSDictionary *)integrations
-{
- if (self = [super initWithContext:context integrations:integrations]) {
- _groupId = [groupId copy];
- _traits = [traits copy];
- }
- return self;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGHTTPClient.h b/Pods/Analytics/Segment/Classes/SEGHTTPClient.h
deleted file mode 100644
index c411d14ecf..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGHTTPClient.h
+++ /dev/null
@@ -1,36 +0,0 @@
-@import Foundation;
-#import "SEGAnalytics.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-extern NSString * const kSegmentAPIBaseHost;
-
-
-NS_SWIFT_NAME(HTTPClient)
-@interface SEGHTTPClient : NSObject
-
-@property (nonatomic, strong) SEGRequestFactory requestFactory;
-@property (nonatomic, readonly) NSMutableDictionary *sessionsByWriteKey;
-@property (nonatomic, readonly) NSURLSession *genericSession;
-@property (nonatomic, weak) id httpSessionDelegate;
-
-+ (SEGRequestFactory)defaultRequestFactory;
-+ (NSString *)authorizationHeader:(NSString *)writeKey;
-
-- (instancetype)initWithRequestFactory:(SEGRequestFactory _Nullable)requestFactory;
-
-/**
- * Upload dictionary formatted as per https://segment.com/docs/sources/server/http/#batch.
- * This method will convert the dictionary to json, gzip it and upload the data.
- * It will respond with retry = YES if the batch should be reuploaded at a later time.
- * It will ask to retry for json errors and 3xx/5xx codes, and not retry for 2xx/4xx response codes.
- * NOTE: You need to re-dispatch within the completionHandler onto a desired queue to avoid threading issues.
- * Completion handlers are called on a dispatch queue internal to SEGHTTPClient.
- */
-- (nullable NSURLSessionUploadTask *)upload:(JSON_DICT)batch forWriteKey:(NSString *)writeKey completionHandler:(void (^)(BOOL retry))completionHandler;
-
-- (NSURLSessionDataTask *)settingsForWriteKey:(NSString *)writeKey completionHandler:(void (^)(BOOL success, JSON_DICT _Nullable settings))completionHandler;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGHTTPClient.m b/Pods/Analytics/Segment/Classes/SEGHTTPClient.m
deleted file mode 100644
index 8457919b9b..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGHTTPClient.m
+++ /dev/null
@@ -1,185 +0,0 @@
-#import "SEGHTTPClient.h"
-#import "NSData+SEGGZIP.h"
-#import "SEGAnalyticsUtils.h"
-#import "SEGUtils.h"
-
-#define SEGMENT_CDN_BASE [NSURL URLWithString:@"https://cdn-settings.segment.com/v1"]
-
-static const NSUInteger kMaxBatchSize = 475000; // 475KB
-
-NSString * const kSegmentAPIBaseHost = @"https://api.segment.io/v1";
-
-@implementation SEGHTTPClient
-
-+ (NSMutableURLRequest * (^)(NSURL *))defaultRequestFactory
-{
- return ^(NSURL *url) {
- return [NSMutableURLRequest requestWithURL:url];
- };
-}
-
-+ (NSString *)authorizationHeader:(NSString *)writeKey
-{
- NSString *rawHeader = [writeKey stringByAppendingString:@":"];
- NSData *userPasswordData = [rawHeader dataUsingEncoding:NSUTF8StringEncoding];
- return [userPasswordData base64EncodedStringWithOptions:0];
-}
-
-
-- (instancetype)initWithRequestFactory:(SEGRequestFactory)requestFactory
-{
- if (self = [self init]) {
- if (requestFactory == nil) {
- self.requestFactory = [SEGHTTPClient defaultRequestFactory];
- } else {
- self.requestFactory = requestFactory;
- }
- _sessionsByWriteKey = [NSMutableDictionary dictionary];
- NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
- config.HTTPAdditionalHeaders = @{
- @"Accept-Encoding" : @"gzip",
- @"User-Agent" : [NSString stringWithFormat:@"analytics-ios/%@", [SEGAnalytics version]],
- };
- _genericSession = [NSURLSession sessionWithConfiguration:config];
- }
- return self;
-}
-
-- (NSURLSession *)sessionForWriteKey:(NSString *)writeKey
-{
- NSURLSession *session = self.sessionsByWriteKey[writeKey];
- if (!session) {
- NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
- config.HTTPAdditionalHeaders = @{
- @"Accept-Encoding" : @"gzip",
- @"Content-Encoding" : @"gzip",
- @"Content-Type" : @"application/json",
- @"User-Agent" : [NSString stringWithFormat:@"analytics-ios/%@", [SEGAnalytics version]],
- };
- session = [NSURLSession sessionWithConfiguration:config delegate:self.httpSessionDelegate delegateQueue:NULL];
- self.sessionsByWriteKey[writeKey] = session;
- }
- return session;
-}
-
-- (void)dealloc
-{
- for (NSURLSession *session in self.sessionsByWriteKey.allValues) {
- [session finishTasksAndInvalidate];
- }
- [self.genericSession finishTasksAndInvalidate];
-}
-
-
-- (nullable NSURLSessionUploadTask *)upload:(NSDictionary *)batch forWriteKey:(NSString *)writeKey completionHandler:(void (^)(BOOL retry))completionHandler
-{
- // batch = SEGCoerceDictionary(batch);
- NSURLSession *session = [self sessionForWriteKey:writeKey];
-
- NSURL *url = [[SEGUtils getAPIHostURL] URLByAppendingPathComponent:@"batch"];
- NSMutableURLRequest *request = self.requestFactory(url);
-
- // This is a workaround for an IOS 8.3 bug that causes Content-Type to be incorrectly set
- [request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
-
- [request setHTTPMethod:@"POST"];
-
- NSError *error = nil;
- NSException *exception = nil;
- NSData *payload = nil;
- @try {
- payload = [NSJSONSerialization dataWithJSONObject:batch options:0 error:&error];
- }
- @catch (NSException *exc) {
- exception = exc;
- }
- if (error || exception) {
- SEGLog(@"Error serializing JSON for batch upload %@", error);
- completionHandler(NO); // Don't retry this batch.
- return nil;
- }
- if (payload.length >= kMaxBatchSize) {
- SEGLog(@"Payload exceeded the limit of %luKB per batch", kMaxBatchSize / 1000);
- completionHandler(NO);
- return nil;
- }
- NSData *gzippedPayload = [payload seg_gzippedData];
-
- NSURLSessionUploadTask *task = [session uploadTaskWithRequest:request fromData:gzippedPayload completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable error) {
- if (error) {
- // Network error. Retry.
- SEGLog(@"Error uploading request %@.", error);
- completionHandler(YES);
- return;
- }
-
- NSInteger code = ((NSHTTPURLResponse *)response).statusCode;
- if (code < 300) {
- // 2xx response codes. Don't retry.
- completionHandler(NO);
- return;
- }
- if (code < 400) {
- // 3xx response codes. Retry.
- SEGLog(@"Server responded with unexpected HTTP code %d.", code);
- completionHandler(YES);
- return;
- }
- if (code == 429) {
- // 429 response codes. Retry.
- SEGLog(@"Server limited client with response code %d.", code);
- completionHandler(YES);
- return;
- }
- if (code < 500) {
- // non-429 4xx response codes. Don't retry.
- SEGLog(@"Server rejected payload with HTTP code %d.", code);
- completionHandler(NO);
- return;
- }
-
- // 5xx response codes. Retry.
- SEGLog(@"Server error with HTTP code %d.", code);
- completionHandler(YES);
- }];
- [task resume];
- return task;
-}
-
-- (NSURLSessionDataTask *)settingsForWriteKey:(NSString *)writeKey completionHandler:(void (^)(BOOL success, JSON_DICT _Nullable settings))completionHandler
-{
- NSURLSession *session = self.genericSession;
-
- NSURL *url = [SEGMENT_CDN_BASE URLByAppendingPathComponent:[NSString stringWithFormat:@"/projects/%@/settings", writeKey]];
- NSMutableURLRequest *request = self.requestFactory(url);
- [request setHTTPMethod:@"GET"];
-
- NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable error) {
- if (error != nil) {
- SEGLog(@"Error fetching settings %@.", error);
- completionHandler(NO, nil);
- return;
- }
-
- NSInteger code = ((NSHTTPURLResponse *)response).statusCode;
- if (code > 300) {
- SEGLog(@"Server responded with unexpected HTTP code %d.", code);
- completionHandler(NO, nil);
- return;
- }
-
- NSError *jsonError = nil;
- id responseJson = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
- if (jsonError != nil) {
- SEGLog(@"Error deserializing response body %@.", jsonError);
- completionHandler(NO, nil);
- return;
- }
-
- completionHandler(YES, responseJson);
- }];
- [task resume];
- return task;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGIdentifyPayload.h b/Pods/Analytics/Segment/Classes/SEGIdentifyPayload.h
deleted file mode 100644
index 3b4e41a2f6..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGIdentifyPayload.h
+++ /dev/null
@@ -1,19 +0,0 @@
-@import Foundation;
-#import "SEGPayload.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-NS_SWIFT_NAME(IdentifyPayload)
-@interface SEGIdentifyPayload : SEGPayload
-
-@property (nonatomic, readonly, nullable) JSON_DICT traits;
-
-- (instancetype)initWithUserId:(NSString *)userId
- anonymousId:(NSString *_Nullable)anonymousId
- traits:(JSON_DICT _Nullable)traits
- context:(JSON_DICT)context
- integrations:(JSON_DICT)integrations;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGIdentifyPayload.m b/Pods/Analytics/Segment/Classes/SEGIdentifyPayload.m
deleted file mode 100644
index 418f71f901..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGIdentifyPayload.m
+++ /dev/null
@@ -1,19 +0,0 @@
-#import "SEGIdentifyPayload.h"
-
-@implementation SEGIdentifyPayload
-
-- (instancetype)initWithUserId:(NSString *)userId
- anonymousId:(NSString *)anonymousId
- traits:(NSDictionary *)traits
- context:(NSDictionary *)context
- integrations:(NSDictionary *)integrations
-{
- if (self = [super initWithContext:context integrations:integrations]) {
- _traits = [traits copy];
- self.anonymousId = [anonymousId copy];
- self.userId = [userId copy];
- }
- return self;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGIntegration.h b/Pods/Analytics/Segment/Classes/SEGIntegration.h
deleted file mode 100644
index daf06bb822..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGIntegration.h
+++ /dev/null
@@ -1,80 +0,0 @@
-@import Foundation;
-#import "SEGIdentifyPayload.h"
-#import "SEGTrackPayload.h"
-#import "SEGScreenPayload.h"
-#import "SEGAliasPayload.h"
-#import "SEGIdentifyPayload.h"
-#import "SEGGroupPayload.h"
-#import "SEGContext.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-NS_SWIFT_NAME(Integration)
-@protocol SEGIntegration
-
-@optional
-// Identify will be called when the user calls either of the following:
-// 1. [[SEGAnalytics sharedInstance] identify:someUserId];
-// 2. [[SEGAnalytics sharedInstance] identify:someUserId traits:someTraits];
-// 3. [[SEGAnalytics sharedInstance] identify:someUserId traits:someTraits options:someOptions];
-// @see https://segment.com/docs/spec/identify/
-- (void)identify:(SEGIdentifyPayload *)payload;
-
-// Track will be called when the user calls either of the following:
-// 1. [[SEGAnalytics sharedInstance] track:someEvent];
-// 2. [[SEGAnalytics sharedInstance] track:someEvent properties:someProperties];
-// 3. [[SEGAnalytics sharedInstance] track:someEvent properties:someProperties options:someOptions];
-// @see https://segment.com/docs/spec/track/
-- (void)track:(SEGTrackPayload *)payload;
-
-// Screen will be called when the user calls either of the following:
-// 1. [[SEGAnalytics sharedInstance] screen:someEvent];
-// 2. [[SEGAnalytics sharedInstance] screen:someEvent properties:someProperties];
-// 3. [[SEGAnalytics sharedInstance] screen:someEvent properties:someProperties options:someOptions];
-// @see https://segment.com/docs/spec/screen/
-- (void)screen:(SEGScreenPayload *)payload;
-
-// Group will be called when the user calls either of the following:
-// 1. [[SEGAnalytics sharedInstance] group:someGroupId];
-// 2. [[SEGAnalytics sharedInstance] group:someGroupId traits:];
-// 3. [[SEGAnalytics sharedInstance] group:someGroupId traits:someGroupTraits options:someOptions];
-// @see https://segment.com/docs/spec/group/
-- (void)group:(SEGGroupPayload *)payload;
-
-// Alias will be called when the user calls either of the following:
-// 1. [[SEGAnalytics sharedInstance] alias:someNewId];
-// 2. [[SEGAnalytics sharedInstance] alias:someNewId options:someOptions];
-// @see https://segment.com/docs/spec/alias/
-- (void)alias:(SEGAliasPayload *)payload;
-
-// Reset is invoked when the user logs out, and any data saved about the user should be cleared.
-- (void)reset;
-
-// Flush is invoked when any queued events should be uploaded.
-- (void)flush;
-
-// App Delegate Callbacks
-
-// Callbacks for notifications changes.
-// ------------------------------------
-- (void)receivedRemoteNotification:(NSDictionary *)userInfo;
-- (void)failedToRegisterForRemoteNotificationsWithError:(NSError *)error;
-- (void)registeredForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
-- (void)handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo;
-
-// Callbacks for app state changes
-// -------------------------------
-
-- (void)applicationDidFinishLaunching:(NSNotification *)notification;
-- (void)applicationDidEnterBackground;
-- (void)applicationWillEnterForeground;
-- (void)applicationWillTerminate;
-- (void)applicationWillResignActive;
-- (void)applicationDidBecomeActive;
-
-- (void)continueUserActivity:(NSUserActivity *)activity;
-- (void)openURL:(NSURL *)url options:(NSDictionary *)options;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGIntegrationFactory.h b/Pods/Analytics/Segment/Classes/SEGIntegrationFactory.h
deleted file mode 100644
index b3b15526df..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGIntegrationFactory.h
+++ /dev/null
@@ -1,22 +0,0 @@
-@import Foundation;
-#import "SEGIntegration.h"
-#import "SEGAnalytics.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class SEGAnalytics;
-
-@protocol SEGIntegrationFactory
-
-/**
- * Attempts to create an adapter with the given settings. Returns the adapter if one was created, or null
- * if this factory isn't capable of creating such an adapter.
- */
-- (id)createWithSettings:(NSDictionary *)settings forAnalytics:(SEGAnalytics *)analytics;
-
-/** The key for which this factory can create an Integration. */
-- (NSString *)key;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGMiddleware.h b/Pods/Analytics/Segment/Classes/SEGMiddleware.h
deleted file mode 100644
index a3c79ae2db..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGMiddleware.h
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// SEGMiddleware.h
-// Analytics
-//
-// Created by Tony Xiao on 9/19/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-#import "SEGContext.h"
-
-typedef void (^SEGMiddlewareNext)(SEGContext *_Nullable newContext);
-
-NS_SWIFT_NAME(Middleware)
-@protocol SEGMiddleware
-@required
-
-// NOTE: If you want to hold onto references of context AFTER passing it through to the next
-// middleware, you should explicitly create a copy via `[context copy]` to guarantee
-// that it does not get changed from underneath you because contexts can be implemented
-// as mutable objects under the hood for performance optimization.
-// The behavior of keeping reference to a context AFTER passing it to the next middleware
-// is strictly undefined.
-
-// Middleware should **always** call `next`. If the intention is to explicitly filter out
-// events from downstream, call `next` with `nil` as the param.
-// It's ok to save next callback until a more convenient time, but it should always always be done.
-// We'll probably actually add tests to sure it is so.
-// TODO: Should we add error as second param to next?
-- (void)context:(SEGContext *_Nonnull)context next:(SEGMiddlewareNext _Nonnull)next;
-
-@end
-
-typedef void (^SEGMiddlewareBlock)(SEGContext *_Nonnull context, SEGMiddlewareNext _Nonnull next);
-
-
-NS_SWIFT_NAME(BlockMiddleware)
-@interface SEGBlockMiddleware : NSObject
-
-@property (nonnull, nonatomic, readonly) SEGMiddlewareBlock block;
-
-- (instancetype _Nonnull)initWithBlock:(SEGMiddlewareBlock _Nonnull)block;
-
-@end
-
-
-typedef void (^RunMiddlewaresCallback)(BOOL earlyExit, NSArray> *_Nonnull remainingMiddlewares);
-
-// XXX TODO: Add some tests for SEGMiddlewareRunner
-NS_SWIFT_NAME(MiddlewareRunner)
-@interface SEGMiddlewareRunner : NSObject
-
-// While it is certainly technically possible to change middlewares dynamically on the fly. we're explicitly NOT
-// gonna support that for now to keep things simple. If there is a real need later we'll see then.
-@property (nonnull, nonatomic, readonly) NSArray> *middlewares;
-
-- (SEGContext * _Nonnull)run:(SEGContext *_Nonnull)context callback:(RunMiddlewaresCallback _Nullable)callback;
-
-- (instancetype _Nonnull)initWithMiddleware:(NSArray> *_Nonnull)middlewares;
-
-@end
-
-// Container object for middlewares for a specific destination.
-NS_SWIFT_NAME(DestinationMiddleware)
-@interface SEGDestinationMiddleware : NSObject
-@property (nonatomic, strong, nonnull, readonly) NSString *integrationKey;
-@property (nonatomic, strong, nullable, readonly) NSArray> *middleware;
-- (instancetype _Nonnull)initWithKey:(NSString * _Nonnull)integrationKey middleware:(NSArray> * _Nonnull)middleware;
-@end
-
-NS_SWIFT_NAME(EdgeFunctionMiddleware)
-@protocol SEGEdgeFunctionMiddleware
-@required
-@property (nonatomic, readonly, nullable) NSArray> *sourceMiddleware;
-@property (nonatomic, readonly, nullable) NSArray *destinationMiddleware;
-- (void)setEdgeFunctionData:(NSDictionary *_Nullable)data;
-- (void)addToDataBridge:(NSString * _Nonnull)key value:(id _Nonnull)value NS_SWIFT_NAME(addToDataBridge(key:value:));
-- (void)removeFromDataBridge:(NSString * _Nonnull)key NS_SWIFT_NAME(removeFromDataBridge(key:));
-- (NSDictionary * _Nullable)dataBridgeSnapshot;
-@end
-
diff --git a/Pods/Analytics/Segment/Classes/SEGMiddleware.m b/Pods/Analytics/Segment/Classes/SEGMiddleware.m
deleted file mode 100644
index a63b05827e..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGMiddleware.m
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// SEGMiddleware.m
-// Analytics
-//
-// Created by Tony Xiao on 9/19/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-#import "SEGUtils.h"
-#import "SEGMiddleware.h"
-
-
-@implementation SEGDestinationMiddleware
-- (instancetype)initWithKey:(NSString *)integrationKey middleware:(NSArray> *)middleware
-{
- if (self = [super init]) {
- _integrationKey = integrationKey;
- _middleware = middleware;
- }
- return self;
-}
-@end
-
-@implementation SEGBlockMiddleware
-
-- (instancetype)initWithBlock:(SEGMiddlewareBlock)block
-{
- if (self = [super init]) {
- _block = block;
- }
- return self;
-}
-
-- (void)context:(SEGContext *)context next:(SEGMiddlewareNext)next
-{
- self.block(context, next);
-}
-
-@end
-
-
-@implementation SEGMiddlewareRunner
-
-- (instancetype)initWithMiddleware:(NSArray> *_Nonnull)middlewares
-{
- if (self = [super init]) {
- _middlewares = middlewares;
- }
- return self;
-}
-
-- (SEGContext *)run:(SEGContext *_Nonnull)context callback:(RunMiddlewaresCallback _Nullable)callback
-{
- return [self runMiddlewares:self.middlewares context:context callback:callback];
-}
-
-// TODO: Maybe rename SEGContext to SEGEvent to be a bit more clear?
-// We could also use some sanity check / other types of logging here.
-- (SEGContext *)runMiddlewares:(NSArray> *_Nonnull)middlewares
- context:(SEGContext *_Nonnull)context
- callback:(RunMiddlewaresCallback _Nullable)callback
-{
- __block SEGContext * _Nonnull result = context;
-
- BOOL earlyExit = context == nil;
- if (middlewares.count == 0 || earlyExit) {
- if (callback) {
- callback(earlyExit, middlewares);
- }
- return context;
- }
-
- [middlewares[0] context:result next:^(SEGContext *_Nullable newContext) {
- NSArray *remainingMiddlewares = [middlewares subarrayWithRange:NSMakeRange(1, middlewares.count - 1)];
- result = [self runMiddlewares:remainingMiddlewares context:newContext callback:callback];
- }];
-
- return result;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGPayload.h b/Pods/Analytics/Segment/Classes/SEGPayload.h
deleted file mode 100644
index 5c594b1846..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGPayload.h
+++ /dev/null
@@ -1,66 +0,0 @@
-@import Foundation;
-#import "SEGSerializableValue.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-NS_SWIFT_NAME(Payload)
-@interface SEGPayload : NSObject
-
-@property (nonatomic, readonly) JSON_DICT context;
-@property (nonatomic, readonly) JSON_DICT integrations;
-@property (nonatomic, strong) NSString *timestamp;
-@property (nonatomic, strong) NSString *messageId;
-@property (nonatomic, strong) NSString *anonymousId;
-@property (nonatomic, strong) NSString *userId;
-
-- (instancetype)initWithContext:(JSON_DICT)context integrations:(JSON_DICT)integrations;
-
-@end
-
-
-NS_SWIFT_NAME(ApplicationLifecyclePayload)
-@interface SEGApplicationLifecyclePayload : SEGPayload
-
-@property (nonatomic, strong) NSString *notificationName;
-
-// ApplicationDidFinishLaunching only
-@property (nonatomic, strong, nullable) NSDictionary *launchOptions;
-
-@end
-
-
-NS_SWIFT_NAME(ContinueUserActivityPayload)
-@interface SEGContinueUserActivityPayload : SEGPayload
-
-@property (nonatomic, strong) NSUserActivity *activity;
-
-@end
-
-NS_SWIFT_NAME(OpenURLPayload)
-@interface SEGOpenURLPayload : SEGPayload
-
-@property (nonatomic, strong) NSURL *url;
-@property (nonatomic, strong) NSDictionary *options;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-
-NS_SWIFT_NAME(RemoteNotificationPayload)
-@interface SEGRemoteNotificationPayload : SEGPayload
-
-// SEGEventTypeHandleActionWithForRemoteNotification
-@property (nonatomic, strong, nullable) NSString *actionIdentifier;
-
-// SEGEventTypeHandleActionWithForRemoteNotification
-// SEGEventTypeReceivedRemoteNotification
-@property (nonatomic, strong, nullable) NSDictionary *userInfo;
-
-// SEGEventTypeFailedToRegisterForRemoteNotifications
-@property (nonatomic, strong, nullable) NSError *error;
-
-// SEGEventTypeRegisteredForRemoteNotifications
-@property (nonatomic, strong, nullable) NSData *deviceToken;
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGPayload.m b/Pods/Analytics/Segment/Classes/SEGPayload.m
deleted file mode 100644
index faad188dd6..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGPayload.m
+++ /dev/null
@@ -1,45 +0,0 @@
-#import "SEGPayload.h"
-#import "SEGState.h"
-#import "SEGUtils.h"
-
-@implementation SEGPayload
-
-@synthesize userId = _userId;
-@synthesize anonymousId = _anonymousId;
-
-- (instancetype)initWithContext:(NSDictionary *)context integrations:(NSDictionary *)integrations
-{
- if (self = [super init]) {
- // combine existing state with user supplied context.
- NSDictionary *internalContext = [SEGState sharedInstance].context.payload;
-
- NSMutableDictionary *combinedContext = [[NSMutableDictionary alloc] init];
- [combinedContext addEntriesFromDictionary:internalContext];
- [combinedContext addEntriesFromDictionary:context];
-
- _context = [combinedContext serializableDeepCopy];
- _integrations = [integrations copy];
- _messageId = nil;
- _userId = nil;
- _anonymousId = nil;
- }
- return self;
-}
-
-@end
-
-
-@implementation SEGApplicationLifecyclePayload
-@end
-
-
-@implementation SEGRemoteNotificationPayload
-@end
-
-
-@implementation SEGContinueUserActivityPayload
-@end
-
-
-@implementation SEGOpenURLPayload
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGReachability.h b/Pods/Analytics/Segment/Classes/SEGReachability.h
deleted file mode 100644
index e96e2cda99..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGReachability.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- Copyright (c) 2011, Tony Million.
- All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-@import Foundation;
-@import SystemConfiguration;
-
-/**
- * Does ARC support GCD objects?
- * It does if the minimum deployment target is iOS 6+ or Mac OS X 8+
- *
- * @see http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h
- **/
-#if OS_OBJECT_USE_OBJC
-#define NEEDS_DISPATCH_RETAIN_RELEASE 0
-#else
-#define NEEDS_DISPATCH_RETAIN_RELEASE 1
-#endif
-
-/**
- * Create NS_ENUM macro if it does not exist on the targeted version of iOS or OS X.
- *
- * @see http://nshipster.com/ns_enum-ns_options/
- **/
-#ifndef NS_ENUM
-#define NS_ENUM(_type, _name) \
- enum _name : _type _name; \
- enum _name : _type
-#endif
-
-NS_ASSUME_NONNULL_BEGIN
-
-extern NSString *const kSEGReachabilityChangedNotification;
-
-typedef NS_ENUM(NSInteger, SEGNetworkStatus) {
- // Apple NetworkStatus Compatible Names.
- SEGNotReachable = 0,
- SEGReachableViaWiFi = 2,
- SEGReachableViaWWAN = 1
-};
-
-@class SEGReachability;
-
-typedef void (^SEGNetworkReachable)(SEGReachability *reachability);
-typedef void (^SEGNetworkUnreachable)(SEGReachability *reachability);
-
-
-NS_SWIFT_NAME(Reachability)
-@interface SEGReachability : NSObject
-
-@property (nonatomic, copy, nullable) SEGNetworkReachable reachableBlock;
-@property (nonatomic, copy, nullable) SEGNetworkUnreachable unreachableBlock;
-
-
-@property (nonatomic, assign) BOOL reachableOnWWAN;
-
-+ (SEGReachability *_Nullable)reachabilityWithHostname:(NSString *)hostname;
-+ (SEGReachability *_Nullable)reachabilityForInternetConnection;
-+ (SEGReachability *_Nullable)reachabilityForLocalWiFi;
-
-- (SEGReachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref;
-
-- (BOOL)startNotifier;
-- (void)stopNotifier;
-
-- (BOOL)isReachable;
-- (BOOL)isReachableViaWWAN;
-- (BOOL)isReachableViaWiFi;
-
-// WWAN may be available, but not active until a connection has been established.
-// WiFi may require a connection for VPN on Demand.
-- (BOOL)isConnectionRequired; // Identical DDG variant.
-- (BOOL)connectionRequired; // Apple's routine.
-// Dynamic, on demand connection?
-- (BOOL)isConnectionOnDemand;
-// Is user intervention required?
-- (BOOL)isInterventionRequired;
-
-- (SEGNetworkStatus)currentReachabilityStatus;
-- (SCNetworkReachabilityFlags)reachabilityFlags;
-- (NSString *)currentReachabilityString;
-- (NSString *)currentReachabilityFlags;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGReachability.m b/Pods/Analytics/Segment/Classes/SEGReachability.m
deleted file mode 100644
index 220cb94569..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGReachability.m
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- Copyright (c) 2011, Tony Million.
- All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import
-#import
-#import
-#import
-#import
-#import
-#import "SEGReachability.h"
-
-
-NSString *const kSEGReachabilityChangedNotification = @"kSEGReachabilityChangedNotification";
-
-
-@interface SEGReachability ()
-
-@property (nonatomic, assign) SCNetworkReachabilityRef reachabilityRef;
-
-
-#if NEEDS_DISPATCH_RETAIN_RELEASE
-@property (nonatomic, assign) dispatch_queue_t reachabilitySerialQueue;
-#else
-@property (nonatomic, strong) dispatch_queue_t reachabilitySerialQueue;
-#endif
-
-
-@property (nonatomic, strong) id reachabilityObject;
-
-- (void)reachabilityChanged:(SCNetworkReachabilityFlags)flags;
-- (BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags;
-
-@end
-
-static NSString *reachabilityFlags(SCNetworkReachabilityFlags flags)
-{
- return [NSString stringWithFormat:@"%c%c %c%c%c%c%c%c%c",
-#if TARGET_OS_IPHONE
- (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-',
-#else
- 'X',
-#endif
- (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-',
- (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-',
- (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-',
- (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-',
- (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-',
- (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-',
- (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-',
- (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-'];
-}
-
-// Start listening for reachability notifications on the current run loop
-static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info)
-{
-#pragma unused(target)
-#if __has_feature(objc_arc)
- SEGReachability *reachability = ((__bridge SEGReachability *)info);
-#else
- SEGReachability *reachability = ((SEGReachability *)info);
-#endif
-
- // We probably don't need an autoreleasepool here, as GCD docs state each queue has its own autorelease pool,
- // but what the heck eh?
- @autoreleasepool
- {
- [reachability reachabilityChanged:flags];
- }
-}
-
-
-@implementation SEGReachability
-
-@synthesize reachabilityRef;
-@synthesize reachabilitySerialQueue;
-
-@synthesize reachableOnWWAN;
-
-@synthesize reachableBlock;
-@synthesize unreachableBlock;
-
-@synthesize reachabilityObject;
-
-#pragma mark - Class Constructor Methods
-
-+ (SEGReachability *)reachabilityWithHostName:(NSString *)hostname
-{
- return [SEGReachability reachabilityWithHostname:hostname];
-}
-
-+ (SEGReachability *)reachabilityWithHostname:(NSString *)hostname
-{
- SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithName(NULL, [hostname UTF8String]);
- if (ref) {
- id reachability = [[self alloc] initWithReachabilityRef:ref];
- CFRelease(ref);
-
-#if __has_feature(objc_arc)
- return reachability;
-#else
- return [reachability autorelease];
-#endif
- }
-
- return nil;
-}
-
-+ (SEGReachability *)reachabilityWithAddress:(const struct sockaddr_in *)hostAddress
-{
- SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)hostAddress);
- if (ref) {
- id reachability = [[self alloc] initWithReachabilityRef:ref];
- CFRelease(ref);
-
-#if __has_feature(objc_arc)
- return reachability;
-#else
- return [reachability autorelease];
-#endif
- }
-
- return nil;
-}
-
-+ (SEGReachability *)reachabilityForInternetConnection
-{
- struct sockaddr_in zeroAddress;
- bzero(&zeroAddress, sizeof(zeroAddress));
- zeroAddress.sin_len = sizeof(zeroAddress);
- zeroAddress.sin_family = AF_INET;
-
- return [self reachabilityWithAddress:&zeroAddress];
-}
-
-+ (SEGReachability *)reachabilityForLocalWiFi
-{
- struct sockaddr_in localWifiAddress;
- bzero(&localWifiAddress, sizeof(localWifiAddress));
- localWifiAddress.sin_len = sizeof(localWifiAddress);
- localWifiAddress.sin_family = AF_INET;
- // IN_LINKLOCALNETNUM is defined in as 169.254.0.0
- localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM);
-
- return [self reachabilityWithAddress:&localWifiAddress];
-}
-
-
-// Initialization methods
-
-- (SEGReachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref
-{
- self = [super init];
- if (self != nil) {
- self.reachableOnWWAN = YES;
- self.reachabilityRef = ref;
- CFRetain(self.reachabilityRef);
- }
-
- return self;
-}
-
-- (void)dealloc
-{
- [self stopNotifier];
-
- if (self.reachabilityRef) {
- CFRelease(self.reachabilityRef);
- self.reachabilityRef = nil;
- }
-
- self.reachableBlock = nil;
- self.unreachableBlock = nil;
-
-#if !(__has_feature(objc_arc))
- [super dealloc];
-#endif
-}
-
-#pragma mark - Notifier Methods
-
-// Notifier
-// NOTE: This uses GCD to trigger the blocks - they *WILL NOT* be called on THE MAIN THREAD
-// - In other words DO NOT DO ANY UI UPDATES IN THE BLOCKS.
-// INSTEAD USE dispatch_async(dispatch_get_main_queue(), ^{UISTUFF}) (or dispatch_sync if you want)
-
-- (BOOL)startNotifier
-{
- SCNetworkReachabilityContext context = {0, NULL, NULL, NULL, NULL};
-
- // this should do a retain on ourself, so as long as we're in notifier mode we shouldn't disappear out from under ourselves
- // woah
- self.reachabilityObject = self;
-
-
- // First, we need to create a serial queue.
- // We allocate this once for the lifetime of the notifier.
- self.reachabilitySerialQueue = dispatch_queue_create("com.tonymillion.reachability", NULL);
- if (!self.reachabilitySerialQueue) {
- return NO;
- }
-
-#if __has_feature(objc_arc)
- context.info = (__bridge void *)self;
-#else
- context.info = (void *)self;
-#endif
-
- if (!SCNetworkReachabilitySetCallback(self.reachabilityRef, TMReachabilityCallback, &context)) {
-#ifdef DEBUG
- NSLog(@"SCNetworkReachabilitySetCallback() failed: %s", SCErrorString(SCError()));
-#endif
-
- // Clear out the dispatch queue
- if (self.reachabilitySerialQueue) {
-#if NEEDS_DISPATCH_RETAIN_RELEASE
- dispatch_release(self.reachabilitySerialQueue);
-#endif
- self.reachabilitySerialQueue = nil;
- }
-
- self.reachabilityObject = nil;
-
- return NO;
- }
-
- // Set it as our reachability queue, which will retain the queue
- if (!SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, self.reachabilitySerialQueue)) {
-#ifdef DEBUG
- NSLog(@"SCNetworkReachabilitySetDispatchQueue() failed: %s", SCErrorString(SCError()));
-#endif
-
- // UH OH - FAILURE!
-
- // First stop, any callbacks!
- SCNetworkReachabilitySetCallback(self.reachabilityRef, NULL, NULL);
-
- // Then clear out the dispatch queue.
- if (self.reachabilitySerialQueue) {
-#if NEEDS_DISPATCH_RETAIN_RELEASE
- dispatch_release(self.reachabilitySerialQueue);
-#endif
- self.reachabilitySerialQueue = nil;
- }
-
- self.reachabilityObject = nil;
-
- return NO;
- }
-
- return YES;
-}
-
-- (void)stopNotifier
-{
- // First stop, any callbacks!
- SCNetworkReachabilitySetCallback(self.reachabilityRef, NULL, NULL);
-
- // Unregister target from the GCD serial dispatch queue.
- SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, NULL);
-
- if (self.reachabilitySerialQueue) {
-#if NEEDS_DISPATCH_RETAIN_RELEASE
- dispatch_release(self.reachabilitySerialQueue);
-#endif
- self.reachabilitySerialQueue = nil;
- }
-
- self.reachabilityObject = nil;
-}
-
-#pragma mark - reachability tests
-
-// This is for the case where you flick the airplane mode;
-// you end up getting something like this:
-//SEGReachability: WR ct-----
-//SEGReachability: -- -------
-//SEGReachability: WR ct-----
-//SEGReachability: -- -------
-// We treat this as 4 UNREACHABLE triggers - really apple should do better than this
-
-#define testcase (kSCNetworkReachabilityFlagsConnectionRequired | kSCNetworkReachabilityFlagsTransientConnection)
-
-- (BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags
-{
- BOOL connectionUP = YES;
-
- if (!(flags & kSCNetworkReachabilityFlagsReachable))
- connectionUP = NO;
-
- if ((flags & testcase) == testcase)
- connectionUP = NO;
-
-#if TARGET_OS_IPHONE
- if (flags & kSCNetworkReachabilityFlagsIsWWAN) {
- // We're on 3G.
- if (!self.reachableOnWWAN) {
- // We don't want to connect when on 3G.
- connectionUP = NO;
- }
- }
-#endif
-
- return connectionUP;
-}
-
-- (BOOL)isReachable
-{
- SCNetworkReachabilityFlags flags;
-
- if (!SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags))
- return NO;
-
- return [self isReachableWithFlags:flags];
-}
-
-- (BOOL)isReachableViaWWAN
-{
-#if TARGET_OS_IPHONE
-
- SCNetworkReachabilityFlags flags = 0;
-
- if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
- // Check we're REACHABLE
- if (flags & kSCNetworkReachabilityFlagsReachable) {
- // Now, check we're on WWAN
- if (flags & kSCNetworkReachabilityFlagsIsWWAN) {
- return YES;
- }
- }
- }
-#endif
-
- return NO;
-}
-
-- (BOOL)isReachableViaWiFi
-{
- SCNetworkReachabilityFlags flags = 0;
-
- if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
- // Check we're reachable
- if ((flags & kSCNetworkReachabilityFlagsReachable)) {
-#if TARGET_OS_IPHONE
- // Check we're NOT on WWAN
- if ((flags & kSCNetworkReachabilityFlagsIsWWAN)) {
- return NO;
- }
-#endif
- return YES;
- }
- }
-
- return NO;
-}
-
-
-// WWAN may be available, but not active until a connection has been established.
-// WiFi may require a connection for VPN on Demand.
-- (BOOL)isConnectionRequired
-{
- return [self connectionRequired];
-}
-
-- (BOOL)connectionRequired
-{
- SCNetworkReachabilityFlags flags;
-
- if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
- return (flags & kSCNetworkReachabilityFlagsConnectionRequired);
- }
-
- return NO;
-}
-
-// Dynamic, on demand connection?
-- (BOOL)isConnectionOnDemand
-{
- SCNetworkReachabilityFlags flags;
-
- if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
- return ((flags & kSCNetworkReachabilityFlagsConnectionRequired) &&
- (flags & (kSCNetworkReachabilityFlagsConnectionOnTraffic | kSCNetworkReachabilityFlagsConnectionOnDemand)));
- }
-
- return NO;
-}
-
-// Is user intervention required?
-- (BOOL)isInterventionRequired
-{
- SCNetworkReachabilityFlags flags;
-
- if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
- return ((flags & kSCNetworkReachabilityFlagsConnectionRequired) &&
- (flags & kSCNetworkReachabilityFlagsInterventionRequired));
- }
-
- return NO;
-}
-
-
-#pragma mark - reachability status stuff
-
-- (SEGNetworkStatus)currentReachabilityStatus
-{
- if ([self isReachable]) {
- if ([self isReachableViaWiFi])
- return SEGReachableViaWiFi;
-
-#if TARGET_OS_IPHONE
- return SEGReachableViaWWAN;
-#endif
- }
-
- return SEGNotReachable;
-}
-
-- (SCNetworkReachabilityFlags)reachabilityFlags
-{
- SCNetworkReachabilityFlags flags = 0;
-
- if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
- return flags;
- }
-
- return 0;
-}
-
-- (NSString *)currentReachabilityString
-{
- SEGNetworkStatus temp = [self currentReachabilityStatus];
-
- if (temp == reachableOnWWAN) {
- // Updated for the fact that we have CDMA phones now!
- return NSLocalizedString(@"Cellular", @"");
- }
- if (temp == SEGReachableViaWiFi) {
- return NSLocalizedString(@"WiFi", @"");
- }
-
- return NSLocalizedString(@"No Connection", @"");
-}
-
-- (NSString *)currentReachabilityFlags
-{
- return reachabilityFlags([self reachabilityFlags]);
-}
-
-#pragma mark - Callback function calls this method
-
-- (void)reachabilityChanged:(SCNetworkReachabilityFlags)flags
-{
- if ([self isReachableWithFlags:flags]) {
- if (self.reachableBlock) {
- self.reachableBlock(self);
- }
- } else {
- if (self.unreachableBlock) {
- self.unreachableBlock(self);
- }
- }
-
- // this makes sure the change notification happens on the MAIN THREAD
- dispatch_async(dispatch_get_main_queue(), ^{
- [[NSNotificationCenter defaultCenter] postNotificationName:kSEGReachabilityChangedNotification
- object:self];
- });
-}
-
-#pragma mark - Debug Description
-
-- (NSString *) description
-{
- NSString *description = [NSString stringWithFormat:@"<%@: %p (%@)>",
- NSStringFromClass([self class]), self, [self currentReachabilityFlags]];
- return description;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGScreenPayload.h b/Pods/Analytics/Segment/Classes/SEGScreenPayload.h
deleted file mode 100644
index 8ffb5ebf7c..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGScreenPayload.h
+++ /dev/null
@@ -1,24 +0,0 @@
-@import Foundation;
-#import "SEGPayload.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-
-NS_SWIFT_NAME(ScreenPayload)
-@interface SEGScreenPayload : SEGPayload
-
-@property (nonatomic, readonly) NSString *name;
-
-@property (nonatomic, readonly, nullable) NSString *category;
-
-@property (nonatomic, readonly, nullable) NSDictionary *properties;
-
-- (instancetype)initWithName:(NSString *)name
- category:(NSString *)category
- properties:(NSDictionary *_Nullable)properties
- context:(NSDictionary *)context
- integrations:(NSDictionary *)integrations;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGScreenPayload.m b/Pods/Analytics/Segment/Classes/SEGScreenPayload.m
deleted file mode 100644
index 402898b3dd..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGScreenPayload.m
+++ /dev/null
@@ -1,20 +0,0 @@
-#import "SEGScreenPayload.h"
-
-
-@implementation SEGScreenPayload
-
-- (instancetype)initWithName:(NSString *)name
- category:(NSString *)category
- properties:(NSDictionary *)properties
- context:(NSDictionary *)context
- integrations:(NSDictionary *)integrations
-{
- if (self = [super initWithContext:context integrations:integrations]) {
- _name = [name copy];
- _category = [category copy];
- _properties = [properties copy];
- }
- return self;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGScreenReporting.h b/Pods/Analytics/Segment/Classes/SEGScreenReporting.h
deleted file mode 100644
index ffe7038b01..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGScreenReporting.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#if TARGET_OS_IPHONE
-@import UIKit;
-#elif TARGET_OS_OSX
-@import Cocoa;
-#endif
-
-#import "SEGSerializableValue.h"
-
-/** Implement this protocol to override automatic screen reporting
- */
-
-NS_ASSUME_NONNULL_BEGIN
-
-@protocol SEGScreenReporting
-@optional
-#if TARGET_OS_IPHONE
-- (void)seg_trackScreen:(UIViewController*)screen name:(NSString*)name;
-@property (readonly, nullable) UIViewController *seg_mainViewController;
-#elif TARGET_OS_OSX
-- (void)seg_trackScreen:(NSViewController*)screen name:(NSString*)name;
-@property (readonly, nullable) NSViewController *seg_mainViewController;
-#endif
-@end
-
-NS_ASSUME_NONNULL_END
-
-
diff --git a/Pods/Analytics/Segment/Classes/SEGSegmentIntegration.h b/Pods/Analytics/Segment/Classes/SEGSegmentIntegration.h
deleted file mode 100644
index 1dbd89b3eb..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGSegmentIntegration.h
+++ /dev/null
@@ -1,29 +0,0 @@
-@import Foundation;
-#import "SEGIntegration.h"
-#import "SEGHTTPClient.h"
-#import "SEGStorage.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-extern NSString *const kSEGSegmentDestinationName;
-
-extern NSString *const SEGSegmentDidSendRequestNotification;
-extern NSString *const SEGSegmentRequestDidSucceedNotification;
-extern NSString *const SEGSegmentRequestDidFailNotification;
-
-/**
- * Filenames of "Application Support" files where essential data is stored.
- */
-extern NSString *const kSEGUserIdFilename;
-extern NSString *const kSEGQueueFilename;
-extern NSString *const kSEGTraitsFilename;
-
-
-NS_SWIFT_NAME(SegmentIntegration)
-@interface SEGSegmentIntegration : NSObject
-
-- (id)initWithAnalytics:(SEGAnalytics *)analytics httpClient:(SEGHTTPClient *)httpClient fileStorage:(id)fileStorage userDefaultsStorage:(id)userDefaultsStorage;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGSegmentIntegration.m b/Pods/Analytics/Segment/Classes/SEGSegmentIntegration.m
deleted file mode 100644
index 4e11bb0afd..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGSegmentIntegration.m
+++ /dev/null
@@ -1,481 +0,0 @@
-#include
-
-#import "SEGAnalytics.h"
-#import "SEGUtils.h"
-#import "SEGSegmentIntegration.h"
-#import "SEGReachability.h"
-#import "SEGHTTPClient.h"
-#import "SEGStorage.h"
-#import "SEGMacros.h"
-#import "SEGState.h"
-
-#if TARGET_OS_IPHONE
-@import UIKit;
-#endif
-
-NSString *const kSEGSegmentDestinationName = @"Segment.io";
-
-NSString *const SEGSegmentDidSendRequestNotification = @"SegmentDidSendRequest";
-NSString *const SEGSegmentRequestDidSucceedNotification = @"SegmentRequestDidSucceed";
-NSString *const SEGSegmentRequestDidFailNotification = @"SegmentRequestDidFail";
-
-NSString *const SEGUserIdKey = @"SEGUserId";
-NSString *const SEGQueueKey = @"SEGQueue";
-NSString *const SEGTraitsKey = @"SEGTraits";
-
-NSString *const kSEGUserIdFilename = @"segmentio.userId";
-NSString *const kSEGQueueFilename = @"segmentio.queue.plist";
-NSString *const kSEGTraitsFilename = @"segmentio.traits.plist";
-
-// Equiv to UIBackgroundTaskInvalid.
-NSUInteger const kSEGBackgroundTaskInvalid = 0;
-
-@interface SEGSegmentIntegration ()
-
-@property (nonatomic, strong) NSMutableArray *queue;
-@property (nonatomic, strong) NSURLSessionUploadTask *batchRequest;
-@property (nonatomic, strong) SEGReachability *reachability;
-@property (nonatomic, strong) NSTimer *flushTimer;
-@property (nonatomic, strong) dispatch_queue_t serialQueue;
-@property (nonatomic, strong) dispatch_queue_t backgroundTaskQueue;
-@property (nonatomic, strong) NSDictionary *traits;
-@property (nonatomic, assign) SEGAnalytics *analytics;
-@property (nonatomic, assign) SEGAnalyticsConfiguration *configuration;
-@property (atomic, copy) NSDictionary *referrer;
-@property (nonatomic, copy) NSString *userId;
-@property (nonatomic, strong) SEGHTTPClient *httpClient;
-@property (nonatomic, strong) id fileStorage;
-@property (nonatomic, strong) id userDefaultsStorage;
-
-#if TARGET_OS_IPHONE
-@property (nonatomic, assign) UIBackgroundTaskIdentifier flushTaskID;
-#else
-@property (nonatomic, assign) NSUInteger flushTaskID;
-#endif
-
-@end
-
-@interface SEGAnalytics ()
-@property (nonatomic, strong, readonly) SEGAnalyticsConfiguration *oneTimeConfiguration;
-@end
-
-@implementation SEGSegmentIntegration
-
-- (id)initWithAnalytics:(SEGAnalytics *)analytics httpClient:(SEGHTTPClient *)httpClient fileStorage:(id)fileStorage userDefaultsStorage:(id)userDefaultsStorage;
-{
- if (self = [super init]) {
- self.analytics = analytics;
- self.configuration = analytics.oneTimeConfiguration;
- self.httpClient = httpClient;
- self.httpClient.httpSessionDelegate = analytics.oneTimeConfiguration.httpSessionDelegate;
- self.fileStorage = fileStorage;
- self.userDefaultsStorage = userDefaultsStorage;
- self.reachability = [SEGReachability reachabilityWithHostname:@"google.com"];
- [self.reachability startNotifier];
- self.serialQueue = seg_dispatch_queue_create_specific("io.segment.analytics.segmentio", DISPATCH_QUEUE_SERIAL);
- self.backgroundTaskQueue = seg_dispatch_queue_create_specific("io.segment.analytics.backgroundTask", DISPATCH_QUEUE_SERIAL);
-#if TARGET_OS_IPHONE
- self.flushTaskID = UIBackgroundTaskInvalid;
-#else
- self.flushTaskID = 0; // the actual value of UIBackgroundTaskInvalid
-#endif
-
- // load traits & user from disk.
- [self loadUserId];
- [self loadTraits];
-
- [self dispatchBackground:^{
- // Check for previous queue data in NSUserDefaults and remove if present.
- if ([[NSUserDefaults standardUserDefaults] objectForKey:SEGQueueKey]) {
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:SEGQueueKey];
- }
-#if !TARGET_OS_TV
- // Check for previous track data in NSUserDefaults and remove if present (Traits still exist in NSUserDefaults on tvOS)
- if ([[NSUserDefaults standardUserDefaults] objectForKey:SEGTraitsKey]) {
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:SEGTraitsKey];
- }
-#endif
- }];
-
- self.flushTimer = [NSTimer timerWithTimeInterval:self.configuration.flushInterval
- target:self
- selector:@selector(flush)
- userInfo:nil
- repeats:YES];
-
- [NSRunLoop.mainRunLoop addTimer:self.flushTimer
- forMode:NSDefaultRunLoopMode];
- }
- return self;
-}
-
-- (void)dispatchBackground:(void (^)(void))block
-{
- seg_dispatch_specific_async(_serialQueue, block);
-}
-
-- (void)dispatchBackgroundAndWait:(void (^)(void))block
-{
- seg_dispatch_specific_sync(_serialQueue, block);
-}
-
-- (void)beginBackgroundTask
-{
- [self endBackgroundTask];
-
- seg_dispatch_specific_sync(_backgroundTaskQueue, ^{
-
- id application = [self.analytics oneTimeConfiguration].application;
- if (application && [application respondsToSelector:@selector(seg_beginBackgroundTaskWithName:expirationHandler:)]) {
- self.flushTaskID = [application seg_beginBackgroundTaskWithName:@"Segmentio.Flush"
- expirationHandler:^{
- [self endBackgroundTask];
- }];
- }
- });
-}
-
-- (void)endBackgroundTask
-{
- // endBackgroundTask and beginBackgroundTask can be called from main thread
- // We should not dispatch to the same queue we use to flush events because it can cause deadlock
- // inside @synchronized(self) block for SEGIntegrationsManager as both events queue and main queue
- // attempt to call forwardSelector:arguments:options:
- // See https://github.com/segmentio/analytics-ios/issues/683
- seg_dispatch_specific_sync(_backgroundTaskQueue, ^{
- if (self.flushTaskID != kSEGBackgroundTaskInvalid) {
- id application = [self.analytics oneTimeConfiguration].application;
- if (application && [application respondsToSelector:@selector(seg_endBackgroundTask:)]) {
- [application seg_endBackgroundTask:self.flushTaskID];
- }
-
- self.flushTaskID = kSEGBackgroundTaskInvalid;
- }
- });
-}
-
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"<%p:%@, %@>", self, self.class, self.configuration.writeKey];
-}
-
-- (NSString *)userId
-{
- return [SEGState sharedInstance].userInfo.userId;
-}
-
-- (void)setUserId:(NSString *)userId
-{
- [self dispatchBackground:^{
- [SEGState sharedInstance].userInfo.userId = userId;
-#if TARGET_OS_TV
- [self.userDefaultsStorage setString:userId forKey:SEGUserIdKey];
-#else
- [self.fileStorage setString:userId forKey:kSEGUserIdFilename];
-#endif
- }];
-}
-
-- (NSDictionary *)traits
-{
- return [SEGState sharedInstance].userInfo.traits;
-}
-
-- (void)setTraits:(NSDictionary *)traits
-{
- [self dispatchBackground:^{
- [SEGState sharedInstance].userInfo.traits = traits;
-#if TARGET_OS_TV
- [self.userDefaultsStorage setDictionary:[self.traits copy] forKey:SEGTraitsKey];
-#else
- [self.fileStorage setDictionary:[self.traits copy] forKey:kSEGTraitsFilename];
-#endif
- }];
-}
-
-#pragma mark - Analytics API
-
-- (void)identify:(SEGIdentifyPayload *)payload
-{
- [self dispatchBackground:^{
- self.userId = payload.userId;
- self.traits = payload.traits;
- }];
-
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.traits forKey:@"traits"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
- [self enqueueAction:@"identify" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-- (void)track:(SEGTrackPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.event forKey:@"event"];
- [dictionary setValue:payload.properties forKey:@"properties"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
- [self enqueueAction:@"track" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-- (void)screen:(SEGScreenPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.name forKey:@"name"];
- [dictionary setValue:payload.properties forKey:@"properties"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
-
- [self enqueueAction:@"screen" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-- (void)group:(SEGGroupPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.groupId forKey:@"groupId"];
- [dictionary setValue:payload.traits forKey:@"traits"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
-
- [self enqueueAction:@"group" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-- (void)alias:(SEGAliasPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.theNewId forKey:@"userId"];
- [dictionary setValue:self.userId ?: [self.analytics getAnonymousId] forKey:@"previousId"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
-
- [self enqueueAction:@"alias" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-#pragma mark - Queueing
-
-// Merges user provided integration options with bundled integrations.
-- (NSDictionary *)integrationsDictionary:(NSDictionary *)integrations
-{
- NSMutableDictionary *dict = [integrations ?: @{} mutableCopy];
- for (NSString *integration in self.analytics.bundledIntegrations) {
- // Don't record Segment.io in the dictionary. It is always enabled.
- if ([integration isEqualToString:kSEGSegmentDestinationName]) {
- continue;
- }
- dict[integration] = @NO;
- }
- return [dict copy];
-}
-
-- (void)enqueueAction:(NSString *)action dictionary:(NSMutableDictionary *)payload context:(NSDictionary *)context integrations:(NSDictionary *)integrations
-{
- // attach these parts of the payload outside since they are all synchronous
- payload[@"type"] = action;
-
- [self dispatchBackground:^{
- // attach userId and anonymousId inside the dispatch_async in case
- // they've changed (see identify function)
-
- // Do not override the userId for an 'alias' action. This value is set in [alias:] already.
- if (![action isEqualToString:@"alias"]) {
- [payload setValue:[SEGState sharedInstance].userInfo.userId forKey:@"userId"];
- }
- [payload setValue:[self.analytics getAnonymousId] forKey:@"anonymousId"];
-
- [payload setValue:[self integrationsDictionary:integrations] forKey:@"integrations"];
-
- [payload setValue:[context copy] forKey:@"context"];
-
- SEGLog(@"%@ Enqueueing action: %@", self, payload);
-
- NSDictionary *queuePayload = [payload copy];
-
- if (self.configuration.experimental.rawSegmentModificationBlock != nil) {
- NSDictionary *tempPayload = self.configuration.experimental.rawSegmentModificationBlock(queuePayload);
- if (tempPayload == nil) {
- SEGLog(@"rawSegmentModificationBlock cannot be used to drop events!");
- } else {
- // prevent anything else from modifying it at this point.
- queuePayload = [tempPayload copy];
- }
- }
- [self queuePayload:queuePayload];
- }];
-}
-
-- (void)queuePayload:(NSDictionary *)payload
-{
- @try {
- SEGLog(@"Queue is at max capacity (%tu), removing oldest payload.", self.queue.count);
- // Trim the queue to maxQueueSize - 1 before we add a new element.
- trimQueue(self.queue, self.analytics.oneTimeConfiguration.maxQueueSize - 1);
- [self.queue addObject:payload];
- [self persistQueue];
- [self flushQueueByLength];
- }
- @catch (NSException *exception) {
- SEGLog(@"%@ Error writing payload: %@", self, exception);
- }
-}
-
-- (void)flush
-{
- [self flushWithMaxSize:self.maxBatchSize];
-}
-
-- (void)flushWithMaxSize:(NSUInteger)maxBatchSize
-{
- void (^startBatch)(void) = ^{
- NSArray *batch;
- if ([self.queue count] >= maxBatchSize) {
- batch = [self.queue subarrayWithRange:NSMakeRange(0, maxBatchSize)];
- } else {
- batch = [NSArray arrayWithArray:self.queue];
- }
- [self sendData:batch];
- };
-
- [self dispatchBackground:^{
- if ([self.queue count] == 0) {
- SEGLog(@"%@ No queued API calls to flush.", self);
- [self endBackgroundTask];
- return;
- }
- if (self.batchRequest != nil) {
- SEGLog(@"%@ API request already in progress, not flushing again.", self);
- return;
- }
- // here
- startBatch();
- }];
-}
-
-- (void)flushQueueByLength
-{
- [self dispatchBackground:^{
- SEGLog(@"%@ Length is %lu.", self, (unsigned long)self.queue.count);
-
- if (self.batchRequest == nil && [self.queue count] >= self.configuration.flushAt) {
- [self flush];
- }
- }];
-}
-
-- (void)reset
-{
- [self dispatchBackgroundAndWait:^{
-#if TARGET_OS_TV
- [self.userDefaultsStorage removeKey:SEGUserIdKey];
- [self.userDefaultsStorage removeKey:SEGTraitsKey];
-#else
- [self.fileStorage removeKey:kSEGUserIdFilename];
- [self.fileStorage removeKey:kSEGTraitsFilename];
-#endif
- self.userId = nil;
- self.traits = [NSMutableDictionary dictionary];
- }];
-}
-
-- (void)notifyForName:(NSString *)name userInfo:(id)userInfo
-{
- dispatch_async(dispatch_get_main_queue(), ^{
- [[NSNotificationCenter defaultCenter] postNotificationName:name object:userInfo];
- SEGLog(@"sent notification %@", name);
- });
-}
-
-- (void)sendData:(NSArray *)batch
-{
- NSMutableDictionary *payload = [[NSMutableDictionary alloc] init];
- [payload setObject:iso8601FormattedString([NSDate date]) forKey:@"sentAt"];
- [payload setObject:_configuration.writeKey forKey:@"writeKey"];
- [payload setObject:batch forKey:@"batch"];
-
- SEGLog(@"%@ Flushing %lu of %lu queued API calls.", self, (unsigned long)batch.count, (unsigned long)self.queue.count);
- SEGLog(@"Flushing batch %@.", payload);
-
- self.batchRequest = [self.httpClient upload:payload forWriteKey:self.configuration.writeKey completionHandler:^(BOOL retry) {
- void (^completion)(void) = ^{
- if (retry) {
- [self notifyForName:SEGSegmentRequestDidFailNotification userInfo:batch];
- self.batchRequest = nil;
- [self endBackgroundTask];
- return;
- }
-
- [self.queue removeObjectsInArray:batch];
- [self persistQueue];
- [self notifyForName:SEGSegmentRequestDidSucceedNotification userInfo:batch];
- self.batchRequest = nil;
- [self endBackgroundTask];
- };
-
- [self dispatchBackground:completion];
- }];
-
- [self notifyForName:SEGSegmentDidSendRequestNotification userInfo:batch];
-}
-
-- (void)applicationDidEnterBackground
-{
- [self beginBackgroundTask];
- // We are gonna try to flush as much as we reasonably can when we enter background
- // since there is a chance that the user will never launch the app again.
- [self flush];
-}
-
-- (void)applicationWillTerminate
-{
- [self dispatchBackgroundAndWait:^{
- if (self.queue.count)
- [self persistQueue];
- }];
-}
-
-#pragma mark - Private
-
-- (NSMutableArray *)queue
-{
- if (!_queue) {
- _queue = [[self.fileStorage arrayForKey:kSEGQueueFilename] ?: @[] mutableCopy];
- }
-
- return _queue;
-}
-
-- (void)loadTraits
-{
- if (![SEGState sharedInstance].userInfo.traits) {
- NSDictionary *traits = nil;
-#if TARGET_OS_TV
- traits = [[self.userDefaultsStorage dictionaryForKey:SEGTraitsKey] ?: @{} mutableCopy];
-#else
- traits = [[self.fileStorage dictionaryForKey:kSEGTraitsFilename] ?: @{} mutableCopy];
-#endif
- [SEGState sharedInstance].userInfo.traits = traits;
- }
-}
-
-- (NSUInteger)maxBatchSize
-{
- return 100;
-}
-
-- (void)loadUserId
-{
- NSString *result = nil;
-#if TARGET_OS_TV
- result = [[NSUserDefaults standardUserDefaults] valueForKey:SEGUserIdKey];
-#else
- result = [self.fileStorage stringForKey:kSEGUserIdFilename];
-#endif
- [SEGState sharedInstance].userInfo.userId = result;
-}
-
-- (void)persistQueue
-{
- [self.fileStorage setArray:[self.queue copy] forKey:kSEGQueueFilename];
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGSegmentIntegrationFactory.h b/Pods/Analytics/Segment/Classes/SEGSegmentIntegrationFactory.h
deleted file mode 100644
index 06c1c0dc0b..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGSegmentIntegrationFactory.h
+++ /dev/null
@@ -1,20 +0,0 @@
-@import Foundation;
-#import "SEGIntegrationFactory.h"
-#import "SEGHTTPClient.h"
-#import "SEGStorage.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-
-NS_SWIFT_NAME(SegmentIntegrationFactory)
-@interface SEGSegmentIntegrationFactory : NSObject
-
-@property (nonatomic, strong) SEGHTTPClient *client;
-@property (nonatomic, strong) id userDefaultsStorage;
-@property (nonatomic, strong) id fileStorage;
-
-- (instancetype)initWithHTTPClient:(SEGHTTPClient *)client fileStorage:(id)fileStorage userDefaultsStorage:(id)userDefaultsStorage;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGSegmentIntegrationFactory.m b/Pods/Analytics/Segment/Classes/SEGSegmentIntegrationFactory.m
deleted file mode 100644
index 435efa44b9..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGSegmentIntegrationFactory.m
+++ /dev/null
@@ -1,27 +0,0 @@
-#import "SEGSegmentIntegrationFactory.h"
-#import "SEGSegmentIntegration.h"
-
-
-@implementation SEGSegmentIntegrationFactory
-
-- (id)initWithHTTPClient:(SEGHTTPClient *)client fileStorage:(id)fileStorage userDefaultsStorage:(id)userDefaultsStorage
-{
- if (self = [super init]) {
- _client = client;
- _userDefaultsStorage = userDefaultsStorage;
- _fileStorage = fileStorage;
- }
- return self;
-}
-
-- (id)createWithSettings:(NSDictionary *)settings forAnalytics:(SEGAnalytics *)analytics
-{
- return [[SEGSegmentIntegration alloc] initWithAnalytics:analytics httpClient:self.client fileStorage:self.fileStorage userDefaultsStorage:self.userDefaultsStorage];
-}
-
-- (NSString *)key
-{
- return kSEGSegmentDestinationName;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGSerializableValue.h b/Pods/Analytics/Segment/Classes/SEGSerializableValue.h
deleted file mode 100644
index e9802cc705..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGSerializableValue.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// SEGSerializableValue.h
-// Analytics
-//
-// Created by Tony Xiao on 11/29/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-
-/*
- Acceptable dictionary values are
- NSString (String);
- NSNumber (Int, Float, Bool);
- NSNull
- NSDate => ISO8601 String
- NSURL => absoluteURL String
- NSArray of the above
- NSDictionary of the above
- */
-#define SERIALIZABLE_DICT NSDictionary *
-
-/*
- Acceptable dictionary values are
- NSString (String);
- NSNumber (Int, Float, Bool);
- NSNull
- NSArray of the above
- NSDictionary of the above
- */
-#define JSON_DICT NSDictionary *
diff --git a/Pods/Analytics/Segment/Classes/SEGStorage.h b/Pods/Analytics/Segment/Classes/SEGStorage.h
deleted file mode 100644
index 61cc48fb9c..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGStorage.h
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// SEGStorage.h
-// Analytics
-//
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-#import "SEGCrypto.h"
-
-@protocol SEGStorage
-
-@property (nonatomic, strong, nullable) id crypto;
-
-- (void)removeKey:(NSString *_Nonnull)key;
-- (void)resetAll;
-
-- (void)setData:(NSData *_Nullable)data forKey:(NSString *_Nonnull)key;
-- (NSData *_Nullable)dataForKey:(NSString *_Nonnull)key;
-
-- (void)setDictionary:(NSDictionary *_Nullable)dictionary forKey:(NSString *_Nonnull)key;
-- (NSDictionary *_Nullable)dictionaryForKey:(NSString *_Nonnull)key;
-
-- (void)setArray:(NSArray *_Nullable)array forKey:(NSString *_Nonnull)key;
-- (NSArray *_Nullable)arrayForKey:(NSString *_Nonnull)key;
-
-- (void)setString:(NSString *_Nullable)string forKey:(NSString *_Nonnull)key;
-- (NSString *_Nullable)stringForKey:(NSString *_Nonnull)key;
-
-// Number and Booleans are intentionally omitted at the moment because they are not needed
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGTrackPayload.h b/Pods/Analytics/Segment/Classes/SEGTrackPayload.h
deleted file mode 100644
index b668d4f023..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGTrackPayload.h
+++ /dev/null
@@ -1,21 +0,0 @@
-@import Foundation;
-#import "SEGPayload.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-
-NS_SWIFT_NAME(TrackPayload)
-@interface SEGTrackPayload : SEGPayload
-
-@property (nonatomic, readonly) NSString *event;
-
-@property (nonatomic, readonly, nullable) NSDictionary *properties;
-
-- (instancetype)initWithEvent:(NSString *)event
- properties:(NSDictionary *_Nullable)properties
- context:(NSDictionary *)context
- integrations:(NSDictionary *)integrations;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Classes/SEGTrackPayload.m b/Pods/Analytics/Segment/Classes/SEGTrackPayload.m
deleted file mode 100644
index 3813b2b531..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGTrackPayload.m
+++ /dev/null
@@ -1,19 +0,0 @@
-#import "SEGTrackPayload.h"
-
-
-@implementation SEGTrackPayload
-
-
-- (instancetype)initWithEvent:(NSString *)event
- properties:(NSDictionary *)properties
- context:(NSDictionary *)context
- integrations:(NSDictionary *)integrations
-{
- if (self = [super initWithContext:context integrations:integrations]) {
- _event = [event copy];
- _properties = [properties copy];
- }
- return self;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/SEGWebhookIntegration.h b/Pods/Analytics/Segment/Classes/SEGWebhookIntegration.h
deleted file mode 100644
index 4e528ea4ee..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGWebhookIntegration.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#import "SEGIntegration.h"
-#import "SEGIntegrationFactory.h"
-#import "SEGHTTPClient.h"
-
-NS_ASSUME_NONNULL_BEGIN
-NS_SWIFT_NAME(WebhookIntegrationFactory)
-@interface SEGWebhookIntegrationFactory : NSObject
-
-@property (nonatomic, copy) NSString *name;
-@property (nonatomic, copy) NSString *webhookUrl;
-
-- (instancetype)initWithName:(NSString *)name webhookUrl:(NSString *)webhookUrl;
-
-@end
-
-NS_ASSUME_NONNULL_END
\ No newline at end of file
diff --git a/Pods/Analytics/Segment/Classes/SEGWebhookIntegration.m b/Pods/Analytics/Segment/Classes/SEGWebhookIntegration.m
deleted file mode 100644
index 7a98455d94..0000000000
--- a/Pods/Analytics/Segment/Classes/SEGWebhookIntegration.m
+++ /dev/null
@@ -1,212 +0,0 @@
-@import Foundation;
-#import "SEGWebhookIntegration.h"
-#import "SEGHTTPClient.h"
-#import "SEGState.h"
-#import "SEGAnalyticsUtils.h"
-#import "SEGUtils.h"
-
-NS_ASSUME_NONNULL_BEGIN
-@interface SEGWebhookIntegration : NSObject
-
-@property (nonatomic, strong) SEGHTTPClient *client;
-@property (nonatomic, strong) NSString *webhookUrl;
-@property (nonatomic, strong) NSString *name;
-@property (nonatomic, strong) SEGAnalytics *analytics;
-@property (nonatomic, strong) dispatch_queue_t serialQueue;
-
-- (instancetype)initWithAnalytics:(SEGAnalytics *)analytics httpClient:(SEGHTTPClient *)client webhookUrl:(NSString *)webhookUrl name:(NSString *)name;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-@implementation SEGWebhookIntegration
-
-- (instancetype)initWithAnalytics:(SEGAnalytics *)analytics httpClient:(SEGHTTPClient *)client webhookUrl:(NSString *)webhookUrl name:(NSString *)name {
- if (self = [super init]) {
- _name = name;
- _analytics = analytics;
- _client = client;
- _webhookUrl = webhookUrl;
- _serialQueue = seg_dispatch_queue_create_specific("io.segment.analytics.webhook", DISPATCH_QUEUE_SERIAL);
- }
- return self;
-}
-
-- (void)sendPayloadToWebhook:(NSDictionary *)data {
- NSURLSession *session = self.client.genericSession;
-
- NSURL *url = [NSURL URLWithString:self.webhookUrl];
- NSMutableURLRequest *request = self.client.requestFactory(url);
-
- // This is a workaround for an IOS 8.3 bug that causes Content-Type to be incorrectly set
- [request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
-
- [request setHTTPMethod:@"POST"];
-
- NSError *error = nil;
- NSException *exception = nil;
- NSData *payload = nil;
- @try {
- payload = [NSJSONSerialization dataWithJSONObject:data options:0 error:&error];
- }
- @catch (NSException *exc) {
- exception = exc;
- }
- if (error || exception) {
- SEGLog(@"Error serializing JSON for upload to webhook %@", error);
- return;
- }
-
- NSURLSessionUploadTask *task = [session uploadTaskWithRequest:request fromData:payload completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable error) {
- if (error) {
- // Network error. Retry.
- SEGLog(@"Error uploading request %@.", error);
- return;
- }
-
- NSInteger code = ((NSHTTPURLResponse *)response).statusCode;
- if (code < 300) {
- // 2xx response codes. Don't retry.
- return;
- }
- if (code < 400) {
- // 3xx response codes. Retry.
- SEGLog(@"Server responded with unexpected HTTP code %zd.", code);
- return;
- }
- if (code == 429) {
- // 429 response codes. Retry.
- SEGLog(@"Server limited client with response code %zd.", code);
- return;
- }
- if (code < 500) {
- // non-429 4xx response codes. Don't retry.
- SEGLog(@"Server rejected payload with HTTP code %zd.", code);
- return;
- }
-
- // 5xx response codes. Retry.
- SEGLog(@"Server error with HTTP code %zd.", code);
- }];
- [task resume];
-}
-
-// Merges user provided integration options with bundled integrations.
-- (NSDictionary *)integrationsDictionary:(NSDictionary *)integrations
-{
- NSMutableDictionary *dict = [integrations ?: @{} mutableCopy];
- for (NSString *integration in self.analytics.bundledIntegrations) {
- // Don't record Segment.io in the dictionary. It is always enabled.
- if ([integration isEqualToString:@"Segment.io"]) {
- continue;
- }
- dict[integration] = @NO;
- }
- return [dict copy];
-}
-
-// Code borrowed from SEGSegmentIntegration.enqueueAction
-- (void)enqueue:(NSString *) type dictionary:(NSMutableDictionary *) payload context:(NSDictionary *)context integrations:(NSDictionary *)integrations
-{
- payload[@"type"] = type;
- if (![type isEqualToString:@"alias"]) {
- [payload setValue:[SEGState sharedInstance].userInfo.userId forKey:@"userId"];
- }
- [payload setValue:[self.analytics getAnonymousId] forKey:@"anonymousId"];
- [payload setValue:[self integrationsDictionary:integrations] forKey:@"integrations"];
- [payload setValue:[context copy] forKey:@"context"];
-
- [self dispatchBackground:^{
- SEGLog(@"%@ Enqueueing payload %@ through %@", self, type, self.name);
- NSDictionary *queuePayload = [payload copy];
- [self sendPayloadToWebhook:queuePayload];
- }];
-}
-
-- (void)dispatchBackground:(void (^)(void))block
-{
- seg_dispatch_specific_async(_serialQueue, block);
-}
-
-- (NSString *)userId
-{
- return [SEGState sharedInstance].userInfo.userId;
-}
-
-- (void)identify:(SEGIdentifyPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.traits forKey:@"traits"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
-
- [self enqueue:@"identify" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-- (void)track:(SEGTrackPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.event forKey:@"event"];
- [dictionary setValue:payload.properties forKey:@"properties"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
-
- [self enqueue:@"track" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-- (void)screen:(SEGScreenPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.name forKey:@"name"];
- [dictionary setValue:payload.properties forKey:@"properties"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
-
- [self enqueue:@"screen" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-- (void)group:(SEGGroupPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.groupId forKey:@"groupId"];
- [dictionary setValue:payload.traits forKey:@"traits"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
-
- [self enqueue:@"group" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-- (void)alias:(SEGAliasPayload *)payload
-{
- NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
- [dictionary setValue:payload.theNewId forKey:@"userId"];
- [dictionary setValue:self.userId ?: [self.analytics getAnonymousId] forKey:@"previousId"];
- [dictionary setValue:payload.timestamp forKey:@"timestamp"];
- [dictionary setValue:payload.messageId forKey:@"messageId"];
-
- [self enqueue:@"alias" dictionary:dictionary context:payload.context integrations:payload.integrations];
-}
-
-@end
-
-@implementation SEGWebhookIntegrationFactory
-- (instancetype)initWithName:(NSString *)name webhookUrl:(NSString *)webhookUrl {
- if (self = [super init]) {
- _name = name;
- _webhookUrl = webhookUrl;
- }
- return self;
-}
-
-- (id )createWithSettings:(NSDictionary *)settings forAnalytics:(SEGAnalytics *)analytics {
- SEGHTTPClient *httpClient = [[SEGHTTPClient alloc] initWithRequestFactory:nil];
- return [[SEGWebhookIntegration alloc] initWithAnalytics:analytics httpClient:httpClient webhookUrl:self.webhookUrl name:self.name];
-}
-
-- (NSString *)key {
- return [NSString stringWithFormat:@"webhook_%@", _name];
-}
-
-
-@end
diff --git a/Pods/Analytics/Segment/Classes/Segment.h b/Pods/Analytics/Segment/Classes/Segment.h
deleted file mode 100644
index 341da95bb8..0000000000
--- a/Pods/Analytics/Segment/Classes/Segment.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// Analytics.h
-// Analytics
-//
-// Created by Tony Xiao on 11/28/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-
-//! Project version number for Analytics.
-FOUNDATION_EXPORT double SegmentVersionNumber;
-
-//! Project version string for Analytics.
-FOUNDATION_EXPORT const unsigned char SegmentVersionString[];
-
-#import "SEGAnalytics.h"
-#import "SEGSegmentIntegration.h"
-#import "SEGSegmentIntegrationFactory.h"
-#import "SEGContext.h"
-#import "SEGMiddleware.h"
-#import "SEGScreenReporting.h"
-#import "SEGAnalyticsUtils.h"
-#import "SEGWebhookIntegration.h"
-#import "SEGReachability.h"
diff --git a/Pods/Analytics/Segment/Internal/NSData+SEGGZIP.h b/Pods/Analytics/Segment/Internal/NSData+SEGGZIP.h
deleted file mode 100644
index 2c291977a9..0000000000
--- a/Pods/Analytics/Segment/Internal/NSData+SEGGZIP.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// GZIP.h
-//
-// Version 1.1.1
-//
-// Created by Nick Lockwood on 03/06/2012.
-// Copyright (C) 2012 Charcoal Design
-//
-// Distributed under the permissive zlib License
-// Get the latest version from here:
-//
-// https://github.com/nicklockwood/GZIP
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source distribution.
-//
-
-
-@import Foundation;
-
-extern void *_Nullable seg_libzOpen(void);
-
-
-@interface NSData (SEG_GZIP)
-
-- (nullable NSData *)seg_gzippedData;
-- (BOOL)seg_isGzippedData;
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/NSData+SEGGZIP.m b/Pods/Analytics/Segment/Internal/NSData+SEGGZIP.m
deleted file mode 100644
index 99612903dc..0000000000
--- a/Pods/Analytics/Segment/Internal/NSData+SEGGZIP.m
+++ /dev/null
@@ -1,107 +0,0 @@
-//
-// GZIP.m
-//
-// Version 1.1.1
-//
-// Created by Nick Lockwood on 03/06/2012.
-// Copyright (C) 2012 Charcoal Design
-//
-// Distributed under the permissive zlib License
-// Get the latest version from here:
-//
-// https://github.com/nicklockwood/GZIP
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source distribution.
-//
-
-
-#import "NSData+SEGGZIP.h"
-#import
-#import
-
-
-#pragma clang diagnostic ignored "-Wcast-qual"
-
-void *_Nullable seg_libzOpen()
-{
- static void *libz;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- libz = dlopen("/usr/lib/libz.dylib", RTLD_LAZY);
- });
- return libz;
-}
-
-
-@implementation NSData (SEG_GZIP)
-
-- (NSData *)seg_gzippedDataWithCompressionLevel:(float)level
-{
- if (self.length == 0 || [self seg_isGzippedData]) {
- return self;
- }
-
- void *libz = seg_libzOpen();
- int (*deflateInit2_)(z_streamp, int, int, int, int, int, const char *, int) =
- (int (*)(z_streamp, int, int, int, int, int, const char *, int))dlsym(libz, "deflateInit2_");
- int (*deflate)(z_streamp, int) = (int (*)(z_streamp, int))dlsym(libz, "deflate");
- int (*deflateEnd)(z_streamp) = (int (*)(z_streamp))dlsym(libz, "deflateEnd");
-
- z_stream stream;
- stream.zalloc = Z_NULL;
- stream.zfree = Z_NULL;
- stream.opaque = Z_NULL;
- stream.avail_in = (uint)self.length;
- stream.next_in = (Bytef *)(void *)self.bytes;
- stream.total_out = 0;
- stream.avail_out = 0;
-
- static const NSUInteger ChunkSize = 16384;
-
- NSMutableData *output = nil;
- int compression = (level < 0.0f) ? Z_DEFAULT_COMPRESSION : (int)(roundf(level * 9));
- if (deflateInit2(&stream, compression, Z_DEFLATED, 31, 8, Z_DEFAULT_STRATEGY) == Z_OK) {
- output = [NSMutableData dataWithLength:ChunkSize];
- while (stream.avail_out == 0) {
- if (stream.total_out >= output.length) {
- output.length += ChunkSize;
- }
- stream.next_out = (uint8_t *)output.mutableBytes + stream.total_out;
- stream.avail_out = (uInt)(output.length - stream.total_out);
- deflate(&stream, Z_FINISH);
- }
- deflateEnd(&stream);
- output.length = stream.total_out;
- }
-
- return output;
-}
-
-- (NSData *)seg_gzippedData
-{
- return [self seg_gzippedDataWithCompressionLevel:-1.0f];
-}
-
-- (BOOL)seg_isGzippedData
-{
- const UInt8 *bytes = (const UInt8 *)self.bytes;
- return (self.length >= 2 && bytes[0] == 0x1f && bytes[1] == 0x8b);
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/NSViewController+SEGScreen.h b/Pods/Analytics/Segment/Internal/NSViewController+SEGScreen.h
deleted file mode 100644
index 8d9fdcd3b4..0000000000
--- a/Pods/Analytics/Segment/Internal/NSViewController+SEGScreen.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// NSViewController+SEGScreen.h
-// Analytics
-//
-// Created by Cody Garvin on 7/8/20.
-// Copyright © 2020 Segment. All rights reserved.
-//
-
-#import "SEGSerializableValue.h"
-
-#if TARGET_OS_OSX
-@import Cocoa;
-
-@interface NSViewController (SEGScreen)
-
-+ (void)seg_swizzleViewDidAppear;
-+ (NSViewController *)seg_rootViewControllerFromView:(NSView *)view;
-
-@end
-
-#endif
diff --git a/Pods/Analytics/Segment/Internal/NSViewController+SEGScreen.m b/Pods/Analytics/Segment/Internal/NSViewController+SEGScreen.m
deleted file mode 100644
index 363cad0d40..0000000000
--- a/Pods/Analytics/Segment/Internal/NSViewController+SEGScreen.m
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// NSViewController+SEGScreen.m
-// Analytics
-//
-// Created by Cody Garvin on 7/8/20.
-// Copyright © 2020 Segment. All rights reserved.
-//
-
-#import "NSViewController+SEGScreen.h"
-#import
-#import "SEGAnalytics.h"
-#import "SEGAnalyticsUtils.h"
-#import "SEGScreenReporting.h"
-
-#if TARGET_OS_OSX
-@implementation NSViewController (SEGScreen)
-
-+ (void)seg_swizzleViewDidAppear
-{
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- Class class = [self class];
-
- SEL originalSelector = @selector(viewDidAppear);
- SEL swizzledSelector = @selector(seg_viewDidAppear:);
-
- Method originalMethod = class_getInstanceMethod(class, originalSelector);
- Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
-
- BOOL didAddMethod =
- class_addMethod(class,
- originalSelector,
- method_getImplementation(swizzledMethod),
- method_getTypeEncoding(swizzledMethod));
-
- if (didAddMethod) {
- class_replaceMethod(class,
- swizzledSelector,
- method_getImplementation(originalMethod),
- method_getTypeEncoding(originalMethod));
- } else {
- method_exchangeImplementations(originalMethod, swizzledMethod);
- }
- });
-}
-
-+ (NSViewController *)seg_rootViewControllerFromView:(NSView *)view
-{
- NSViewController *rootViewController = view.window.contentViewController;
-
- if (rootViewController.childViewControllers.count > 0) {
- if ([rootViewController conformsToProtocol:@protocol(SEGScreenReporting)] && [rootViewController respondsToSelector:@selector(seg_mainViewController)]) {
- __auto_type screenReporting = (NSViewController*)rootViewController;
- return screenReporting.seg_mainViewController;
- }
-
- // fall back on first child UIViewController as a "best guess" assumption
- __auto_type *firstChildViewController = rootViewController.childViewControllers.firstObject;
- if (firstChildViewController != nil) {
- return firstChildViewController;
- }
- }
-
- return rootViewController;
-}
-
-- (void)seg_viewDidAppear:(BOOL)animated
-{
- NSViewController *top = [[self class] seg_rootViewControllerFromView:self.view];
- if (!top) {
- SEGLog(@"Could not infer screen.");
- return;
- }
-
- NSString *name = [[[top class] description] stringByReplacingOccurrencesOfString:@"ViewController" withString:@""];
-
- if (!name || name.length == 0) {
- // if no class description found, try view controller's title.
- name = [top title];
- // Class name could be just "ViewController".
- if (name.length == 0) {
- SEGLog(@"Could not infer screen name.");
- name = @"Unknown";
- }
- }
-
- if ([top conformsToProtocol:@protocol(SEGScreenReporting)] && [top respondsToSelector:@selector(seg_trackScreen:name:)]) {
- __auto_type screenReporting = (NSViewController*)top;
- [screenReporting seg_trackScreen:top name:name];
- return;
- }
-
- [[SEGAnalytics sharedAnalytics] screen:name properties:nil options:nil];
-
- [self seg_viewDidAppear:animated];
-}
-@end
-#endif
diff --git a/Pods/Analytics/Segment/Internal/SEGAES256Crypto.h b/Pods/Analytics/Segment/Internal/SEGAES256Crypto.h
deleted file mode 100644
index 85d8d7d6cd..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGAES256Crypto.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// SEGAES256Crypto.h
-// Analytics
-//
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-#import "SEGCrypto.h"
-
-
-NS_SWIFT_NAME(AES256Crypto)
-@interface SEGAES256Crypto : NSObject
-
-@property (nonatomic, readonly, nonnull) NSString *password;
-@property (nonatomic, readonly, nonnull) NSData *salt;
-@property (nonatomic, readonly, nonnull) NSData *iv;
-
-- (instancetype _Nonnull)initWithPassword:(NSString *_Nonnull)password salt:(NSData *_Nonnull)salt iv:(NSData *_Nonnull)iv;
-// Convenient shorthand. Will randomly generate salt and iv.
-- (instancetype _Nonnull)initWithPassword:(NSString *_Nonnull)password;
-
-+ (NSData *_Nonnull)randomDataOfLength:(size_t)length;
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGAES256Crypto.m b/Pods/Analytics/Segment/Internal/SEGAES256Crypto.m
deleted file mode 100644
index b4f4599e2c..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGAES256Crypto.m
+++ /dev/null
@@ -1,148 +0,0 @@
-//
-// SEGAES256Crypto.m
-// Analytics
-//
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-
-#import
-#import
-#import "SEGAES256Crypto.h"
-#import "SEGUtils.h"
-
-// Implementation courtesy of http://robnapier.net/aes-commoncrypto
-
-static NSString *const kRNCryptManagerErrorDomain = @"com.segment.crypto";
-
-static const CCAlgorithm kAlgorithm = kCCAlgorithmAES;
-static const NSUInteger kAlgorithmKeySize = kCCKeySizeAES256;
-static const NSUInteger kAlgorithmBlockSize = kCCBlockSizeAES128;
-static const NSUInteger kAlgorithmIVSize = kCCBlockSizeAES128;
-static const NSUInteger kPBKDFSaltSize = 8;
-static const NSUInteger kPBKDFRounds = 10000; // ~80ms on an iPhone 4
-
-
-@implementation SEGAES256Crypto
-
-- (instancetype)initWithPassword:(NSString *)password salt:(NSData *)salt iv:(NSData *_Nonnull)iv
-{
- if (self = [super init]) {
- _password = password;
- _salt = salt;
- _iv = iv;
- }
- return self;
-}
-
-- (instancetype)initWithPassword:(NSString *)password
-{
- NSData *iv = [SEGAES256Crypto randomDataOfLength:kAlgorithmIVSize];
- NSData *salt = [SEGAES256Crypto randomDataOfLength:kPBKDFSaltSize];
- return [self initWithPassword:password salt:salt iv:iv];
-}
-
-- (NSData *)aesKey
-{
- return [[self class] AESKeyForPassword:self.password salt:self.salt];
-}
-
-- (NSData *)encrypt:(NSData *)data
-{
- size_t outLength;
- NSMutableData *cipherData = [NSMutableData dataWithLength:data.length + kAlgorithmBlockSize];
-
- CCCryptorStatus
- result = CCCrypt(kCCEncrypt, // operation
- kAlgorithm, // Algorithm
- kCCOptionPKCS7Padding, // options
- self.aesKey.bytes, // key
- self.aesKey.length, // keylength
- self.iv.bytes, // iv
- data.bytes, // dataIn
- data.length, // dataInLength,
- cipherData.mutableBytes, // dataOut
- cipherData.length, // dataOutAvailable
- &outLength); // dataOutMoved
-
- if (result == kCCSuccess) {
- cipherData.length = outLength;
- } else {
- NSError *error = [NSError errorWithDomain:kRNCryptManagerErrorDomain
- code:result
- userInfo:nil];
- SEGLog(@"Unable to encrypt data", error);
- return nil;
- }
- return cipherData;
-}
-
-- (NSData *)decrypt:(NSData *)data
-{
- size_t outLength;
- NSMutableData *decryptedData = [NSMutableData dataWithLength:data.length + kAlgorithmBlockSize];
-
- CCCryptorStatus
- result = CCCrypt(kCCDecrypt, // operation
- kAlgorithm, // Algorithm
- kCCOptionPKCS7Padding, // options
- self.aesKey.bytes, // key
- self.aesKey.length, // keylength
- self.iv.bytes, // iv
- data.bytes, // dataIn
- data.length, // dataInLength,
- decryptedData.mutableBytes, // dataOut
- decryptedData.length, // dataOutAvailable
- &outLength); // dataOutMoved
-
- if (result == kCCSuccess) {
- decryptedData.length = outLength;
- } else {
- NSError *error = [NSError errorWithDomain:kRNCryptManagerErrorDomain
- code:result
- userInfo:nil];
- SEGLog(@"Unable to decrypt data", error);
- return nil;
- }
- return decryptedData;
-}
-
-+ (NSData *)randomDataOfLength:(size_t)length
-{
- NSMutableData *data = [NSMutableData dataWithLength:length];
-
- int result = SecRandomCopyBytes(kSecRandomDefault,
- length,
- data.mutableBytes);
- if (result != kCCSuccess) {
- SEGLog(@"Unable to generate random bytes: %d", result);
- }
-
- return data;
-}
-
-// Replace this with a 10,000 hash calls if you don't have CCKeyDerivationPBKDF
-+ (NSData *)AESKeyForPassword:(NSString *)password
- salt:(NSData *)salt
-{
- NSMutableData *derivedKey = [NSMutableData dataWithLength:kAlgorithmKeySize];
-
- int result = CCKeyDerivationPBKDF(kCCPBKDF2, // algorithm
- password.UTF8String, // password
- [password lengthOfBytesUsingEncoding:NSUTF8StringEncoding], // passwordLength
- salt.bytes, // salt
- salt.length, // saltLen
- kCCPRFHmacAlgSHA1, // PRF
- kPBKDFRounds, // rounds
- derivedKey.mutableBytes, // derivedKey
- derivedKey.length); // derivedKeyLen
-
- // Do not log password here
- if (result != kCCSuccess) {
- SEGLog(@"Unable to create AES key for password: %d", result);
- }
-
- return derivedKey;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGFileStorage.h b/Pods/Analytics/Segment/Internal/SEGFileStorage.h
deleted file mode 100644
index 5a35b9c431..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGFileStorage.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// SEGFileStorage.h
-// Analytics
-//
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-#import "SEGStorage.h"
-
-
-NS_SWIFT_NAME(FileStorage)
-@interface SEGFileStorage : NSObject
-
-@property (nonatomic, strong, nullable) id crypto;
-
-- (instancetype _Nonnull)initWithFolder:(NSURL *_Nonnull)folderURL crypto:(id _Nullable)crypto;
-
-- (NSURL *_Nonnull)urlForKey:(NSString *_Nonnull)key;
-
-+ (NSURL *_Nullable)applicationSupportDirectoryURL;
-+ (NSURL *_Nullable)cachesDirectoryURL;
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGFileStorage.m b/Pods/Analytics/Segment/Internal/SEGFileStorage.m
deleted file mode 100644
index 75158e32ed..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGFileStorage.m
+++ /dev/null
@@ -1,304 +0,0 @@
-//
-// SEGFileStorage.m
-// Analytics
-//
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-#import "SEGUtils.h"
-#import "SEGFileStorage.h"
-#import "SEGCrypto.h"
-
-
-@interface SEGFileStorage ()
-
-@property (nonatomic, strong, nonnull) NSURL *folderURL;
-
-@end
-
-
-@implementation SEGFileStorage
-
-- (instancetype)initWithFolder:(NSURL *)folderURL crypto:(id)crypto
-{
- if (self = [super init]) {
- _folderURL = folderURL;
- _crypto = crypto;
- [self createDirectoryAtURLIfNeeded:folderURL];
- return self;
- }
- return nil;
-}
-
-- (void)removeKey:(NSString *)key
-{
- NSURL *url = [self urlForKey:key];
- NSError *error = nil;
- if (![[NSFileManager defaultManager] removeItemAtURL:url error:&error]) {
- SEGLog(@"Unable to remove key %@ - error removing file at path %@", key, url);
- }
-}
-
-- (void)resetAll
-{
- NSError *error = nil;
- if (![[NSFileManager defaultManager] removeItemAtURL:self.folderURL error:&error]) {
- SEGLog(@"ERROR: Unable to reset file storage. Path cannot be removed - %@", self.folderURL.path);
- }
- [self createDirectoryAtURLIfNeeded:self.folderURL];
-}
-
-- (void)setData:(NSData *)data forKey:(NSString *)key
-{
- NSURL *url = [self urlForKey:key];
-
- // a nil value was supplied, remove the storage for said key.
- if (data == nil) {
- [[NSFileManager defaultManager] removeItemAtURL:url error:nil];
- return;
- }
-
- if (self.crypto) {
- NSData *encryptedData = [self.crypto encrypt:data];
- [encryptedData writeToURL:url atomically:YES];
- } else {
- [data writeToURL:url atomically:YES];
- }
-
- NSError *error = nil;
- if (![url setResourceValue:@YES
- forKey:NSURLIsExcludedFromBackupKey
- error:&error]) {
- SEGLog(@"Error excluding %@ from backup %@", [url lastPathComponent], error);
- }
-}
-
-- (NSData *)dataForKey:(NSString *)key
-{
- NSURL *url = [self urlForKey:key];
- NSData *data = [NSData dataWithContentsOfURL:url];
- if (!data) {
- SEGLog(@"WARNING: No data file for key %@", key);
- return nil;
- }
- if (self.crypto) {
- return [self.crypto decrypt:data];
- }
- return data;
-}
-
-- (nullable NSDictionary *)dictionaryForKey:(NSString *)key
-{
- return [self jsonForKey:key];
-}
-
-- (void)setDictionary:(nullable NSDictionary *)dictionary forKey:(NSString *)key
-{
- [self setJSON:dictionary forKey:key];
-}
-
-- (nullable NSArray *)arrayForKey:(NSString *)key
-{
- return [self jsonForKey:key];
-}
-
-- (void)setArray:(nullable NSArray *)array forKey:(NSString *)key
-{
- [self setJSON:array forKey:key];
-}
-
-- (nullable NSString *)stringForKey:(NSString *)key
-{
- id data = [self jsonForKey:key];
-
- if (data == nil) {
- return nil;
- }
-
- if ([data isKindOfClass:[NSString class]]) {
- return data;
- } else if ([data isKindOfClass:[NSDictionary class]]) {
- return data[key];
- }
-
- return nil;
-}
-
-- (void)setString:(nullable NSString *)string forKey:(NSString *)key
-{
- [self setJSON:string forKey:key];
-}
-
-
-+ (NSURL *)applicationSupportDirectoryURL
-{
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
- NSString *storagePath = [paths firstObject];
-#if TARGET_OS_IPHONE
- // will return ".../Application Support" because it's in a sandbox.
- return [NSURL fileURLWithPath:storagePath];
-#else
- NSString *executableName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleExecutable"];
- // if we can't get an exec name, we're probably running as tests in a library of some kind, so make one up.
- if (executableName == nil) {
- executableName = @"segment-test";
- }
- NSString *newStoragePath = [storagePath stringByAppendingPathComponent:executableName];
- BOOL isDirectory = NO;
- BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:newStoragePath isDirectory:&isDirectory];
- // if it exists, but isn't a directory... yikes, but make a segment-specific one.
- if (!isDirectory && exists) {
- newStoragePath = [storagePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@-%@", executableName, @"segment"]];
- }
-
- if (!exists) {
- [[NSFileManager defaultManager] createDirectoryAtPath:newStoragePath withIntermediateDirectories:NO attributes:nil error:nil];
- }
-
- exists = [[NSFileManager defaultManager] fileExistsAtPath:newStoragePath isDirectory:&isDirectory];
- if (!exists || !isDirectory) {
- // we got some major prollems boss.
- NSAssert(NO, @"We were unable to create or get the Application Support directory for your executable!");
- }
- return [NSURL fileURLWithPath:newStoragePath];
-#endif
-}
-
-+ (NSURL *)cachesDirectoryURL
-{
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
- NSString *storagePath = [paths firstObject];
- return [NSURL fileURLWithPath:storagePath];
-}
-
-- (NSURL *)urlForKey:(NSString *)key
-{
- return [self.folderURL URLByAppendingPathComponent:key];
-}
-
-#pragma mark - Helpers
-
-- (id _Nullable)jsonForKey:(NSString *)key
-{
- id result = nil;
-
- NSData *data = [self dataForKey:key];
- if (data) {
- BOOL needsConversion = NO;
- result = [self jsonFromData:data needsConversion:&needsConversion];
- if (needsConversion) {
- @try {
- [self setJSON:result forKey:key];
- // maybe a little repetitive, but we want to recreate the same path it would
- // take if it weren't being converted.
- data = [self dataForKey:key];
- result = [self jsonFromData:data needsConversion:&needsConversion];
- } @catch (NSException *e) {
- SEGLog(@"Unable to convert data from plist object to json; Exception: %@, data: %@", e, data);
-
- [self removeKey:key];
- result = nil;
- }
- }
- }
- return result;
-}
-
-- (void)setJSON:(id _Nonnull)json forKey:(NSString *)key
-{
- NSDictionary *dict = nil;
-
- // json doesn't allow stand alone values like plist (previous storage format) does so
- // we need to massage it a little.
- if (json) {
- if ([json isKindOfClass:[NSDictionary class]] || [json isKindOfClass:[NSArray class]]) {
- dict = json;
- } else {
- dict = @{key: json};
- }
- }
-
- NSData *data = [self dataFromJSON:dict];
- [self setData:data forKey:key];
-}
-
-- (NSData *_Nullable)dataFromJSON:(id)json
-{
- if (json == nil) {
- return nil;
- }
-
- NSError *error = nil;
- NSData *data = [NSJSONSerialization dataWithJSONObject:json options:0 error:&error];
- if (error) {
- SEGLog(@"Unable to serialize data from json object; %@, %@", error, json);
- }
- return data;
-}
-
-- (id _Nullable)jsonFromData:(NSData *_Nonnull)data needsConversion:(BOOL *)needsConversion
-{
- NSError *error = nil;
- id result = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
- if (error) {
- // maybe it's a plist and needs to be converted.
- result = [self plistFromData:data];
- if (result != nil) {
- *needsConversion = YES;
- } else {
- SEGLog(@"Unable to parse json from data %@", error);
- }
- }
- return result;
-}
-
-- (void)createDirectoryAtURLIfNeeded:(NSURL *)url
-{
- if (![[NSFileManager defaultManager] fileExistsAtPath:url.path
- isDirectory:NULL]) {
- NSError *error = nil;
- if (![[NSFileManager defaultManager] createDirectoryAtPath:url.path
- withIntermediateDirectories:YES
- attributes:nil
- error:&error]) {
- SEGLog(@"error: %@", error.localizedDescription);
- }
- }
-}
-
-/// Deprecated
-- (NSData *_Nullable)dataFromPlist:(nonnull id)plist
-{
- NSError *error = nil;
- NSData *data = nil;
- // Temporary just-in-case fix for issue #846; Follow-on PR to move away from plist storage.
- @try {
- data = [NSPropertyListSerialization dataWithPropertyList:plist
- format:NSPropertyListXMLFormat_v1_0
- options:0
- error:&error];
- } @catch (NSException *e) {
- SEGLog(@"Unable to serialize data from plist object; Exception: %@, plist: %@", e, plist);
- } @finally {
- if (error) {
- SEGLog(@"Unable to serialize data from plist object; Error: %@, plist: %@", error, plist);
- }
- }
- return data;
-}
-
-/// Deprecated
-- (id _Nullable)plistFromData:(NSData *_Nonnull)data
-{
- NSError *error = nil;
- id plist = [NSPropertyListSerialization propertyListWithData:data
- options:0
- format:nil
- error:&error];
- if (error) {
- SEGLog(@"Unable to parse plist from data %@", error);
- }
- return plist;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGIntegrationsManager.h b/Pods/Analytics/Segment/Internal/SEGIntegrationsManager.h
deleted file mode 100644
index 3d02e5e612..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGIntegrationsManager.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// SEGIntegrationsManager.h
-// Analytics
-//
-// Created by Tony Xiao on 9/20/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-#import "SEGMiddleware.h"
-
-/**
- * Filenames of "Application Support" files where essential data is stored.
- */
-extern NSString *_Nonnull const kSEGAnonymousIdFilename;
-extern NSString *_Nonnull const kSEGCachedSettingsFilename;
-
-/**
- * NSNotification name, that is posted after integrations are loaded.
- */
-extern NSString *_Nonnull SEGAnalyticsIntegrationDidStart;
-
-@class SEGAnalytics;
-
-NS_SWIFT_NAME(IntegrationsManager)
-@interface SEGIntegrationsManager : NSObject
-
-// Exposed for testing.
-+ (BOOL)isIntegration:(NSString *_Nonnull)key enabledInOptions:(NSDictionary *_Nonnull)options;
-+ (BOOL)isTrackEvent:(NSString *_Nonnull)event enabledForIntegration:(NSString *_Nonnull)key inPlan:(NSDictionary *_Nonnull)plan;
-
-// @Deprecated - Exposing for backward API compat reasons only
-@property (nonatomic, readonly) NSMutableDictionary *_Nonnull registeredIntegrations;
-
-- (instancetype _Nonnull)initWithAnalytics:(SEGAnalytics *_Nonnull)analytics;
-
-// @Deprecated - Exposing for backward API compat reasons only
-- (NSString *_Nonnull)getAnonymousId;
-- (void)saveAnonymousId:(NSString *_Nonnull)anonymousId;
-
-@end
-
-
-@interface SEGIntegrationsManager (SEGMiddleware)
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGIntegrationsManager.m b/Pods/Analytics/Segment/Internal/SEGIntegrationsManager.m
deleted file mode 100644
index ea550b6305..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGIntegrationsManager.m
+++ /dev/null
@@ -1,799 +0,0 @@
-//
-// SEGIntegrationsManager.m
-// Analytics
-//
-// Created by Tony Xiao on 9/20/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-#if TARGET_OS_IPHONE
-@import UIKit;
-#endif
-#import
-#import "SEGAnalyticsUtils.h"
-#import "SEGAnalytics.h"
-#import "SEGIntegrationFactory.h"
-#import "SEGIntegration.h"
-#import "SEGHTTPClient.h"
-#import "SEGStorage.h"
-#import "SEGFileStorage.h"
-#import "SEGUserDefaultsStorage.h"
-#import "SEGIntegrationsManager.h"
-#import "SEGSegmentIntegrationFactory.h"
-#import "SEGSegmentIntegration.h"
-#import "SEGPayload.h"
-#import "SEGIdentifyPayload.h"
-#import "SEGTrackPayload.h"
-#import "SEGGroupPayload.h"
-#import "SEGScreenPayload.h"
-#import "SEGAliasPayload.h"
-#import "SEGUtils.h"
-#import "SEGState.h"
-
-NSString *SEGAnalyticsIntegrationDidStart = @"io.segment.analytics.integration.did.start";
-NSString *const SEGAnonymousIdKey = @"SEGAnonymousId";
-NSString *const kSEGAnonymousIdFilename = @"segment.anonymousId";
-NSString *const kSEGCachedSettingsFilename = @"analytics.settings.v2.plist";
-
-
-@interface SEGIdentifyPayload (AnonymousId)
-@property (nonatomic, readwrite, nullable) NSString *anonymousId;
-@end
-
-
-@interface SEGPayload (Options)
-@property (readonly) NSDictionary *options;
-@end
-@implementation SEGPayload (Options)
-// Combine context and integrations to form options
-- (NSDictionary *)options
-{
- return @{
- @"context" : self.context ?: @{},
- @"integrations" : self.integrations ?: @{}
- };
-}
-@end
-
-
-@interface SEGAnalyticsConfiguration (Private)
-@property (nonatomic, strong) NSArray *factories;
-@end
-
-
-@interface SEGIntegrationsManager ()
-
-@property (nonatomic, strong) SEGAnalytics *analytics;
-@property (nonatomic, strong) NSDictionary *cachedSettings;
-@property (nonatomic, strong) SEGAnalyticsConfiguration *configuration;
-@property (nonatomic, strong) dispatch_queue_t serialQueue;
-@property (nonatomic, strong) NSMutableArray *messageQueue;
-@property (nonatomic, strong) NSArray *factories;
-@property (nonatomic, strong) NSMutableDictionary *integrations;
-@property (nonatomic, strong) NSMutableDictionary *registeredIntegrations;
-@property (nonatomic, strong) NSMutableDictionary *integrationMiddleware;
-@property (nonatomic) volatile BOOL initialized;
-@property (nonatomic, copy) NSString *cachedAnonymousId;
-@property (nonatomic, strong) SEGHTTPClient *httpClient;
-@property (nonatomic, strong) NSURLSessionDataTask *settingsRequest;
-@property (nonatomic, strong) id userDefaultsStorage;
-@property (nonatomic, strong) id fileStorage;
-
-@end
-
-@interface SEGAnalytics ()
-@property (nullable, nonatomic, strong, readonly) SEGAnalyticsConfiguration *oneTimeConfiguration;
-@end
-
-
-@implementation SEGIntegrationsManager
-
-@dynamic cachedAnonymousId;
-@synthesize cachedSettings = _cachedSettings;
-
-- (instancetype _Nonnull)initWithAnalytics:(SEGAnalytics *_Nonnull)analytics
-{
- SEGAnalyticsConfiguration *configuration = analytics.oneTimeConfiguration;
- NSCParameterAssert(configuration != nil);
-
- if (self = [super init]) {
- self.analytics = analytics;
- self.configuration = configuration;
- self.serialQueue = seg_dispatch_queue_create_specific("io.segment.analytics", DISPATCH_QUEUE_SERIAL);
- self.messageQueue = [[NSMutableArray alloc] init];
- self.httpClient = [[SEGHTTPClient alloc] initWithRequestFactory:configuration.requestFactory];
-
- self.userDefaultsStorage = [[SEGUserDefaultsStorage alloc] initWithDefaults:[NSUserDefaults standardUserDefaults] namespacePrefix:nil crypto:configuration.crypto];
- #if TARGET_OS_TV
- self.fileStorage = [[SEGFileStorage alloc] initWithFolder:[SEGFileStorage cachesDirectoryURL] crypto:configuration.crypto];
- #else
- self.fileStorage = [[SEGFileStorage alloc] initWithFolder:[SEGFileStorage applicationSupportDirectoryURL] crypto:configuration.crypto];
- #endif
-
- self.cachedAnonymousId = [self loadOrGenerateAnonymousID:NO];
- NSMutableArray *factories = [[configuration factories] mutableCopy];
- [factories addObject:[[SEGSegmentIntegrationFactory alloc] initWithHTTPClient:self.httpClient fileStorage:self.fileStorage userDefaultsStorage:self.userDefaultsStorage]];
- self.factories = [factories copy];
- self.integrations = [NSMutableDictionary dictionaryWithCapacity:factories.count];
- self.registeredIntegrations = [NSMutableDictionary dictionaryWithCapacity:factories.count];
- self.integrationMiddleware = [NSMutableDictionary dictionaryWithCapacity:factories.count];
-
- // Update settings on each integration immediately
- [self refreshSettings];
-
- // Update settings on foreground
- id application = configuration.application;
- if (application) {
- // Attach to application state change hooks
- NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
-#if TARGET_OS_IPHONE
- [nc addObserver:self selector:@selector(onAppForeground:) name:UIApplicationWillEnterForegroundNotification object:application];
-#elif TARGET_OS_OSX
- [nc addObserver:self selector:@selector(onAppForeground:) name:NSApplicationWillBecomeActiveNotification object:application];
-#endif
- }
- }
- return self;
-}
-
-
-- (void)dealloc
-{
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-}
-
-- (void)setCachedAnonymousId:(NSString *)cachedAnonymousId
-{
- [SEGState sharedInstance].userInfo.anonymousId = cachedAnonymousId;
-}
-
-- (NSString *)cachedAnonymousId
-{
- NSString *value = [SEGState sharedInstance].userInfo.anonymousId;
- return value;
-}
-
-- (void)onAppForeground:(NSNotification *)note
-{
- seg_dispatch_specific_async(_serialQueue, ^{
- [self refreshSettings];
- });
-}
-
-- (void)handleAppStateNotification:(NSString *)notificationName
-{
- SEGLog(@"Application state change notification: %@", notificationName);
- static NSDictionary *selectorMapping;
- static dispatch_once_t selectorMappingOnce;
- dispatch_once(&selectorMappingOnce, ^{
-#if TARGET_OS_IPHONE
-
- selectorMapping = @{
- UIApplicationDidFinishLaunchingNotification :
- NSStringFromSelector(@selector(applicationDidFinishLaunching:)),
- UIApplicationDidEnterBackgroundNotification :
- NSStringFromSelector(@selector(applicationDidEnterBackground)),
- UIApplicationWillEnterForegroundNotification :
- NSStringFromSelector(@selector(applicationWillEnterForeground)),
- UIApplicationWillTerminateNotification :
- NSStringFromSelector(@selector(applicationWillTerminate)),
- UIApplicationWillResignActiveNotification :
- NSStringFromSelector(@selector(applicationWillResignActive)),
- UIApplicationDidBecomeActiveNotification :
- NSStringFromSelector(@selector(applicationDidBecomeActive))
- };
-#elif TARGET_OS_OSX
- selectorMapping = @{
- NSApplicationDidFinishLaunchingNotification :
- NSStringFromSelector(@selector(applicationDidFinishLaunching:)),
- NSApplicationDidResignActiveNotification :
- NSStringFromSelector(@selector(applicationDidEnterBackground)),
- NSApplicationWillBecomeActiveNotification :
- NSStringFromSelector(@selector(applicationWillEnterForeground)),
- NSApplicationWillTerminateNotification :
- NSStringFromSelector(@selector(applicationWillTerminate)),
- };
-#endif
-
- });
- SEL selector = NSSelectorFromString(selectorMapping[notificationName]);
- if (selector) {
- [self callIntegrationsWithSelector:selector arguments:nil options:nil sync:true];
- }
-}
-
-#pragma mark - Public API
-
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"<%p:%@, %@>", self, [self class], [self dictionaryWithValuesForKeys:@[ @"configuration" ]]];
-}
-
-#pragma mark - Analytics API
-
-- (void)identify:(SEGIdentifyPayload *)payload
-{
- NSCAssert2(payload.userId.length > 0 || payload.traits.count > 0, @"either userId (%@) or traits (%@) must be provided.", payload.userId, payload.traits);
-
- [self callIntegrationsWithSelector:NSSelectorFromString(@"identify:")
- arguments:@[ payload ]
- options:payload.options
- sync:false];
-}
-
-#pragma mark - Track
-
-- (void)track:(SEGTrackPayload *)payload
-{
- NSCAssert1(payload.event.length > 0, @"event (%@) must not be empty.", payload.event);
-
- [self callIntegrationsWithSelector:NSSelectorFromString(@"track:")
- arguments:@[ payload ]
- options:payload.options
- sync:false];
-}
-
-#pragma mark - Screen
-
-- (void)screen:(SEGScreenPayload *)payload
-{
- NSCAssert1(payload.name.length > 0, @"screen name (%@) must not be empty.", payload.name);
-
- [self callIntegrationsWithSelector:NSSelectorFromString(@"screen:")
- arguments:@[ payload ]
- options:payload.options
- sync:false];
-}
-
-#pragma mark - Group
-
-- (void)group:(SEGGroupPayload *)payload
-{
- [self callIntegrationsWithSelector:NSSelectorFromString(@"group:")
- arguments:@[ payload ]
- options:payload.options
- sync:false];
-}
-
-#pragma mark - Alias
-
-- (void)alias:(SEGAliasPayload *)payload
-{
- [self callIntegrationsWithSelector:NSSelectorFromString(@"alias:")
- arguments:@[ payload ]
- options:payload.options
- sync:false];
-}
-
-- (void)receivedRemoteNotification:(NSDictionary *)userInfo
-{
- [self callIntegrationsWithSelector:_cmd arguments:@[ userInfo ] options:nil sync:true];
-}
-
-- (void)failedToRegisterForRemoteNotificationsWithError:(NSError *)error
-{
- [self callIntegrationsWithSelector:_cmd arguments:@[ error ] options:nil sync:true];
-}
-
-- (void)registeredForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
-{
- NSParameterAssert(deviceToken != nil);
-
- [self callIntegrationsWithSelector:_cmd arguments:@[ deviceToken ] options:nil sync:true];
-}
-
-- (void)handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo
-{
- [self callIntegrationsWithSelector:_cmd arguments:@[ identifier, userInfo ] options:nil sync:true];
-}
-
-- (void)continueUserActivity:(NSUserActivity *)activity
-{
- [self callIntegrationsWithSelector:_cmd arguments:@[ activity ] options:nil sync:true];
-}
-
-- (void)openURL:(NSURL *)url options:(NSDictionary *)options
-{
- [self callIntegrationsWithSelector:_cmd arguments:@[ url, options ] options:nil sync:true];
-}
-
-- (void)reset
-{
- [self resetAnonymousId];
- [self callIntegrationsWithSelector:_cmd arguments:nil options:nil sync:false];
-}
-
-- (void)resetAnonymousId
-{
- self.cachedAnonymousId = [self loadOrGenerateAnonymousID:YES];
-}
-
-- (NSString *)getAnonymousId;
-{
- return self.cachedAnonymousId;
-}
-
-- (NSString *)loadOrGenerateAnonymousID:(BOOL)reset
-{
-#if TARGET_OS_TV
- NSString *anonymousId = [self.userDefaultsStorage stringForKey:SEGAnonymousIdKey];
-#else
- NSString *anonymousId = [self.fileStorage stringForKey:kSEGAnonymousIdFilename];
-#endif
-
- if (!anonymousId || reset) {
- // We've chosen to generate a UUID rather than use the UDID (deprecated in iOS 5),
- // identifierForVendor (iOS6 and later, can't be changed on logout),
- // or MAC address (blocked in iOS 7). For more info see https://segment.io/libraries/ios#ids
- anonymousId = GenerateUUIDString();
- SEGLog(@"New anonymousId: %@", anonymousId);
-#if TARGET_OS_TV
- [self.userDefaultsStorage setString:anonymousId forKey:SEGAnonymousIdKey];
-#else
- [self.fileStorage setString:anonymousId forKey:kSEGAnonymousIdFilename];
-#endif
- }
-
- return anonymousId;
-}
-
-- (void)saveAnonymousId:(NSString *)anonymousId
-{
- self.cachedAnonymousId = anonymousId;
-#if TARGET_OS_TV
- [self.userDefaultsStorage setString:anonymousId forKey:SEGAnonymousIdKey];
-#else
- [self.fileStorage setString:anonymousId forKey:kSEGAnonymousIdFilename];
-#endif
-}
-
-- (void)flush
-{
- [self callIntegrationsWithSelector:_cmd arguments:nil options:nil sync:false];
-}
-
-#pragma mark - Analytics Settings
-
-- (NSDictionary *)cachedSettings
-{
- if (!_cachedSettings) {
-#if TARGET_OS_TV
- _cachedSettings = [self.userDefaultsStorage dictionaryForKey:kSEGCachedSettingsFilename] ?: @{};
-#else
- _cachedSettings = [self.fileStorage dictionaryForKey:kSEGCachedSettingsFilename] ?: @{};
-#endif
- }
-
- return _cachedSettings;
-}
-
-- (void)setCachedSettings:(NSDictionary *)settings
-{
- _cachedSettings = [settings copy];
- if (!_cachedSettings) {
- // [@{} writeToURL:settingsURL atomically:YES];
- return;
- }
-
-#if TARGET_OS_TV
- [self.userDefaultsStorage setDictionary:_cachedSettings forKey:kSEGCachedSettingsFilename];
-#else
- [self.fileStorage setDictionary:_cachedSettings forKey:kSEGCachedSettingsFilename];
-#endif
-
- [self updateIntegrationsWithSettings:settings[@"integrations"]];
-}
-
-- (nonnull NSArray> *)middlewareForIntegrationKey:(NSString *)key
-{
- NSMutableArray *result = [[NSMutableArray alloc] init];
- for (SEGDestinationMiddleware *container in self.configuration.destinationMiddleware) {
- if ([container.integrationKey isEqualToString:key]) {
- [result addObjectsFromArray:container.middleware];
- }
- }
- return result;
-}
-
-- (void)updateIntegrationsWithSettings:(NSDictionary *)projectSettings
-{
- // see if we have a new segment API host and set it.
- NSString *apiHost = projectSettings[kSEGSegmentDestinationName][@"apiHost"];
- if (apiHost) {
- [SEGUtils saveAPIHost:apiHost];
- }
-
- seg_dispatch_specific_sync(_serialQueue, ^{
- if (self.initialized) {
- return;
- }
- for (id factory in self.factories) {
- NSString *key = [factory key];
- NSDictionary *integrationSettings = [projectSettings objectForKey:key];
- if (isUnitTesting()) {
- integrationSettings = @{};
- }
- if (integrationSettings || [key hasPrefix:@"webhook_"]) {
- id integration = [factory createWithSettings:integrationSettings forAnalytics:self.analytics];
- if (integration != nil) {
- self.integrations[key] = integration;
- self.registeredIntegrations[key] = @NO;
-
- // setup integration middleware
- NSArray> *middleware = [self middlewareForIntegrationKey:key];
- self.integrationMiddleware[key] = [[SEGMiddlewareRunner alloc] initWithMiddleware:middleware];
- }
- [[NSNotificationCenter defaultCenter] postNotificationName:SEGAnalyticsIntegrationDidStart object:key userInfo:nil];
- } else {
- SEGLog(@"No settings for %@. Skipping.", key);
- }
- }
- [self flushMessageQueue];
- self.initialized = true;
- });
-}
-
-- (void)configureEdgeFunctions:(NSDictionary *)settings
-{
- if (self.configuration.edgeFunctionMiddleware) {
- NSDictionary *edgeFnSettings = settings[@"edgeFunction"];
- if (edgeFnSettings != nil && edgeFnSettings.count > 0) {
- [self.configuration.edgeFunctionMiddleware setEdgeFunctionData:settings[@"edgeFunction"]];
- }
- }
-}
-
-- (NSDictionary *)defaultSettings
-{
- NSDictionary *segment = [self segmentSettings];
- NSDictionary *result = @{
- @"integrations" : @{
- kSEGSegmentDestinationName : segment
- },
- @"plan" : @{
- @"track" : @{}
- }
- };
- return result;
-}
-
-- (NSDictionary *)segmentSettings
-{
- NSDictionary *result = @{
- @"apiKey" : self.configuration.writeKey,
- @"apiHost" : [SEGUtils getAPIHost]
- };
- return result;
-}
-
-- (void)refreshSettings
-{
- // look at our cache immediately, lets try to get things running
- // with the last values while we wait to see about any updates.
- NSDictionary *previouslyCachedSettings = [self cachedSettings];
- if (previouslyCachedSettings && [previouslyCachedSettings count] > 0) {
- [self setCachedSettings:previouslyCachedSettings];
- [self configureEdgeFunctions:previouslyCachedSettings];
- }
-
- seg_dispatch_specific_async(_serialQueue, ^{
- if (self.settingsRequest) {
- return;
- }
-
- self.settingsRequest = [self.httpClient settingsForWriteKey:self.configuration.writeKey completionHandler:^(BOOL success, NSDictionary *settings) {
- seg_dispatch_specific_async(self -> _serialQueue, ^{
- if (success) {
- [self setCachedSettings:settings];
- [self configureEdgeFunctions:settings];
- } else {
- NSDictionary *previouslyCachedSettings = [self cachedSettings];
- if (previouslyCachedSettings && [previouslyCachedSettings count] > 0) {
- [self setCachedSettings:previouslyCachedSettings];
- [self configureEdgeFunctions:previouslyCachedSettings];
- } else if (self.configuration.defaultSettings != nil) {
- // If settings request fail, load a user-supplied version if present.
- // but make sure segment.io is in the integrations
- NSMutableDictionary *newSettings = [self.configuration.defaultSettings serializableMutableDeepCopy];
- NSMutableDictionary *integrations = newSettings[@"integrations"];
- if (integrations != nil) {
- integrations[kSEGSegmentDestinationName] = [self segmentSettings];
- } else {
- newSettings[@"integrations"] = @{kSEGSegmentDestinationName: [self segmentSettings]};
- }
-
- [self setCachedSettings:newSettings];
- // don't configure edge functions here. it'll do the right thing on it's own.
- } else {
- // If settings request fail, fall back to using just Segment integration.
- // Doesn't address situations where this callback never gets called (though we don't expect that to ever happen).
- [self setCachedSettings:[self defaultSettings]];
- // don't configure edge functions here. it'll do the right thing on it's own.
- }
- }
- self.settingsRequest = nil;
- });
- }];
- });
-}
-
-#pragma mark - Private
-
-+ (BOOL)isIntegration:(NSString *)key enabledInOptions:(NSDictionary *)options
-{
- // If the event is in the tracking plan, it should always be sent to api.segment.io.
- if ([kSEGSegmentDestinationName isEqualToString:key]) {
- return YES;
- }
- if (options[key]) {
- id value = options[key];
-
- // it's been observed that customers sometimes override this with
- // value's that aren't bool types.
- if ([value isKindOfClass:[NSNumber class]]) {
- NSNumber *numberValue = (NSNumber *)value;
- return [numberValue boolValue];
- } if ([value isKindOfClass:[NSDictionary class]]) {
- return YES;
- } else {
- NSString *msg = [NSString stringWithFormat: @"Value for `%@` in integration options is supposed to be a boolean or dictionary and it is not!"
- "This is likely due to a user-added value in `integrations` that overwrites a value received from the server", key];
- SEGLog(msg);
- NSAssert(NO, msg);
- }
- } else if (options[@"All"]) {
- return [options[@"All"] boolValue];
- } else if (options[@"all"]) {
- return [options[@"all"] boolValue];
- }
- return YES;
-}
-
-+ (BOOL)isTrackEvent:(NSString *)event enabledForIntegration:(NSString *)key inPlan:(NSDictionary *)plan
-{
- // Whether the event is enabled or disabled, it should always be sent to api.segment.io.
- if ([key isEqualToString:kSEGSegmentDestinationName]) {
- return YES;
- }
-
- if (plan[@"track"][event]) {
- if ([plan[@"track"][event][@"enabled"] boolValue]) {
- return [self isIntegration:key enabledInOptions:plan[@"track"][event][@"integrations"]];
- } else {
- return NO;
- }
- } else if (plan[@"track"][@"__default"]) {
- return [plan[@"track"][@"__default"][@"enabled"] boolValue];
- }
-
- return YES;
-}
-
-- (void)forwardSelector:(SEL)selector arguments:(NSArray *)arguments options:(NSDictionary *)options
-{
- [self.integrations enumerateKeysAndObjectsUsingBlock:^(NSString *key, id integration, BOOL *stop) {
- [self invokeIntegration:integration key:key selector:selector arguments:arguments options:options];
- }];
-}
-
-/*
- This kind of sucks, but we wrote ourselves into a corner here. A larger refactor will need to happen.
- I also opted to not put this as a utility function because we shouldn't be doing this in the first place,
- so consider it a one-off. If you find yourself needing to do this again, lets talk about a refactor.
- */
-- (SEGEventType)eventTypeFromSelector:(SEL)selector
-{
- NSString *selectorString = NSStringFromSelector(selector);
- SEGEventType result = SEGEventTypeUndefined;
-
- if ([selectorString hasPrefix:@"identify"]) {
- result = SEGEventTypeIdentify;
- } else if ([selectorString hasPrefix:@"track"]) {
- result = SEGEventTypeTrack;
- } else if ([selectorString hasPrefix:@"screen"]) {
- result = SEGEventTypeScreen;
- } else if ([selectorString hasPrefix:@"group"]) {
- result = SEGEventTypeGroup;
- } else if ([selectorString hasPrefix:@"alias"]) {
- result = SEGEventTypeAlias;
- } else if ([selectorString hasPrefix:@"reset"]) {
- result = SEGEventTypeReset;
- } else if ([selectorString hasPrefix:@"flush"]) {
- result = SEGEventTypeFlush;
- } else if ([selectorString hasPrefix:@"receivedRemoteNotification"]) {
- result = SEGEventTypeReceivedRemoteNotification;
- } else if ([selectorString hasPrefix:@"failedToRegisterForRemoteNotificationsWithError"]) {
- result = SEGEventTypeFailedToRegisterForRemoteNotifications;
- } else if ([selectorString hasPrefix:@"registeredForRemoteNotificationsWithDeviceToken"]) {
- result = SEGEventTypeRegisteredForRemoteNotifications;
- } else if ([selectorString hasPrefix:@"handleActionWithIdentifier"]) {
- result = SEGEventTypeHandleActionWithForRemoteNotification;
- } else if ([selectorString hasPrefix:@"continueUserActivity"]) {
- result = SEGEventTypeContinueUserActivity;
- } else if ([selectorString hasPrefix:@"openURL"]) {
- result = SEGEventTypeOpenURL;
- } else if ([selectorString hasPrefix:@"application"]) {
- result = SEGEventTypeApplicationLifecycle;
- }
-
- return result;
-}
-
-- (void)invokeIntegration:(id)integration key:(NSString *)key selector:(SEL)selector arguments:(NSArray *)arguments options:(NSDictionary *)options
-{
- if (![integration respondsToSelector:selector]) {
- SEGLog(@"Not sending call to %@ because it doesn't respond to %@.", key, NSStringFromSelector(selector));
- return;
- }
-
- if (![[self class] isIntegration:key enabledInOptions:options[@"integrations"]]) {
- SEGLog(@"Not sending call to %@ because it is disabled in options.", key);
- return;
- }
-
- SEGEventType eventType = [self eventTypeFromSelector:selector];
- if (eventType == SEGEventTypeTrack) {
- SEGTrackPayload *eventPayload = arguments[0];
- BOOL enabled = [[self class] isTrackEvent:eventPayload.event enabledForIntegration:key inPlan:self.cachedSettings[@"plan"]];
- if (!enabled) {
- SEGLog(@"Not sending call to %@ because it is disabled in plan.", key);
- return;
- }
- }
-
- NSMutableArray *newArguments = [arguments mutableCopy];
-
- if (eventType != SEGEventTypeUndefined) {
- SEGMiddlewareRunner *runner = self.integrationMiddleware[key];
- if (runner.middlewares.count > 0) {
- SEGPayload *payload = nil;
- // things like flush have no args.
- if (arguments.count > 0) {
- payload = arguments[0];
- }
- SEGContext *context = [[[SEGContext alloc] initWithAnalytics:self.analytics] modify:^(id _Nonnull ctx) {
- ctx.eventType = eventType;
- ctx.payload = payload;
- }];
-
- context = [runner run:context callback:nil];
- // if we weren't given args, don't set them.
- if (arguments.count > 0) {
- newArguments[0] = context.payload;
- }
- }
- }
-
- SEGLog(@"Running: %@ with arguments %@ on integration: %@", NSStringFromSelector(selector), newArguments, key);
- NSInvocation *invocation = [self invocationForSelector:selector arguments:newArguments];
- [invocation invokeWithTarget:integration];
-}
-
-- (NSInvocation *)invocationForSelector:(SEL)selector arguments:(NSArray *)arguments
-{
- struct objc_method_description description = protocol_getMethodDescription(@protocol(SEGIntegration), selector, NO, YES);
-
- NSMethodSignature *signature = [NSMethodSignature signatureWithObjCTypes:description.types];
-
- NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
- invocation.selector = selector;
- for (int i = 0; i < arguments.count; i++) {
- id argument = (arguments[i] == [NSNull null]) ? nil : arguments[i];
- [invocation setArgument:&argument atIndex:i + 2];
- }
- return invocation;
-}
-
-- (void)queueSelector:(SEL)selector arguments:(NSArray *)arguments options:(NSDictionary *)options
-{
- NSArray *obj = @[ NSStringFromSelector(selector), arguments ?: @[], options ?: @{} ];
- SEGLog(@"Queueing: %@", obj);
- [_messageQueue addObject:obj];
-}
-
-- (void)flushMessageQueue
-{
- if (_messageQueue.count != 0) {
- for (NSArray *arr in _messageQueue)
- [self forwardSelector:NSSelectorFromString(arr[0]) arguments:arr[1] options:arr[2]];
- [_messageQueue removeAllObjects];
- }
-}
-
-- (void)callIntegrationsWithSelector:(SEL)selector arguments:(NSArray *)arguments options:(NSDictionary *)options sync:(BOOL)sync
-{
- // TODO: Currently we ignore the `sync` argument and queue the event asynchronously.
- // For integrations that need events to be on the main thread, they'll have to do so
- // manually and hop back on to the main thread.
- // Eventually we should figure out a way to handle this in analytics-ios itself.
- seg_dispatch_specific_async(_serialQueue, ^{
- if (self.initialized) {
- [self flushMessageQueue];
- [self forwardSelector:selector arguments:arguments options:options];
- } else {
- [self queueSelector:selector arguments:arguments options:options];
- }
- });
-}
-
-@end
-
-
-@implementation SEGIntegrationsManager (SEGMiddleware)
-
-- (void)context:(SEGContext *)context next:(void (^_Nonnull)(SEGContext *_Nullable))next
-{
- switch (context.eventType) {
- case SEGEventTypeIdentify: {
- SEGIdentifyPayload *p = (SEGIdentifyPayload *)context.payload;
- [self identify:p];
- break;
- }
- case SEGEventTypeTrack: {
- SEGTrackPayload *p = (SEGTrackPayload *)context.payload;
- [self track:p];
- break;
- }
- case SEGEventTypeScreen: {
- SEGScreenPayload *p = (SEGScreenPayload *)context.payload;
- [self screen:p];
- break;
- }
- case SEGEventTypeGroup: {
- SEGGroupPayload *p = (SEGGroupPayload *)context.payload;
- [self group:p];
- break;
- }
- case SEGEventTypeAlias: {
- SEGAliasPayload *p = (SEGAliasPayload *)context.payload;
- [self alias:p];
- break;
- }
- case SEGEventTypeReset:
- [self reset];
- break;
- case SEGEventTypeFlush:
- [self flush];
- break;
- case SEGEventTypeReceivedRemoteNotification:
- [self receivedRemoteNotification:
- [(SEGRemoteNotificationPayload *)context.payload userInfo]];
- break;
- case SEGEventTypeFailedToRegisterForRemoteNotifications:
- [self failedToRegisterForRemoteNotificationsWithError:
- [(SEGRemoteNotificationPayload *)context.payload error]];
- break;
- case SEGEventTypeRegisteredForRemoteNotifications:
- [self registeredForRemoteNotificationsWithDeviceToken:
- [(SEGRemoteNotificationPayload *)context.payload deviceToken]];
- break;
- case SEGEventTypeHandleActionWithForRemoteNotification: {
- SEGRemoteNotificationPayload *payload = (SEGRemoteNotificationPayload *)context.payload;
- [self handleActionWithIdentifier:payload.actionIdentifier
- forRemoteNotification:payload.userInfo];
- break;
- }
- case SEGEventTypeContinueUserActivity:
- [self continueUserActivity:
- [(SEGContinueUserActivityPayload *)context.payload activity]];
- break;
- case SEGEventTypeOpenURL: {
- SEGOpenURLPayload *payload = (SEGOpenURLPayload *)context.payload;
- [self openURL:payload.url options:payload.options];
- break;
- }
- case SEGEventTypeApplicationLifecycle:
- [self handleAppStateNotification:
- [(SEGApplicationLifecyclePayload *)context.payload notificationName]];
- break;
- default:
- case SEGEventTypeUndefined:
- NSAssert(NO, @"Received context with undefined event type %@", context);
- SEGLog(@"[ERROR]: Received context with undefined event type %@", context);
- break;
- }
- next(context);
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGMacros.h b/Pods/Analytics/Segment/Internal/SEGMacros.h
deleted file mode 100644
index f07ad6b7fa..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGMacros.h
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// SEGMacros.h
-// Analytics
-//
-// Created by Brandon Sneed on 12/20/19.
-// Copyright © 2019 Segment. All rights reserved.
-//
-
-#ifndef SEGMacros_h
-#define SEGMacros_h
-
-#import "TargetConditionals.h"
-
-#define __deprecated__(s) __attribute__((deprecated(s)))
-
-#define weakify(var) __weak typeof(var) __weak_##var = var;
-
-#define strongify(var) \
-_Pragma("clang diagnostic push") \
-_Pragma("clang diagnostic ignored \"-Wshadow\"") \
-__strong typeof(var) var = __weak_##var; \
-_Pragma("clang diagnostic pop")
-
-#if TARGET_OS_IOS == 1 || TARGET_OS_TV == 1
-#define TARGET_UIKIT 1
-#endif
-
-#endif /* SEGMacros_h */
diff --git a/Pods/Analytics/Segment/Internal/SEGState.h b/Pods/Analytics/Segment/Internal/SEGState.h
deleted file mode 100644
index 9f620d176e..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGState.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// SEGState.h
-// Analytics
-//
-// Created by Brandon Sneed on 6/9/20.
-// Copyright © 2020 Segment. All rights reserved.
-//
-
-@import Foundation;
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class SEGAnalyticsConfiguration;
-
-@interface SEGUserInfo: NSObject
-@property (nonatomic, strong) NSString *anonymousId;
-@property (nonatomic, strong, nullable) NSString *userId;
-@property (nonatomic, strong, nullable) NSDictionary *traits;
-@end
-
-@interface SEGPayloadContext: NSObject
-@property (nonatomic, readonly) NSDictionary *payload;
-@property (nonatomic, strong, nullable) NSDictionary *referrer;
-@property (nonatomic, strong, nullable) NSString *deviceToken;
-
-- (void)updateStaticContext;
-
-@end
-
-
-
-@interface SEGState : NSObject
-
-@property (nonatomic, readonly) SEGUserInfo *userInfo;
-@property (nonatomic, readonly) SEGPayloadContext *context;
-
-@property (nonatomic, strong, nullable) SEGAnalyticsConfiguration *configuration;
-
-+ (instancetype)sharedInstance;
-- (instancetype)init __unavailable;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Internal/SEGState.m b/Pods/Analytics/Segment/Internal/SEGState.m
deleted file mode 100644
index b5791b7cfa..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGState.m
+++ /dev/null
@@ -1,212 +0,0 @@
-//
-// SEGState.m
-// Analytics
-//
-// Created by Brandon Sneed on 6/9/20.
-// Copyright © 2020 Segment. All rights reserved.
-//
-
-#import "SEGState.h"
-#import "SEGAnalytics.h"
-#import "SEGAnalyticsUtils.h"
-#import "SEGReachability.h"
-#import "SEGUtils.h"
-
-typedef void (^SEGStateSetBlock)(void);
-typedef _Nullable id (^SEGStateGetBlock)(void);
-
-
-@interface SEGState()
-// State Objects
-@property (nonatomic, nonnull) SEGUserInfo *userInfo;
-@property (nonatomic, nonnull) SEGPayloadContext *context;
-// State Accessors
-- (void)setValueWithBlock:(SEGStateSetBlock)block;
-- (id)valueWithBlock:(SEGStateGetBlock)block;
-@end
-
-
-@protocol SEGStateObject
-@property (nonatomic, weak) SEGState *state;
-- (instancetype)initWithState:(SEGState *)aState;
-@end
-
-
-@interface SEGUserInfo ()
-@end
-
-@interface SEGPayloadContext ()
-@property (nonatomic, strong) SEGReachability *reachability;
-@property (nonatomic, strong) NSDictionary *cachedStaticContext;
-@end
-
-#pragma mark - SEGUserInfo
-
-@implementation SEGUserInfo
-
-@synthesize state;
-
-@synthesize anonymousId = _anonymousId;
-@synthesize userId = _userId;
-@synthesize traits = _traits;
-
-- (instancetype)initWithState:(SEGState *)aState
-{
- if (self = [super init]) {
- self.state = aState;
- }
- return self;
-}
-
-- (NSString *)anonymousId
-{
- return [state valueWithBlock: ^id{
- return self->_anonymousId;
- }];
-}
-
-- (void)setAnonymousId:(NSString *)anonymousId
-{
- [state setValueWithBlock: ^{
- self->_anonymousId = [anonymousId copy];
- }];
-}
-
-- (NSString *)userId
-{
- return [state valueWithBlock: ^id{
- return self->_userId;
- }];
-}
-
-- (void)setUserId:(NSString *)userId
-{
- [state setValueWithBlock: ^{
- self->_userId = [userId copy];
- }];
-}
-
-- (NSDictionary *)traits
-{
- return [state valueWithBlock:^id{
- return self->_traits;
- }];
-}
-
-- (void)setTraits:(NSDictionary *)traits
-{
- [state setValueWithBlock: ^{
- self->_traits = [traits serializableDeepCopy];
- }];
-}
-
-@end
-
-
-#pragma mark - SEGPayloadContext
-
-@implementation SEGPayloadContext
-
-@synthesize state;
-@synthesize reachability;
-
-@synthesize referrer = _referrer;
-@synthesize cachedStaticContext = _cachedStaticContext;
-@synthesize deviceToken = _deviceToken;
-
-- (instancetype)initWithState:(SEGState *)aState
-{
- if (self = [super init]) {
- self.state = aState;
- self.reachability = [SEGReachability reachabilityWithHostname:@"google.com"];
- [self.reachability startNotifier];
- }
- return self;
-}
-
-- (void)updateStaticContext
-{
- self.cachedStaticContext = getStaticContext(state.configuration, self.deviceToken);
-}
-
-- (NSDictionary *)payload
-{
- NSMutableDictionary *result = [self.cachedStaticContext mutableCopy];
- [result addEntriesFromDictionary:getLiveContext(self.reachability, self.referrer, state.userInfo.traits)];
- return result;
-}
-
-- (NSDictionary *)referrer
-{
- return [state valueWithBlock:^id{
- return self->_referrer;
- }];
-}
-
-- (void)setReferrer:(NSDictionary *)referrer
-{
- [state setValueWithBlock: ^{
- self->_referrer = [referrer serializableDeepCopy];
- }];
-}
-
-- (NSString *)deviceToken
-{
- return [state valueWithBlock:^id{
- return self->_deviceToken;
- }];
-}
-
-- (void)setDeviceToken:(NSString *)deviceToken
-{
- [state setValueWithBlock: ^{
- self->_deviceToken = [deviceToken copy];
- }];
- [self updateStaticContext];
-}
-
-@end
-
-
-#pragma mark - SEGState
-
-@implementation SEGState {
- dispatch_queue_t _stateQueue;
-}
-
-// TODO: Make this not a singleton.. :(
-+ (instancetype)sharedInstance
-{
- static SEGState *sharedInstance = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- sharedInstance = [[self alloc] init];
- });
- return sharedInstance;
-}
-
-- (instancetype)init
-{
- if (self = [super init]) {
- _stateQueue = dispatch_queue_create("com.segment.state.queue", DISPATCH_QUEUE_CONCURRENT);
- self.userInfo = [[SEGUserInfo alloc] initWithState:self];
- self.context = [[SEGPayloadContext alloc] initWithState:self];
- }
- return self;
-}
-
-- (void)setValueWithBlock:(SEGStateSetBlock)block
-{
- dispatch_barrier_async(_stateQueue, block);
-}
-
-- (id)valueWithBlock:(SEGStateGetBlock)block
-{
- __block id value = nil;
- dispatch_sync(_stateQueue, ^{
- value = block();
- });
- return value;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGStoreKitTracker.h b/Pods/Analytics/Segment/Internal/SEGStoreKitTracker.h
deleted file mode 100644
index 40636215e0..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGStoreKitTracker.h
+++ /dev/null
@@ -1,15 +0,0 @@
-@import Foundation;
-@import StoreKit;
-#import "SEGAnalytics.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-
-NS_SWIFT_NAME(StoreKitTracker)
-@interface SEGStoreKitTracker : NSObject
-
-+ (instancetype)trackTransactionsForAnalytics:(SEGAnalytics *)analytics;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Internal/SEGStoreKitTracker.m b/Pods/Analytics/Segment/Internal/SEGStoreKitTracker.m
deleted file mode 100644
index 61d65011d6..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGStoreKitTracker.m
+++ /dev/null
@@ -1,98 +0,0 @@
-#import "SEGStoreKitTracker.h"
-
-
-@interface SEGStoreKitTracker ()
-
-@property (nonatomic, readonly) SEGAnalytics *analytics;
-@property (nonatomic, readonly) NSMutableDictionary *transactions;
-@property (nonatomic, readonly) NSMutableDictionary *productRequests;
-
-@end
-
-
-@implementation SEGStoreKitTracker
-
-+ (instancetype)trackTransactionsForAnalytics:(SEGAnalytics *)analytics
-{
- return [[SEGStoreKitTracker alloc] initWithAnalytics:analytics];
-}
-
-- (instancetype)initWithAnalytics:(SEGAnalytics *)analytics
-{
- if (self = [self init]) {
- _analytics = analytics;
- _productRequests = [NSMutableDictionary dictionaryWithCapacity:1];
- _transactions = [NSMutableDictionary dictionaryWithCapacity:1];
-
- [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
- }
- return self;
-}
-
-- (void)dealloc
-{
- [[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
-}
-
-#pragma mark - SKPaymentQueue Observer
-- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
-{
- for (SKPaymentTransaction *transaction in transactions) {
- if (transaction.transactionState != SKPaymentTransactionStatePurchased) {
- continue;
- }
-
- SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:transaction.payment.productIdentifier]];
- @synchronized(self)
- {
- [self.transactions setObject:transaction forKey:transaction.payment.productIdentifier];
- [self.productRequests setObject:request forKey:transaction.payment.productIdentifier];
- }
- request.delegate = self;
- [request start];
- }
-}
-
-#pragma mark - SKProductsRequest delegate
-- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
-{
- for (SKProduct *product in response.products) {
- @synchronized(self)
- {
- SKPaymentTransaction *transaction = [self.transactions objectForKey:product.productIdentifier];
- [self trackTransaction:transaction forProduct:product];
- [self.transactions removeObjectForKey:product.productIdentifier];
- [self.productRequests removeObjectForKey:product.productIdentifier];
- }
- }
-}
-
-#pragma mark - Track
-- (void)trackTransaction:(SKPaymentTransaction *)transaction forProduct:(SKProduct *)product
-{
- // it seems the identifier is nil for renewable subscriptions
- // see http://stackoverflow.com/questions/14827059/skpaymenttransactions-originaltransaction-transactionreceipt-nil-for-restore-on
- // there isn't a spec'd event for this case ( https://segment.com/docs/spec/ecommerce/v2/ ) so ignoring it for now
- if (transaction.transactionIdentifier == nil) {
- return;
- }
-
- NSString *currency = [product.priceLocale objectForKey:NSLocaleCurrencyCode];
-
- [self.analytics track:@"Order Completed" properties:@{
- @"orderId" : transaction.transactionIdentifier,
- @"affiliation" : @"App Store",
- @"currency" : currency ?: @"",
- @"products" : @[
- @{
- @"sku" : transaction.transactionIdentifier,
- @"quantity" : @(transaction.payment.quantity),
- @"productId" : product.productIdentifier ?: @"",
- @"price" : product.price ?: @0,
- @"name" : product.localizedTitle ?: @"",
- }
- ]
- }];
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGUserDefaultsStorage.h b/Pods/Analytics/Segment/Internal/SEGUserDefaultsStorage.h
deleted file mode 100644
index 36b1d7082d..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGUserDefaultsStorage.h
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// SEGUserDefaultsStorage.h
-// Analytics
-//
-// Created by Tony Xiao on 8/24/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-@import Foundation;
-#import "SEGStorage.h"
-
-
-NS_SWIFT_NAME(UserDefaultsStorage)
-@interface SEGUserDefaultsStorage : NSObject
-
-@property (nonatomic, strong, nullable) id crypto;
-@property (nonnull, nonatomic, readonly) NSUserDefaults *defaults;
-@property (nullable, nonatomic, readonly) NSString *namespacePrefix;
-
-- (instancetype _Nonnull)initWithDefaults:(NSUserDefaults *_Nonnull)defaults namespacePrefix:(NSString *_Nullable)namespacePrefix crypto:(id _Nullable)crypto;
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGUserDefaultsStorage.m b/Pods/Analytics/Segment/Internal/SEGUserDefaultsStorage.m
deleted file mode 100644
index 8fe58683eb..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGUserDefaultsStorage.m
+++ /dev/null
@@ -1,165 +0,0 @@
-//
-// SEGUserDefaultsStorage.m
-// Analytics
-//
-// Created by Tony Xiao on 8/24/16.
-// Copyright © 2016 Segment. All rights reserved.
-//
-
-#import "SEGUtils.h"
-#import "SEGUserDefaultsStorage.h"
-#import "SEGCrypto.h"
-
-
-@implementation SEGUserDefaultsStorage
-
-- (instancetype)initWithDefaults:(NSUserDefaults *)defaults namespacePrefix:(NSString *)namespacePrefix crypto:(id)crypto
-{
- if (self = [super init]) {
- _defaults = defaults;
- _namespacePrefix = namespacePrefix;
- _crypto = crypto;
- }
- return self;
-}
-
-- (void)removeKey:(NSString *)key
-{
- [self.defaults removeObjectForKey:[self namespacedKey:key]];
-}
-
-- (void)resetAll
-{
- // Courtesy of http://stackoverflow.com/questions/6358737/nsuserdefaults-reset
- if (!self.namespacePrefix) {
- NSString *domainName = [[NSBundle mainBundle] bundleIdentifier];
- if (domainName) {
- [self.defaults removePersistentDomainForName:domainName];
- return;
- }
- }
- for (NSString *key in self.defaults.dictionaryRepresentation.allKeys) {
- if (!self.namespacePrefix || [key hasPrefix:self.namespacePrefix]) {
- [self.defaults removeObjectForKey:key];
- }
- }
- [self.defaults synchronize];
-}
-
-- (void)setObject:(id)object forKey:(NSString *)key
-{
- // pass through for NSUserDefaults to remove keys if supplied a nil value.
- if (object) {
- [self.defaults setObject:object forKey:key];
- } else {
- [self.defaults removeObjectForKey:key];
- }
-}
-
-- (void)setData:(NSData *)data forKey:(NSString *)key
-{
- key = [self namespacedKey:key];
- if (!self.crypto) {
- [self.defaults setObject:data forKey:key];
- return;
- }
- NSData *encryptedData = [self.crypto encrypt:data];
- [self setObject:encryptedData forKey:key];
-}
-
-- (NSData *)dataForKey:(NSString *)key
-{
- key = [self namespacedKey:key];
- if (!self.crypto) {
- return [self.defaults objectForKey:key];
- }
- NSData *data = [self.defaults objectForKey:key];
- if (!data) {
- SEGLog(@"WARNING: No data file for key %@", key);
- return nil;
- }
- return [self.crypto decrypt:data];
-}
-
-- (NSDictionary *)dictionaryForKey:(NSString *)key
-{
- if (!self.crypto) {
- key = [self namespacedKey:key];
- return [self.defaults dictionaryForKey:key];
- }
- return [self plistForKey:key];
-}
-
-- (void)setDictionary:(NSDictionary *)dictionary forKey:(NSString *)key
-{
- if (!self.crypto) {
- key = [self namespacedKey:key];
- [self setObject:[dictionary plistCompatible] forKey:key];
- return;
- }
- [self setPlist:[dictionary plistCompatible] forKey:key];
-}
-
-- (NSArray *)arrayForKey:(NSString *)key
-{
- if (!self.crypto) {
- key = [self namespacedKey:key];
- return [self.defaults arrayForKey:key];
- }
- return [self plistForKey:key];
-}
-
-- (void)setArray:(NSArray *)array forKey:(NSString *)key
-{
- if (!self.crypto) {
- key = [self namespacedKey:key];
- [self setObject:[array plistCompatible] forKey:key];
- return;
- }
- [self setPlist:[array plistCompatible] forKey:key];
-}
-
-- (NSString *)stringForKey:(NSString *)key
-{
- if (!self.crypto) {
- key = [self namespacedKey:key];
- return [self.defaults stringForKey:key];
- }
- return [self plistForKey:key];
-}
-
-- (void)setString:(NSString *)string forKey:(NSString *)key
-{
- if (!self.crypto) {
- key = [self namespacedKey:key];
- [self setObject:string forKey:key];
- return;
- }
- [self setPlist:string forKey:key];
-}
-
-#pragma mark - Helpers
-
-- (id _Nullable)plistForKey:(NSString *)key
-{
- NSData *data = [self dataForKey:key];
- return data ? [SEGUtils plistFromData:data] : nil;
-}
-
-- (void)setPlist:(id _Nonnull)plist forKey:(NSString *)key
-{
- NSData *data = [SEGUtils dataFromPlist:plist];
- if (data) {
- [self setData:data forKey:key];
- }
-}
-
-- (NSString *)namespacedKey:(NSString *)key
-{
- if (self.namespacePrefix) {
- return [NSString stringWithFormat:@"%@.%@", self.namespacePrefix, key];
- }
- return key;
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/SEGUtils.h b/Pods/Analytics/Segment/Internal/SEGUtils.h
deleted file mode 100644
index ac8a146098..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGUtils.h
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// SEGUtils.h
-//
-//
-
-@import Foundation;
-#import "SEGAnalyticsUtils.h"
-#import "SEGSerializableValue.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class SEGAnalyticsConfiguration;
-@class SEGReachability;
-
-NS_SWIFT_NAME(Utilities)
-@interface SEGUtils : NSObject
-
-+ (void)saveAPIHost:(nonnull NSString *)apiHost;
-+ (nonnull NSString *)getAPIHost;
-+ (nullable NSURL *)getAPIHostURL;
-
-+ (NSData *_Nullable)dataFromPlist:(nonnull id)plist;
-+ (id _Nullable)plistFromData:(NSData *)data;
-
-+ (id _Nullable)traverseJSON:(id _Nullable)object andReplaceWithFilters:(NSDictionary*)patterns;
-
-@end
-
-BOOL isUnitTesting(void);
-
-NSString * _Nullable deviceTokenToString(NSData * _Nullable deviceToken);
-NSString *getDeviceModel(void);
-BOOL getAdTrackingEnabled(SEGAnalyticsConfiguration *configuration);
-NSDictionary *getStaticContext(SEGAnalyticsConfiguration *configuration, NSString * _Nullable deviceToken);
-NSDictionary *getLiveContext(SEGReachability *reachability, NSDictionary * _Nullable referrer, NSDictionary * _Nullable traits);
-
-NSString *GenerateUUIDString(void);
-
-#if TARGET_OS_IPHONE
-NSDictionary *mobileSpecifications(SEGAnalyticsConfiguration *configuration, NSString * _Nullable deviceToken);
-#elif TARGET_OS_OSX
-NSDictionary *desktopSpecifications(SEGAnalyticsConfiguration *configuration, NSString * _Nullable deviceToken);
-#endif
-
-// Date Utils
-NSString *iso8601FormattedString(NSDate *date);
-NSString *iso8601NanoFormattedString(NSDate *date);
-
-void trimQueue(NSMutableArray *array, NSUInteger size);
-
-// Async Utils
-dispatch_queue_t seg_dispatch_queue_create_specific(const char *label,
- dispatch_queue_attr_t _Nullable attr);
-BOOL seg_dispatch_is_on_specific_queue(dispatch_queue_t queue);
-void seg_dispatch_specific(dispatch_queue_t queue, dispatch_block_t block,
- BOOL waitForCompletion);
-void seg_dispatch_specific_async(dispatch_queue_t queue,
- dispatch_block_t block);
-void seg_dispatch_specific_sync(dispatch_queue_t queue, dispatch_block_t block);
-
-// JSON Utils
-
-JSON_DICT SEGCoerceDictionary(NSDictionary *_Nullable dict);
-
-NSString *_Nullable SEGIDFA(void);
-
-NSString *SEGEventNameForScreenTitle(NSString *title);
-
-@interface NSJSONSerialization (Serializable)
-+ (BOOL)isOfSerializableType:(id)obj;
-@end
-
-// Deep copy and check NSCoding conformance
-@protocol SEGSerializableDeepCopy
--(id _Nullable) serializableMutableDeepCopy;
--(id _Nullable) serializableDeepCopy;
-@end
-
-@interface NSDictionary(SerializableDeepCopy)
-@end
-
-@interface NSArray(SerializableDeepCopy)
-@end
-
-@interface NSDictionary(PListJSON)
-- (NSDictionary *)plistCompatible;
-@end
-
-@interface NSArray(PListJSON)
-- (NSDictionary *)plistCompatible;
-@end
-
-
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/Analytics/Segment/Internal/SEGUtils.m b/Pods/Analytics/Segment/Internal/SEGUtils.m
deleted file mode 100644
index 8781a1f85e..0000000000
--- a/Pods/Analytics/Segment/Internal/SEGUtils.m
+++ /dev/null
@@ -1,703 +0,0 @@
-//
-// SEGUtils.m
-//
-//
-
-#import "SEGUtils.h"
-#import "SEGAnalyticsConfiguration.h"
-#import "SEGReachability.h"
-#import "SEGAnalytics.h"
-#import "SEGHTTPClient.h"
-
-#include
-
-#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
-@import CoreTelephony;
-static CTTelephonyNetworkInfo *_telephonyNetworkInfo;
-#endif
-
-const NSString *segment_apiHost = @"segment_apihost";
-
-@interface SEGAnalyticsConfiguration(InstanceId)
-@property (nonatomic, strong) NSString *instanceId;
-@end
-
-@implementation SEGUtils
-
-+ (void)saveAPIHost:(nonnull NSString *)apiHost
-{
- if (!apiHost) {
- return;
- }
- if (![apiHost containsString:@"https://"]) {
- apiHost = [NSString stringWithFormat:@"https://%@", apiHost];
- }
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- [defaults setObject:apiHost forKey:[segment_apiHost copy]];
-}
-
-+ (nonnull NSString *)getAPIHost
-{
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSString *result = [defaults stringForKey:[segment_apiHost copy]];
- if (!result) {
- result = kSegmentAPIBaseHost;
- }
- return result;
-}
-
-+ (nullable NSURL *)getAPIHostURL
-{
- return [NSURL URLWithString:[SEGUtils getAPIHost]];
-}
-
-+ (NSData *_Nullable)dataFromPlist:(nonnull id)plist
-{
- NSError *error = nil;
- NSData *data = [NSPropertyListSerialization dataWithPropertyList:plist
- format:NSPropertyListXMLFormat_v1_0
- options:0
- error:&error];
- if (error) {
- SEGLog(@"Unable to serialize data from plist object", error, plist);
- }
- return data;
-}
-
-+ (id _Nullable)plistFromData:(NSData *_Nonnull)data
-{
- NSError *error = nil;
- id plist = [NSPropertyListSerialization propertyListWithData:data
- options:0
- format:nil
- error:&error];
- if (error) {
- SEGLog(@"Unable to parse plist from data %@", error);
- }
- return plist;
-}
-
-
-+(id)traverseJSON:(id)object andReplaceWithFilters:(NSDictionary*)patterns
-{
- if ([object isKindOfClass:NSDictionary.class]) {
- NSDictionary* dict = object;
- NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:dict.count];
-
- for (NSString* key in dict.allKeys) {
- newDict[key] = [self traverseJSON:dict[key] andReplaceWithFilters:patterns];
- }
-
- return newDict;
- }
-
- if ([object isKindOfClass:NSArray.class]) {
- NSArray* array = object;
- NSMutableArray* newArray = [NSMutableArray arrayWithCapacity:array.count];
-
- for (int i = 0; i < array.count; i++) {
- newArray[i] = [self traverseJSON:array[i] andReplaceWithFilters:patterns];
- }
-
- return newArray;
- }
-
- if ([object isKindOfClass:NSString.class]) {
- NSError* error = nil;
- NSMutableString* str = [object mutableCopy];
-
- for (NSString* pattern in patterns) {
- NSRegularExpression* re = [NSRegularExpression regularExpressionWithPattern:pattern
- options:0
- error:&error];
-
- if (error) {
- @throw error;
- }
-
- NSInteger matches = [re replaceMatchesInString:str
- options:0
- range:NSMakeRange(0, str.length)
- withTemplate:patterns[pattern]];
-
- if (matches > 0) {
- SEGLog(@"%@ Redacted value from action: %@", self, pattern);
- }
- }
-
- return str;
- }
-
- return object;
-}
-
-@end
-
-BOOL isUnitTesting()
-{
- static dispatch_once_t pred = 0;
- static BOOL _isUnitTesting = NO;
- dispatch_once(&pred, ^{
- NSDictionary *env = [NSProcessInfo processInfo].environment;
- _isUnitTesting = (env[@"XCTestConfigurationFilePath"] != nil);
- });
- return _isUnitTesting;
-}
-
-NSString *deviceTokenToString(NSData *deviceToken)
-{
- if (!deviceToken) return nil;
-
- const unsigned char *buffer = (const unsigned char *)[deviceToken bytes];
- if (!buffer) {
- return nil;
- }
- NSMutableString *token = [NSMutableString stringWithCapacity:(deviceToken.length * 2)];
- for (NSUInteger i = 0; i < deviceToken.length; i++) {
- [token appendString:[NSString stringWithFormat:@"%02lx", (unsigned long)buffer[i]]];
- }
- return token;
-}
-
-NSString *getDeviceModel()
-{
- size_t size;
- sysctlbyname("hw.machine", NULL, &size, NULL, 0);
- char result[size];
- sysctlbyname("hw.machine", result, &size, NULL, 0);
- NSString *results = [NSString stringWithCString:result encoding:NSUTF8StringEncoding];
- return results;
-}
-
-BOOL getAdTrackingEnabled(SEGAnalyticsConfiguration *configuration)
-{
- BOOL result = NO;
- if ((configuration.adSupportBlock != nil) && (configuration.enableAdvertisingTracking)) {
- result = YES;
- }
- return result;
-}
-
-NSDictionary *getStaticContext(SEGAnalyticsConfiguration *configuration, NSString *deviceToken)
-{
- NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
-
- dict[@"library"] = @{
- @"name" : @"analytics-ios",
- @"version" : [SEGAnalytics version]
- };
-
- dict[@"instanceId"] = configuration.instanceId;
-
- NSMutableDictionary *infoDictionary = [[[NSBundle mainBundle] infoDictionary] mutableCopy];
- [infoDictionary addEntriesFromDictionary:[[NSBundle mainBundle] localizedInfoDictionary]];
- if (infoDictionary.count) {
- dict[@"app"] = @{
- @"name" : infoDictionary[@"CFBundleDisplayName"] ?: @"",
- @"version" : infoDictionary[@"CFBundleShortVersionString"] ?: @"",
- @"build" : infoDictionary[@"CFBundleVersion"] ?: @"",
- @"namespace" : [[NSBundle mainBundle] bundleIdentifier] ?: @"",
- };
- }
-
- NSDictionary *settingsDictionary = nil;
-#if TARGET_OS_IPHONE
- settingsDictionary = mobileSpecifications(configuration, deviceToken);
-#elif TARGET_OS_OSX
- settingsDictionary = desktopSpecifications(configuration, deviceToken);
-#endif
-
- if (settingsDictionary != nil) {
- dict[@"device"] = settingsDictionary[@"device"];
- dict[@"os"] = settingsDictionary[@"os"];
- dict[@"screen"] = settingsDictionary[@"screen"];
- }
-
- return dict;
-}
-
-#if TARGET_OS_IPHONE
-NSDictionary *mobileSpecifications(SEGAnalyticsConfiguration *configuration, NSString *deviceToken)
-{
- NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
- UIDevice *device = [UIDevice currentDevice];
- dict[@"device"] = ({
- NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
- dict[@"manufacturer"] = @"Apple";
-#if TARGET_OS_MACCATALYST
- dict[@"type"] = @"macos";
- dict[@"name"] = @"Macintosh";
-#else
- dict[@"type"] = @"ios";
- dict[@"name"] = [device model];
-#endif
- dict[@"model"] = getDeviceModel();
- dict[@"id"] = [[device identifierForVendor] UUIDString];
- if (getAdTrackingEnabled(configuration)) {
- NSString *idfa = configuration.adSupportBlock();
- // This isn't ideal. We're doing this because we can't actually check if IDFA is enabled on
- // the customer device. Apple docs and tests show that if it is disabled, one gets back all 0's.
- BOOL adTrackingEnabled = (![idfa isEqualToString:@"00000000-0000-0000-0000-000000000000"]);
- dict[@"adTrackingEnabled"] = @(adTrackingEnabled);
-
- if (adTrackingEnabled) {
- dict[@"advertisingId"] = idfa;
- }
- }
- if (deviceToken && deviceToken.length > 0) {
- dict[@"token"] = deviceToken;
- }
- dict;
- });
-
- dict[@"os"] = @{
- @"name" : device.systemName,
- @"version" : device.systemVersion
- };
-
- CGSize screenSize = [UIScreen mainScreen].bounds.size;
- dict[@"screen"] = @{
- @"width" : @(screenSize.width),
- @"height" : @(screenSize.height)
- };
-
- // BKS: This bit below doesn't seem to be effective anymore. Will investigate later.
- /*#if !(TARGET_IPHONE_SIMULATOR)
- Class adClient = NSClassFromString(SEGADClientClass);
- if (adClient) {
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
- id sharedClient = [adClient performSelector:NSSelectorFromString(@"sharedClient")];
- #pragma clang diagnostic pop
- void (^completionHandler)(BOOL iad) = ^(BOOL iad) {
- if (iad) {
- dict[@"referrer"] = @{ @"type" : @"iad" };
- }
- };
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
- [sharedClient performSelector:NSSelectorFromString(@"determineAppInstallationAttributionWithCompletionHandler:")
- withObject:completionHandler];
- #pragma clang diagnostic pop
- }
- #endif*/
-
- return dict;
-}
-#endif
-
-#if TARGET_OS_OSX
-NSString *getMacUUID()
-{
- char buf[512] = { 0 };
- int bufSize = sizeof(buf);
- io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/");
- CFStringRef uuidCf = (CFStringRef) IORegistryEntryCreateCFProperty(ioRegistryRoot, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0);
- IOObjectRelease(ioRegistryRoot);
- CFStringGetCString(uuidCf, buf, bufSize, kCFStringEncodingMacRoman);
- CFRelease(uuidCf);
- return [NSString stringWithUTF8String:buf];
-}
-
-NSDictionary *desktopSpecifications(SEGAnalyticsConfiguration *configuration, NSString *deviceToken)
-{
- NSProcessInfo *deviceInfo = [NSProcessInfo processInfo];
- NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
- dict[@"device"] = ({
- NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
- dict[@"manufacturer"] = @"Apple";
- dict[@"type"] = @"macos";
- dict[@"model"] = getDeviceModel();
- dict[@"id"] = getMacUUID();
- dict[@"name"] = [deviceInfo hostName];
-
- if (getAdTrackingEnabled(configuration)) {
- NSString *idfa = configuration.adSupportBlock();
- // This isn't ideal. We're doing this because we can't actually check if IDFA is enabled on
- // the customer device. Apple docs and tests show that if it is disabled, one gets back all 0's.
- BOOL adTrackingEnabled = (![idfa isEqualToString:@"00000000-0000-0000-0000-000000000000"]);
- dict[@"adTrackingEnabled"] = @(adTrackingEnabled);
-
- if (adTrackingEnabled) {
- dict[@"advertisingId"] = idfa;
- }
- }
- if (deviceToken && deviceToken.length > 0) {
- dict[@"token"] = deviceToken;
- }
- dict;
- });
-
- dict[@"os"] = @{
- @"name" : deviceInfo.operatingSystemVersionString,
- @"version" : [NSString stringWithFormat:@"%ld.%ld.%ld",
- deviceInfo.operatingSystemVersion.majorVersion,
- deviceInfo.operatingSystemVersion.minorVersion,
- deviceInfo.operatingSystemVersion.patchVersion]
- };
-
- CGSize screenSize = [NSScreen mainScreen].frame.size;
- dict[@"screen"] = @{
- @"width" : @(screenSize.width),
- @"height" : @(screenSize.height)
- };
-
- return dict;
-}
-
-#endif
-
-NSDictionary *getLiveContext(SEGReachability *reachability, NSDictionary *referrer, NSDictionary *traits)
-{
- NSMutableDictionary *context = [[NSMutableDictionary alloc] init];
- context[@"locale"] = [NSString stringWithFormat:
- @"%@-%@",
- [NSLocale.currentLocale objectForKey:NSLocaleLanguageCode],
- [NSLocale.currentLocale objectForKey:NSLocaleCountryCode]];
-
- context[@"timezone"] = [[NSTimeZone localTimeZone] name];
-
- context[@"network"] = ({
- NSMutableDictionary *network = [[NSMutableDictionary alloc] init];
-
- if (reachability.isReachable) {
- network[@"wifi"] = @(reachability.isReachableViaWiFi);
- network[@"cellular"] = @(reachability.isReachableViaWWAN);
- }
-
-#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
- static dispatch_once_t networkInfoOnceToken;
- dispatch_once(&networkInfoOnceToken, ^{
- _telephonyNetworkInfo = [[CTTelephonyNetworkInfo alloc] init];
- });
-
- CTCarrier *carrier = [_telephonyNetworkInfo subscriberCellularProvider];
- if (carrier.carrierName.length)
- network[@"carrier"] = carrier.carrierName;
-#endif
-
- network;
- });
-
- context[@"traits"] = [traits copy];
-
- if (referrer) {
- context[@"referrer"] = [referrer copy];
- }
-
- return [context copy];
-}
-
-
-@interface SEGISO8601NanosecondDateFormatter: NSDateFormatter
-@end
-
-@implementation SEGISO8601NanosecondDateFormatter
-
-- (id)init
-{
- self = [super init];
- self.dateFormat = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSS:'Z'";
- self.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
- self.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
- return self;
-}
-
-const NSInteger __SEG_NANO_MAX_LENGTH = 9;
-- (NSString * _Nonnull)stringFromDate:(NSDate *)date
-{
- NSCalendar *calendar = [NSCalendar currentCalendar];
- NSDateComponents *dateComponents = [calendar components:NSCalendarUnitSecond | NSCalendarUnitNanosecond fromDate:date];
- NSString *genericDateString = [super stringFromDate:date];
-
- NSMutableArray *stringComponents = [[genericDateString componentsSeparatedByString:@"."] mutableCopy];
- NSString *nanoSeconds = [NSString stringWithFormat:@"%li", (long)dateComponents.nanosecond];
-
- if (nanoSeconds.length > __SEG_NANO_MAX_LENGTH) {
- nanoSeconds = [nanoSeconds substringToIndex:__SEG_NANO_MAX_LENGTH];
- } else {
- nanoSeconds = [nanoSeconds stringByPaddingToLength:__SEG_NANO_MAX_LENGTH withString:@"0" startingAtIndex:0];
- }
-
- NSString *result = [NSString stringWithFormat:@"%@.%@Z", stringComponents[0], nanoSeconds];
-
- return result;
-}
-
-@end
-
-
-NSString *GenerateUUIDString()
-{
- CFUUIDRef theUUID = CFUUIDCreate(NULL);
- NSString *UUIDString = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, theUUID);
- CFRelease(theUUID);
- return UUIDString;
-}
-
-
-// Date Utils
-NSString *iso8601NanoFormattedString(NSDate *date)
-{
- static NSDateFormatter *dateFormatter;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- dateFormatter = [[SEGISO8601NanosecondDateFormatter alloc] init];
- });
- return [dateFormatter stringFromDate:date];
-}
-
-NSString *iso8601FormattedString(NSDate *date)
-{
- static NSDateFormatter *dateFormatter;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- dateFormatter = [[NSDateFormatter alloc] init];
- dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
- dateFormatter.dateFormat = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSS'Z'";
- dateFormatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
- });
- return [dateFormatter stringFromDate:date];
-}
-
-
-/** trim the queue so that it contains only upto `max` number of elements. */
-void trimQueue(NSMutableArray *queue, NSUInteger max)
-{
- if (queue.count < max) {
- return;
- }
-
- // Previously we didn't cap the queue. Hence there are cases where
- // the queue may already be larger than 1000 events. Delete as many
- // events as required to trim the queue size.
- NSRange range = NSMakeRange(0, queue.count - max);
- [queue removeObjectsInRange:range];
-}
-
-// Async Utils
-dispatch_queue_t
-seg_dispatch_queue_create_specific(const char *label,
- dispatch_queue_attr_t attr)
-{
- dispatch_queue_t queue = dispatch_queue_create(label, attr);
- dispatch_queue_set_specific(queue, (__bridge const void *)queue,
- (__bridge void *)queue, NULL);
- return queue;
-}
-
-BOOL seg_dispatch_is_on_specific_queue(dispatch_queue_t queue)
-{
- return dispatch_get_specific((__bridge const void *)queue) != NULL;
-}
-
-void seg_dispatch_specific(dispatch_queue_t queue, dispatch_block_t block,
- BOOL waitForCompletion)
-{
- dispatch_block_t autoreleasing_block = ^{
- @autoreleasepool
- {
- block();
- }
- };
- if (dispatch_get_specific((__bridge const void *)queue)) {
- autoreleasing_block();
- } else if (waitForCompletion) {
- dispatch_sync(queue, autoreleasing_block);
- } else {
- dispatch_async(queue, autoreleasing_block);
- }
-}
-
-void seg_dispatch_specific_async(dispatch_queue_t queue,
- dispatch_block_t block)
-{
- seg_dispatch_specific(queue, block, NO);
-}
-
-void seg_dispatch_specific_sync(dispatch_queue_t queue,
- dispatch_block_t block)
-{
- seg_dispatch_specific(queue, block, YES);
-}
-
-NSDictionary *SEGCoerceDictionary(NSDictionary *dict)
-{
- // make sure that a new dictionary exists even if the input is null
- dict = dict ?: @{};
- // assert that the proper types are in the dictionary
- dict = [dict serializableDeepCopy];
- return dict;
-}
-
-NSString *SEGEventNameForScreenTitle(NSString *title)
-{
- return [[NSString alloc] initWithFormat:@"Viewed %@ Screen", title];
-}
-
-@implementation NSJSONSerialization(Serializable)
-+ (BOOL)isOfSerializableType:(id)obj
-{
- if ([obj conformsToProtocol:@protocol(SEGSerializable)])
- return YES;
-
- if ([obj isKindOfClass:[NSArray class]] ||
- [obj isKindOfClass:[NSDictionary class]] ||
- [obj isKindOfClass:[NSString class]] ||
- [obj isKindOfClass:[NSNumber class]] ||
- [obj isKindOfClass:[NSNull class]])
- return YES;
- return NO;
-}
-@end
-
-
-@implementation NSDictionary(SerializableDeepCopy)
-
-- (id)serializableDeepCopy:(BOOL)mutable
-{
- NSMutableDictionary *result = [[NSMutableDictionary alloc] initWithCapacity:self.count];
- NSArray *keys = [self allKeys];
- for (id key in keys) {
- id aValue = [self objectForKey:key];
- id theCopy = nil;
-
- if (![NSJSONSerialization isOfSerializableType:aValue]) {
- NSString *className = NSStringFromClass([aValue class]);
-#ifdef DEBUG
- NSAssert(FALSE, @"key `%@` is a %@ and can't be serialized for delivery.", key, className);
-#else
- SEGLog(@"key `%@` is a %@ and can't be serializaed for delivery.", key, className);
- // simply leave it out since we can't encode it anyway.
- continue;
-#endif
- }
-
- if ([aValue conformsToProtocol:@protocol(SEGSerializableDeepCopy)]) {
- theCopy = [aValue serializableDeepCopy:mutable];
- } else if ([aValue conformsToProtocol:@protocol(SEGSerializable)]) {
- theCopy = [aValue serializeToAppropriateType];
- } else if ([aValue conformsToProtocol:@protocol(NSCopying)]) {
- theCopy = [aValue copy];
- } else {
- theCopy = aValue;
- }
-
- [result setValue:theCopy forKey:key];
- }
-
- if (mutable) {
- return result;
- } else {
- return [result copy];
- }
-}
-
-- (NSDictionary *)serializableDeepCopy {
- return [self serializableDeepCopy:NO];
-}
-
-- (NSMutableDictionary *)serializableMutableDeepCopy {
- return [self serializableDeepCopy:YES];
-}
-
-@end
-
-
-@implementation NSArray(SerializableDeepCopy)
-
--(id)serializableDeepCopy:(BOOL)mutable
-{
- NSMutableArray *result = [[NSMutableArray alloc] initWithCapacity:self.count];
-
- for (id aValue in self) {
- id theCopy = nil;
-
- if (![NSJSONSerialization isOfSerializableType:aValue]) {
- NSString *className = NSStringFromClass([aValue class]);
-#ifdef DEBUG
- NSAssert(FALSE, @"found a %@ which can't be serialized for delivery.", className);
-#else
- SEGLog(@"found a %@ which can't be serializaed for delivery.", className);
- // simply leave it out since we can't encode it anyway.
- continue;
-#endif
- }
-
- if ([aValue conformsToProtocol:@protocol(SEGSerializableDeepCopy)]) {
- theCopy = [aValue serializableDeepCopy:mutable];
- } else if ([aValue conformsToProtocol:@protocol(SEGSerializable)]) {
- theCopy = [aValue serializeToAppropriateType];
- } else if ([aValue conformsToProtocol:@protocol(NSCopying)]) {
- theCopy = [aValue copy];
- } else {
- theCopy = aValue;
- }
- [result addObject:theCopy];
- }
-
- if (mutable) {
- return result;
- } else {
- return [result copy];
- }
-}
-
-
-- (NSArray *)serializableDeepCopy {
- return [self serializableDeepCopy:NO];
-}
-
-- (NSMutableArray *)serializableMutableDeepCopy {
- return [self serializableDeepCopy:YES];
-}
-
-@end
-
-
-@implementation NSDictionary(PListJSON)
-
-- (NSDictionary *)plistCompatible {
- const NSMutableDictionary *replaced = [NSMutableDictionary new];
- const id null = [NSNull null];
-
- for(NSString *key in self) {
- const id object = [self objectForKey:key];
- if(object == null) {
- continue;
- } else if ([object isKindOfClass:[NSDictionary class]]) {
- [replaced setObject:[object plistCompatible] forKey:key];
- } else if ([object isKindOfClass:[NSArray class]]) {
- [replaced setObject:[object plistCompatible] forKey:key];
- } else {
- [replaced setObject:object forKey:key];
- }
- }
- return [NSDictionary dictionaryWithDictionary:(NSDictionary*)replaced];
-}
-
-@end
-
-@implementation NSArray(PListJSON)
-
-- (NSArray *)plistCompatible {
- const NSMutableArray *replaced = [NSMutableArray new];
- const id null = [NSNull null];
-
- for (int i=0; i<[self count]; i++) {
- const id object = [self objectAtIndex:i];
-
- if ([object isKindOfClass:[NSDictionary class]]) {
- [replaced setObject:[object plistCompatible] atIndexedSubscript:i];
- } else if ([object isKindOfClass:[NSArray class]]) {
- [replaced setObject:[object plistCompatible] atIndexedSubscript:i];
- } else if (object == null) {
- continue;
- } else {
- [replaced setObject:object atIndexedSubscript:i];
- }
- }
- return [NSArray arrayWithArray:(NSArray*)replaced];
-}
-
-@end
diff --git a/Pods/Analytics/Segment/Internal/UIViewController+SEGScreen.h b/Pods/Analytics/Segment/Internal/UIViewController+SEGScreen.h
deleted file mode 100644
index 6b81b6049e..0000000000
--- a/Pods/Analytics/Segment/Internal/UIViewController+SEGScreen.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#import "SEGSerializableValue.h"
-
-#if TARGET_OS_IPHONE
-@import UIKit;
-
-@interface UIViewController (SEGScreen)
-
-+ (void)seg_swizzleViewDidAppear;
-+ (UIViewController *)seg_rootViewControllerFromView:(UIView *)view;
-
-@end
-
-#endif
diff --git a/Pods/Analytics/Segment/Internal/UIViewController+SEGScreen.m b/Pods/Analytics/Segment/Internal/UIViewController+SEGScreen.m
deleted file mode 100644
index 8fd35623ad..0000000000
--- a/Pods/Analytics/Segment/Internal/UIViewController+SEGScreen.m
+++ /dev/null
@@ -1,124 +0,0 @@
-#import "UIViewController+SEGScreen.h"
-#import
-#import "SEGAnalytics.h"
-#import "SEGAnalyticsUtils.h"
-#import "SEGScreenReporting.h"
-
-
-#if TARGET_OS_IPHONE
-@implementation UIViewController (SEGScreen)
-
-+ (void)seg_swizzleViewDidAppear
-{
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- Class class = [self class];
-
- SEL originalSelector = @selector(viewDidAppear:);
- SEL swizzledSelector = @selector(seg_viewDidAppear:);
-
- Method originalMethod = class_getInstanceMethod(class, originalSelector);
- Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
-
- BOOL didAddMethod =
- class_addMethod(class,
- originalSelector,
- method_getImplementation(swizzledMethod),
- method_getTypeEncoding(swizzledMethod));
-
- if (didAddMethod) {
- class_replaceMethod(class,
- swizzledSelector,
- method_getImplementation(originalMethod),
- method_getTypeEncoding(originalMethod));
- } else {
- method_exchangeImplementations(originalMethod, swizzledMethod);
- }
- });
-}
-
-
-+ (UIViewController *)seg_rootViewControllerFromView:(UIView *)view
-{
- UIViewController *root = view.window.rootViewController;
- return [self seg_topViewController:root];
-}
-
-+ (UIViewController *)seg_topViewController:(UIViewController *)rootViewController
-{
- UIViewController *nextRootViewController = [self seg_nextRootViewController:rootViewController];
- if (nextRootViewController) {
- return [self seg_topViewController:nextRootViewController];
- }
-
- return rootViewController;
-}
-
-+ (UIViewController *)seg_nextRootViewController:(UIViewController *)rootViewController
-{
- UIViewController *presentedViewController = rootViewController.presentedViewController;
- if (presentedViewController != nil) {
- return presentedViewController;
- }
-
- if ([rootViewController isKindOfClass:[UINavigationController class]]) {
- UIViewController *lastViewController = ((UINavigationController *)rootViewController).viewControllers.lastObject;
- return lastViewController;
- }
-
- if ([rootViewController isKindOfClass:[UITabBarController class]]) {
- __auto_type *currentTabViewController = ((UITabBarController*)rootViewController).selectedViewController;
- if (currentTabViewController != nil) {
- return currentTabViewController;
- }
- }
-
- if (rootViewController.childViewControllers.count > 0) {
- if ([rootViewController conformsToProtocol:@protocol(SEGScreenReporting)] && [rootViewController respondsToSelector:@selector(seg_mainViewController)]) {
- __auto_type screenReporting = (UIViewController*)rootViewController;
- return screenReporting.seg_mainViewController;
- }
-
- // fall back on first child UIViewController as a "best guess" assumption
- __auto_type *firstChildViewController = rootViewController.childViewControllers.firstObject;
- if (firstChildViewController != nil) {
- return firstChildViewController;
- }
- }
-
- return nil;
-}
-
-- (void)seg_viewDidAppear:(BOOL)animated
-{
- UIViewController *top = [[self class] seg_rootViewControllerFromView:self.view];
- if (!top) {
- SEGLog(@"Could not infer screen.");
- return;
- }
-
- NSString *name = [[[top class] description] stringByReplacingOccurrencesOfString:@"ViewController" withString:@""];
-
- if (!name || name.length == 0) {
- // if no class description found, try view controller's title.
- name = [top title];
- // Class name could be just "ViewController".
- if (name.length == 0) {
- SEGLog(@"Could not infer screen name.");
- name = @"Unknown";
- }
- }
-
- if ([top conformsToProtocol:@protocol(SEGScreenReporting)] && [top respondsToSelector:@selector(seg_trackScreen:name:)]) {
- __auto_type screenReporting = (UIViewController*)top;
- [screenReporting seg_trackScreen:top name:name];
- return;
- }
-
- [[SEGAnalytics sharedAnalytics] screen:name properties:nil options:nil];
-
- [self seg_viewDidAppear:animated];
-}
-
-@end
-#endif
diff --git a/Pods/AppAuth/LICENSE b/Pods/AppAuth/LICENSE
deleted file mode 100644
index d645695673..0000000000
--- a/Pods/AppAuth/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/Pods/AppAuth/README.md b/Pods/AppAuth/README.md
deleted file mode 100644
index 78f79959f0..0000000000
--- a/Pods/AppAuth/README.md
+++ /dev/null
@@ -1,717 +0,0 @@
-![AppAuth for iOS and macOS](https://rawgit.com/openid/AppAuth-iOS/master/appauth_lockup.svg)
-[![tests](https://github.com/openid/AppAuth-iOS/actions/workflows/tests.yml/badge.svg?event=push)](https://github.com/openid/AppAuth-iOS/actions/workflows/tests.yml)
-[![codecov](https://codecov.io/gh/openid/AppAuth-iOS/branch/master/graph/badge.svg)](https://codecov.io/gh/openid/AppAuth-iOS)
-[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)
-[![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg?style=flat)](https://swift.org/package-manager)
-[![Pod Version](https://img.shields.io/cocoapods/v/AppAuth.svg?style=flat)](https://cocoapods.org/pods/AppAuth)
-[![Pod License](https://img.shields.io/cocoapods/l/AppAuth.svg?style=flat)](https://github.com/openid/AppAuth-iOS/blob/master/LICENSE)
-[![Pod Platform](https://img.shields.io/cocoapods/p/AppAuth.svg?style=flat)](https://cocoapods.org/pods/AppAuth)
-[![Catalyst compatible](https://img.shields.io/badge/Catalyst-compatible-brightgreen.svg?style=flat)](https://developer.apple.com/documentation/xcode/creating_a_mac_version_of_your_ipad_app)
-
-AppAuth for iOS and macOS, and tvOS is a client SDK for communicating with
-[OAuth 2.0](https://tools.ietf.org/html/rfc6749) and
-[OpenID Connect](http://openid.net/specs/openid-connect-core-1_0.html) providers.
-It strives to
-directly map the requests and responses of those specifications, while following
-the idiomatic style of the implementation language. In addition to mapping the
-raw protocol flows, convenience methods are available to assist with common
-tasks like performing an action with fresh tokens.
-
-It follows the best practices set out in
-[RFC 8252 - OAuth 2.0 for Native Apps](https://tools.ietf.org/html/rfc8252)
-including using `SFAuthenticationSession` and `SFSafariViewController` on iOS
-for the auth request. `UIWebView` and `WKWebView` are explicitly *not*
-supported due to the security and usability reasons explained in
-[Section 8.12 of RFC 8252](https://tools.ietf.org/html/rfc8252#section-8.12).
-
-It also supports the [PKCE](https://tools.ietf.org/html/rfc7636) extension to
-OAuth, which was created to secure authorization codes in public clients when
-custom URI scheme redirects are used. The library is friendly to other
-extensions (standard or otherwise), with the ability to handle additional params
-in all protocol requests and responses.
-
-For tvOS, AppAuth implements [OAuth 2.0 Device Authorization Grant
-](https://tools.ietf.org/html/rfc8628) to allow for tvOS sign-ins through a secondary device.
-
-## Specification
-
-### iOS
-
-#### Supported Versions
-
-AppAuth supports iOS 7 and above.
-
-iOS 9+ uses the in-app browser tab pattern
-(via `SFSafariViewController`), and falls back to the system browser (mobile
-Safari) on earlier versions.
-
-#### Authorization Server Requirements
-
-Both Custom URI Schemes (all supported versions of iOS) and Universal Links
-(iOS 9+) can be used with the library.
-
-In general, AppAuth can work with any authorization server that supports
-native apps, as documented in [RFC 8252](https://tools.ietf.org/html/rfc8252),
-either through custom URI scheme redirects, or universal links.
-Authorization servers that assume all clients are web-based, or require clients to maintain
-confidentiality of the client secrets may not work well.
-
-### macOS
-
-#### Supported Versions
-
-AppAuth supports macOS (OS X) 10.9 and above.
-
-#### Authorization Server Requirements
-
-AppAuth for macOS supports both custom schemes; a loopback HTTP redirects
-via a small embedded server.
-
-In general, AppAuth can work with any authorization server that supports
-native apps, as documented in [RFC 8252](https://tools.ietf.org/html/rfc8252);
-either through custom URI schemes, or loopback HTTP redirects.
-Authorization servers that assume all clients are web-based, or require clients to maintain
-confidentiality of the client secrets may not work well.
-
-### tvOS
-
-#### Supported Versions
-
-AppAuth supports tvOS 9.0 and above. Please note that while it is possible to run the standard AppAuth library on tvOS, the documentation below describes implementing [OAuth 2.0 Device Authorization Grant](https://tools.ietf.org/html/rfc8628) (AppAuthTV).
-
-#### Authorization Server Requirements
-
-AppAuthTV is designed for servers that support the device authorization flow as documented in [RFC 8628](https://tools.ietf.org/html/rfc8628).
-
-## Try
-
-Want to try out AppAuth? Just run:
-
- pod try AppAuth
-
-Follow the instructions in [Examples/README.md](Examples/README.md) to configure
-with your own OAuth client (you need to update three configuration points with your
-client info to try the demo).
-
-## Setup
-
-AppAuth supports four options for dependency management.
-
-### CocoaPods
-
-With [CocoaPods](https://guides.cocoapods.org/using/getting-started.html),
-add the following line to your `Podfile`:
-
- pod 'AppAuth'
-
-Then, run `pod install`.
-
-**tvOS:** Use the `TV` subspec:
-
- pod 'AppAuth/TV'
-
-
-### Swift Package Manager
-
-With [Swift Package Manager](https://swift.org/package-manager),
-add the following `dependency` to your `Package.swift`:
-
-```swift
-dependencies: [
- .package(url: "https://github.com/openid/AppAuth-iOS.git", .upToNextMajor(from: "1.3.0"))
-]
-```
-
-**tvOS:** Use the `AppAuthTV` target.
-
-### Carthage
-
-With [Carthage](https://github.com/Carthage/Carthage), add the following
-line to your `Cartfile`:
-
- github "openid/AppAuth-iOS" "master"
-
-Then, run `carthage bootstrap`.
-
-**tvOS:** Use the `AppAuthTV` framework.
-
-### Static Library
-
-You can also use AppAuth as a static library. This requires linking the library
-and your project, and including the headers. Here is a suggested configuration:
-
-1. Create an Xcode Workspace.
-2. Add `AppAuth.xcodeproj` to your Workspace.
-3. Include libAppAuth as a linked library for your target (in the "General ->
-Linked Framework and Libraries" section of your target).
-4. Add `AppAuth-iOS/Source` to your search paths of your target ("Build Settings ->
-"Header Search Paths").
-
-*Note: There is no static library for AppAuthTV.*
-
-## Auth Flow
-
-AppAuth supports both manual interaction with the authorization server
-where you need to perform your own token exchanges, as well as convenience
-methods that perform some of this logic for you. This example uses the
-convenience method, which returns either an `OIDAuthState` object, or an error.
-
-`OIDAuthState` is a class that keeps track of the authorization and token
-requests and responses, and provides a convenience method to call an API with
-fresh tokens. This is the only object that you need to serialize to retain the
-authorization state of the session.
-
-### Configuration
-
-You can configure AppAuth by specifying the endpoints directly:
-
-Objective-C
-```objc
-NSURL *authorizationEndpoint =
- [NSURL URLWithString:@"https://accounts.google.com/o/oauth2/v2/auth"];
-NSURL *tokenEndpoint =
- [NSURL URLWithString:@"https://www.googleapis.com/oauth2/v4/token"];
-
-OIDServiceConfiguration *configuration =
- [[OIDServiceConfiguration alloc]
- initWithAuthorizationEndpoint:authorizationEndpoint
- tokenEndpoint:tokenEndpoint];
-
-// perform the auth request...
-```
-
-Swift
-```swift
-let authorizationEndpoint = URL(string: "https://accounts.google.com/o/oauth2/v2/auth")!
-let tokenEndpoint = URL(string: "https://www.googleapis.com/oauth2/v4/token")!
-let configuration = OIDServiceConfiguration(authorizationEndpoint: authorizationEndpoint,
- tokenEndpoint: tokenEndpoint)
-
-// perform the auth request...
-```
-
-**tvOS**
-
-Objective-C
-```objc
-NSURL *deviceAuthorizationEndpoint =
- [NSURL URLWithString:@"https://oauth2.googleapis.com/device/code"];
-NSURL *tokenEndpoint =
- [NSURL URLWithString:@"https://www.googleapis.com/oauth2/v4/token"];
-
-OIDTVServiceConfiguration *configuration =
- [[OIDTVServiceConfiguration alloc]
- initWithDeviceAuthorizationEndpoint:deviceAuthorizationEndpoint
- tokenEndpoint:tokenEndpoint];
-
-// perform the auth request...
-```
-
-
-Or through discovery:
-
-Objective-C
-```objc
-NSURL *issuer = [NSURL URLWithString:@"https://accounts.google.com"];
-
-[OIDAuthorizationService discoverServiceConfigurationForIssuer:issuer
- completion:^(OIDServiceConfiguration *_Nullable configuration,
- NSError *_Nullable error) {
-
- if (!configuration) {
- NSLog(@"Error retrieving discovery document: %@",
- [error localizedDescription]);
- return;
- }
-
- // perform the auth request...
-}];
-```
-
-Swift
-```swift
-let issuer = URL(string: "https://accounts.google.com")!
-
-// discovers endpoints
-OIDAuthorizationService.discoverConfiguration(forIssuer: issuer) { configuration, error in
- guard let config = configuration else {
- print("Error retrieving discovery document: \(error?.localizedDescription ?? "Unknown error")")
- return
- }
-
- // perform the auth request...
-}
-```
-
-**tvOS**
-
-Objective-C
-```objc
-NSURL *issuer = [NSURL URLWithString:@"https://accounts.google.com"];
-
-[OIDTVAuthorizationService discoverServiceConfigurationForIssuer:issuer
- completion:^(OIDTVServiceConfiguration *_Nullable configuration,
- NSError *_Nullable error) {
-
- if (!configuration) {
- NSLog(@"Error retrieving discovery document: %@",
- [error localizedDescription]);
- return;
- }
-
- // perform the auth request...
-}];
-```
-
-### Authorizing – iOS
-
-First, you need to have a property in your `UIApplicationDelegate`
-implementation to hold the session, in order to continue the authorization flow
-from the redirect. In this example, the implementation of this delegate is
-a class named `AppDelegate`, if your app's application delegate has a different
-name, please update the class name in samples below accordingly.
-
-Objective-C
-```objc
-@interface AppDelegate : UIResponder
-// property of the app's AppDelegate
-@property(nonatomic, strong, nullable) id currentAuthorizationFlow;
-@end
-```
-
-Swift
-```swift
-class AppDelegate: UIResponder, UIApplicationDelegate {
- // property of the app's AppDelegate
- var currentAuthorizationFlow: OIDExternalUserAgentSession?
-}
-```
-
-
-And your main class, a property to store the auth state:
-
-Objective-C
-```objc
-// property of the containing class
-@property(nonatomic, strong, nullable) OIDAuthState *authState;
-```
-Swift
-```swift
-// property of the containing class
-private var authState: OIDAuthState?
-```
-
-
-Then, initiate the authorization request. By using the
-`authStateByPresentingAuthorizationRequest` convenience method, the token
-exchange will be performed automatically, and everything will be protected with
-PKCE (if the server supports it). AppAuth also lets you perform these
-requests manually. See the `authNoCodeExchange` method in the included Example
-app for a demonstration:
-
-Objective-C
-```objc
-// builds authentication request
-OIDAuthorizationRequest *request =
- [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration
- clientId:kClientID
- scopes:@[OIDScopeOpenID,
- OIDScopeProfile]
- redirectURL:kRedirectURI
- responseType:OIDResponseTypeCode
- additionalParameters:nil];
-
-// performs authentication request
-AppDelegate *appDelegate =
- (AppDelegate *)[UIApplication sharedApplication].delegate;
-appDelegate.currentAuthorizationFlow =
- [OIDAuthState authStateByPresentingAuthorizationRequest:request
- presentingViewController:self
- callback:^(OIDAuthState *_Nullable authState,
- NSError *_Nullable error) {
- if (authState) {
- NSLog(@"Got authorization tokens. Access token: %@",
- authState.lastTokenResponse.accessToken);
- [self setAuthState:authState];
- } else {
- NSLog(@"Authorization error: %@", [error localizedDescription]);
- [self setAuthState:nil];
- }
-}];
-```
-
-Swift
-```swift
-// builds authentication request
-let request = OIDAuthorizationRequest(configuration: configuration,
- clientId: clientID,
- clientSecret: clientSecret,
- scopes: [OIDScopeOpenID, OIDScopeProfile],
- redirectURL: redirectURI,
- responseType: OIDResponseTypeCode,
- additionalParameters: nil)
-
-// performs authentication request
-print("Initiating authorization request with scope: \(request.scope ?? "nil")")
-
-let appDelegate = UIApplication.shared.delegate as! AppDelegate
-
-appDelegate.currentAuthorizationFlow =
- OIDAuthState.authState(byPresenting: request, presenting: self) { authState, error in
- if let authState = authState {
- self.setAuthState(authState)
- print("Got authorization tokens. Access token: " +
- "\(authState.lastTokenResponse?.accessToken ?? "nil")")
- } else {
- print("Authorization error: \(error?.localizedDescription ?? "Unknown error")")
- self.setAuthState(nil)
- }
-}
-```
-
-*Handling the Redirect*
-
-The authorization response URL is returned to the app via the iOS openURL
-app delegate method, so you need to pipe this through to the current
-authorization session (created in the previous session):
-
-Objective-C
-```objc
-- (BOOL)application:(UIApplication *)app
- openURL:(NSURL *)url
- options:(NSDictionary *)options {
- // Sends the URL to the current authorization flow (if any) which will
- // process it if it relates to an authorization response.
- if ([_currentAuthorizationFlow resumeExternalUserAgentFlowWithURL:url]) {
- _currentAuthorizationFlow = nil;
- return YES;
- }
-
- // Your additional URL handling (if any) goes here.
-
- return NO;
-}
-```
-
-Swift
-```swift
-func application(_ app: UIApplication,
- open url: URL,
- options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
- // Sends the URL to the current authorization flow (if any) which will
- // process it if it relates to an authorization response.
- if let authorizationFlow = self.currentAuthorizationFlow,
- authorizationFlow.resumeExternalUserAgentFlow(with: url) {
- self.currentAuthorizationFlow = nil
- return true
- }
-
- // Your additional URL handling (if any)
-
- return false
-}
-```
-
-### Authorizing – MacOS
-
-On macOS, the most popular way to get the authorization response redirect is to
-start a local HTTP server on the loopback interface (limited to incoming
-requests from the user's machine only). When the authorization is complete, the
-user is redirected to that local server, and the authorization response can be
-processed by the app. AppAuth takes care of managing the local HTTP server
-lifecycle for you.
-
-> #### :bulb: Alternative: Custom URI Schemes
-> Custom URI schemes are also supported on macOS, but some browsers display
-> an interstitial, which reduces the usability. For an example on using custom
-> URI schemes with macOS, See `Example-Mac`.
-
-To receive the authorization response using a local HTTP server, first you need
-to have an instance variable in your main class to retain the HTTP redirect
-handler:
-
-Objective-C
-```objc
-OIDRedirectHTTPHandler *_redirectHTTPHandler;
-```
-
-Then, as the port used by the local HTTP server varies, you need to start it
-before building the authorization request, in order to get the exact redirect
-URI to use:
-
-Objective-C
-```objc
-static NSString *const kSuccessURLString =
- @"http://openid.github.io/AppAuth-iOS/redirect/";
-NSURL *successURL = [NSURL URLWithString:kSuccessURLString];
-
-// Starts a loopback HTTP redirect listener to receive the code. This needs to be started first,
-// as the exact redirect URI (including port) must be passed in the authorization request.
-_redirectHTTPHandler = [[OIDRedirectHTTPHandler alloc] initWithSuccessURL:successURL];
-NSURL *redirectURI = [_redirectHTTPHandler startHTTPListener:nil];
-```
-
-Then, initiate the authorization request. By using the
-`authStateByPresentingAuthorizationRequest` convenience method, the token
-exchange will be performed automatically, and everything will be protected with
-PKCE (if the server supports it). By assigning the return value to the
-`OIDRedirectHTTPHandler`'s `currentAuthorizationFlow`, the authorization will
-continue automatically once the user makes their choice:
-
-```objc
-// builds authentication request
-OIDAuthorizationRequest *request =
- [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration
- clientId:kClientID
- clientSecret:kClientSecret
- scopes:@[ OIDScopeOpenID ]
- redirectURL:redirectURI
- responseType:OIDResponseTypeCode
- additionalParameters:nil];
-// performs authentication request
-__weak __typeof(self) weakSelf = self;
-_redirectHTTPHandler.currentAuthorizationFlow =
- [OIDAuthState authStateByPresentingAuthorizationRequest:request
- callback:^(OIDAuthState *_Nullable authState,
- NSError *_Nullable error) {
- // Brings this app to the foreground.
- [[NSRunningApplication currentApplication]
- activateWithOptions:(NSApplicationActivateAllWindows |
- NSApplicationActivateIgnoringOtherApps)];
-
- // Processes the authorization response.
- if (authState) {
- NSLog(@"Got authorization tokens. Access token: %@",
- authState.lastTokenResponse.accessToken);
- } else {
- NSLog(@"Authorization error: %@", error.localizedDescription);
- }
- [weakSelf setAuthState:authState];
-}];
-```
-
-
-### Authorizing – tvOS
-
-Ensure that your main class is a delegate of `OIDAuthStateChangeDelegate`, `OIDAuthStateErrorDelegate`, implement the corresponding methods, and include the following property and instance variable:
-
-Objective-C
-```objc
-// property of the containing class
-@property(nonatomic, strong, nullable) OIDAuthState *authState;
-
-// instance variable of the containing class
-OIDTVAuthorizationCancelBlock _cancelBlock;
-```
-
-Then, build and perform the authorization request.
-
-Objective-C
-```objc
-// builds authentication request
-__weak __typeof(self) weakSelf = self;
-
-OIDTVAuthorizationRequest *request =
- [[OIDTVAuthorizationRequest alloc] initWithConfiguration:configuration
- clientId:kClientID
- clientSecret:kClientSecret
- scopes:@[ OIDScopeOpenID, OIDScopeProfile ]
- additionalParameters:nil];
-
-// performs authentication request
-OIDTVAuthorizationInitialization initBlock =
- ^(OIDTVAuthorizationResponse *_Nullable response, NSError *_Nullable error) {
- if (response) {
- // process authorization response
- NSLog(@"Got authorization response: %@", response);
- } else {
- // handle initialization error
- NSLog(@"Error: %@", error);
- }
- };
-
-OIDTVAuthorizationCompletion completionBlock =
- ^(OIDAuthState *_Nullable authState, NSError *_Nullable error) {
- weakSelf.signInView.hidden = YES;
- if (authState) {
- NSLog(@"Token response: %@", authState.lastTokenResponse);
- [weakSelf setAuthState:authState];
- } else {
- NSLog(@"Error: %@", error);
- [weakSelf setAuthState:nil];
- }
- };
-
-_cancelBlock = [OIDTVAuthorizationService authorizeTVRequest:request
- initialization:initBlock
- completion:completionBlock];
-```
-
-### Making API Calls
-
-AppAuth gives you the raw token information, if you need it. However, we
-recommend that users of the `OIDAuthState` convenience wrapper use the provided
-`performActionWithFreshTokens:` method to perform their API calls to avoid
-needing to worry about token freshness:
-
-Objective-C
-```objc
-[_authState performActionWithFreshTokens:^(NSString *_Nonnull accessToken,
- NSString *_Nonnull idToken,
- NSError *_Nullable error) {
- if (error) {
- NSLog(@"Error fetching fresh tokens: %@", [error localizedDescription]);
- return;
- }
-
- // perform your API request using the tokens
-}];
-```
-
-Swift
-```swift
-let userinfoEndpoint = URL(string:"https://openidconnect.googleapis.com/v1/userinfo")!
-self.authState?.performAction() { (accessToken, idToken, error) in
-
- if error != nil {
- print("Error fetching fresh tokens: \(error?.localizedDescription ?? "Unknown error")")
- return
- }
- guard let accessToken = accessToken else {
- return
- }
-
- // Add Bearer token to request
- var urlRequest = URLRequest(url: userinfoEndpoint)
- urlRequest.allHTTPHeaderFields = ["Authorization": "Bearer \(accessToken)"]
-
- // Perform request...
-}
-```
-
-### Custom User-Agents (iOS and macOS)
-
-Each OAuth flow involves presenting an external user-agent to the user, that
-allows them to interact with the OAuth authorization server. Typical examples
-of a user-agent are the user's browser, or an in-app browser tab incarnation
-like `ASWebAuthenticationSession` on iOS.
-
-AppAuth ships with several implementations of an external user-agent out of the
-box, including defaults for iOS and macOS suitable for most cases. The default
-user-agents typically share persistent cookies with the system default browser,
-to improve the chance that the user doesn't need to sign-in all over again.
-
-It is possible to change the user-agent that AppAuth uses, and even write your
-own - all without needing to fork the library.
-
-All implementations of the external user-agent, be they included or created by
-you need to conform to the
-[`OIDExternalUserAgent`](http://openid.github.io/AppAuth-iOS/docs/latest/protocol_o_i_d_external_user_agent-p.html)
-protocol.
-
-Instances of the `OIDExternalUserAgent`are passed into
-[`OIDAuthState.authStateByPresentingAuthorizationRequest:externalUserAgent:callback`](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_auth_state.html#ac762fe2bf95c116f0b437419be211fa1)
-and/or
-[`OIDAuthorizationService.presentAuthorizationRequest:externalUserAgent:callback:`](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_authorization_service.html#ae551f8e6887366a46e49b09b37389b8f)
-rather than using the platform-specific convenience methods (which use the
-default user-agents for their respective platforms), like
-[`OIDAuthState.authStateByPresentingAuthorizationRequest:presentingViewController:callback:`](http://openid.github.io/AppAuth-iOS/docs/latest/category_o_i_d_auth_state_07_i_o_s_08.html#ae32fd0732cd3192cd5219f2655a4c85c).
-
-Popular use-cases for writing your own user-agent implementation include needing
-to style the user-agent in ways not supported by AppAuth, and implementing a
-fully custom flow with your own business logic. You can take one of the existing
-implementations as a starting point to copy, rename, and customize to your
-needs.
-
-#### Custom Browser User-Agent
-
-AppAuth for iOS includes a few extra user-agent implementations which you can
-try, or use as a reference for your own implementation. One of them,
-[`OIDExternalUserAgentIOSCustomBrowser`](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_external_user_agent_i_o_s_custom_browser.html)
-enables you to use a different browser for authentication, like Chrome for iOS
-or Firefox for iOS.
-
-Here's how to configure AppAuth to use a custom browser using the
-`OIDExternalUserAgentIOSCustomBrowser` user agent:
-
-First, add the following array to your
-[Info.plist](https://github.com/openid/AppAuth-iOS/blob/135f99d2cb4e9d18d310ac2588b905e612461561/Examples/Example-iOS_ObjC/Source/Info.plist#L34)
-(in XCode, right click -> Open As -> Source Code)
-
-```
- LSApplicationQueriesSchemes
-
- googlechromes
- opera-https
- firefox
-
-```
-
-This is required so that AppAuth can test for the browser and open the app store
-if it's not installed (the default behavior of this user-agent). You only need
-to include the URL scheme of the actual browser you intend to use.
-
-Objective-C
-```objc
-// performs authentication request
-AppDelegate *appDelegate =
- (AppDelegate *)[UIApplication sharedApplication].delegate;
-id userAgent =
- [OIDExternalUserAgentIOSCustomBrowser CustomBrowserChrome];
-appDelegate.currentAuthorizationFlow =
- [OIDAuthState authStateByPresentingAuthorizationRequest:request
- externalUserAgent:userAgent
- callback:^(OIDAuthState *_Nullable authState,
- NSError *_Nullable error) {
- if (authState) {
- NSLog(@"Got authorization tokens. Access token: %@",
- authState.lastTokenResponse.accessToken);
- [self setAuthState:authState];
- } else {
- NSLog(@"Authorization error: %@", [error localizedDescription]);
- [self setAuthState:nil];
- }
-}];
-```
-
-Swift
-```
-guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else {
- self.logMessage("Error accessing AppDelegate")
- return
- }
-let userAgent = OIDExternalUserAgentIOSCustomBrowser.customBrowserChrome()
-appDelegate.currentAuthorizationFlow = OIDAuthState.authState(byPresenting: request, externalUserAgent: userAgent) { authState, error in
- if let authState = authState {
- self.setAuthState(authState)
- self.logMessage("Got authorization tokens. Access token: \(authState.lastTokenResponse?.accessToken ?? "DEFAULT_TOKEN")")
- } else {
- self.logMessage("Authorization error: \(error?.localizedDescription ?? "DEFAULT_ERROR")")
- self.setAuthState(nil)
- }
-}
-```
-
-That's it! With those two changes (which you can try on the included sample),
-AppAuth will use Chrome iOS for the authorization request (and open Chrome in
-the App Store if it's not installed).
-
-⚠️**Note: the `OIDExternalUserAgentIOSCustomBrowser` user-agent is not intended for consumer apps**. It is designed for
-advanced enterprise use-cases where the app developers have greater control over
-the operating environment and have special requirements that require a custom
-browser like Chrome.
-
-You don't need to stop with the included external user agents either! Since the
-[`OIDExternalUserAgent`](http://openid.github.io/AppAuth-iOS/docs/latest/protocol_o_i_d_external_user_agent-p.html)
-protocol is part of AppAuth's public API, you can implement your own versions of
-it. In the above example,
-`userAgent = [OIDExternalUserAgentIOSCustomBrowser CustomBrowserChrome]` would
-be replaced with an instantiation of your user-agent implementation.
-
-## API Documentation
-
-Browse the [API documentation](http://openid.github.io/AppAuth-iOS/docs/latest/annotated.html).
-
-## Included Samples
-
-Sample apps that explore core AppAuth features are available for iOS, macOS and tvOS; follow the instructions in [Examples/README.md](Examples/README.md) to get started.
diff --git a/Pods/AppAuth/Source/AppAuth.h b/Pods/AppAuth/Source/AppAuth.h
deleted file mode 100644
index 19abc55e1d..0000000000
--- a/Pods/AppAuth/Source/AppAuth.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*! @file AppAuth.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDAuthState.h"
-#import "OIDAuthStateChangeDelegate.h"
-#import "OIDAuthStateErrorDelegate.h"
-#import "OIDAuthorizationRequest.h"
-#import "OIDAuthorizationResponse.h"
-#import "OIDAuthorizationService.h"
-#import "OIDError.h"
-#import "OIDErrorUtilities.h"
-#import "OIDExternalUserAgent.h"
-#import "OIDExternalUserAgentRequest.h"
-#import "OIDExternalUserAgentSession.h"
-#import "OIDGrantTypes.h"
-#import "OIDIDToken.h"
-#import "OIDRegistrationRequest.h"
-#import "OIDRegistrationResponse.h"
-#import "OIDResponseTypes.h"
-#import "OIDScopes.h"
-#import "OIDScopeUtilities.h"
-#import "OIDServiceConfiguration.h"
-#import "OIDServiceDiscovery.h"
-#import "OIDTokenRequest.h"
-#import "OIDTokenResponse.h"
-#import "OIDTokenUtilities.h"
-#import "OIDURLSessionProvider.h"
-#import "OIDEndSessionRequest.h"
-#import "OIDEndSessionResponse.h"
-
-#if TARGET_OS_TV
-#elif TARGET_OS_WATCH
-#elif TARGET_OS_IOS || TARGET_OS_MACCATALYST
-#import "OIDAuthState+IOS.h"
-#import "OIDAuthorizationService+IOS.h"
-#import "OIDExternalUserAgentIOS.h"
-#import "OIDExternalUserAgentIOSCustomBrowser.h"
-#import "OIDExternalUserAgentCatalyst.h"
-#elif TARGET_OS_OSX
-#import "OIDAuthState+Mac.h"
-#import "OIDAuthorizationService+Mac.h"
-#import "OIDExternalUserAgentMac.h"
-#import "OIDRedirectHTTPHandler.h"
-#else
-#error "Platform Undefined"
-#endif
-
-/*! @mainpage AppAuth for iOS and macOS
-
- @section introduction Introduction
-
- AppAuth for iOS and macOS is a client SDK for communicating with [OAuth 2.0]
- (https://tools.ietf.org/html/rfc6749) and [OpenID Connect]
- (http://openid.net/specs/openid-connect-core-1_0.html) providers. It strives to
- directly map the requests and responses of those specifications, while following
- the idiomatic style of the implementation language. In addition to mapping the
- raw protocol flows, convenience methods are available to assist with common
- tasks like performing an action with fresh tokens.
-
- It follows the best practices set out in
- [RFC 8252 - OAuth 2.0 for Native Apps](https://tools.ietf.org/html/rfc8252)
- including using `SFAuthenticationSession` and `SFSafariViewController` on iOS
- for the auth request. Web view and `WKWebView` are explicitly *not*
- supported due to the security and usability reasons explained in
- [Section 8.12 of RFC 8252](https://tools.ietf.org/html/rfc8252#section-8.12).
-
- It also supports the [PKCE](https://tools.ietf.org/html/rfc7636) extension to
- OAuth which was created to secure authorization codes in public clients when
- custom URI scheme redirects are used. The library is friendly to other
- extensions (standard or otherwise) with the ability to handle additional params
- in all protocol requests and responses.
-
- Homepage: http://openid.github.io/AppAuth-iOS/
- API Documentation: http://openid.github.io/AppAuth-iOS/docs/latest
- Git Repository: https://github.com/openid/AppAuth-iOS
-
- */
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthState+IOS.h b/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthState+IOS.h
deleted file mode 100644
index 1a1ee63a07..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthState+IOS.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*! @file OIDAuthState+IOS.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import
-
-#import "OIDAuthState.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief iOS specific convenience methods for @c OIDAuthState.
- */
-@interface OIDAuthState (IOS)
-
-/*! @brief Convenience method to create a @c OIDAuthState by presenting an authorization request
- and performing the authorization code exchange in the case of code flow requests. For
- the hybrid flow, the caller should validate the id_token and c_hash, then perform the token
- request (@c OIDAuthorizationService.performTokenRequest:callback:)
- and update the OIDAuthState with the results (@c
- OIDAuthState.updateWithTokenResponse:error:).
- @param authorizationRequest The authorization request to present.
- @param presentingViewController The view controller to use for presenting the authentication UI.
- @param callback The method called when the request has completed or failed.
- @return A @c OIDExternalUserAgentSession instance which will terminate when it
- receives a @c OIDExternalUserAgentSession.cancel message, or after processing a
- @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message.
- */
-+ (id)
- authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest
- presentingViewController:(UIViewController *)presentingViewController
- callback:(OIDAuthStateAuthorizationCallback)callback;
-
-/*! @brief Convenience method to create a @c OIDAuthState by presenting an authorization request
- (optionally using an emphemeral browser session that shares no cookies or data with the
- normal browser session) and performing the authorization code exchange in the case of code
- flow requests. For the hybrid flow, the caller should validate the id_token and c_hash, then
- perform the token request (@c OIDAuthorizationService.performTokenRequest:callback:)
- and update the OIDAuthState with the results (@c
- OIDAuthState.updateWithTokenResponse:error:).
- @param authorizationRequest The authorization request to present.
- @param presentingViewController The view controller to use for presenting the authentication UI.
- @param prefersEphemeralSession Whether the caller prefers to use a private authentication
- session. See @c ASWebAuthenticationSession.prefersEphemeralWebBrowserSession for more.
- @param callback The method called when the request has completed or failed.
- @return A @c OIDExternalUserAgentSession instance which will terminate when it
- receives a @c OIDExternalUserAgentSession.cancel message, or after processing a
- @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message.
- */
-+ (id)
- authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest
- presentingViewController:(UIViewController *)presentingViewController
- prefersEphemeralSession:(BOOL)prefersEphemeralSession
- callback:(OIDAuthStateAuthorizationCallback)callback
- API_AVAILABLE(ios(13));
-
-+ (id)
- authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest
- callback:(OIDAuthStateAuthorizationCallback)callback API_AVAILABLE(ios(11)) API_UNAVAILABLE(macCatalyst)
- __deprecated_msg("This method will not work on iOS 13. Use "
- "authStateByPresentingAuthorizationRequest:presentingViewController:callback:");
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthState+IOS.m b/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthState+IOS.m
deleted file mode 100644
index c474a77d1e..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthState+IOS.m
+++ /dev/null
@@ -1,78 +0,0 @@
-/*! @file OIDAuthState+IOS.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import "OIDAuthState+IOS.h"
-#import "OIDExternalUserAgentIOS.h"
-#import "OIDExternalUserAgentCatalyst.h"
-
-@implementation OIDAuthState (IOS)
-
-+ (id)
- authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest
- presentingViewController:(UIViewController *)presentingViewController
- callback:(OIDAuthStateAuthorizationCallback)callback {
- id externalUserAgent;
-#if TARGET_OS_MACCATALYST
- externalUserAgent = [[OIDExternalUserAgentCatalyst alloc]
- initWithPresentingViewController:presentingViewController];
-#else // TARGET_OS_MACCATALYST
- externalUserAgent = [[OIDExternalUserAgentIOS alloc] initWithPresentingViewController:presentingViewController];
-#endif // TARGET_OS_MACCATALYST
- return [self authStateByPresentingAuthorizationRequest:authorizationRequest
- externalUserAgent:externalUserAgent
- callback:callback];
-}
-
-+ (id)
- authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest
- presentingViewController:(UIViewController *)presentingViewController
- prefersEphemeralSession:(BOOL)prefersEphemeralSession
- callback:(OIDAuthStateAuthorizationCallback)callback {
- id externalUserAgent;
-#if TARGET_OS_MACCATALYST
- externalUserAgent = [[OIDExternalUserAgentCatalyst alloc]
- initWithPresentingViewController:presentingViewController
- prefersEphemeralSession:prefersEphemeralSession];
-#else // TARGET_OS_MACCATALYST
- externalUserAgent = [[OIDExternalUserAgentIOS alloc]
- initWithPresentingViewController:presentingViewController
- prefersEphemeralSession:prefersEphemeralSession];
-#endif // TARGET_OS_MACCATALYST
- return [self authStateByPresentingAuthorizationRequest:authorizationRequest
- externalUserAgent:externalUserAgent
- callback:callback];
-}
-
-#if !TARGET_OS_MACCATALYST
-+ (id)
- authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest
- callback:(OIDAuthStateAuthorizationCallback)callback {
- OIDExternalUserAgentIOS *externalUserAgent = [[OIDExternalUserAgentIOS alloc] init];
- return [self authStateByPresentingAuthorizationRequest:authorizationRequest
- externalUserAgent:externalUserAgent
- callback:callback];
-}
-#endif // !TARGET_OS_MACCATALYST
-
-@end
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthorizationService+IOS.h b/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthorizationService+IOS.h
deleted file mode 100644
index c7c685d286..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthorizationService+IOS.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*! @file OIDAuthorizationService+IOS.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import
-
-#import "OIDAuthorizationService.h"
-#import "OIDExternalUserAgentSession.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief Provides iOS specific authorization request handling.
- */
-@interface OIDAuthorizationService (IOS)
-
-/*! @brief Perform an authorization flow, presenting an appropriate browser for the user to
- authenticate.
- @param request The authorization request.
- @param presentingViewController The view controller from which to present authentication UI.
- @param callback The method called when the request has completed or failed.
- @return A @c OIDExternalUserAgentSession instance which will terminate when it
- receives a @c OIDExternalUserAgentSession.cancel message, or after processing a
- @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message.
- */
-+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request
- presentingViewController:(UIViewController *)presentingViewController
- callback:(OIDAuthorizationCallback)callback;
-
-/*! @brief Perform an authorization flow using the @c ASWebAuthenticationSession optionally using an
- emphemeral browser session that shares no cookies or data with the normal browser session.
- @param request The authorization request.
- @param presentingViewController The view controller from which to present authentication UI.
- @param prefersEphemeralSession Whether the caller prefers to use a private authentication
- session. See @c ASWebAuthenticationSession.prefersEphemeralWebBrowserSession for more.
- @param callback The method called when the request has completed or failed.
- @return A @c OIDExternalUserAgentSession instance which will terminate when it
- receives a @c OIDExternalUserAgentSession.cancel message, or after processing a
- @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message.
- */
-+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request
- presentingViewController:(UIViewController *)presentingViewController
- prefersEphemeralSession:(BOOL)prefersEphemeralSession
- callback:(OIDAuthorizationCallback)callback API_AVAILABLE(ios(13));
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthorizationService+IOS.m b/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthorizationService+IOS.m
deleted file mode 100644
index 4ca07c55e7..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDAuthorizationService+IOS.m
+++ /dev/null
@@ -1,64 +0,0 @@
-/*! @file OIDAuthorizationService+IOS.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import "OIDAuthorizationService+IOS.h"
-#import "OIDExternalUserAgentIOS.h"
-#import "OIDExternalUserAgentCatalyst.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@implementation OIDAuthorizationService (IOS)
-
-+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request
- presentingViewController:(UIViewController *)presentingViewController
- callback:(OIDAuthorizationCallback)callback {
- id externalUserAgent;
-#if TARGET_OS_MACCATALYST
- externalUserAgent = [[OIDExternalUserAgentCatalyst alloc]
- initWithPresentingViewController:presentingViewController];
-#else // TARGET_OS_MACCATALYST
- externalUserAgent = [[OIDExternalUserAgentIOS alloc] initWithPresentingViewController:presentingViewController];
-#endif // TARGET_OS_MACCATALYST
- return [self presentAuthorizationRequest:request externalUserAgent:externalUserAgent callback:callback];
-}
-
-+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request
- presentingViewController:(UIViewController *)presentingViewController
- prefersEphemeralSession:(BOOL)prefersEphemeralSession
- callback:(OIDAuthorizationCallback)callback {
- id externalUserAgent;
-#if TARGET_OS_MACCATALYST
- externalUserAgent = [[OIDExternalUserAgentCatalyst alloc]
- initWithPresentingViewController:presentingViewController
- prefersEphemeralSession:prefersEphemeralSession];
-#else // TARGET_OS_MACCATALYST
- externalUserAgent = [[OIDExternalUserAgentIOS alloc] initWithPresentingViewController:presentingViewController
- prefersEphemeralSession:prefersEphemeralSession];
-#endif // TARGET_OS_MACCATALYST
- return [self presentAuthorizationRequest:request externalUserAgent:externalUserAgent callback:callback];
-}
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentCatalyst.h b/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentCatalyst.h
deleted file mode 100644
index 910d0bb862..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentCatalyst.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*! @file OIDExternalUserAgentCatalyst.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2019 The AppAuth Authors. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import
-
-#import "OIDExternalUserAgent.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief A Catalyst specific external user-agent that uses `ASWebAuthenticationSession` to
- present the request.
-*/
-API_AVAILABLE(macCatalyst(13)) API_UNAVAILABLE(ios)
-@interface OIDExternalUserAgentCatalyst : NSObject
-
-/*! @internal
- @brief Unavailable. Please use @c initWithPresentingViewController:
- */
-- (nonnull instancetype)init NS_UNAVAILABLE;
-
-/*! @brief The designated initializer.
- @param presentingViewController The view controller from which to present the
- \SFSafariViewController.
- */
-- (nullable instancetype)initWithPresentingViewController:
- (UIViewController *)presentingViewController
- NS_DESIGNATED_INITIALIZER;
-
-/*! @brief Create an external user-agent which optionally uses a private authentication session.
- @param presentingViewController The view controller from which to present the browser.
- @param prefersEphemeralSession Whether the caller prefers to use a private authentication
- session. See @c ASWebAuthenticationSession.prefersEphemeralWebBrowserSession for more.
- */
-- (nullable instancetype)initWithPresentingViewController:
- (UIViewController *)presentingViewController
- prefersEphemeralSession:(BOOL)prefersEphemeralSession;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentCatalyst.m b/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentCatalyst.m
deleted file mode 100644
index d6771b3e99..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentCatalyst.m
+++ /dev/null
@@ -1,157 +0,0 @@
-/*! @file OIDExternalUserAgentCatalyst.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2019 The AppAuth Authors. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import "OIDExternalUserAgentCatalyst.h"
-
-#import
-#import
-
-#import "OIDErrorUtilities.h"
-#import "OIDExternalUserAgentSession.h"
-#import "OIDExternalUserAgentRequest.h"
-
-#if TARGET_OS_MACCATALYST
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface OIDExternalUserAgentCatalyst ()
-@end
-
-@implementation OIDExternalUserAgentCatalyst {
- UIViewController *_presentingViewController;
- BOOL _prefersEphemeralSession;
-
- BOOL _externalUserAgentFlowInProgress;
- __weak id _session;
- ASWebAuthenticationSession *_webAuthenticationVC;
-}
-
-- (nullable instancetype)initWithPresentingViewController:
- (UIViewController *)presentingViewController {
- self = [super init];
- if (self) {
- _presentingViewController = presentingViewController;
- }
- return self;
-}
-
-- (nullable instancetype)initWithPresentingViewController:
- (UIViewController *)presentingViewController
- prefersEphemeralSession:(BOOL)prefersEphemeralSession {
- self = [self initWithPresentingViewController:presentingViewController];
- if (self) {
- _prefersEphemeralSession = prefersEphemeralSession;
- }
- return self;
-}
-
-- (BOOL)presentExternalUserAgentRequest:(id)request
- session:(id)session {
- if (_externalUserAgentFlowInProgress) {
- // TODO: Handle errors as authorization is already in progress.
- return NO;
- }
-
- _externalUserAgentFlowInProgress = YES;
- _session = session;
- BOOL openedUserAgent = NO;
- NSURL *requestURL = [request externalUserAgentRequestURL];
-
- __weak OIDExternalUserAgentCatalyst *weakSelf = self;
- NSString *redirectScheme = request.redirectScheme;
- ASWebAuthenticationSession *authenticationVC =
- [[ASWebAuthenticationSession alloc] initWithURL:requestURL
- callbackURLScheme:redirectScheme
- completionHandler:^(NSURL * _Nullable callbackURL,
- NSError * _Nullable error) {
- __strong OIDExternalUserAgentCatalyst *strongSelf = weakSelf;
- if (!strongSelf) {
- return;
- }
- strongSelf->_webAuthenticationVC = nil;
- if (callbackURL) {
- [strongSelf->_session resumeExternalUserAgentFlowWithURL:callbackURL];
- } else {
- NSError *safariError =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow
- underlyingError:error
- description:nil];
- [strongSelf->_session failExternalUserAgentFlowWithError:safariError];
- }
- }];
-
- authenticationVC.presentationContextProvider = self;
- authenticationVC.prefersEphemeralWebBrowserSession = _prefersEphemeralSession;
- _webAuthenticationVC = authenticationVC;
- openedUserAgent = [authenticationVC start];
-
- if (!openedUserAgent) {
- [self cleanUp];
- NSError *safariError = [OIDErrorUtilities errorWithCode:OIDErrorCodeSafariOpenError
- underlyingError:nil
- description:@"Unable to open ASWebAuthenticationSession view controller."];
- [session failExternalUserAgentFlowWithError:safariError];
- }
- return openedUserAgent;
-}
-
-- (void)dismissExternalUserAgentAnimated:(BOOL)animated completion:(void (^)(void))completion {
- if (!_externalUserAgentFlowInProgress) {
- // Ignore this call if there is no authorization flow in progress.
- if (completion) completion();
- return;
- }
-
- ASWebAuthenticationSession *webAuthenticationVC = _webAuthenticationVC;
-
- [self cleanUp];
-
- if (webAuthenticationVC) {
- // dismiss the ASWebAuthenticationSession
- [webAuthenticationVC cancel];
- if (completion) completion();
- } else {
- if (completion) completion();
- }
-}
-
-- (void)cleanUp {
- // The weak reference to |_session| is set to nil to avoid accidentally using
- // it while not in an authorization flow.
- _webAuthenticationVC = nil;
- _session = nil;
- _externalUserAgentFlowInProgress = NO;
-}
-
-#pragma mark - ASWebAuthenticationPresentationContextProviding
-
-- (ASPresentationAnchor)presentationAnchorForWebAuthenticationSession:(ASWebAuthenticationSession *)session {
- return _presentingViewController.view.window;
-}
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // TARGET_OS_MACCATALYST
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOS.h b/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOS.h
deleted file mode 100644
index ae0773c696..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOS.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*! @file OIDExternalUserAgentIOS.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import
-
-#import "OIDExternalUserAgent.h"
-
-@class SFSafariViewController;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief An iOS specific external user-agent that uses the best possible user-agent available
- depending on the version of iOS to present the request.
- */
-API_UNAVAILABLE(macCatalyst)
-@interface OIDExternalUserAgentIOS : NSObject
-
-- (nullable instancetype)init API_AVAILABLE(ios(11))
- __deprecated_msg("This method will not work on iOS 13, use "
- "initWithPresentingViewController:presentingViewController");
-
-/*! @brief The designated initializer.
- @param presentingViewController The view controller from which to present the authentication UI.
- @discussion The specific authentication UI used depends on the iOS version and accessibility
- options. iOS 8 uses the system browser, iOS 9-10 use @c SFSafariViewController, iOS 11 uses
- @c SFAuthenticationSession
- (unless Guided Access is on which does not work) or uses @c SFSafariViewController, and iOS
- 12+ uses @c ASWebAuthenticationSession (unless Guided Access is on).
- */
-- (nullable instancetype)initWithPresentingViewController:
- (UIViewController *)presentingViewController
- NS_DESIGNATED_INITIALIZER;
-
-/*! @brief Create an external user-agent which optionally uses a private authentication session.
- @param presentingViewController The view controller from which to present the browser.
- @param prefersEphemeralSession Whether the caller prefers to use a private authentication
- session. See @c ASWebAuthenticationSession.prefersEphemeralWebBrowserSession for more.
- @discussion Authentication is performed with @c ASWebAuthenticationSession (unless Guided Access
- is on), setting the ephemerality based on the argument.
- */
-- (nullable instancetype)initWithPresentingViewController:
- (UIViewController *)presentingViewController
- prefersEphemeralSession:(BOOL)prefersEphemeralSession
- API_AVAILABLE(ios(13));
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOS.m b/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOS.m
deleted file mode 100644
index eab7aa3cbf..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOS.m
+++ /dev/null
@@ -1,268 +0,0 @@
-/*! @file OIDExternalUserAgentIOS.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import "OIDExternalUserAgentIOS.h"
-
-#import
-#import
-
-#import "OIDErrorUtilities.h"
-#import "OIDExternalUserAgentSession.h"
-#import "OIDExternalUserAgentRequest.h"
-
-#if !TARGET_OS_MACCATALYST
-
-NS_ASSUME_NONNULL_BEGIN
-
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
-@interface OIDExternalUserAgentIOS ()
-@end
-#else
-@interface OIDExternalUserAgentIOS ()
-@end
-#endif
-
-@implementation OIDExternalUserAgentIOS {
- UIViewController *_presentingViewController;
- BOOL _prefersEphemeralSession;
-
- BOOL _externalUserAgentFlowInProgress;
- __weak id _session;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- __weak SFSafariViewController *_safariVC;
- SFAuthenticationSession *_authenticationVC;
- ASWebAuthenticationSession *_webAuthenticationVC;
-#pragma clang diagnostic pop
-}
-
-- (nullable instancetype)init {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wnonnull"
- return [self initWithPresentingViewController:nil];
-#pragma clang diagnostic pop
-}
-
-- (nullable instancetype)initWithPresentingViewController:
- (UIViewController *)presentingViewController {
- self = [super init];
- if (self) {
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
- NSAssert(presentingViewController != nil,
- @"presentingViewController cannot be nil on iOS 13");
-#endif // __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
-
- _presentingViewController = presentingViewController;
- }
- return self;
-}
-
-- (nullable instancetype)initWithPresentingViewController:
- (UIViewController *)presentingViewController
- prefersEphemeralSession:(BOOL)prefersEphemeralSession {
- self = [self initWithPresentingViewController:presentingViewController];
- if (self) {
- _prefersEphemeralSession = prefersEphemeralSession;
- }
- return self;
-}
-
-- (BOOL)presentExternalUserAgentRequest:(id)request
- session:(id)session {
- if (_externalUserAgentFlowInProgress) {
- // TODO: Handle errors as authorization is already in progress.
- return NO;
- }
-
- _externalUserAgentFlowInProgress = YES;
- _session = session;
- BOOL openedUserAgent = NO;
- NSURL *requestURL = [request externalUserAgentRequestURL];
-
- // iOS 12 and later, use ASWebAuthenticationSession
- if (@available(iOS 12.0, *)) {
- // ASWebAuthenticationSession doesn't work with guided access (rdar://40809553)
- if (!UIAccessibilityIsGuidedAccessEnabled()) {
- __weak OIDExternalUserAgentIOS *weakSelf = self;
- NSString *redirectScheme = request.redirectScheme;
- ASWebAuthenticationSession *authenticationVC =
- [[ASWebAuthenticationSession alloc] initWithURL:requestURL
- callbackURLScheme:redirectScheme
- completionHandler:^(NSURL * _Nullable callbackURL,
- NSError * _Nullable error) {
- __strong OIDExternalUserAgentIOS *strongSelf = weakSelf;
- if (!strongSelf) {
- return;
- }
- strongSelf->_webAuthenticationVC = nil;
- if (callbackURL) {
- [strongSelf->_session resumeExternalUserAgentFlowWithURL:callbackURL];
- } else {
- NSError *safariError =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow
- underlyingError:error
- description:nil];
- [strongSelf->_session failExternalUserAgentFlowWithError:safariError];
- }
- }];
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
- if (@available(iOS 13.0, *)) {
- authenticationVC.presentationContextProvider = self;
- authenticationVC.prefersEphemeralWebBrowserSession = _prefersEphemeralSession;
- }
-#endif
- _webAuthenticationVC = authenticationVC;
- openedUserAgent = [authenticationVC start];
- }
- }
- // iOS 11, use SFAuthenticationSession
- if (@available(iOS 11.0, *)) {
- // SFAuthenticationSession doesn't work with guided access (rdar://40809553)
- if (!openedUserAgent && !UIAccessibilityIsGuidedAccessEnabled()) {
- __weak OIDExternalUserAgentIOS *weakSelf = self;
- NSString *redirectScheme = request.redirectScheme;
- SFAuthenticationSession *authenticationVC =
- [[SFAuthenticationSession alloc] initWithURL:requestURL
- callbackURLScheme:redirectScheme
- completionHandler:^(NSURL * _Nullable callbackURL,
- NSError * _Nullable error) {
- __strong OIDExternalUserAgentIOS *strongSelf = weakSelf;
- if (!strongSelf) {
- return;
- }
- strongSelf->_authenticationVC = nil;
- if (callbackURL) {
- [strongSelf->_session resumeExternalUserAgentFlowWithURL:callbackURL];
- } else {
- NSError *safariError =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow
- underlyingError:error
- description:@"User cancelled."];
- [strongSelf->_session failExternalUserAgentFlowWithError:safariError];
- }
- }];
- _authenticationVC = authenticationVC;
- openedUserAgent = [authenticationVC start];
- }
- }
- // iOS 9 and 10, use SFSafariViewController
- if (@available(iOS 9.0, *)) {
- if (!openedUserAgent && _presentingViewController) {
- SFSafariViewController *safariVC =
- [[SFSafariViewController alloc] initWithURL:requestURL];
- safariVC.delegate = self;
- _safariVC = safariVC;
- [_presentingViewController presentViewController:safariVC animated:YES completion:nil];
- openedUserAgent = YES;
- }
- }
- // iOS 8 and earlier, use mobile Safari
- if (!openedUserAgent){
- openedUserAgent = [[UIApplication sharedApplication] openURL:requestURL];
- }
-
- if (!openedUserAgent) {
- [self cleanUp];
- NSError *safariError = [OIDErrorUtilities errorWithCode:OIDErrorCodeSafariOpenError
- underlyingError:nil
- description:@"Unable to open Safari."];
- [session failExternalUserAgentFlowWithError:safariError];
- }
- return openedUserAgent;
-}
-
-- (void)dismissExternalUserAgentAnimated:(BOOL)animated completion:(void (^)(void))completion {
- if (!_externalUserAgentFlowInProgress) {
- // Ignore this call if there is no authorization flow in progress.
- if (completion) completion();
- return;
- }
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- SFSafariViewController *safariVC = _safariVC;
- SFAuthenticationSession *authenticationVC = _authenticationVC;
- ASWebAuthenticationSession *webAuthenticationVC = _webAuthenticationVC;
-#pragma clang diagnostic pop
-
- [self cleanUp];
-
- if (webAuthenticationVC) {
- // dismiss the ASWebAuthenticationSession
- [webAuthenticationVC cancel];
- if (completion) completion();
- } else if (authenticationVC) {
- // dismiss the SFAuthenticationSession
- [authenticationVC cancel];
- if (completion) completion();
- } else if (safariVC) {
- // dismiss the SFSafariViewController
- [safariVC dismissViewControllerAnimated:YES completion:completion];
- } else {
- if (completion) completion();
- }
-}
-
-- (void)cleanUp {
- // The weak references to |_safariVC| and |_session| are set to nil to avoid accidentally using
- // them while not in an authorization flow.
- _safariVC = nil;
- _authenticationVC = nil;
- _webAuthenticationVC = nil;
- _session = nil;
- _externalUserAgentFlowInProgress = NO;
-}
-
-#pragma mark - SFSafariViewControllerDelegate
-
-- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller NS_AVAILABLE_IOS(9.0) {
- if (controller != _safariVC) {
- // Ignore this call if the safari view controller do not match.
- return;
- }
- if (!_externalUserAgentFlowInProgress) {
- // Ignore this call if there is no authorization flow in progress.
- return;
- }
- id session = _session;
- [self cleanUp];
- NSError *error = [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow
- underlyingError:nil
- description:@"No external user agent flow in progress."];
- [session failExternalUserAgentFlowWithError:error];
-}
-
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
-#pragma mark - ASWebAuthenticationPresentationContextProviding
-
-- (ASPresentationAnchor)presentationAnchorForWebAuthenticationSession:(ASWebAuthenticationSession *)session API_AVAILABLE(ios(13.0)){
- return _presentingViewController.view.window;
-}
-#endif // __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // !TARGET_OS_MACCATALYST
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOSCustomBrowser.h b/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOSCustomBrowser.h
deleted file mode 100644
index 2032e8c919..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOSCustomBrowser.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*! @file OIDExternalUserAgentIOSCustomBrowser.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2018 Google LLC
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import
-
-#import "OIDExternalUserAgent.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief A block that transforms a regular http/https URL into one that will open in an
- alternative browser.
- @param requestURL the http/https request URL to be transformed.
- @return transformed URL.
- */
-typedef NSURL *_Nullable (^OIDCustomBrowserURLTransformation)(NSURL *_Nullable requestURL);
-
-/*! @brief An implementation of the OIDExternalUserAgent protocol for iOS that uses
- a custom browser (i.e. not Safari) for external requests. It is suitable for browsers that
- offer a custom url scheme that simply replaces the "https" scheme. It is not designed
- for browsers that require other modifications to the URL. If the browser is not installed
- the user will be prompted to install it.
- */
-API_UNAVAILABLE(macCatalyst)
-@interface OIDExternalUserAgentIOSCustomBrowser : NSObject
-
-/*! @brief URL transformation block for the browser.
- */
-@property(nonatomic, readonly) OIDCustomBrowserURLTransformation URLTransformation;
-
-/*! @brief URL Scheme used to test for whether the browser is installed.
- */
-@property(nonatomic, readonly, nullable) NSString *canOpenURLScheme;
-
-/*! @brief URL of the browser's App Store listing.
- */
-@property(nonatomic, readonly, nullable) NSURL *appStoreURL;
-
-/*! @brief An instance of @c OIDExternalUserAgentIOSCustomBrowser for Chrome.
- */
-+ (instancetype)CustomBrowserChrome;
-
-/*! @brief An instance of @c OIDExternalUserAgentIOSCustomBrowser for Firefox.
- */
-+ (instancetype)CustomBrowserFirefox;
-
-/*! @brief An instance of @c OIDExternalUserAgentIOSCustomBrowser for Opera.
- */
-+ (instancetype)CustomBrowserOpera;
-
-/*! @brief An instance of @c OIDExternalUserAgentIOSCustomBrowser for Safari.
- */
-+ (instancetype)CustomBrowserSafari;
-
-/*! @brief Creates a @c OIDCustomBrowserURLTransformation using the scheme substitution method used
- iOS browsers like Chrome and Firefox.
- */
-+ (OIDCustomBrowserURLTransformation)
- URLTransformationSchemeSubstitutionHTTPS:(NSString *)browserSchemeHTTPS
- HTTP:(nullable NSString *)browserSchemeHTTP;
-
-/*! @brief Creates a @c OIDCustomBrowserURLTransformation with the URL prefix method used by
- iOS browsers like Firefox.
- */
-+ (OIDCustomBrowserURLTransformation) URLTransformationSchemeConcatPrefix:(NSString*)URLprefix;
-
-/*! @internal
- @brief Unavailable. Please use @c initWithURLTransformation:canOpenURLScheme:appStoreURL:
- */
-- (nonnull instancetype)init NS_UNAVAILABLE;
-
-/*! @brief OIDExternalUserAgent for a custom browser. @c presentExternalUserAgentRequest:session method
- will return NO if the browser isn't installed.
- */
-- (nullable instancetype)initWithURLTransformation:(OIDCustomBrowserURLTransformation)URLTransformation;
-
-/*! @brief The designated initializer.
- @param URLTransformation the transformation block to translate the URL into one that will open
- in the desired custom browser.
- @param canOpenURLScheme any scheme supported by the browser used to check if the browser is
- installed.
- @param appStoreURL URL of the browser in the app store. When this and @c canOpenURLScheme
- are non-nil, @c presentExternalUserAgentRequest:session will redirect the user to the app store
- if the browser is not installed.
- */
-- (nullable instancetype)initWithURLTransformation:(OIDCustomBrowserURLTransformation)URLTransformation
- canOpenURLScheme:(nullable NSString *)canOpenURLScheme
- appStoreURL:(nullable NSURL *)appStoreURL
- NS_DESIGNATED_INITIALIZER;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOSCustomBrowser.m b/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOSCustomBrowser.m
deleted file mode 100644
index be5dc820cc..0000000000
--- a/Pods/AppAuth/Source/AppAuth/iOS/OIDExternalUserAgentIOSCustomBrowser.m
+++ /dev/null
@@ -1,171 +0,0 @@
-/*! @file OIDExternalUserAgentIOSCustomBrowser.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2018 Google LLC
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
-
-#import "OIDExternalUserAgentIOSCustomBrowser.h"
-
-#import
-
-#import "OIDAuthorizationRequest.h"
-#import "OIDAuthorizationService.h"
-#import "OIDErrorUtilities.h"
-#import "OIDURLQueryComponent.h"
-
-#if !TARGET_OS_MACCATALYST
-
-NS_ASSUME_NONNULL_BEGIN
-
-@implementation OIDExternalUserAgentIOSCustomBrowser
-
-+ (instancetype)CustomBrowserChrome {
- // Chrome iOS documentation: https://developer.chrome.com/multidevice/ios/links
- OIDCustomBrowserURLTransformation transform = [[self class] URLTransformationSchemeSubstitutionHTTPS:@"googlechromes" HTTP:@"googlechrome"];
- NSURL *appStoreURL =
- [NSURL URLWithString:@"https://itunes.apple.com/us/app/chrome/id535886823"];
- return [[[self class] alloc] initWithURLTransformation:transform
- canOpenURLScheme:@"googlechromes"
- appStoreURL:appStoreURL];
-}
-
-+ (instancetype)CustomBrowserFirefox {
- // Firefox iOS documentation: https://github.com/mozilla-mobile/firefox-ios-open-in-client
- OIDCustomBrowserURLTransformation transform =
- [[self class] URLTransformationSchemeConcatPrefix:@"firefox://open-url?url="];
- NSURL *appStoreURL =
- [NSURL URLWithString:@"https://itunes.apple.com/us/app/firefox-web-browser/id989804926"];
- return [[[self class] alloc] initWithURLTransformation:transform
- canOpenURLScheme:@"firefox"
- appStoreURL:appStoreURL];
-}
-
-+ (instancetype)CustomBrowserOpera {
- OIDCustomBrowserURLTransformation transform =
- [[self class] URLTransformationSchemeSubstitutionHTTPS:@"opera-https" HTTP:@"opera-http"];
- NSURL *appStoreURL =
- [NSURL URLWithString:@"https://itunes.apple.com/us/app/opera-mini-web-browser/id363729560"];
- return [[[self class] alloc] initWithURLTransformation:transform
- canOpenURLScheme:@"opera-https"
- appStoreURL:appStoreURL];
-}
-
-+ (instancetype)CustomBrowserSafari {
- OIDCustomBrowserURLTransformation transformNOP = ^NSURL *(NSURL *requestURL) {
- return requestURL;
- };
- OIDExternalUserAgentIOSCustomBrowser *transform =
- [[[self class] alloc] initWithURLTransformation:transformNOP];
- return transform;
-}
-
-+ (OIDCustomBrowserURLTransformation)
- URLTransformationSchemeSubstitutionHTTPS:(NSString *)browserSchemeHTTPS
- HTTP:(nullable NSString *)browserSchemeHTTP {
- OIDCustomBrowserURLTransformation transform = ^NSURL *(NSURL *requestURL) {
- // Replace the URL Scheme with the Chrome equivalent.
- NSString *newScheme = nil;
- if ([requestURL.scheme isEqualToString:@"https"]) {
- newScheme = browserSchemeHTTPS;
- } else if ([requestURL.scheme isEqualToString:@"http"]) {
- if (!browserSchemeHTTP) {
- NSAssert(false, @"No HTTP scheme registered for browser");
- return nil;
- }
- newScheme = browserSchemeHTTP;
- }
-
- // Replaces the URI scheme with the custom scheme
- NSURLComponents *components = [NSURLComponents componentsWithURL:requestURL
- resolvingAgainstBaseURL:YES];
- components.scheme = newScheme;
- return components.URL;
- };
- return transform;
-}
-
-+ (OIDCustomBrowserURLTransformation)URLTransformationSchemeConcatPrefix:(NSString *)URLprefix {
- OIDCustomBrowserURLTransformation transform = ^NSURL *(NSURL *requestURL) {
- NSString *requestURLString = [requestURL absoluteString];
- NSMutableCharacterSet *allowedParamCharacters =
- [OIDURLQueryComponent URLParamValueAllowedCharacters];
- NSString *encodedUrl = [requestURLString stringByAddingPercentEncodingWithAllowedCharacters:allowedParamCharacters];
- NSString *newURL = [NSString stringWithFormat:@"%@%@", URLprefix, encodedUrl];
- return [NSURL URLWithString:newURL];
- };
- return transform;
-}
-
-- (nullable instancetype)initWithURLTransformation:
- (OIDCustomBrowserURLTransformation)URLTransformation {
- return [self initWithURLTransformation:URLTransformation canOpenURLScheme:nil appStoreURL:nil];
-}
-
-- (nullable instancetype)
- initWithURLTransformation:(OIDCustomBrowserURLTransformation)URLTransformation
- canOpenURLScheme:(nullable NSString *)canOpenURLScheme
- appStoreURL:(nullable NSURL *)appStoreURL {
- self = [super init];
- if (self) {
- _URLTransformation = URLTransformation;
- _canOpenURLScheme = canOpenURLScheme;
- _appStoreURL = appStoreURL;
- }
- return self;
-}
-
-- (BOOL)presentExternalUserAgentRequest:(nonnull id)request
- session:(nonnull id)session {
- // If the app store URL is set, checks if the app is installed and if not opens the app store.
- if (_appStoreURL && _canOpenURLScheme) {
- // Verifies existence of LSApplicationQueriesSchemes Info.plist key.
- NSArray __unused* canOpenURLs =
- [[NSBundle mainBundle] objectForInfoDictionaryKey:@"LSApplicationQueriesSchemes"];
- NSAssert(canOpenURLs, @"plist missing LSApplicationQueriesSchemes key");
- NSAssert1([canOpenURLs containsObject:_canOpenURLScheme],
- @"plist missing LSApplicationQueriesSchemes entry for '%@'", _canOpenURLScheme);
-
- // Opens AppStore if app isn't installed
- NSString *testURLString = [NSString stringWithFormat:@"%@://example.com", _canOpenURLScheme];
- NSURL *testURL = [NSURL URLWithString:testURLString];
- if (![[UIApplication sharedApplication] canOpenURL:testURL]) {
- [[UIApplication sharedApplication] openURL:_appStoreURL];
- return NO;
- }
- }
-
- // Transforms the request URL and opens it.
- NSURL *requestURL = [request externalUserAgentRequestURL];
- requestURL = _URLTransformation(requestURL);
- BOOL openedInBrowser = [[UIApplication sharedApplication] openURL:requestURL];
- return openedInBrowser;
-}
-
-- (void)dismissExternalUserAgentAnimated:(BOOL)animated
- completion:(nonnull void (^)(void))completion {
- completion();
-}
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif // !TARGET_OS_MACCATALYST
-
-#endif // TARGET_OS_IOS || TARGET_OS_MACCATALYST
diff --git a/Pods/AppAuth/Source/AppAuthCore.h b/Pods/AppAuth/Source/AppAuthCore.h
deleted file mode 100644
index c30af46488..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*! @file AppAuthCore.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDAuthState.h"
-#import "OIDAuthStateChangeDelegate.h"
-#import "OIDAuthStateErrorDelegate.h"
-#import "OIDAuthorizationRequest.h"
-#import "OIDAuthorizationResponse.h"
-#import "OIDAuthorizationService.h"
-#import "OIDError.h"
-#import "OIDErrorUtilities.h"
-#import "OIDExternalUserAgent.h"
-#import "OIDExternalUserAgentRequest.h"
-#import "OIDExternalUserAgentSession.h"
-#import "OIDGrantTypes.h"
-#import "OIDIDToken.h"
-#import "OIDRegistrationRequest.h"
-#import "OIDRegistrationResponse.h"
-#import "OIDResponseTypes.h"
-#import "OIDScopes.h"
-#import "OIDScopeUtilities.h"
-#import "OIDServiceConfiguration.h"
-#import "OIDServiceDiscovery.h"
-#import "OIDTokenRequest.h"
-#import "OIDTokenResponse.h"
-#import "OIDTokenUtilities.h"
-#import "OIDURLSessionProvider.h"
-#import "OIDEndSessionRequest.h"
-#import "OIDEndSessionResponse.h"
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthState.h b/Pods/AppAuth/Source/AppAuthCore/OIDAuthState.h
deleted file mode 100644
index 68697d2cac..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthState.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/*! @file OIDAuthState.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-#import
-
-@class OIDAuthorizationRequest;
-@class OIDAuthorizationResponse;
-@class OIDAuthState;
-@class OIDRegistrationResponse;
-@class OIDTokenResponse;
-@class OIDTokenRequest;
-@protocol OIDAuthStateChangeDelegate;
-@protocol OIDAuthStateErrorDelegate;
-@protocol OIDExternalUserAgent;
-@protocol OIDExternalUserAgentSession;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief Represents a block used to call an action with a fresh access token.
- @param accessToken A valid access token if available.
- @param idToken A valid ID token if available.
- @param error The error if an error occurred.
- */
-typedef void (^OIDAuthStateAction)(NSString *_Nullable accessToken,
- NSString *_Nullable idToken,
- NSError *_Nullable error);
-
-/*! @brief The method called when the @c
- OIDAuthState.authStateByPresentingAuthorizationRequest:presentingViewController:callback:
- method has completed or failed.
- @param authState The auth state, if the authorization request succeeded.
- @param error The error if an error occurred.
- */
-typedef void (^OIDAuthStateAuthorizationCallback)(OIDAuthState *_Nullable authState,
- NSError *_Nullable error);
-
-/*! @brief A convenience class that retains the auth state between @c OIDAuthorizationResponse%s
- and @c OIDTokenResponse%s.
- */
-@interface OIDAuthState : NSObject
-
-/*! @brief The most recent refresh token received from the server.
- @discussion Rather than using this property directly, you should call
- @c OIDAuthState.performActionWithFreshTokens:.
- @remarks refresh_token
- @see https://tools.ietf.org/html/rfc6749#section-5.1
- */
-@property(nonatomic, readonly, nullable) NSString *refreshToken;
-
-/*! @brief The scope of the current authorization grant.
- @discussion This represents the latest scope returned by the server and may be a subset of the
- scope that was initially granted.
- @remarks scope
- */
-@property(nonatomic, readonly, nullable) NSString *scope;
-
-/*! @brief The most recent authorization response used to update the authorization state. For the
- implicit flow, this will contain the latest access token.
- */
-@property(nonatomic, readonly) OIDAuthorizationResponse *lastAuthorizationResponse;
-
-/*! @brief The most recent token response used to update this authorization state. This will
- contain the latest access token.
- */
-@property(nonatomic, readonly, nullable) OIDTokenResponse *lastTokenResponse;
-
-/*! @brief The most recent registration response used to update this authorization state. This will
- contain the latest client credentials.
- */
-@property(nonatomic, readonly, nullable) OIDRegistrationResponse *lastRegistrationResponse;
-
-/*! @brief The authorization error that invalidated this @c OIDAuthState.
- @discussion The authorization error encountered by @c OIDAuthState or set by the user via
- @c OIDAuthState.updateWithAuthorizationError: that invalidated this @c OIDAuthState.
- Authorization errors from @c OIDAuthState will always have a domain of
- @c ::OIDOAuthAuthorizationErrorDomain or @c ::OIDOAuthTokenErrorDomain. Note: that after
- unarchiving the @c OIDAuthState object, the \NSError_userInfo property of this error will
- be nil.
- */
-@property(nonatomic, readonly, nullable) NSError *authorizationError;
-
-/*! @brief Returns YES if the authorization state is not known to be invalid.
- @discussion Returns YES if no OAuth errors have been received, and the last call resulted in a
- successful access token or id token. This does not mean that the access is fresh - just
- that it was valid the last time it was used. Note that network and other transient errors
- do not invalidate the authorized state. If NO, you should authenticate the user again,
- using a fresh authorization request. Invalid @c OIDAuthState objects may still be useful in
- that case, to hint at the previously authorized user and streamline the re-authentication
- experience.
- */
-@property(nonatomic, readonly) BOOL isAuthorized;
-
-/*! @brief The @c OIDAuthStateChangeDelegate delegate.
- @discussion Use the delegate to observe state changes (and update storage) as well as error
- states.
- */
-@property(nonatomic, weak, nullable) id stateChangeDelegate;
-
-/*! @brief The @c OIDAuthStateErrorDelegate delegate.
- @discussion Use the delegate to observe state changes (and update storage) as well as error
- states.
- */
-@property(nonatomic, weak, nullable) id errorDelegate;
-
-/*! @brief Convenience method to create a @c OIDAuthState by presenting an authorization request
- and performing the authorization code exchange in the case of code flow requests. For
- the hybrid flow, the caller should validate the id_token and c_hash, then perform the token
- request (@c OIDAuthorizationService.performTokenRequest:callback:)
- and update the OIDAuthState with the results (@c
- OIDAuthState.updateWithTokenResponse:error:).
- @param authorizationRequest The authorization request to present.
- @param externalUserAgent A external user agent that can present an external user-agent request.
- @param callback The method called when the request has completed or failed.
- @return A @c OIDExternalUserAgentSession instance which will terminate when it
- receives a @c OIDExternalUserAgentSession.cancel message, or after processing a
- @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message.
- */
-+ (id)
- authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest
- externalUserAgent:(id)externalUserAgent
- callback:(OIDAuthStateAuthorizationCallback)callback;
-
-/*! @internal
- @brief Unavailable. Please use @c initWithAuthorizationResponse:.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-/*! @brief Creates an auth state from an authorization response.
- @param authorizationResponse The authorization response.
- */
-- (instancetype)initWithAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse;
-
-/*! @brief Creates an auth state from an authorization and token response.
- @param authorizationResponse The authorization response.
- @param tokenResponse The token response.
- */
-- (instancetype)initWithAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse
- tokenResponse:(nullable OIDTokenResponse *)tokenResponse;
-
-/*! @brief Creates an auth state from an registration response.
- @param registrationResponse The registration response.
- */
-- (instancetype)initWithRegistrationResponse:(OIDRegistrationResponse *)registrationResponse;
-
-/*! @brief Creates an auth state from an authorization, token and registration response.
- @param authorizationResponse The authorization response.
- @param tokenResponse The token response.
- @param registrationResponse The registration response.
- */
-- (instancetype)initWithAuthorizationResponse:
- (nullable OIDAuthorizationResponse *)authorizationResponse
- tokenResponse:(nullable OIDTokenResponse *)tokenResponse
- registrationResponse:(nullable OIDRegistrationResponse *)registrationResponse
- NS_DESIGNATED_INITIALIZER;
-
-/*! @brief Updates the authorization state based on a new authorization response.
- @param authorizationResponse The new authorization response to update the state with.
- @param error Any error encountered when performing the authorization request. Errors in the
- domain @c ::OIDOAuthAuthorizationErrorDomain are reflected in the auth state, other errors
- are assumed to be transient, and ignored.
- @discussion Typically called with the response from an incremental authorization request,
- or if using the implicit flow. Will clear the @c #lastTokenResponse property.
- */
-- (void)updateWithAuthorizationResponse:(nullable OIDAuthorizationResponse *)authorizationResponse
- error:(nullable NSError *)error;
-
-/*! @brief Updates the authorization state based on a new token response.
- @param tokenResponse The new token response to update the state from.
- @param error Any error encountered when performing the authorization request. Errors in the
- domain @c ::OIDOAuthTokenErrorDomain are reflected in the auth state, other errors
- are assumed to be transient, and ignored.
- @discussion Typically called with the response from an authorization code exchange, or a token
- refresh.
- */
-- (void)updateWithTokenResponse:(nullable OIDTokenResponse *)tokenResponse
- error:(nullable NSError *)error;
-
-/*! @brief Updates the authorization state based on a new registration response.
- @param registrationResponse The new registration response to update the state with.
- @discussion Typically called with the response from a successful client registration
- request. Will reset the auth state.
- */
-- (void)updateWithRegistrationResponse:(nullable OIDRegistrationResponse *)registrationResponse;
-
-/*! @brief Updates the authorization state based on an authorization error.
- @param authorizationError The authorization error.
- @discussion Call this method if you receive an authorization error during an API call to
- invalidate the authentication state of this @c OIDAuthState. Don't call with errors
- unrelated to authorization, such as transient network errors.
- The OIDAuthStateErrorDelegate.authState:didEncounterAuthorizationError: method of
- @c #errorDelegate will be called with the error.
- You may optionally use the convenience method
- OIDErrorUtilities.resourceServerAuthorizationErrorWithCode:errorResponse:underlyingError:
- to create \NSError objects for use here.
- The latest error received is stored in @c #authorizationError. Note: that after unarchiving
- this object, the \NSError_userInfo property of this error will be nil.
- */
-- (void)updateWithAuthorizationError:(NSError *)authorizationError;
-
-/*! @brief Calls the block with a valid access token (refreshing it first, if needed), or if a
- refresh was needed and failed, with the error that caused it to fail.
- @param action The block to execute with a fresh token. This block will be executed on the main
- thread.
- */
-- (void)performActionWithFreshTokens:(OIDAuthStateAction)action;
-
-/*! @brief Calls the block with a valid access token (refreshing it first, if needed), or if a
- refresh was needed and failed, with the error that caused it to fail.
- @param action The block to execute with a fresh token. This block will be executed on the main
- thread.
- @param additionalParameters Additional parameters for the token request if token is
- refreshed.
- */
-- (void)performActionWithFreshTokens:(OIDAuthStateAction)action
- additionalRefreshParameters:
- (nullable NSDictionary *)additionalParameters;
-
-/*! @brief Calls the block with a valid access token (refreshing it first, if needed), or if a
- refresh was needed and failed, with the error that caused it to fail.
- @param action The block to execute with a fresh token. This block will be executed on the main
- thread.
- @param additionalParameters Additional parameters for the token request if token is
- refreshed.
- @param dispatchQueue The dispatchQueue on which to dispatch the action block.
- */
-- (void)performActionWithFreshTokens:(OIDAuthStateAction)action
- additionalRefreshParameters:
- (nullable NSDictionary *)additionalParameters
- dispatchQueue:(dispatch_queue_t)dispatchQueue;
-
-/*! @brief Forces a token refresh the next time @c OIDAuthState.performActionWithFreshTokens: is
- called, even if the current tokens are considered valid.
- */
-- (void)setNeedsTokenRefresh;
-
-/*! @brief Creates a token request suitable for refreshing an access token.
- @return A @c OIDTokenRequest suitable for using a refresh token to obtain a new access token.
- @discussion After performing the refresh, call @c OIDAuthState.updateWithTokenResponse:error:
- to update the authorization state based on the response. Rather than doing the token refresh
- yourself, you should use @c OIDAuthState.performActionWithFreshTokens:.
- @see https://tools.ietf.org/html/rfc6749#section-1.5
- */
-- (nullable OIDTokenRequest *)tokenRefreshRequest;
-
-/*! @brief Creates a token request suitable for refreshing an access token.
- @param additionalParameters Additional parameters for the token request.
- @return A @c OIDTokenRequest suitable for using a refresh token to obtain a new access token.
- @discussion After performing the refresh, call @c OIDAuthState.updateWithTokenResponse:error:
- to update the authorization state based on the response. Rather than doing the token refresh
- yourself, you should use @c OIDAuthState.performActionWithFreshTokens:.
- @see https://tools.ietf.org/html/rfc6749#section-1.5
- */
-- (nullable OIDTokenRequest *)tokenRefreshRequestWithAdditionalParameters:
- (nullable NSDictionary *)additionalParameters;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthState.m b/Pods/AppAuth/Source/AppAuthCore/OIDAuthState.m
deleted file mode 100644
index fe8a162217..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthState.m
+++ /dev/null
@@ -1,570 +0,0 @@
-/*! @file OIDAuthState.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDAuthState.h"
-
-#import "OIDAuthStateChangeDelegate.h"
-#import "OIDAuthStateErrorDelegate.h"
-#import "OIDAuthorizationRequest.h"
-#import "OIDAuthorizationResponse.h"
-#import "OIDAuthorizationService.h"
-#import "OIDDefines.h"
-#import "OIDError.h"
-#import "OIDErrorUtilities.h"
-#import "OIDRegistrationResponse.h"
-#import "OIDTokenRequest.h"
-#import "OIDTokenResponse.h"
-#import "OIDTokenUtilities.h"
-
-/*! @brief Key used to encode the @c refreshToken property for @c NSSecureCoding.
- */
-static NSString *const kRefreshTokenKey = @"refreshToken";
-
-/*! @brief Key used to encode the @c needsTokenRefresh property for @c NSSecureCoding.
- */
-static NSString *const kNeedsTokenRefreshKey = @"needsTokenRefresh";
-
-/*! @brief Key used to encode the @c scope property for @c NSSecureCoding.
- */
-static NSString *const kScopeKey = @"scope";
-
-/*! @brief Key used to encode the @c lastAuthorizationResponse property for @c NSSecureCoding.
- */
-static NSString *const kLastAuthorizationResponseKey = @"lastAuthorizationResponse";
-
-/*! @brief Key used to encode the @c lastTokenResponse property for @c NSSecureCoding.
- */
-static NSString *const kLastTokenResponseKey = @"lastTokenResponse";
-
-/*! @brief Key used to encode the @c lastOAuthError property for @c NSSecureCoding.
- */
-static NSString *const kAuthorizationErrorKey = @"authorizationError";
-
-/*! @brief The exception thrown when a developer tries to create a refresh request from an
- authorization request with no authorization code.
- */
-static NSString *const kRefreshTokenRequestException =
- @"Attempted to create a token refresh request from a token response with no refresh token.";
-
-/*! @brief Number of seconds the access token is refreshed before it actually expires.
- */
-static const NSUInteger kExpiryTimeTolerance = 60;
-
-/*! @brief Object to hold OIDAuthState pending actions.
- */
-@interface OIDAuthStatePendingAction : NSObject
-@property(nonatomic, readonly, nullable) OIDAuthStateAction action;
-@property(nonatomic, readonly, nullable) dispatch_queue_t dispatchQueue;
-@end
-@implementation OIDAuthStatePendingAction
-- (id)initWithAction:(OIDAuthStateAction)action andDispatchQueue:(dispatch_queue_t)dispatchQueue {
- self = [super init];
- if (self) {
- _action = action;
- _dispatchQueue = dispatchQueue;
- }
- return self;
-}
-@end
-
-@interface OIDAuthState ()
-
-/*! @brief The access token generated by the authorization server.
- @discussion Rather than using this property directly, you should call
- @c OIDAuthState.withFreshTokenPerformAction:.
- */
-@property(nonatomic, readonly, nullable) NSString *accessToken;
-
-/*! @brief The approximate expiration date & time of the access token.
- @discussion Rather than using this property directly, you should call
- @c OIDAuthState.withFreshTokenPerformAction:.
- */
-@property(nonatomic, readonly, nullable) NSDate *accessTokenExpirationDate;
-
-/*! @brief ID Token value associated with the authenticated session.
- @discussion Rather than using this property directly, you should call
- OIDAuthState.withFreshTokenPerformAction:.
- */
-@property(nonatomic, readonly, nullable) NSString *idToken;
-
-/*! @brief Private method, called when the internal state changes.
- */
-- (void)didChangeState;
-
-@end
-
-
-@implementation OIDAuthState {
- /*! @brief Array of pending actions (use @c _pendingActionsSyncObject to synchronize access).
- */
- NSMutableArray *_pendingActions;
-
- /*! @brief Object for synchronizing access to @c pendingActions.
- */
- id _pendingActionsSyncObject;
-
- /*! @brief If YES, tokens will be refreshed on the next API call regardless of expiry.
- */
- BOOL _needsTokenRefresh;
-}
-
-#pragma mark - Convenience initializers
-
-+ (id)
- authStateByPresentingAuthorizationRequest:(OIDAuthorizationRequest *)authorizationRequest
- externalUserAgent:(id)externalUserAgent
- callback:(OIDAuthStateAuthorizationCallback)callback {
- // presents the authorization request
- id authFlowSession = [OIDAuthorizationService
- presentAuthorizationRequest:authorizationRequest
- externalUserAgent:externalUserAgent
- callback:^(OIDAuthorizationResponse *_Nullable authorizationResponse,
- NSError *_Nullable authorizationError) {
- // inspects response and processes further if needed (e.g. authorization
- // code exchange)
- if (authorizationResponse) {
- if ([authorizationRequest.responseType
- isEqualToString:OIDResponseTypeCode]) {
- // if the request is for the code flow (NB. not hybrid), assumes the
- // code is intended for this client, and performs the authorization
- // code exchange
- OIDTokenRequest *tokenExchangeRequest =
- [authorizationResponse tokenExchangeRequest];
- [OIDAuthorizationService performTokenRequest:tokenExchangeRequest
- originalAuthorizationResponse:authorizationResponse
- callback:^(OIDTokenResponse *_Nullable tokenResponse,
- NSError *_Nullable tokenError) {
- OIDAuthState *authState;
- if (tokenResponse) {
- authState = [[OIDAuthState alloc]
- initWithAuthorizationResponse:
- authorizationResponse
- tokenResponse:tokenResponse];
- }
- callback(authState, tokenError);
- }];
- } else {
- // hybrid flow (code id_token). Two possible cases:
- // 1. The code is not for this client, ie. will be sent to a
- // webservice that performs the id token verification and token
- // exchange
- // 2. The code is for this client and, for security reasons, the
- // application developer must verify the id_token signature and
- // c_hash before calling the token endpoint
- OIDAuthState *authState = [[OIDAuthState alloc]
- initWithAuthorizationResponse:authorizationResponse];
- callback(authState, authorizationError);
- }
- } else {
- callback(nil, authorizationError);
- }
- }];
- return authFlowSession;
-}
-
-#pragma mark - Initializers
-
-- (nonnull instancetype)init
- OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithAuthorizationResponse:tokenResponse:))
-
-/*! @brief Creates an auth state from an authorization response.
- @param authorizationResponse The authorization response.
- */
-- (instancetype)initWithAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse {
- return [self initWithAuthorizationResponse:authorizationResponse tokenResponse:nil];
-}
-
-
-/*! @brief Designated initializer.
- @param authorizationResponse The authorization response.
- @discussion Creates an auth state from an authorization response and token response.
- */
-- (instancetype)initWithAuthorizationResponse:(OIDAuthorizationResponse *)authorizationResponse
- tokenResponse:(nullable OIDTokenResponse *)tokenResponse {
- return [self initWithAuthorizationResponse:authorizationResponse
- tokenResponse:tokenResponse
- registrationResponse:nil];
-}
-
-/*! @brief Creates an auth state from an registration response.
- @param registrationResponse The registration response.
- */
-- (instancetype)initWithRegistrationResponse:(OIDRegistrationResponse *)registrationResponse {
- return [self initWithAuthorizationResponse:nil
- tokenResponse:nil
- registrationResponse:registrationResponse];
-}
-
-- (instancetype)initWithAuthorizationResponse:
- (nullable OIDAuthorizationResponse *)authorizationResponse
- tokenResponse:(nullable OIDTokenResponse *)tokenResponse
- registrationResponse:(nullable OIDRegistrationResponse *)registrationResponse {
- self = [super init];
- if (self) {
- _pendingActionsSyncObject = [[NSObject alloc] init];
-
- if (registrationResponse) {
- [self updateWithRegistrationResponse:registrationResponse];
- }
-
- if (authorizationResponse) {
- [self updateWithAuthorizationResponse:authorizationResponse error:nil];
- }
-
- if (tokenResponse) {
- [self updateWithTokenResponse:tokenResponse error:nil];
- }
- }
- return self;
-}
-
-#pragma mark - NSObject overrides
-
-- (NSString *)description {
- return [NSString stringWithFormat:@"<%@: %p, isAuthorized: %@, refreshToken: \"%@\", "
- "scope: \"%@\", accessToken: \"%@\", "
- "accessTokenExpirationDate: %@, idToken: \"%@\", "
- "lastAuthorizationResponse: %@, lastTokenResponse: %@, "
- "lastRegistrationResponse: %@, authorizationError: %@>",
- NSStringFromClass([self class]),
- (void *)self,
- (self.isAuthorized) ? @"YES" : @"NO",
- [OIDTokenUtilities redact:_refreshToken],
- _scope,
- [OIDTokenUtilities redact:self.accessToken],
- self.accessTokenExpirationDate,
- [OIDTokenUtilities redact:self.idToken],
- _lastAuthorizationResponse,
- _lastTokenResponse,
- _lastRegistrationResponse,
- _authorizationError];
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)aDecoder {
- _lastAuthorizationResponse = [aDecoder decodeObjectOfClass:[OIDAuthorizationResponse class]
- forKey:kLastAuthorizationResponseKey];
- _lastTokenResponse = [aDecoder decodeObjectOfClass:[OIDTokenResponse class]
- forKey:kLastTokenResponseKey];
- self = [self initWithAuthorizationResponse:_lastAuthorizationResponse
- tokenResponse:_lastTokenResponse];
- if (self) {
- _authorizationError =
- [aDecoder decodeObjectOfClass:[NSError class] forKey:kAuthorizationErrorKey];
- _scope = [aDecoder decodeObjectOfClass:[NSString class] forKey:kScopeKey];
- _refreshToken = [aDecoder decodeObjectOfClass:[NSString class] forKey:kRefreshTokenKey];
- _needsTokenRefresh = [aDecoder decodeBoolForKey:kNeedsTokenRefreshKey];
- }
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)aCoder {
- [aCoder encodeObject:_lastAuthorizationResponse forKey:kLastAuthorizationResponseKey];
- [aCoder encodeObject:_lastTokenResponse forKey:kLastTokenResponseKey];
- if (_authorizationError) {
- NSError *codingSafeAuthorizationError = [NSError errorWithDomain:_authorizationError.domain
- code:_authorizationError.code
- userInfo:nil];
- [aCoder encodeObject:codingSafeAuthorizationError forKey:kAuthorizationErrorKey];
- }
- [aCoder encodeObject:_scope forKey:kScopeKey];
- [aCoder encodeObject:_refreshToken forKey:kRefreshTokenKey];
- [aCoder encodeBool:_needsTokenRefresh forKey:kNeedsTokenRefreshKey];
-}
-
-#pragma mark - Private convenience getters
-
-- (NSString *)accessToken {
- if (_authorizationError) {
- return nil;
- }
- return _lastTokenResponse ? _lastTokenResponse.accessToken
- : _lastAuthorizationResponse.accessToken;
-}
-
-- (NSString *)tokenType {
- if (_authorizationError) {
- return nil;
- }
- return _lastTokenResponse ? _lastTokenResponse.tokenType
- : _lastAuthorizationResponse.tokenType;
-}
-
-- (NSDate *)accessTokenExpirationDate {
- if (_authorizationError) {
- return nil;
- }
- return _lastTokenResponse ? _lastTokenResponse.accessTokenExpirationDate
- : _lastAuthorizationResponse.accessTokenExpirationDate;
-}
-
-- (NSString *)idToken {
- if (_authorizationError) {
- return nil;
- }
- return _lastTokenResponse ? _lastTokenResponse.idToken
- : _lastAuthorizationResponse.idToken;
-}
-
-#pragma mark - Getters
-
-- (BOOL)isAuthorized {
- return !self.authorizationError && (self.accessToken || self.idToken || self.refreshToken);
-}
-
-#pragma mark - Updating the state
-
-- (void)updateWithRegistrationResponse:(OIDRegistrationResponse *)registrationResponse {
- _lastRegistrationResponse = registrationResponse;
- _refreshToken = nil;
- _scope = nil;
- _lastAuthorizationResponse = nil;
- _lastTokenResponse = nil;
- _authorizationError = nil;
- [self didChangeState];
-}
-
-- (void)updateWithAuthorizationResponse:(nullable OIDAuthorizationResponse *)authorizationResponse
- error:(nullable NSError *)error {
- // If the error is an OAuth authorization error, updates the state. Other errors are ignored.
- if (error.domain == OIDOAuthAuthorizationErrorDomain) {
- [self updateWithAuthorizationError:error];
- return;
- }
- if (!authorizationResponse) {
- return;
- }
-
- _lastAuthorizationResponse = authorizationResponse;
-
- // clears the last token response and refresh token as these now relate to an old authorization
- // that is no longer relevant
- _lastTokenResponse = nil;
- _refreshToken = nil;
- _authorizationError = nil;
-
- // if the response's scope is nil, it means that it equals that of the request
- // see: https://tools.ietf.org/html/rfc6749#section-5.1
- _scope = (authorizationResponse.scope) ? authorizationResponse.scope
- : authorizationResponse.request.scope;
-
- [self didChangeState];
-}
-
-- (void)updateWithTokenResponse:(nullable OIDTokenResponse *)tokenResponse
- error:(nullable NSError *)error {
- if (_authorizationError) {
- // Calling updateWithTokenResponse while in an error state probably means the developer obtained
- // a new token and did the exchange without also calling updateWithAuthorizationResponse.
- // Attempts to handle gracefully, but warns the developer that this is unexpected.
- NSLog(@"OIDAuthState:updateWithTokenResponse should not be called in an error state [%@] call"
- "updateWithAuthorizationResponse with the result of the fresh authorization response"
- "first",
- _authorizationError);
-
- _authorizationError = nil;
- }
-
- // If the error is an OAuth authorization error, updates the state. Other errors are ignored.
- if (error.domain == OIDOAuthTokenErrorDomain) {
- [self updateWithAuthorizationError:error];
- return;
- }
- if (!tokenResponse) {
- return;
- }
-
- _lastTokenResponse = tokenResponse;
-
- // updates the scope and refresh token if they are present on the TokenResponse.
- // according to the spec, these may be changed by the server, including when refreshing the
- // access token. See: https://tools.ietf.org/html/rfc6749#section-5.1 and
- // https://tools.ietf.org/html/rfc6749#section-6
- if (tokenResponse.scope) {
- _scope = tokenResponse.scope;
- }
- if (tokenResponse.refreshToken) {
- _refreshToken = tokenResponse.refreshToken;
- }
-
- [self didChangeState];
-}
-
-- (void)updateWithAuthorizationError:(NSError *)oauthError {
- _authorizationError = oauthError;
-
- [self didChangeState];
-
- [_errorDelegate authState:self didEncounterAuthorizationError:oauthError];
-}
-
-#pragma mark - OAuth Requests
-
-- (OIDTokenRequest *)tokenRefreshRequest {
- return [self tokenRefreshRequestWithAdditionalParameters:nil];
-}
-
-- (OIDTokenRequest *)tokenRefreshRequestWithAdditionalParameters:
- (NSDictionary *)additionalParameters {
-
- // TODO: Add unit test to confirm exception is thrown when expected
-
- if (!_refreshToken) {
- [OIDErrorUtilities raiseException:kRefreshTokenRequestException];
- }
- return [[OIDTokenRequest alloc]
- initWithConfiguration:_lastAuthorizationResponse.request.configuration
- grantType:OIDGrantTypeRefreshToken
- authorizationCode:nil
- redirectURL:nil
- clientID:_lastAuthorizationResponse.request.clientID
- clientSecret:_lastAuthorizationResponse.request.clientSecret
- scope:nil
- refreshToken:_refreshToken
- codeVerifier:nil
- additionalParameters:additionalParameters];
-}
-
-#pragma mark - Stateful Actions
-
-- (void)didChangeState {
- [_stateChangeDelegate didChangeState:self];
-}
-
-- (void)setNeedsTokenRefresh {
- _needsTokenRefresh = YES;
-}
-
-- (void)performActionWithFreshTokens:(OIDAuthStateAction)action {
- [self performActionWithFreshTokens:action additionalRefreshParameters:nil];
-}
-
-- (void)performActionWithFreshTokens:(OIDAuthStateAction)action
- additionalRefreshParameters:
- (nullable NSDictionary *)additionalParameters {
- [self performActionWithFreshTokens:action
- additionalRefreshParameters:additionalParameters
- dispatchQueue:dispatch_get_main_queue()];
-}
-
-- (void)performActionWithFreshTokens:(OIDAuthStateAction)action
- additionalRefreshParameters:
- (nullable NSDictionary *)additionalParameters
- dispatchQueue:(dispatch_queue_t)dispatchQueue {
-
- if ([self isTokenFresh]) {
- // access token is valid within tolerance levels, perform action
- dispatch_async(dispatchQueue, ^{
- action(self.accessToken, self.idToken, nil);
- });
- return;
- }
-
- if (!_refreshToken) {
- // no refresh token available and token has expired
- NSError *tokenRefreshError = [
- OIDErrorUtilities errorWithCode:OIDErrorCodeTokenRefreshError
- underlyingError:nil
- description:@"Unable to refresh expired token without a refresh token."];
- dispatch_async(dispatchQueue, ^{
- action(nil, nil, tokenRefreshError);
- });
- return;
- }
-
- // access token is expired, first refresh the token, then perform action
- NSAssert(_pendingActionsSyncObject, @"_pendingActionsSyncObject cannot be nil", @"");
- OIDAuthStatePendingAction* pendingAction =
- [[OIDAuthStatePendingAction alloc] initWithAction:action andDispatchQueue:dispatchQueue];
- @synchronized(_pendingActionsSyncObject) {
- // if a token is already in the process of being refreshed, adds to pending actions
- if (_pendingActions) {
- [_pendingActions addObject:pendingAction];
- return;
- }
-
- // creates a list of pending actions, starting with this one
- _pendingActions = [NSMutableArray arrayWithObject:pendingAction];
- }
-
- // refresh the tokens
- OIDTokenRequest *tokenRefreshRequest =
- [self tokenRefreshRequestWithAdditionalParameters:additionalParameters];
- [OIDAuthorizationService performTokenRequest:tokenRefreshRequest
- originalAuthorizationResponse:_lastAuthorizationResponse
- callback:^(OIDTokenResponse *_Nullable response,
- NSError *_Nullable error) {
- // update OIDAuthState based on response
- if (response) {
- self->_needsTokenRefresh = NO;
- [self updateWithTokenResponse:response error:nil];
- } else {
- if (error.domain == OIDOAuthTokenErrorDomain) {
- self->_needsTokenRefresh = NO;
- [self updateWithAuthorizationError:error];
- } else {
- if ([self->_errorDelegate respondsToSelector:
- @selector(authState:didEncounterTransientError:)]) {
- [self->_errorDelegate authState:self didEncounterTransientError:error];
- }
- }
- }
-
- // nil the pending queue and process everything that was queued up
- NSArray *actionsToProcess;
- @synchronized(self->_pendingActionsSyncObject) {
- actionsToProcess = self->_pendingActions;
- self->_pendingActions = nil;
- }
- for (OIDAuthStatePendingAction* actionToProcess in actionsToProcess) {
- dispatch_async(actionToProcess.dispatchQueue, ^{
- actionToProcess.action(self.accessToken, self.idToken, error);
- });
- }
- }];
-}
-
-#pragma mark -
-
-/*! @fn isTokenFresh
- @brief Determines whether a token refresh request must be made to refresh the tokens.
- */
-- (BOOL)isTokenFresh {
- if (_needsTokenRefresh) {
- // forced refresh
- return NO;
- }
-
- if (!self.accessTokenExpirationDate) {
- // if there is no expiration time but we have an access token, it is assumed to never expire
- return !!self.accessToken;
- }
-
- // has the token expired?
- BOOL tokenFresh = [self.accessTokenExpirationDate timeIntervalSinceNow] > kExpiryTimeTolerance;
- return tokenFresh;
-}
-
-@end
-
-
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthStateChangeDelegate.h b/Pods/AppAuth/Source/AppAuthCore/OIDAuthStateChangeDelegate.h
deleted file mode 100644
index 2570df131f..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthStateChangeDelegate.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*! @file OIDAuthStateChangeDelegate.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-@class OIDAuthState;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @protocol OIDAuthStateChangeDelegate
- @brief Delegate of the OIDAuthState used to monitor various changes in state.
- */
-@protocol OIDAuthStateChangeDelegate
-
-/*! @brief Called when the authorization state changes and any backing storage needs to be updated.
- @param state The @c OIDAuthState that changed.
- @discussion If you are storing the authorization state, you should update the storage when the
- state changes.
- */
-- (void)didChangeState:(OIDAuthState *)state;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthStateErrorDelegate.h b/Pods/AppAuth/Source/AppAuthCore/OIDAuthStateErrorDelegate.h
deleted file mode 100644
index 91a9b1cd00..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthStateErrorDelegate.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*! @file OIDAuthStateErrorDelegate.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-@class OIDAuthState;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @protocol OIDAuthStateErrorDelegate
- @brief Delegate of the OIDAuthState used to monitor errors.
- */
-@protocol OIDAuthStateErrorDelegate
-
-/*! @brief Called when an authentication occurs, which indicates the auth session is invalid.
- @param state The @c OIDAuthState on which the error occurred.
- @param error The authorization error.
- @discussion This is a hard error (not a transient network issue) that indicates a problem with
- the authorization. You should stop using the @c OIDAuthState when such an error is
- encountered. If the \NSError_code is @c ::OIDErrorCodeOAuthInvalidGrant then
- the session may be recoverable with user interaction (i.e. re-authentication). In all cases
- you should consider the user unauthorized, and remove locally cached resources that require
- that authorization. @c OIDAuthState will call this method automatically if it encounters
- an OAuth error (that is, an HTTP 400 response with a valid OAuth error response) during
- authorization or token refresh (such as performed automatically when using
- @c OIDAuthState.performActionWithFreshTokens:). You can signal authorization errors with
- @c OIDAuthState.updateWithAuthorizationError:.
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-- (void)authState:(OIDAuthState *)state didEncounterAuthorizationError:(NSError *)error;
-
-@optional
-
-/*! @brief Called when a network or other transient error occurs.
- @param state The @c OIDAuthState on which the error occurred.
- @param error The transient error.
- @discussion This is a soft error, typically network related. The @c OIDAuthState is likely
- still valid, and should not be discarded. Retry the request using an incremental backoff
- strategy. This is only called when using the @c OIDAuthState convenience methods such as
- @c OIDAuthState.performActionWithFreshTokens:. If you are refreshing the tokens yourself
- outside of @c OIDAuthState class, it will never be called.
- */
-- (void)authState:(OIDAuthState *)state didEncounterTransientError:(NSError *)error;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationRequest.h b/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationRequest.h
deleted file mode 100644
index 594f01d876..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationRequest.h
+++ /dev/null
@@ -1,250 +0,0 @@
-/*! @file OIDAuthorizationRequest.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-// These files only declare string constants useful for constructing a @c OIDAuthorizationRequest,
-// so they are imported here for convenience.
-#import "OIDExternalUserAgentRequest.h"
-#import "OIDResponseTypes.h"
-#import "OIDScopes.h"
-
-@class OIDServiceConfiguration;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief The @c code_challenge_method value for the S256 code challenge.
- @see https://tools.ietf.org/html/rfc7636#section-4.3
- */
-extern NSString *const OIDOAuthorizationRequestCodeChallengeMethodS256;
-
-
-/*! @brief Represents an authorization request.
- @see https://tools.ietf.org/html/rfc6749#section-4
- @see https://tools.ietf.org/html/rfc6749#section-4.1.1
- */
-@interface OIDAuthorizationRequest :
- NSObject
-
-/*! @brief The service's configuration.
- @remarks This configuration specifies how to connect to a particular OAuth provider.
- Configurations may be created manually, or via an OpenID Connect Discovery Document.
- */
-@property(nonatomic, readonly) OIDServiceConfiguration *configuration;
-
-/*! @brief The expected response type.
- @remarks response_type
- @discussion Generally 'code' if pure OAuth, otherwise a space-delimited list of of response
- types including 'code', 'token', and 'id_token' for OpenID Connect.
- @see https://tools.ietf.org/html/rfc6749#section-3.1.1
- @see http://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3
- */
-@property(nonatomic, readonly) NSString *responseType;
-
-/*! @brief The client identifier.
- @remarks client_id
- @see https://tools.ietf.org/html/rfc6749#section-2.2
- */
-@property(nonatomic, readonly) NSString *clientID;
-
-/*! @brief The client secret.
- @remarks client_secret
- @discussion The client secret is used to prove that identity of the client when exchaning an
- authorization code for an access token.
- The client secret is not passed in the authorizationRequestURL. It is only used when
- exchanging the authorization code for an access token.
- @see https://tools.ietf.org/html/rfc6749#section-2.3.1
- */
-@property(nonatomic, readonly, nullable) NSString *clientSecret;
-
-/*! @brief The value of the scope parameter is expressed as a list of space-delimited,
- case-sensitive strings.
- @remarks scope
- @see https://tools.ietf.org/html/rfc6749#section-3.3
- */
-@property(nonatomic, readonly, nullable) NSString *scope;
-
-/*! @brief The client's redirect URI.
- @remarks redirect_uri
- @see https://tools.ietf.org/html/rfc6749#section-3.1.2
- */
-@property(nonatomic, readonly, nullable) NSURL *redirectURL;
-
-/*! @brief An opaque value used by the client to maintain state between the request and callback.
- @remarks state
- @discussion If this value is not explicitly set, this library will automatically add state and
- perform appropriate validation of the state in the authorization response. It is recommended
- that the default implementation of this parameter be used wherever possible. Typically used
- to prevent CSRF attacks, as recommended in RFC6819 Section 5.3.5.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.1
- @see https://tools.ietf.org/html/rfc6819#section-5.3.5
- */
-@property(nonatomic, readonly, nullable) NSString *state;
-
-/*! @brief String value used to associate a Client session with an ID Token, and to mitigate replay
- attacks. The value is passed through unmodified from the Authentication Request to the ID
- Token. Sufficient entropy MUST be present in the nonce values used to prevent attackers from
- guessing values.
- @remarks nonce
- @discussion If this value is not explicitly set, this library will automatically add nonce and
- perform appropriate validation of the nonce in the ID Token.
- @see https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
- */
-@property(nonatomic, readonly, nullable) NSString *nonce;
-
-/*! @brief The PKCE code verifier.
- @remarks code_verifier
- @discussion The code verifier itself is not included in the authorization request that is sent
- on the wire, but needs to be in the token exchange request.
- @c OIDAuthorizationResponse.tokenExchangeRequest will create a @c OIDTokenRequest that
- includes this parameter automatically.
- @see https://tools.ietf.org/html/rfc7636#section-4.1
- */
-@property(nonatomic, readonly, nullable) NSString *codeVerifier;
-
-/*! @brief The PKCE code challenge, derived from #codeVerifier.
- @remarks code_challenge
- @see https://tools.ietf.org/html/rfc7636#section-4.2
- */
-@property(nonatomic, readonly, nullable) NSString *codeChallenge;
-
-/*! @brief The method used to compute the @c #codeChallenge
- @remarks code_challenge_method
- @see https://tools.ietf.org/html/rfc7636#section-4.3
- */
-@property(nonatomic, readonly, nullable) NSString *codeChallengeMethod;
-
-/*! @brief The client's additional authorization parameters.
- @see https://tools.ietf.org/html/rfc6749#section-3.1
- */
-@property(nonatomic, readonly, nullable) NSDictionary *additionalParameters;
-
-/*! @internal
- @brief Unavailable. Please use
- @c initWithConfiguration:clientId:scopes:redirectURL:responseType:additionalParameters:.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-/*! @brief Creates an authorization request with opinionated defaults (a secure @c state, and
- PKCE with S256 as the @c code_challenge_method).
- @param configuration The service's configuration.
- @param clientID The client identifier.
- @param scopes An array of scopes to combine into a single scope string per the OAuth2 spec.
- @param redirectURL The client's redirect URI.
- @param responseType The expected response type.
- @param additionalParameters The client's additional authorization parameters.
- @remarks This convenience initializer generates a state parameter and PKCE challenges
- automatically.
- */
-- (instancetype)
- initWithConfiguration:(OIDServiceConfiguration *)configuration
- clientId:(NSString *)clientID
- scopes:(nullable NSArray *)scopes
- redirectURL:(NSURL *)redirectURL
- responseType:(NSString *)responseType
- additionalParameters:(nullable NSDictionary *)additionalParameters;
-
-/*! @brief Creates an authorization request with opinionated defaults (a secure @c state, @c nonce,
- and PKCE with S256 as the @c code_challenge_method).
- @param configuration The service's configuration.
- @param clientID The client identifier.
- @param clientSecret The client secret.
- @param scopes An array of scopes to combine into a single scope string per the OAuth2 spec.
- @param redirectURL The client's redirect URI.
- @param responseType The expected response type.
- @param additionalParameters The client's additional authorization parameters.
- @remarks This convenience initializer generates a state parameter and PKCE challenges
- automatically.
- */
-- (instancetype)
- initWithConfiguration:(OIDServiceConfiguration *)configuration
- clientId:(NSString *)clientID
- clientSecret:(nullable NSString *)clientSecret
- scopes:(nullable NSArray *)scopes
- redirectURL:(NSURL *)redirectURL
- responseType:(NSString *)responseType
- additionalParameters:(nullable NSDictionary *)additionalParameters;
-
-/*! @brief Designated initializer.
- @param configuration The service's configuration.
- @param clientID The client identifier.
- @param scope A scope string per the OAuth2 spec (a space-delimited set of scopes).
- @param redirectURL The client's redirect URI.
- @param responseType The expected response type.
- @param state An opaque value used by the client to maintain state between the request and
- callback.
- @param nonce String value used to associate a Client session with an ID Token. Can be set to nil
- if not using OpenID Connect, although pure OAuth servers should ignore params they don't
- understand anyway.
- @param codeVerifier The PKCE code verifier. See @c OIDAuthorizationRequest.generateCodeVerifier.
- @param codeChallenge The PKCE code challenge, calculated from the code verifier such as with
- @c OIDAuthorizationRequest.codeChallengeS256ForVerifier:.
- @param codeChallengeMethod The PKCE code challenge method.
- ::OIDOAuthorizationRequestCodeChallengeMethodS256 when
- @c OIDAuthorizationRequest.codeChallengeS256ForVerifier: is used to create the code
- challenge.
- @param additionalParameters The client's additional authorization parameters.
- */
-- (instancetype)
- initWithConfiguration:(OIDServiceConfiguration *)configuration
- clientId:(NSString *)clientID
- clientSecret:(nullable NSString *)clientSecret
- scope:(nullable NSString *)scope
- redirectURL:(nullable NSURL *)redirectURL
- responseType:(NSString *)responseType
- state:(nullable NSString *)state
- nonce:(nullable NSString *)nonce
- codeVerifier:(nullable NSString *)codeVerifier
- codeChallenge:(nullable NSString *)codeChallenge
- codeChallengeMethod:(nullable NSString *)codeChallengeMethod
- additionalParameters:(nullable NSDictionary *)additionalParameters
- NS_DESIGNATED_INITIALIZER;
-
-/*! @brief Constructs the request URI by adding the request parameters to the query component of the
- authorization endpoint URI using the "application/x-www-form-urlencoded" format.
- @return A URL representing the authorization request.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.1
- */
-- (NSURL *)authorizationRequestURL;
-
-/*! @brief Generates an OAuth state param using a random source.
- @return The generated state.
- @see https://tools.ietf.org/html/rfc6819#section-5.3.5
- */
-+ (nullable NSString *)generateState;
-
-/*! @brief Constructs a PKCE-compliant code verifier.
- @return The generated code verifier.
- @see https://tools.ietf.org/html/rfc7636#section-4.1
- */
-+ (nullable NSString *)generateCodeVerifier;
-
-/*! @brief Creates a PKCE S256 codeChallenge from the codeVerifier.
- @param codeVerifier The code verifier from which the code challenge will be derived.
- @return The generated code challenge.
- @details Generate a secure code verifier to pass into this method with
- @c OIDAuthorizationRequest.generateCodeVerifier. The matching @c #codeChallengeMethod for
- @c #codeChallenge%s created by this method is
- ::OIDOAuthorizationRequestCodeChallengeMethodS256.
- @see https://tools.ietf.org/html/rfc7636#section-4.1
- */
-+ (nullable NSString *)codeChallengeS256ForVerifier:(nullable NSString *)codeVerifier;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationRequest.m b/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationRequest.m
deleted file mode 100644
index ccfacda0fd..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationRequest.m
+++ /dev/null
@@ -1,351 +0,0 @@
-/*! @file OIDAuthorizationRequest.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDAuthorizationRequest.h"
-
-#import "OIDDefines.h"
-#import "OIDScopeUtilities.h"
-#import "OIDServiceConfiguration.h"
-#import "OIDTokenUtilities.h"
-#import "OIDURLQueryComponent.h"
-
-/*! @brief The key for the @c configuration property for @c NSSecureCoding
- */
-static NSString *const kConfigurationKey = @"configuration";
-
-/*! @brief Key used to encode the @c responseType property for @c NSSecureCoding, and on the URL
- request.
- */
-static NSString *const kResponseTypeKey = @"response_type";
-
-/*! @brief Key used to encode the @c clientID property for @c NSSecureCoding, and on the URL
- request.
- */
-static NSString *const kClientIDKey = @"client_id";
-
-/*! @brief Key used to encode the @c clientSecret property for @c NSSecureCoding.
- */
-static NSString *const kClientSecretKey = @"client_secret";
-
-/*! @brief Key used to encode the @c scope property for @c NSSecureCoding, and on the URL request.
- */
-static NSString *const kScopeKey = @"scope";
-
-/*! @brief Key used to encode the @c redirectURL property for @c NSSecureCoding, and on the URL
- request.
- */
-static NSString *const kRedirectURLKey = @"redirect_uri";
-
-/*! @brief Key used to encode the @c state property for @c NSSecureCoding, and on the URL request.
- */
-static NSString *const kStateKey = @"state";
-
-/*! @brief Key used to encode the @c nonce property for @c NSSecureCoding, and on the URL request.
- */
-static NSString *const kNonceKey = @"nonce";
-
-/*! @brief Key used to encode the @c codeVerifier property for @c NSSecureCoding.
- */
-static NSString *const kCodeVerifierKey = @"code_verifier";
-
-/*! @brief Key used to send the @c codeChallenge on the URL request.
- */
-static NSString *const kCodeChallengeKey = @"code_challenge";
-
-/*! @brief Key used to send the @c codeChallengeMethod on the URL request.
- */
-static NSString *const kCodeChallengeMethodKey = @"code_challenge_method";
-
-/*! @brief Key used to encode the @c additionalParameters property for
- @c NSSecureCoding
- */
-static NSString *const kAdditionalParametersKey = @"additionalParameters";
-
-/*! @brief Number of random bytes generated for the @ state.
- */
-static NSUInteger const kStateSizeBytes = 32;
-
-/*! @brief Number of random bytes generated for the @ codeVerifier.
- */
-static NSUInteger const kCodeVerifierBytes = 32;
-
-/*! @brief Assertion text for unsupported response types.
- */
-static NSString *const OIDOAuthUnsupportedResponseTypeMessage =
- @"The response_type \"%@\" isn't supported. AppAuth only supports the \"code\" or \"code id_token\" response_type.";
-
-/*! @brief Code challenge request method.
- */
-NSString *const OIDOAuthorizationRequestCodeChallengeMethodS256 = @"S256";
-
-@implementation OIDAuthorizationRequest
-
-- (instancetype)init
- OID_UNAVAILABLE_USE_INITIALIZER(
- @selector(initWithConfiguration:
- clientId:
- scopes:
- redirectURL:
- responseType:
- additionalParameters:)
- )
-
-/*! @brief Check if the response type is one AppAuth supports
- @remarks AppAuth only supports the `code` and `code id_token` response types.
- @see https://github.com/openid/AppAuth-iOS/issues/98
- @see https://github.com/openid/AppAuth-iOS/issues/292
- */
-+ (BOOL)isSupportedResponseType:(NSString *)responseType
-{
- NSString *codeIdToken = [@[OIDResponseTypeCode, OIDResponseTypeIDToken]
- componentsJoinedByString:@" "];
- NSString *idTokenCode = [@[OIDResponseTypeIDToken, OIDResponseTypeCode]
- componentsJoinedByString:@" "];
-
- return [responseType isEqualToString:OIDResponseTypeCode]
- || [responseType isEqualToString:codeIdToken]
- || [responseType isEqualToString:idTokenCode];
-}
-
-- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration
- clientId:(NSString *)clientID
- clientSecret:(nullable NSString *)clientSecret
- scope:(nullable NSString *)scope
- redirectURL:(NSURL *)redirectURL
- responseType:(NSString *)responseType
- state:(nullable NSString *)state
- nonce:(nullable NSString *)nonce
- codeVerifier:(nullable NSString *)codeVerifier
- codeChallenge:(nullable NSString *)codeChallenge
- codeChallengeMethod:(nullable NSString *)codeChallengeMethod
- additionalParameters:(nullable NSDictionary *)additionalParameters
-{
- self = [super init];
- if (self) {
- _configuration = [configuration copy];
- _clientID = [clientID copy];
- _clientSecret = [clientSecret copy];
- _scope = [scope copy];
- _redirectURL = [redirectURL copy];
- _responseType = [responseType copy];
- if (![[self class] isSupportedResponseType:_responseType]) {
- NSAssert(NO, OIDOAuthUnsupportedResponseTypeMessage, _responseType);
- return nil;
- }
- _state = [state copy];
- _nonce = [nonce copy];
- _codeVerifier = [codeVerifier copy];
- _codeChallenge = [codeChallenge copy];
- _codeChallengeMethod = [codeChallengeMethod copy];
-
- _additionalParameters =
- [[NSDictionary alloc] initWithDictionary:additionalParameters copyItems:YES];
- }
- return self;
-}
-
-- (instancetype)
- initWithConfiguration:(OIDServiceConfiguration *)configuration
- clientId:(NSString *)clientID
- clientSecret:(NSString *)clientSecret
- scopes:(nullable NSArray *)scopes
- redirectURL:(NSURL *)redirectURL
- responseType:(NSString *)responseType
- additionalParameters:(nullable NSDictionary *)additionalParameters {
-
- // generates PKCE code verifier and challenge
- NSString *codeVerifier = [[self class] generateCodeVerifier];
- NSString *codeChallenge = [[self class] codeChallengeS256ForVerifier:codeVerifier];
-
- return [self initWithConfiguration:configuration
- clientId:clientID
- clientSecret:clientSecret
- scope:[OIDScopeUtilities scopesWithArray:scopes]
- redirectURL:redirectURL
- responseType:responseType
- state:[[self class] generateState]
- nonce:[[self class] generateState]
- codeVerifier:codeVerifier
- codeChallenge:codeChallenge
- codeChallengeMethod:OIDOAuthorizationRequestCodeChallengeMethodS256
- additionalParameters:additionalParameters];
-}
-
-- (instancetype)
- initWithConfiguration:(OIDServiceConfiguration *)configuration
- clientId:(NSString *)clientID
- scopes:(nullable NSArray *)scopes
- redirectURL:(NSURL *)redirectURL
- responseType:(NSString *)responseType
- additionalParameters:(nullable NSDictionary *)additionalParameters {
- return [self initWithConfiguration:configuration
- clientId:clientID
- clientSecret:nil
- scopes:scopes
- redirectURL:redirectURL
- responseType:responseType
- additionalParameters:additionalParameters];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(nullable NSZone *)zone {
- // The documentation for NSCopying specifically advises us to return a reference to the original
- // instance in the case where instances are immutable (as ours is):
- // "Implement NSCopying by retaining the original instead of creating a new copy when the class
- // and its contents are immutable."
- return self;
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)aDecoder {
- OIDServiceConfiguration *configuration =
- [aDecoder decodeObjectOfClass:[OIDServiceConfiguration class]
- forKey:kConfigurationKey];
- NSString *responseType = [aDecoder decodeObjectOfClass:[NSString class] forKey:kResponseTypeKey];
- NSString *clientID = [aDecoder decodeObjectOfClass:[NSString class] forKey:kClientIDKey];
- NSString *clientSecret = [aDecoder decodeObjectOfClass:[NSString class] forKey:kClientSecretKey];
- NSString *scope = [aDecoder decodeObjectOfClass:[NSString class] forKey:kScopeKey];
- NSURL *redirectURL = [aDecoder decodeObjectOfClass:[NSURL class] forKey:kRedirectURLKey];
- NSString *state = [aDecoder decodeObjectOfClass:[NSString class] forKey:kStateKey];
- NSString *nonce = [aDecoder decodeObjectOfClass:[NSString class] forKey:kNonceKey];
- NSString *codeVerifier = [aDecoder decodeObjectOfClass:[NSString class] forKey:kCodeVerifierKey];
- NSString *codeChallenge =
- [aDecoder decodeObjectOfClass:[NSString class] forKey:kCodeChallengeKey];
- NSString *codeChallengeMethod =
- [aDecoder decodeObjectOfClass:[NSString class] forKey:kCodeChallengeMethodKey];
- NSSet *additionalParameterCodingClasses = [NSSet setWithArray:@[
- [NSDictionary class],
- [NSString class]
- ]];
- NSDictionary *additionalParameters =
- [aDecoder decodeObjectOfClasses:additionalParameterCodingClasses
- forKey:kAdditionalParametersKey];
-
- self = [self initWithConfiguration:configuration
- clientId:clientID
- clientSecret:clientSecret
- scope:scope
- redirectURL:redirectURL
- responseType:responseType
- state:state
- nonce:nonce
- codeVerifier:codeVerifier
- codeChallenge:codeChallenge
- codeChallengeMethod:codeChallengeMethod
- additionalParameters:additionalParameters];
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)aCoder {
- [aCoder encodeObject:_configuration forKey:kConfigurationKey];
- [aCoder encodeObject:_responseType forKey:kResponseTypeKey];
- [aCoder encodeObject:_clientID forKey:kClientIDKey];
- [aCoder encodeObject:_clientSecret forKey:kClientSecretKey];
- [aCoder encodeObject:_scope forKey:kScopeKey];
- [aCoder encodeObject:_redirectURL forKey:kRedirectURLKey];
- [aCoder encodeObject:_state forKey:kStateKey];
- [aCoder encodeObject:_nonce forKey:kNonceKey];
- [aCoder encodeObject:_codeVerifier forKey:kCodeVerifierKey];
- [aCoder encodeObject:_codeChallenge forKey:kCodeChallengeKey];
- [aCoder encodeObject:_codeChallengeMethod forKey:kCodeChallengeMethodKey];
- [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey];
-}
-
-#pragma mark - NSObject overrides
-
-- (NSString *)description {
- return [NSString stringWithFormat:@"<%@: %p, request: %@>",
- NSStringFromClass([self class]),
- (void *)self,
- self.authorizationRequestURL];
-}
-
-#pragma mark - State and PKCE verifier/challenge generation Methods
-
-+ (nullable NSString *)generateCodeVerifier {
- return [OIDTokenUtilities randomURLSafeStringWithSize:kCodeVerifierBytes];
-}
-
-+ (nullable NSString *)generateState {
- return [OIDTokenUtilities randomURLSafeStringWithSize:kStateSizeBytes];
-}
-
-+ (nullable NSString *)codeChallengeS256ForVerifier:(NSString *)codeVerifier {
- if (!codeVerifier) {
- return nil;
- }
- // generates the code_challenge per spec https://tools.ietf.org/html/rfc7636#section-4.2
- // code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier)))
- // NB. the ASCII conversion on the code_verifier entropy was done at time of generation.
- NSData *sha256Verifier = [OIDTokenUtilities sha256:codeVerifier];
- return [OIDTokenUtilities encodeBase64urlNoPadding:sha256Verifier];
-}
-
-#pragma mark -
-
-- (NSURL *)authorizationRequestURL {
- OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] init];
-
- // Required parameters.
- [query addParameter:kResponseTypeKey value:_responseType];
- [query addParameter:kClientIDKey value:_clientID];
-
- // Add any additional parameters the client has specified.
- [query addParameters:_additionalParameters];
-
- // Add optional parameters, as applicable.
- if (_redirectURL) {
- [query addParameter:kRedirectURLKey value:_redirectURL.absoluteString];
- }
- if (_scope) {
- [query addParameter:kScopeKey value:_scope];
- }
- if (_state) {
- [query addParameter:kStateKey value:_state];
- }
- if (_nonce) {
- [query addParameter:kNonceKey value:_nonce];
- }
- if (_codeChallenge) {
- [query addParameter:kCodeChallengeKey value:_codeChallenge];
- }
- if (_codeChallengeMethod) {
- [query addParameter:kCodeChallengeMethodKey value:_codeChallengeMethod];
- }
-
- // Construct the URL:
- return [query URLByReplacingQueryInURL:_configuration.authorizationEndpoint];
-}
-
-#pragma mark - OIDExternalUserAgentRequest
-
-- (NSURL *)externalUserAgentRequestURL {
- return [self authorizationRequestURL];
-}
-
-- (NSString *)redirectScheme {
- return [[self redirectURL] scheme];
-}
-
-@end
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationResponse.h b/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationResponse.h
deleted file mode 100644
index e7552fe59b..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationResponse.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*! @file OIDAuthorizationResponse.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-@class OIDAuthorizationRequest;
-@class OIDTokenRequest;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief Represents the response to an authorization request.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2
- @see https://tools.ietf.org/html/rfc6749#section-5.1
- @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse
- */
-@interface OIDAuthorizationResponse : NSObject
-
-/*! @brief The request which was serviced.
- */
-@property(nonatomic, readonly) OIDAuthorizationRequest *request;
-
-/*! @brief The authorization code generated by the authorization server.
- @discussion Set when the response_type requested includes 'code'.
- @remarks code
- */
-@property(nonatomic, readonly, nullable) NSString *authorizationCode;
-
-/*! @brief REQUIRED if the "state" parameter was present in the client authorization request. The
- exact value received from the client.
- @remarks state
- */
-@property(nonatomic, readonly, nullable) NSString *state;
-
-/*! @brief The access token generated by the authorization server.
- @discussion Set when the response_type requested includes 'token'.
- @remarks access_token
- @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse
- */
-@property(nonatomic, readonly, nullable) NSString *accessToken;
-
-/*! @brief The approximate expiration date & time of the access token.
- @discussion Set when the response_type requested includes 'token'.
- @remarks expires_in
- @seealso OIDAuthorizationResponse.accessToken
- @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse
- */
-@property(nonatomic, readonly, nullable) NSDate *accessTokenExpirationDate;
-
-/*! @brief Typically "Bearer" when present. Otherwise, another token_type value that the Client has
- negotiated with the Authorization Server.
- @discussion Set when the response_type requested includes 'token'.
- @remarks token_type
- @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse
- */
-@property(nonatomic, readonly, nullable) NSString *tokenType;
-
-/*! @brief ID Token value associated with the authenticated session.
- @discussion Set when the response_type requested includes 'id_token'.
- @remarks id_token
- @see http://openid.net/specs/openid-connect-core-1_0.html#IDToken
- @see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse
- */
-@property(nonatomic, readonly, nullable) NSString *idToken;
-
-/*! @brief The scope of the access token. OPTIONAL, if identical to the scopes requested, otherwise,
- REQUIRED.
- @remarks scope
- @see https://tools.ietf.org/html/rfc6749#section-5.1
- */
-@property(nonatomic, readonly, nullable) NSString *scope;
-
-/*! @brief Additional parameters returned from the authorization server.
- */
-@property(nonatomic, readonly, nullable)
- NSDictionary *> *additionalParameters;
-
-/*! @internal
- @brief Unavailable. Please use initWithRequest:parameters:.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-/*! @brief Designated initializer.
- @param request The serviced request.
- @param parameters The decoded parameters returned from the Authorization Server.
- @remarks Known parameters are extracted from the @c parameters parameter and the normative
- properties are populated. Non-normative parameters are placed in the
- @c #additionalParameters dictionary.
- */
-- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request
- parameters:(NSDictionary *> *)parameters
- NS_DESIGNATED_INITIALIZER;
-
-/*! @brief Creates a token request suitable for exchanging an authorization code for an access
- token.
- @return A @c OIDTokenRequest suitable for exchanging an authorization code for an access
- token.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.3
- */
-- (nullable OIDTokenRequest *)tokenExchangeRequest;
-
-/*! @brief Creates a token request suitable for exchanging an authorization code for an access
- token.
- @param additionalParameters Additional parameters for the token request.
- @return A @c OIDTokenRequest suitable for exchanging an authorization code for an access
- token.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.3
- */
-- (nullable OIDTokenRequest *)tokenExchangeRequestWithAdditionalParameters:
- (nullable NSDictionary *)additionalParameters;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationResponse.m b/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationResponse.m
deleted file mode 100644
index a8f92c75e7..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationResponse.m
+++ /dev/null
@@ -1,210 +0,0 @@
-/*! @file OIDAuthorizationResponse.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDAuthorizationResponse.h"
-
-#import "OIDAuthorizationRequest.h"
-#import "OIDDefines.h"
-#import "OIDError.h"
-#import "OIDFieldMapping.h"
-#import "OIDTokenRequest.h"
-#import "OIDTokenUtilities.h"
-
-/*! @brief The key for the @c authorizationCode property in the incoming parameters and for
- @c NSSecureCoding.
- */
-static NSString *const kAuthorizationCodeKey = @"code";
-
-/*! @brief The key for the @c state property in the incoming parameters and for @c NSSecureCoding.
- */
-static NSString *const kStateKey = @"state";
-
-/*! @brief The key for the @c accessToken property in the incoming parameters and for
- @c NSSecureCoding.
- */
-static NSString *const kAccessTokenKey = @"access_token";
-
-/*! @brief The key for the @c accessTokenExpirationDate property in the incoming parameters and for
- @c NSSecureCoding.
- */
-static NSString *const kExpiresInKey = @"expires_in";
-
-/*! @brief The key for the @c tokenType property in the incoming parameters and for
- @c NSSecureCoding.
- */
-static NSString *const kTokenTypeKey = @"token_type";
-
-/*! @brief The key for the @c idToken property in the incoming parameters and for @c NSSecureCoding.
- */
-static NSString *const kIDTokenKey = @"id_token";
-
-/*! @brief The key for the @c scope property in the incoming parameters and for @c NSSecureCoding.
- */
-static NSString *const kScopeKey = @"scope";
-
-/*! @brief Key used to encode the @c additionalParameters property for @c NSSecureCoding
- */
-static NSString *const kAdditionalParametersKey = @"additionalParameters";
-
-/*! @brief Key used to encode the @c request property for @c NSSecureCoding
- */
-static NSString *const kRequestKey = @"request";
-
-/*! @brief The exception thrown when a developer tries to create a token exchange request from an
- authorization request with no authorization code.
- */
-static NSString *const kTokenExchangeRequestException =
- @"Attempted to create a token exchange request from an authorization response with no "
- "authorization code.";
-
-@implementation OIDAuthorizationResponse
-
-/*! @brief Returns a mapping of incoming parameters to instance variables.
- @return A mapping of incoming parameters to instance variables.
- */
-+ (NSDictionary *)fieldMap {
- static NSMutableDictionary *fieldMap;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- fieldMap = [NSMutableDictionary dictionary];
- fieldMap[kStateKey] =
- [[OIDFieldMapping alloc] initWithName:@"_state" type:[NSString class]];
- fieldMap[kAuthorizationCodeKey] =
- [[OIDFieldMapping alloc] initWithName:@"_authorizationCode" type:[NSString class]];
- fieldMap[kAccessTokenKey] =
- [[OIDFieldMapping alloc] initWithName:@"_accessToken" type:[NSString class]];
- fieldMap[kExpiresInKey] =
- [[OIDFieldMapping alloc] initWithName:@"_accessTokenExpirationDate"
- type:[NSDate class]
- conversion:^id _Nullable(NSObject *_Nullable value) {
- if (![value isKindOfClass:[NSNumber class]]) {
- return value;
- }
- NSNumber *valueAsNumber = (NSNumber *)value;
- return [NSDate dateWithTimeIntervalSinceNow:[valueAsNumber longLongValue]];
- }];
- fieldMap[kTokenTypeKey] =
- [[OIDFieldMapping alloc] initWithName:@"_tokenType" type:[NSString class]];
- fieldMap[kIDTokenKey] =
- [[OIDFieldMapping alloc] initWithName:@"_idToken" type:[NSString class]];
- fieldMap[kScopeKey] =
- [[OIDFieldMapping alloc] initWithName:@"_scope" type:[NSString class]];
- });
- return fieldMap;
-}
-
-#pragma mark - Initializers
-
-- (instancetype)init
- OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithRequest:parameters:))
-
-- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request
- parameters:(NSDictionary *> *)parameters {
- self = [super init];
- if (self) {
- _request = [request copy];
- NSDictionary *> *additionalParameters =
- [OIDFieldMapping remainingParametersWithMap:[[self class] fieldMap]
- parameters:parameters
- instance:self];
- _additionalParameters = additionalParameters;
- }
- return self;
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(nullable NSZone *)zone {
- // The documentation for NSCopying specifically advises us to return a reference to the original
- // instance in the case where instances are immutable (as ours is):
- // "Implement NSCopying by retaining the original instead of creating a new copy when the class
- // and its contents are immutable."
- return self;
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)aDecoder {
- OIDAuthorizationRequest *request =
- [aDecoder decodeObjectOfClass:[OIDAuthorizationRequest class] forKey:kRequestKey];
- self = [self initWithRequest:request parameters:@{ }];
- if (self) {
- [OIDFieldMapping decodeWithCoder:aDecoder map:[[self class] fieldMap] instance:self];
- _additionalParameters = [aDecoder decodeObjectOfClasses:[OIDFieldMapping JSONTypes]
- forKey:kAdditionalParametersKey];
- }
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)aCoder {
- [aCoder encodeObject:_request forKey:kRequestKey];
- [OIDFieldMapping encodeWithCoder:aCoder map:[[self class] fieldMap] instance:self];
- [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey];
-}
-
-#pragma mark - NSObject overrides
-
-- (NSString *)description {
- return [NSString stringWithFormat:@"<%@: %p, authorizationCode: %@, state: \"%@\", accessToken: "
- "\"%@\", accessTokenExpirationDate: %@, tokenType: %@, "
- "idToken: \"%@\", scope: \"%@\", additionalParameters: %@, "
- "request: %@>",
- NSStringFromClass([self class]),
- (void *)self,
- _authorizationCode,
- _state,
- [OIDTokenUtilities redact:_accessToken],
- _accessTokenExpirationDate,
- _tokenType,
- [OIDTokenUtilities redact:_idToken],
- _scope,
- _additionalParameters,
- _request];
-}
-
-#pragma mark -
-
-- (OIDTokenRequest *)tokenExchangeRequest {
- return [self tokenExchangeRequestWithAdditionalParameters:nil];
-}
-
-- (OIDTokenRequest *)tokenExchangeRequestWithAdditionalParameters:
- (NSDictionary *)additionalParameters {
- // TODO: add a unit test to confirm exception is thrown when expected and the request is created
- // with the correct parameters.
- if (!_authorizationCode) {
- [NSException raise:kTokenExchangeRequestException
- format:kTokenExchangeRequestException];
- }
- return [[OIDTokenRequest alloc] initWithConfiguration:_request.configuration
- grantType:OIDGrantTypeAuthorizationCode
- authorizationCode:_authorizationCode
- redirectURL:_request.redirectURL
- clientID:_request.clientID
- clientSecret:_request.clientSecret
- scope:nil
- refreshToken:nil
- codeVerifier:_request.codeVerifier
- additionalParameters:additionalParameters];
-}
-
-@end
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationService.h b/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationService.h
deleted file mode 100644
index c8fee5358d..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationService.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*! @file OIDAuthorizationService.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-@class OIDAuthorization;
-@class OIDAuthorizationRequest;
-@class OIDAuthorizationResponse;
-@class OIDEndSessionRequest;
-@class OIDEndSessionResponse;
-@class OIDRegistrationRequest;
-@class OIDRegistrationResponse;
-@class OIDServiceConfiguration;
-@class OIDTokenRequest;
-@class OIDTokenResponse;
-@protocol OIDExternalUserAgent;
-@protocol OIDExternalUserAgentSession;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief Represents the type of block used as a callback for creating a service configuration from
- a remote OpenID Connect Discovery document.
- @param configuration The service configuration, if available.
- @param error The error if an error occurred.
- */
-typedef void (^OIDDiscoveryCallback)(OIDServiceConfiguration *_Nullable configuration,
- NSError *_Nullable error);
-
-/*! @brief Represents the type of block used as a callback for various methods of
- @c OIDAuthorizationService.
- @param authorizationResponse The authorization response, if available.
- @param error The error if an error occurred.
- */
-typedef void (^OIDAuthorizationCallback)(OIDAuthorizationResponse *_Nullable authorizationResponse,
- NSError *_Nullable error);
-
-/*! @brief Block used as a callback for the end-session request of @c OIDAuthorizationService.
- @param endSessionResponse The end-session response, if available.
- @param error The error if an error occurred.
- */
-typedef void (^OIDEndSessionCallback)(OIDEndSessionResponse *_Nullable endSessionResponse,
- NSError *_Nullable error);
-
-/*! @brief Represents the type of block used as a callback for various methods of
- @c OIDAuthorizationService.
- @param tokenResponse The token response, if available.
- @param error The error if an error occurred.
- */
-typedef void (^OIDTokenCallback)(OIDTokenResponse *_Nullable tokenResponse,
- NSError *_Nullable error);
-
-/*! @brief Represents the type of dictionary used to specify additional querystring parameters
- when making authorization or token endpoint requests.
- */
-typedef NSDictionary *_Nullable OIDTokenEndpointParameters;
-
-/*! @brief Represents the type of block used as a callback for various methods of
- @c OIDAuthorizationService.
- @param registrationResponse The registration response, if available.
- @param error The error if an error occurred.
-*/
-typedef void (^OIDRegistrationCompletion)(OIDRegistrationResponse *_Nullable registrationResponse,
- NSError *_Nullable error);
-
-/*! @brief Performs various OAuth and OpenID Connect related calls via the user agent or
- \NSURLSession.
- */
-@interface OIDAuthorizationService : NSObject
-
-/*! @brief The service's configuration.
- @remarks Each authorization service is initialized with a configuration. This configuration
- specifies how to connect to a particular OAuth provider. Clients should use separate
- authorization service instances for each provider they wish to integrate with.
- Configurations may be created manually, or via an OpenID Connect Discovery Document.
- */
-@property(nonatomic, readonly) OIDServiceConfiguration *configuration;
-
-/*! @internal
- @brief Unavailable. This class should not be initialized.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-/*! @brief Convenience method for creating an authorization service configuration from an OpenID
- Connect compliant issuer URL.
- @param issuerURL The service provider's OpenID Connect issuer.
- @param completion A block which will be invoked when the authorization service configuration has
- been created, or when an error has occurred.
- @see https://openid.net/specs/openid-connect-discovery-1_0.html
- */
-+ (void)discoverServiceConfigurationForIssuer:(NSURL *)issuerURL
- completion:(OIDDiscoveryCallback)completion;
-
-
-/*! @brief Convenience method for creating an authorization service configuration from an OpenID
- Connect compliant identity provider's discovery document.
- @param discoveryURL The URL of the service provider's OpenID Connect discovery document.
- @param completion A block which will be invoked when the authorization service configuration has
- been created, or when an error has occurred.
- @see https://openid.net/specs/openid-connect-discovery-1_0.html
- */
-+ (void)discoverServiceConfigurationForDiscoveryURL:(NSURL *)discoveryURL
- completion:(OIDDiscoveryCallback)completion;
-
-/*! @brief Perform an authorization flow using a generic flow shim.
- @param request The authorization request.
- @param externalUserAgent Generic external user-agent that can present an authorization
- request.
- @param callback The method called when the request has completed or failed.
- @return A @c OIDExternalUserAgentSession instance which will terminate when it
- receives a @c OIDExternalUserAgentSession.cancel message, or after processing a
- @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message.
- */
-+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request
- externalUserAgent:(id)externalUserAgent
- callback:(OIDAuthorizationCallback)callback;
-
-/*! @brief Perform a logout request.
- @param request The end-session logout request.
- @param externalUserAgent Generic external user-agent that can present user-agent requests.
- @param callback The method called when the request has completed or failed.
- @return A @c OIDExternalUserAgentSession instance which will terminate when it
- receives a @c OIDExternalUserAgentSession.cancel message, or after processing a
- @c OIDExternalUserAgentSession.resumeExternalUserAgentFlowWithURL: message.
- @see http://openid.net/specs/openid-connect-session-1_0.html#RPLogout
- */
-+ (id)
- presentEndSessionRequest:(OIDEndSessionRequest *)request
- externalUserAgent:(id)externalUserAgent
- callback:(OIDEndSessionCallback)callback;
-
-/*! @brief Performs a token request.
- @param request The token request.
- @param callback The method called when the request has completed or failed.
- */
-+ (void)performTokenRequest:(OIDTokenRequest *)request callback:(OIDTokenCallback)callback;
-
-/*! @brief Performs a token request.
- @param request The token request.
- @param authorizationResponse The original authorization response related to this token request.
- @param callback The method called when the request has completed or failed.
- */
-+ (void)performTokenRequest:(OIDTokenRequest *)request
- originalAuthorizationResponse:(OIDAuthorizationResponse *_Nullable)authorizationResponse
- callback:(OIDTokenCallback)callback;
-
-/*! @brief Performs a registration request.
- @param request The registration request.
- @param completion The method called when the request has completed or failed.
- */
-+ (void)performRegistrationRequest:(OIDRegistrationRequest *)request
- completion:(OIDRegistrationCompletion)completion;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationService.m b/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationService.m
deleted file mode 100644
index cc749a3f9d..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDAuthorizationService.m
+++ /dev/null
@@ -1,790 +0,0 @@
-/*! @file OIDAuthorizationService.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDAuthorizationService.h"
-
-#import "OIDAuthorizationRequest.h"
-#import "OIDAuthorizationResponse.h"
-#import "OIDDefines.h"
-#import "OIDEndSessionRequest.h"
-#import "OIDEndSessionResponse.h"
-#import "OIDErrorUtilities.h"
-#import "OIDExternalUserAgent.h"
-#import "OIDExternalUserAgentSession.h"
-#import "OIDIDToken.h"
-#import "OIDRegistrationRequest.h"
-#import "OIDRegistrationResponse.h"
-#import "OIDServiceConfiguration.h"
-#import "OIDServiceDiscovery.h"
-#import "OIDTokenRequest.h"
-#import "OIDTokenResponse.h"
-#import "OIDURLQueryComponent.h"
-#import "OIDURLSessionProvider.h"
-
-/*! @brief Path appended to an OpenID Connect issuer for discovery
- @see https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig
- */
-static NSString *const kOpenIDConfigurationWellKnownPath = @".well-known/openid-configuration";
-
-/*! @brief Max allowable iat (Issued At) time skew
- @see https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation
- */
-static int const kOIDAuthorizationSessionIATMaxSkew = 600;
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface OIDAuthorizationSession : NSObject
-
-- (instancetype)init NS_UNAVAILABLE;
-
-- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request
- NS_DESIGNATED_INITIALIZER;
-
-@end
-
-@implementation OIDAuthorizationSession {
- OIDAuthorizationRequest *_request;
- id _externalUserAgent;
- OIDAuthorizationCallback _pendingauthorizationFlowCallback;
-}
-
-- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request {
- self = [super init];
- if (self) {
- _request = [request copy];
- }
- return self;
-}
-
-- (void)presentAuthorizationWithExternalUserAgent:(id)externalUserAgent
- callback:(OIDAuthorizationCallback)authorizationFlowCallback {
- _externalUserAgent = externalUserAgent;
- _pendingauthorizationFlowCallback = authorizationFlowCallback;
- BOOL authorizationFlowStarted =
- [_externalUserAgent presentExternalUserAgentRequest:_request session:self];
- if (!authorizationFlowStarted) {
- NSError *safariError = [OIDErrorUtilities errorWithCode:OIDErrorCodeSafariOpenError
- underlyingError:nil
- description:@"Unable to open Safari."];
- [self didFinishWithResponse:nil error:safariError];
- }
-}
-
-- (void)cancel {
- [self cancelWithCompletion:nil];
-}
-
-- (void)cancelWithCompletion:(nullable void (^)(void))completion {
- [_externalUserAgent dismissExternalUserAgentAnimated:YES completion:^{
- NSError *error = [OIDErrorUtilities errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow
- underlyingError:nil
- description:@"Authorization flow was cancelled."];
- [self didFinishWithResponse:nil error:error];
- if (completion) completion();
- }];
-}
-
-/*! @brief Does the redirection URL equal another URL down to the path component?
- @param URL The first redirect URI to compare.
- @param redirectionURL The second redirect URI to compare.
- @return YES if the URLs match down to the path level (query params are ignored).
- */
-+ (BOOL)URL:(NSURL *)URL matchesRedirectionURL:(NSURL *)redirectionURL {
- NSURL *standardizedURL = [URL standardizedURL];
- NSURL *standardizedRedirectURL = [redirectionURL standardizedURL];
-
- return [standardizedURL.scheme caseInsensitiveCompare:standardizedRedirectURL.scheme] == NSOrderedSame
- && OIDIsEqualIncludingNil(standardizedURL.user, standardizedRedirectURL.user)
- && OIDIsEqualIncludingNil(standardizedURL.password, standardizedRedirectURL.password)
- && OIDIsEqualIncludingNil(standardizedURL.host, standardizedRedirectURL.host)
- && OIDIsEqualIncludingNil(standardizedURL.port, standardizedRedirectURL.port)
- && OIDIsEqualIncludingNil(standardizedURL.path, standardizedRedirectURL.path);
-}
-
-- (BOOL)shouldHandleURL:(NSURL *)URL {
- return [[self class] URL:URL matchesRedirectionURL:_request.redirectURL];
-}
-
-- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL {
- // rejects URLs that don't match redirect (these may be completely unrelated to the authorization)
- if (![self shouldHandleURL:URL]) {
- return NO;
- }
-
- AppAuthRequestTrace(@"Authorization Response: %@", URL);
-
- // checks for an invalid state
- if (!_pendingauthorizationFlowCallback) {
- [NSException raise:OIDOAuthExceptionInvalidAuthorizationFlow
- format:@"%@", OIDOAuthExceptionInvalidAuthorizationFlow, nil];
- }
-
- OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] initWithURL:URL];
-
- NSError *error;
- OIDAuthorizationResponse *response = nil;
-
- // checks for an OAuth error response as per RFC6749 Section 4.1.2.1
- if (query.dictionaryValue[OIDOAuthErrorFieldError]) {
- error = [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthAuthorizationErrorDomain
- OAuthResponse:query.dictionaryValue
- underlyingError:nil];
- }
-
- // no error, should be a valid OAuth 2.0 response
- if (!error) {
- response = [[OIDAuthorizationResponse alloc] initWithRequest:_request
- parameters:query.dictionaryValue];
-
- // verifies that the state in the response matches the state in the request, or both are nil
- if (!OIDIsEqualIncludingNil(_request.state, response.state)) {
- NSMutableDictionary *userInfo = [query.dictionaryValue mutableCopy];
- userInfo[NSLocalizedDescriptionKey] =
- [NSString stringWithFormat:@"State mismatch, expecting %@ but got %@ in authorization "
- "response %@",
- _request.state,
- response.state,
- response];
- response = nil;
- error = [NSError errorWithDomain:OIDOAuthAuthorizationErrorDomain
- code:OIDErrorCodeOAuthAuthorizationClientError
- userInfo:userInfo];
- }
- }
-
- [_externalUserAgent dismissExternalUserAgentAnimated:YES completion:^{
- [self didFinishWithResponse:response error:error];
- }];
-
- return YES;
-}
-
-- (void)failExternalUserAgentFlowWithError:(NSError *)error {
- [self didFinishWithResponse:nil error:error];
-}
-
-/*! @brief Invokes the pending callback and performs cleanup.
- @param response The authorization response, if any to return to the callback.
- @param error The error, if any, to return to the callback.
- */
-- (void)didFinishWithResponse:(nullable OIDAuthorizationResponse *)response
- error:(nullable NSError *)error {
- OIDAuthorizationCallback callback = _pendingauthorizationFlowCallback;
- _pendingauthorizationFlowCallback = nil;
- _externalUserAgent = nil;
- if (callback) {
- callback(response, error);
- }
-}
-
-@end
-
-@interface OIDEndSessionImplementation : NSObject {
- // private variables
- OIDEndSessionRequest *_request;
- id _externalUserAgent;
- OIDEndSessionCallback _pendingEndSessionCallback;
-}
-- (instancetype)init NS_UNAVAILABLE;
-
-- (instancetype)initWithRequest:(OIDEndSessionRequest *)request
- NS_DESIGNATED_INITIALIZER;
-@end
-
-
-@implementation OIDEndSessionImplementation
-
-- (instancetype)initWithRequest:(OIDEndSessionRequest *)request {
- self = [super init];
- if (self) {
- _request = [request copy];
- }
- return self;
-}
-
-- (void)presentAuthorizationWithExternalUserAgent:(id)externalUserAgent
- callback:(OIDEndSessionCallback)authorizationFlowCallback {
- _externalUserAgent = externalUserAgent;
- _pendingEndSessionCallback = authorizationFlowCallback;
- BOOL authorizationFlowStarted =
- [_externalUserAgent presentExternalUserAgentRequest:_request session:self];
- if (!authorizationFlowStarted) {
- NSError *safariError = [OIDErrorUtilities errorWithCode:OIDErrorCodeSafariOpenError
- underlyingError:nil
- description:@"Unable to open Safari."];
- [self didFinishWithResponse:nil error:safariError];
- }
-}
-
-- (void)cancel {
- [self cancelWithCompletion:nil];
-}
-
-- (void)cancelWithCompletion:(nullable void (^)(void))completion {
- [_externalUserAgent dismissExternalUserAgentAnimated:YES completion:^{
- NSError *error = [OIDErrorUtilities
- errorWithCode:OIDErrorCodeUserCanceledAuthorizationFlow
- underlyingError:nil
- description:nil];
- [self didFinishWithResponse:nil error:error];
- if (completion) completion();
- }];
-}
-
-- (BOOL)shouldHandleURL:(NSURL *)URL {
- // The logic of when to handle the URL is the same as for authorization requests: should match
- // down to the path component.
- return [[OIDAuthorizationSession class] URL:URL
- matchesRedirectionURL:_request.postLogoutRedirectURL];
-}
-
-- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL {
- // rejects URLs that don't match redirect (these may be completely unrelated to the authorization)
- if (![self shouldHandleURL:URL]) {
- return NO;
- }
- // checks for an invalid state
- if (!_pendingEndSessionCallback) {
- [NSException raise:OIDOAuthExceptionInvalidAuthorizationFlow
- format:@"%@", OIDOAuthExceptionInvalidAuthorizationFlow, nil];
- }
-
-
- NSError *error;
- OIDEndSessionResponse *response = nil;
-
- OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] initWithURL:URL];
- response = [[OIDEndSessionResponse alloc] initWithRequest:_request
- parameters:query.dictionaryValue];
-
- // verifies that the state in the response matches the state in the request, or both are nil
- if (!OIDIsEqualIncludingNil(_request.state, response.state)) {
- NSMutableDictionary *userInfo = [query.dictionaryValue mutableCopy];
- userInfo[NSLocalizedDescriptionKey] =
- [NSString stringWithFormat:@"State mismatch, expecting %@ but got %@ in authorization "
- "response %@",
- _request.state,
- response.state,
- response];
- response = nil;
- error = [NSError errorWithDomain:OIDOAuthAuthorizationErrorDomain
- code:OIDErrorCodeOAuthAuthorizationClientError
- userInfo:userInfo];
- }
-
- [_externalUserAgent dismissExternalUserAgentAnimated:YES completion:^{
- [self didFinishWithResponse:response error:error];
- }];
-
- return YES;
-}
-
-- (void)failExternalUserAgentFlowWithError:(NSError *)error {
- [self didFinishWithResponse:nil error:error];
-}
-
-/*! @brief Invokes the pending callback and performs cleanup.
- @param response The authorization response, if any to return to the callback.
- @param error The error, if any, to return to the callback.
- */
-- (void)didFinishWithResponse:(nullable OIDEndSessionResponse *)response
- error:(nullable NSError *)error {
- OIDEndSessionCallback callback = _pendingEndSessionCallback;
- _pendingEndSessionCallback = nil;
- _externalUserAgent = nil;
- if (callback) {
- callback(response, error);
- }
-}
-
-@end
-
-@implementation OIDAuthorizationService
-
-+ (void)discoverServiceConfigurationForIssuer:(NSURL *)issuerURL
- completion:(OIDDiscoveryCallback)completion {
- NSURL *fullDiscoveryURL =
- [issuerURL URLByAppendingPathComponent:kOpenIDConfigurationWellKnownPath];
-
- [[self class] discoverServiceConfigurationForDiscoveryURL:fullDiscoveryURL
- completion:completion];
-}
-
-+ (void)discoverServiceConfigurationForDiscoveryURL:(NSURL *)discoveryURL
- completion:(OIDDiscoveryCallback)completion {
-
- NSURLSession *session = [OIDURLSessionProvider session];
- NSURLSessionDataTask *task =
- [session dataTaskWithURL:discoveryURL
- completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
- // If we got any sort of error, just report it.
- if (error || !data) {
- NSString *errorDescription =
- [NSString stringWithFormat:@"Connection error fetching discovery document '%@': %@.",
- discoveryURL,
- error.localizedDescription];
- error = [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError
- underlyingError:error
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, error);
- });
- return;
- }
-
- NSHTTPURLResponse *urlResponse = (NSHTTPURLResponse *)response;
-
- // Check for non-200 status codes.
- // https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse
- if (urlResponse.statusCode != 200) {
- NSError *URLResponseError = [OIDErrorUtilities HTTPErrorWithHTTPResponse:urlResponse
- data:data];
- NSString *errorDescription =
- [NSString stringWithFormat:@"Non-200 HTTP response (%d) fetching discovery document "
- "'%@'.",
- (int)urlResponse.statusCode,
- discoveryURL];
- error = [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError
- underlyingError:URLResponseError
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, error);
- });
- return;
- }
-
- // Construct an OIDServiceDiscovery with the received JSON.
- OIDServiceDiscovery *discovery =
- [[OIDServiceDiscovery alloc] initWithJSONData:data error:&error];
- if (error || !discovery) {
- NSString *errorDescription =
- [NSString stringWithFormat:@"JSON error parsing document at '%@': %@",
- discoveryURL,
- error.localizedDescription];
- error = [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError
- underlyingError:error
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, error);
- });
- return;
- }
-
- // Create our service configuration with the discovery document and return it.
- OIDServiceConfiguration *configuration =
- [[OIDServiceConfiguration alloc] initWithDiscoveryDocument:discovery];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(configuration, nil);
- });
- }];
- [task resume];
-}
-
-#pragma mark - Authorization Endpoint
-
-+ (id) presentAuthorizationRequest:(OIDAuthorizationRequest *)request
- externalUserAgent:(id)externalUserAgent
- callback:(OIDAuthorizationCallback)callback {
-
- AppAuthRequestTrace(@"Authorization Request: %@", request);
-
- OIDAuthorizationSession *flowSession = [[OIDAuthorizationSession alloc] initWithRequest:request];
- [flowSession presentAuthorizationWithExternalUserAgent:externalUserAgent callback:callback];
- return flowSession;
-}
-
-+ (id)
- presentEndSessionRequest:(OIDEndSessionRequest *)request
- externalUserAgent:(id)externalUserAgent
- callback:(OIDEndSessionCallback)callback {
- OIDEndSessionImplementation *flowSession =
- [[OIDEndSessionImplementation alloc] initWithRequest:request];
- [flowSession presentAuthorizationWithExternalUserAgent:externalUserAgent callback:callback];
- return flowSession;
-}
-
-#pragma mark - Token Endpoint
-
-+ (void)performTokenRequest:(OIDTokenRequest *)request callback:(OIDTokenCallback)callback {
- [[self class] performTokenRequest:request
- originalAuthorizationResponse:nil
- callback:callback];
-}
-
-+ (void)performTokenRequest:(OIDTokenRequest *)request
- originalAuthorizationResponse:(OIDAuthorizationResponse *_Nullable)authorizationResponse
- callback:(OIDTokenCallback)callback {
-
- NSURLRequest *URLRequest = [request URLRequest];
-
- AppAuthRequestTrace(@"Token Request: %@\nHeaders:%@\nHTTPBody: %@",
- URLRequest.URL,
- URLRequest.allHTTPHeaderFields,
- [[NSString alloc] initWithData:URLRequest.HTTPBody
- encoding:NSUTF8StringEncoding]);
-
- NSURLSession *session = [OIDURLSessionProvider session];
- [[session dataTaskWithRequest:URLRequest
- completionHandler:^(NSData *_Nullable data,
- NSURLResponse *_Nullable response,
- NSError *_Nullable error) {
- if (error) {
- // A network error or server error occurred.
- NSString *errorDescription =
- [NSString stringWithFormat:@"Connection error making token request to '%@': %@.",
- URLRequest.URL,
- error.localizedDescription];
- NSError *returnedError =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError
- underlyingError:error
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, returnedError);
- });
- return;
- }
-
- NSHTTPURLResponse *HTTPURLResponse = (NSHTTPURLResponse *)response;
- NSInteger statusCode = HTTPURLResponse.statusCode;
- AppAuthRequestTrace(@"Token Response: HTTP Status %d\nHTTPBody: %@",
- (int)statusCode,
- [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
- if (statusCode != 200) {
- // A server error occurred.
- NSError *serverError =
- [OIDErrorUtilities HTTPErrorWithHTTPResponse:HTTPURLResponse data:data];
-
- // HTTP 4xx may indicate an RFC6749 Section 5.2 error response, attempts to parse as such.
- if (statusCode >= 400 && statusCode < 500) {
- NSError *jsonDeserializationError;
- NSDictionary *> *json =
- [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonDeserializationError];
-
- // If the HTTP 4xx response parses as JSON and has an 'error' key, it's an OAuth error.
- // These errors are special as they indicate a problem with the authorization grant.
- if (json[OIDOAuthErrorFieldError]) {
- NSError *oauthError =
- [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthTokenErrorDomain
- OAuthResponse:json
- underlyingError:serverError];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, oauthError);
- });
- return;
- }
- }
-
- // Status code indicates this is an error, but not an RFC6749 Section 5.2 error.
- NSString *errorDescription =
- [NSString stringWithFormat:@"Non-200 HTTP response (%d) making token request to '%@'.",
- (int)statusCode,
- URLRequest.URL];
- NSError *returnedError =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeServerError
- underlyingError:serverError
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, returnedError);
- });
- return;
- }
-
- NSError *jsonDeserializationError;
- NSDictionary *> *json =
- [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonDeserializationError];
- if (jsonDeserializationError) {
- // A problem occurred deserializing the response/JSON.
- NSString *errorDescription =
- [NSString stringWithFormat:@"JSON error parsing token response: %@",
- jsonDeserializationError.localizedDescription];
- NSError *returnedError =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeJSONDeserializationError
- underlyingError:jsonDeserializationError
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, returnedError);
- });
- return;
- }
-
- OIDTokenResponse *tokenResponse =
- [[OIDTokenResponse alloc] initWithRequest:request parameters:json];
- if (!tokenResponse) {
- // A problem occurred constructing the token response from the JSON.
- NSError *returnedError =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeTokenResponseConstructionError
- underlyingError:jsonDeserializationError
- description:@"Token response invalid."];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, returnedError);
- });
- return;
- }
-
- // If an ID Token is included in the response, validates the ID Token following the rules
- // in OpenID Connect Core Section 3.1.3.7 for features that AppAuth directly supports
- // (which excludes rules #1, #4, #5, #7, #8, #12, and #13). Regarding rule #6, ID Tokens
- // received by this class are received via direct communication between the Client and the Token
- // Endpoint, thus we are exercising the option to rely only on the TLS validation. AppAuth
- // has a zero dependencies policy, and verifying the JWT signature would add a dependency.
- // Users of the library are welcome to perform the JWT signature verification themselves should
- // they wish.
- if (tokenResponse.idToken) {
- OIDIDToken *idToken = [[OIDIDToken alloc] initWithIDTokenString:tokenResponse.idToken];
- if (!idToken) {
- NSError *invalidIDToken =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenParsingError
- underlyingError:nil
- description:@"ID Token parsing failed"];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, invalidIDToken);
- });
- return;
- }
-
- // OpenID Connect Core Section 3.1.3.7. rule #1
- // Not supported: AppAuth does not support JWT encryption.
-
- // OpenID Connect Core Section 3.1.3.7. rule #2
- // Validates that the issuer in the ID Token matches that of the discovery document.
- NSURL *issuer = tokenResponse.request.configuration.issuer;
- if (issuer && ![idToken.issuer isEqual:issuer]) {
- NSError *invalidIDToken =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError
- underlyingError:nil
- description:@"Issuer mismatch"];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, invalidIDToken);
- });
- return;
- }
-
- // OpenID Connect Core Section 3.1.3.7. rule #3 & Section 2 azp Claim
- // Validates that the aud (audience) Claim contains the client ID, or that the azp
- // (authorized party) Claim matches the client ID.
- NSString *clientID = tokenResponse.request.clientID;
- if (![idToken.audience containsObject:clientID] &&
- ![idToken.claims[@"azp"] isEqualToString:clientID]) {
- NSError *invalidIDToken =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError
- underlyingError:nil
- description:@"Audience mismatch"];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, invalidIDToken);
- });
- return;
- }
-
- // OpenID Connect Core Section 3.1.3.7. rules #4 & #5
- // Not supported.
-
- // OpenID Connect Core Section 3.1.3.7. rule #6
- // As noted above, AppAuth only supports the code flow which results in direct communication
- // of the ID Token from the Token Endpoint to the Client, and we are exercising the option to
- // use TSL server validation instead of checking the token signature. Users may additionally
- // check the token signature should they wish.
-
- // OpenID Connect Core Section 3.1.3.7. rules #7 & #8
- // Not applicable. See rule #6.
-
- // OpenID Connect Core Section 3.1.3.7. rule #9
- // Validates that the current time is before the expiry time.
- NSTimeInterval expiresAtDifference = [idToken.expiresAt timeIntervalSinceNow];
- if (expiresAtDifference < 0) {
- NSError *invalidIDToken =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError
- underlyingError:nil
- description:@"ID Token expired"];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, invalidIDToken);
- });
- return;
- }
-
- // OpenID Connect Core Section 3.1.3.7. rule #10
- // Validates that the issued at time is not more than +/- 10 minutes on the current time.
- NSTimeInterval issuedAtDifference = [idToken.issuedAt timeIntervalSinceNow];
- if (fabs(issuedAtDifference) > kOIDAuthorizationSessionIATMaxSkew) {
- NSString *message =
- [NSString stringWithFormat:@"Issued at time is more than %d seconds before or after "
- "the current time",
- kOIDAuthorizationSessionIATMaxSkew];
- NSError *invalidIDToken =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError
- underlyingError:nil
- description:message];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, invalidIDToken);
- });
- return;
- }
-
- // Only relevant for the authorization_code response type
- if ([tokenResponse.request.grantType isEqual:OIDGrantTypeAuthorizationCode]) {
- // OpenID Connect Core Section 3.1.3.7. rule #11
- // Validates the nonce.
- NSString *nonce = authorizationResponse.request.nonce;
- if (nonce && ![idToken.nonce isEqual:nonce]) {
- NSError *invalidIDToken =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeIDTokenFailedValidationError
- underlyingError:nil
- description:@"Nonce mismatch"];
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(nil, invalidIDToken);
- });
- return;
- }
- }
-
- // OpenID Connect Core Section 3.1.3.7. rules #12
- // ACR is not directly supported by AppAuth.
-
- // OpenID Connect Core Section 3.1.3.7. rules #12
- // max_age is not directly supported by AppAuth.
- }
-
- // Success
- dispatch_async(dispatch_get_main_queue(), ^{
- callback(tokenResponse, nil);
- });
- }] resume];
-}
-
-
-#pragma mark - Registration Endpoint
-
-+ (void)performRegistrationRequest:(OIDRegistrationRequest *)request
- completion:(OIDRegistrationCompletion)completion {
- NSURLRequest *URLRequest = [request URLRequest];
- if (!URLRequest) {
- // A problem occurred deserializing the response/JSON.
- NSError *returnedError = [OIDErrorUtilities errorWithCode:OIDErrorCodeJSONSerializationError
- underlyingError:nil
- description:@"The registration request could not "
- "be serialized as JSON."];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, returnedError);
- });
- return;
- }
-
- NSURLSession *session = [OIDURLSessionProvider session];
- [[session dataTaskWithRequest:URLRequest
- completionHandler:^(NSData *_Nullable data,
- NSURLResponse *_Nullable response,
- NSError *_Nullable error) {
- if (error) {
- // A network error or server error occurred.
- NSString *errorDescription =
- [NSString stringWithFormat:@"Connection error making registration request to '%@': %@.",
- URLRequest.URL,
- error.localizedDescription];
- NSError *returnedError = [OIDErrorUtilities errorWithCode:OIDErrorCodeNetworkError
- underlyingError:error
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, returnedError);
- });
- return;
- }
-
- NSHTTPURLResponse *HTTPURLResponse = (NSHTTPURLResponse *) response;
-
- if (HTTPURLResponse.statusCode != 201 && HTTPURLResponse.statusCode != 200) {
- // A server error occurred.
- NSError *serverError = [OIDErrorUtilities HTTPErrorWithHTTPResponse:HTTPURLResponse
- data:data];
-
- // HTTP 400 may indicate an OpenID Connect Dynamic Client Registration 1.0 Section 3.3 error
- // response, checks for that
- if (HTTPURLResponse.statusCode == 400) {
- NSError *jsonDeserializationError;
- NSDictionary *> *json =
- [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonDeserializationError];
-
- // if the HTTP 400 response parses as JSON and has an 'error' key, it's an OAuth error
- // these errors are special as they indicate a problem with the authorization grant
- if (json[OIDOAuthErrorFieldError]) {
- NSError *oauthError =
- [OIDErrorUtilities OAuthErrorWithDomain:OIDOAuthRegistrationErrorDomain
- OAuthResponse:json
- underlyingError:serverError];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, oauthError);
- });
- return;
- }
- }
-
- // not an OAuth error, just a generic server error
- NSString *errorDescription =
- [NSString stringWithFormat:@"Non-200/201 HTTP response (%d) making registration request "
- "to '%@'.",
- (int)HTTPURLResponse.statusCode,
- URLRequest.URL];
- NSError *returnedError = [OIDErrorUtilities errorWithCode:OIDErrorCodeServerError
- underlyingError:serverError
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, returnedError);
- });
- return;
- }
-
- NSError *jsonDeserializationError;
- NSDictionary *> *json =
- [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonDeserializationError];
- if (jsonDeserializationError) {
- // A problem occurred deserializing the response/JSON.
- NSString *errorDescription =
- [NSString stringWithFormat:@"JSON error parsing registration response: %@",
- jsonDeserializationError.localizedDescription];
- NSError *returnedError = [OIDErrorUtilities errorWithCode:OIDErrorCodeJSONDeserializationError
- underlyingError:jsonDeserializationError
- description:errorDescription];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, returnedError);
- });
- return;
- }
-
- OIDRegistrationResponse *registrationResponse =
- [[OIDRegistrationResponse alloc] initWithRequest:request
- parameters:json];
- if (!registrationResponse) {
- // A problem occurred constructing the registration response from the JSON.
- NSError *returnedError =
- [OIDErrorUtilities errorWithCode:OIDErrorCodeRegistrationResponseConstructionError
- underlyingError:nil
- description:@"Registration response invalid."];
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(nil, returnedError);
- });
- return;
- }
-
- // Success
- dispatch_async(dispatch_get_main_queue(), ^{
- completion(registrationResponse, nil);
- });
- }] resume];
-}
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDClientMetadataParameters.h b/Pods/AppAuth/Source/AppAuthCore/OIDClientMetadataParameters.h
deleted file mode 100644
index 39ea2d6219..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDClientMetadataParameters.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*! @file OIDClientMetadataParameters.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief Parameter name for the token endpoint authentication method.
- */
-extern NSString *const OIDTokenEndpointAuthenticationMethodParam;
-
-/*! @brief Parameter name for the application type.
- */
-extern NSString *const OIDApplicationTypeParam;
-
-/*! @brief Parameter name for the redirect URI values.
- */
-extern NSString *const OIDRedirectURIsParam;
-
-/*! @brief Parameter name for the response type values.
- */
-extern NSString *const OIDResponseTypesParam;
-
-/*! @brief Parameter name for the grant type values.
- */
-extern NSString *const OIDGrantTypesParam;
-
-/*! @brief Parameter name for the subject type.
- */
-extern NSString *const OIDSubjectTypeParam;
-
-/*! @brief Application type that indicates this client is a native (not a web) application.
- */
-extern NSString *const OIDApplicationTypeNative;
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDClientMetadataParameters.m b/Pods/AppAuth/Source/AppAuthCore/OIDClientMetadataParameters.m
deleted file mode 100644
index 79ad467651..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDClientMetadataParameters.m
+++ /dev/null
@@ -1,33 +0,0 @@
-/*! @file OIDClientMetadataParameters.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 The AppAuth for iOS Authors. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDClientMetadataParameters.h"
-
-NSString *const OIDTokenEndpointAuthenticationMethodParam = @"token_endpoint_auth_method";
-
-NSString *const OIDApplicationTypeParam = @"application_type";
-
-NSString *const OIDRedirectURIsParam = @"redirect_uris";
-
-NSString *const OIDResponseTypesParam = @"response_types";
-
-NSString *const OIDGrantTypesParam = @"grant_types";
-
-NSString *const OIDSubjectTypeParam = @"subject_type";
-
-NSString *const OIDApplicationTypeNative = @"native";
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDDefines.h b/Pods/AppAuth/Source/AppAuthCore/OIDDefines.h
deleted file mode 100644
index 8ff4f19bab..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDDefines.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*! @file OIDDefines.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/*! @def OIDIsEqualIncludingNil(x, y)
- @brief Returns YES if x and y are equal by reference or value.
- @discussion NOTE: parameters may be evaluated multiple times. Be careful if using this check
- with expressions - especially if the expressions have side effects.
- @param x An object.
- @param y An object.
- */
-#define OIDIsEqualIncludingNil(x, y) (((x) == (y)) || [(x) isEqual:(y)])
-
-/*! @def OID_UNAVAILABLE_USE_INITIALIZER(designatedInitializer)
- @brief Provides a template implementation for init-family methods which have been marked as
- NS_UNAVILABLE. Stops the compiler from giving a warning when it's the super class'
- designated initializer, and gives callers useful feedback telling them what the
- new designated initializer is.
- @remarks Takes a SEL as a parameter instead of a string so that we get compiler warnings if the
- designated intializer's signature changes.
- @param designatedInitializer A SEL referencing the designated initializer.
- */
-#define OID_UNAVAILABLE_USE_INITIALIZER(designatedInitializer) { \
- NSString *reason = [NSString stringWithFormat:@"Called: %@\nDesignated Initializer:%@", \
- NSStringFromSelector(_cmd), \
- NSStringFromSelector(designatedInitializer)]; \
- @throw [NSException exceptionWithName:@"Attempt to call unavailable initializer." \
- reason:reason \
- userInfo:nil]; \
-}
-
-#ifdef _APPAUTHTRACE
-# define AppAuthRequestTrace(fmt, ...) NSLog(fmt, ##__VA_ARGS__);
-#else // _APPAUTHTRACE
-# define AppAuthRequestTrace(...)
-#endif // _APPAUTHTRACE
-
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionRequest.h b/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionRequest.h
deleted file mode 100644
index 4087e9fa9f..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionRequest.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*! @file OIDEndSessionRequest.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2017 The AppAuth Authors. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#import "OIDExternalUserAgentRequest.h"
-
-@class OIDServiceConfiguration;
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface OIDEndSessionRequest : NSObject
-
-
-/*! @brief The service's configuration.
- @remarks This configuration specifies how to connect to a particular OAuth provider.
- Configurations may be created manually, or via an OpenID Connect Discovery Document.
- */
-@property(nonatomic, readonly) OIDServiceConfiguration *configuration;
-
-/*! @brief The client's redirect URI.
- @remarks post_logout_redirect_uri
- @see http://openid.net/specs/openid-connect-session-1_0.html#RPLogout
- */
-@property(nonatomic, readonly, nullable) NSURL *postLogoutRedirectURL;
-
-/*! @brief Previously issued ID Token passed to the end session endpoint as a hint about the End-User's current authenticated
- session with the Client
- @remarks id_token_hint
- @see http://openid.net/specs/openid-connect-session-1_0.html#RPLogout
- */
-@property(nonatomic, readonly, nullable) NSString *idTokenHint;
-
-/*! @brief An opaque value used by the client to maintain state between the request and callback.
- @remarks state
- @discussion If this value is not explicitly set, this library will automatically add state and
- perform appropriate validation of the state in the authorization response. It is recommended
- that the default implementation of this parameter be used wherever possible. Typically used
- to prevent CSRF attacks, as recommended in RFC6819 Section 5.3.5.
- @see http://openid.net/specs/openid-connect-session-1_0.html#RPLogout
- */
-@property(nonatomic, readonly, nullable) NSString *state;
-
-/*! @brief The client's additional authorization parameters.
- @see https://tools.ietf.org/html/rfc6749#section-3.1
- */
-@property(nonatomic, readonly, nullable) NSDictionary *additionalParameters;
-
-/*! @internal
- @brief Unavailable. Please use @c initWithConfiguration:clientId:scopes:redirectURL:additionalParameters:.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-/*! @brief Creates an authorization request with opinionated defaults (a secure @c state).
- @param configuration The service's configuration.
- @param idTokenHint The previously issued ID Token
- @param postLogoutRedirectURL The client's post-logout redirect URI.
- callback.
- @param additionalParameters The client's additional authorization parameters.
-*/
-- (instancetype)
- initWithConfiguration:(OIDServiceConfiguration *)configuration
- idTokenHint:(NSString *)idTokenHint
- postLogoutRedirectURL:(NSURL *)postLogoutRedirectURL
- additionalParameters:(nullable NSDictionary *)additionalParameters;
-
-/*! @brief Designated initializer.
- @param configuration The service's configuration.
- @param idTokenHint The previously issued ID Token
- @param postLogoutRedirectURL The client's post-logout redirect URI.
- @param state An opaque value used by the client to maintain state between the request and
- callback.
- @param additionalParameters The client's additional authorization parameters.
- */
-- (instancetype)
- initWithConfiguration:(OIDServiceConfiguration *)configuration
- idTokenHint:(NSString *)idTokenHint
- postLogoutRedirectURL:(NSURL *)postLogoutRedirectURL
- state:(NSString *)state
- additionalParameters:(nullable NSDictionary *)additionalParameters
- NS_DESIGNATED_INITIALIZER;
-
-/*! @brief Constructs the request URI by adding the request parameters to the query component of the
- authorization endpoint URI using the "application/x-www-form-urlencoded" format.
- @return A URL representing the authorization request.
- @see http://openid.net/specs/openid-connect-session-1_0.html#RPLogout
- */
-- (NSURL *)endSessionRequestURL;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionRequest.m b/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionRequest.m
deleted file mode 100644
index 1e9eb0e228..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionRequest.m
+++ /dev/null
@@ -1,190 +0,0 @@
-/*! @file OIDEndSessionRequest.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2017 The AppAuth Authors. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDEndSessionRequest.h"
-
-#import "OIDDefines.h"
-#import "OIDTokenUtilities.h"
-#import "OIDServiceConfiguration.h"
-#import "OIDServiceDiscovery.h"
-#import "OIDURLQueryComponent.h"
-
-/*! @brief The key for the @c configuration property for @c NSSecureCoding
- */
-static NSString *const kConfigurationKey = @"configuration";
-
-/*! @brief Key used to encode the @c state property for @c NSSecureCoding, and on the URL request.
- */
-static NSString *const kStateKey = @"state";
-
-/*! @brief Key used to encode the @c postLogoutRedirectURL property for @c NSSecureCoding, and on the URL request.
- */
-static NSString *const kPostLogoutRedirectURLKey = @"post_logout_redirect_uri";
-
-/*! @brief Key used to encode the @c idTokenHint property for @c NSSecureCoding, and on the URL request.
- */
-static NSString *const kIdTokenHintKey = @"id_token_hint";
-
-/*! @brief Key used to encode the @c additionalParameters property for @c NSSecureCoding
- */
-static NSString *const kAdditionalParametersKey = @"additionalParameters";
-
-/*! @brief Number of random bytes generated for the @state.
- */
-static NSUInteger const kStateSizeBytes = 32;
-
-/*! @brief Assertion text for missing end_session_endpoint.
- */
-static NSString *const OIDMissingEndSessionEndpointMessage =
-@"The service configuration is missing an end_session_endpoint.";
-
-@implementation OIDEndSessionRequest
-
-- (instancetype)init
- OID_UNAVAILABLE_USE_INITIALIZER(
- @selector(initWithConfiguration:
- idTokenHint:
- postLogoutRedirectURL:
- additionalParameters:)
- )
-
-- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration
- idTokenHint:(NSString *)idTokenHint
- postLogoutRedirectURL:(NSURL *)postLogoutRedirectURL
- state:(NSString *)state
- additionalParameters:(NSDictionary *)additionalParameters
-{
- self = [super init];
- if (self) {
- _configuration = [configuration copy];
- _idTokenHint = [idTokenHint copy];
- _postLogoutRedirectURL = [postLogoutRedirectURL copy];
- _state = [state copy];
- _additionalParameters =
- [[NSDictionary alloc] initWithDictionary:additionalParameters copyItems:YES];
- }
- return self;
-}
-
-- (instancetype)initWithConfiguration:(OIDServiceConfiguration *)configuration
- idTokenHint:(NSString *)idTokenHint
- postLogoutRedirectURL:(NSURL *)postLogoutRedirectURL
- additionalParameters:(NSDictionary *)additionalParameters
-{
- return [self initWithConfiguration:configuration
- idTokenHint:idTokenHint
- postLogoutRedirectURL:postLogoutRedirectURL
- state:[[self class] generateState]
- additionalParameters:additionalParameters];
-}
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(nullable NSZone *)zone {
- // The documentation for NSCopying specifically advises us to return a reference to the original
- // instance in the case where instances are immutable (as ours is):
- // "Implement NSCopying by retaining the original instead of creating a new copy when the class
- // and its contents are immutable."
- return self;
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)aDecoder {
- OIDServiceConfiguration *configuration = [aDecoder decodeObjectOfClass:[OIDServiceConfiguration class] forKey:kConfigurationKey];
-
- NSString *idTokenHint = [aDecoder decodeObjectOfClass:[NSString class] forKey:kIdTokenHintKey];
- NSURL *postLogoutRedirectURL = [aDecoder decodeObjectOfClass:[NSURL class] forKey:kPostLogoutRedirectURLKey];
- NSString *state = [aDecoder decodeObjectOfClass:[NSString class] forKey:kStateKey];
- NSSet *additionalParameterCodingClasses = [NSSet setWithArray:@[
- [NSDictionary class],
- [NSString class]
- ]];
- NSDictionary *additionalParameters = [aDecoder decodeObjectOfClasses:additionalParameterCodingClasses
- forKey:kAdditionalParametersKey];
-
- self = [self initWithConfiguration:configuration
- idTokenHint:idTokenHint
- postLogoutRedirectURL:postLogoutRedirectURL
- state:state
- additionalParameters:additionalParameters];
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)aCoder {
- [aCoder encodeObject:_configuration forKey:kConfigurationKey];
- [aCoder encodeObject:_idTokenHint forKey:kIdTokenHintKey];
- [aCoder encodeObject:_postLogoutRedirectURL forKey:kPostLogoutRedirectURLKey];
- [aCoder encodeObject:_state forKey:kStateKey];
- [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey];
-}
-
-#pragma mark - NSObject overrides
-
-- (NSString *)description {
- return [NSString stringWithFormat:@"<%@: %p, request: %@>",
- NSStringFromClass([self class]),
- (void *)self,
- self.endSessionRequestURL];
-}
-
-+ (nullable NSString *)generateState {
- return [OIDTokenUtilities randomURLSafeStringWithSize:kStateSizeBytes];
-}
-
-#pragma mark - OIDExternalUserAgentRequest
-
-- (NSURL*)externalUserAgentRequestURL {
- return [self endSessionRequestURL];
-}
-
-- (NSString *)redirectScheme {
- return [_postLogoutRedirectURL scheme];
-}
-
-#pragma mark -
-
-- (NSURL *)endSessionRequestURL {
- OIDURLQueryComponent *query = [[OIDURLQueryComponent alloc] init];
-
- // Add any additional parameters the client has specified.
- [query addParameters:_additionalParameters];
-
- // Add optional parameters, as applicable.
- if (_idTokenHint) {
- [query addParameter:kIdTokenHintKey value:_idTokenHint];
- }
-
- if (_postLogoutRedirectURL) {
- [query addParameter:kPostLogoutRedirectURLKey value:_postLogoutRedirectURL.absoluteString];
- }
-
- if (_state) {
- [query addParameter:kStateKey value:_state];
- }
-
- NSAssert(_configuration.endSessionEndpoint, OIDMissingEndSessionEndpointMessage);
-
- // Construct the URL
- return [query URLByReplacingQueryInURL:_configuration.endSessionEndpoint];
-}
-
-@end
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionResponse.h b/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionResponse.h
deleted file mode 100644
index ab69b9305b..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionResponse.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*! @file OIDEndSessionResponse.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2017 The AppAuth Authors. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-@class OIDEndSessionRequest;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief Represents the response to an End Session request.
- @see http://openid.net/specs/openid-connect-session-1_0.html#RPLogout
- */
-
-@interface OIDEndSessionResponse : NSObject
-
-/*! @brief The request which was serviced.
- */
-@property(nonatomic, readonly) OIDEndSessionRequest *request;
-
-/*! @brief REQUIRED if the "state" parameter was present in the client end-session request. The
- exact value received from the client.
- @remarks state
- */
-@property(nonatomic, readonly, nullable) NSString *state;
-
-/*! @brief Additional parameters returned from the end session endpoint.
- */
-@property(nonatomic, readonly, nullable)
- NSDictionary *> *additionalParameters;
-
-/*! @internal
- @brief Unavailable. Please use initWithParameters:.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-/*! @brief Designated initializer.
- @param request The serviced request.
- @param parameters The decoded parameters returned from the End Session Endpoint.
- @remarks Known parameters are extracted from the @c parameters parameter and the normative
- properties are populated. Non-normative parameters are placed in the
- @c #additionalParameters dictionary.
- */
-- (instancetype)initWithRequest:(OIDEndSessionRequest *)request
- parameters:(NSDictionary *> *)parameters
- NS_DESIGNATED_INITIALIZER;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionResponse.m b/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionResponse.m
deleted file mode 100644
index bedf0cd936..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDEndSessionResponse.m
+++ /dev/null
@@ -1,118 +0,0 @@
-/*! @file OIDEndSessionResponse.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2017 The AppAuth Authors. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDEndSessionResponse.h"
-
-#import "OIDDefines.h"
-#import "OIDEndSessionRequest.h"
-#import "OIDFieldMapping.h"
-
-/*! @brief The key for the @c state property in the incoming parameters and for @c NSSecureCoding.
- */
-static NSString *const kStateKey = @"state";
-
-/*! @brief Key used to encode the @c request property for @c NSSecureCoding
- */
-static NSString *const kRequestKey = @"request";
-
-/*! @brief Key used to encode the @c additionalParameters property for
- @c NSSecureCoding
- */
-static NSString *const kAdditionalParametersKey = @"additionalParameters";
-
-@implementation OIDEndSessionResponse
-
-#pragma mark - Initializers
-
-- (instancetype)init
- OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithRequest:parameters:))
-
-- (instancetype)initWithRequest:(OIDEndSessionRequest *)request
- parameters:(NSDictionary *> *)parameters {
- self = [super init];
- if (self) {
- _request = [request copy];
- NSDictionary *> *additionalParameters =
- [OIDFieldMapping remainingParametersWithMap:[[self class] fieldMap]
- parameters:parameters
- instance:self];
- _additionalParameters = additionalParameters;
- }
- return self;
-}
-
-/*! @brief Returns a mapping of incoming parameters to instance variables.
- @return A mapping of incoming parameters to instance variables.
- */
-+ (NSDictionary *)fieldMap {
- static NSMutableDictionary *fieldMap;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- fieldMap = [NSMutableDictionary dictionary];
- fieldMap[kStateKey] =
- [[OIDFieldMapping alloc] initWithName:@"_state" type:[NSString class]];
- });
- return fieldMap;
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(nullable NSZone *)zone {
- // The documentation for NSCopying specifically advises us to return a reference to the original
- // instance in the case where instances are immutable (as ours is):
- // "Implement NSCopying by retaining the original instead of creating a new copy when the class
- // and its contents are immutable."
- return self;
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)aDecoder {
- OIDEndSessionRequest *request =
- [aDecoder decodeObjectOfClass:[OIDEndSessionRequest class] forKey:kRequestKey];
- self = [self initWithRequest:request parameters:@{ }];
- if (self) {
- [OIDFieldMapping decodeWithCoder:aDecoder map:[[self class] fieldMap] instance:self];
- _additionalParameters = [aDecoder decodeObjectOfClasses:[OIDFieldMapping JSONTypes]
- forKey:kAdditionalParametersKey];
- }
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)aCoder {
- [aCoder encodeObject:_request forKey:kRequestKey];
- [OIDFieldMapping encodeWithCoder:aCoder map:[[self class] fieldMap] instance:self];
- [aCoder encodeObject:_additionalParameters forKey:kAdditionalParametersKey];
-}
-
-#pragma mark - NSObject overrides
-
-- (NSString *)description {
- return [NSString stringWithFormat:@"<%@: %p, state: \"%@\", "
- "additionalParameters: %@, request: %@>",
- NSStringFromClass([self class]),
- (void *)self,
- _state,
- _additionalParameters,
- _request];
-}
-@end
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDError.h b/Pods/AppAuth/Source/AppAuthCore/OIDError.h
deleted file mode 100644
index 5131f0ad48..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDError.h
+++ /dev/null
@@ -1,393 +0,0 @@
-/*! @file OIDError.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief The error domain for all NSErrors returned from the AppAuth library.
- */
-extern NSString *const OIDGeneralErrorDomain;
-
-/*! @brief The error domain for OAuth specific errors on the authorization endpoint.
- @discussion This error domain is used when the server responds to an authorization request
- with an explicit OAuth error, as defined by RFC6749 Section 4.1.2.1. If the authorization
- response is invalid and not explicitly an error response, another error domain will be used.
- The error response parameter dictionary is available in the
- \NSError_userInfo dictionary using the @c ::OIDOAuthErrorResponseErrorKey key.
- The \NSError_code will be one of the @c ::OIDErrorCodeOAuthAuthorization enum values.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
-extern NSString *const OIDOAuthAuthorizationErrorDomain;
-
-/*! @brief The error domain for OAuth specific errors on the token endpoint.
- @discussion This error domain is used when the server responds with HTTP 400 and an OAuth error,
- as defined RFC6749 Section 5.2. If an HTTP 400 response does not parse as an OAuth error
- (i.e. no 'error' field is present or the JSON is invalid), another error domain will be
- used. The entire OAuth error response dictionary is available in the \NSError_userInfo
- dictionary using the @c ::OIDOAuthErrorResponseErrorKey key. Unlike transient network
- errors, errors in this domain invalidate the authentication state, and either indicate a
- client error or require user interaction (i.e. reauthentication) to resolve.
- The \NSError_code will be one of the @c ::OIDErrorCodeOAuthToken enum values.
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-extern NSString *const OIDOAuthTokenErrorDomain;
-
-/*! @brief The error domain for dynamic client registration errors.
- @discussion This error domain is used when the server responds with HTTP 400 and an OAuth error,
- as defined in OpenID Connect Dynamic Client Registration 1.0 Section 3.3. If an HTTP 400
- response does not parse as an OAuth error (i.e. no 'error' field is present or the JSON is
- invalid), another error domain will be used. The entire OAuth error response dictionary is
- available in the \NSError_userInfo dictionary using the @c ::OIDOAuthErrorResponseErrorKey
- key. Unlike transient network errors, errors in this domain invalidate the authentication
- state, and indicates a client error.
- The \NSError_code will be one of the @c ::OIDErrorCodeOAuthToken enum values.
- @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError
- */
-extern NSString *const OIDOAuthRegistrationErrorDomain;
-
-/*! @brief The error domain for authorization errors encountered out of band on the resource server.
- */
-extern NSString *const OIDResourceServerAuthorizationErrorDomain;
-
-/*! @brief An error domain representing received HTTP errors.
- */
-extern NSString *const OIDHTTPErrorDomain;
-
-/*! @brief An error key for the original OAuth error response (if any).
- */
-extern NSString *const OIDOAuthErrorResponseErrorKey;
-
-/*! @brief The key of the 'error' response field in a RFC6749 Section 5.2 response.
- @remark error
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-extern NSString *const OIDOAuthErrorFieldError;
-
-/*! @brief The key of the 'error_description' response field in a RFC6749 Section 5.2 response.
- @remark error_description
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-extern NSString *const OIDOAuthErrorFieldErrorDescription;
-
-/*! @brief The key of the 'error_uri' response field in a RFC6749 Section 5.2 response.
- @remark error_uri
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-extern NSString *const OIDOAuthErrorFieldErrorURI;
-
-/*! @brief The various error codes returned from the AppAuth library.
- */
-typedef NS_ENUM(NSInteger, OIDErrorCode) {
- /*! @brief Indicates a problem parsing an OpenID Connect Service Discovery document.
- */
- OIDErrorCodeInvalidDiscoveryDocument = -2,
-
- /*! @brief Indicates the user manually canceled the OAuth authorization code flow.
- */
- OIDErrorCodeUserCanceledAuthorizationFlow = -3,
-
- /*! @brief Indicates an OAuth authorization flow was programmatically cancelled.
- */
- OIDErrorCodeProgramCanceledAuthorizationFlow = -4,
-
- /*! @brief Indicates a network error or server error occurred.
- */
- OIDErrorCodeNetworkError = -5,
-
- /*! @brief Indicates a server error occurred.
- */
- OIDErrorCodeServerError = -6,
-
- /*! @brief Indicates a problem occurred deserializing the response/JSON.
- */
- OIDErrorCodeJSONDeserializationError = -7,
-
- /*! @brief Indicates a problem occurred constructing the token response from the JSON.
- */
- OIDErrorCodeTokenResponseConstructionError = -8,
-
- /*! @brief @c UIApplication.openURL: returned NO when attempting to open the authorization
- request in mobile Safari.
- */
- OIDErrorCodeSafariOpenError = -9,
-
- /*! @brief @c NSWorkspace.openURL returned NO when attempting to open the authorization
- request in the default browser.
- */
- OIDErrorCodeBrowserOpenError = -10,
-
- /*! @brief Indicates a problem when trying to refresh the tokens.
- */
- OIDErrorCodeTokenRefreshError = -11,
-
- /*! @brief Indicates a problem occurred constructing the registration response from the JSON.
- */
- OIDErrorCodeRegistrationResponseConstructionError = -12,
-
- /*! @brief Indicates a problem occurred deserializing the response/JSON.
- */
- OIDErrorCodeJSONSerializationError = -13,
-
- /*! @brief The ID Token did not parse.
- */
- OIDErrorCodeIDTokenParsingError = -14,
-
- /*! @brief The ID Token did not pass validation (e.g. issuer, audience checks).
- */
- OIDErrorCodeIDTokenFailedValidationError = -15,
-};
-
-/*! @brief Enum of all possible OAuth error codes as defined by RFC6749
- @discussion Used by @c ::OIDErrorCodeOAuthAuthorization and @c ::OIDErrorCodeOAuthToken
- which define endpoint-specific subsets of OAuth codes. Those enum types are down-castable
- to this one.
- @see https://tools.ietf.org/html/rfc6749#section-11.4
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-typedef NS_ENUM(NSInteger, OIDErrorCodeOAuth) {
-
- /*! @remarks invalid_request
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthInvalidRequest = -2,
-
- /*! @remarks unauthorized_client
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthUnauthorizedClient = -3,
-
- /*! @remarks access_denied
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAccessDenied = -4,
-
- /*! @remarks unsupported_response_type
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthUnsupportedResponseType = -5,
-
- /*! @remarks invalid_scope
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthInvalidScope = -6,
-
- /*! @remarks server_error
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthServerError = -7,
-
- /*! @remarks temporarily_unavailable
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthTemporarilyUnavailable = -8,
-
- /*! @remarks invalid_client
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthInvalidClient = -9,
-
- /*! @remarks invalid_grant
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthInvalidGrant = -10,
-
- /*! @remarks unsupported_grant_type
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthUnsupportedGrantType = -11,
-
- /*! @remarks invalid_redirect_uri
- @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError
- */
- OIDErrorCodeOAuthInvalidRedirectURI = -12,
-
- /*! @remarks invalid_client_metadata
- @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError
- */
- OIDErrorCodeOAuthInvalidClientMetadata = -13,
-
- /*! @brief An authorization error occurring on the client rather than the server. For example,
- due to a state mismatch or misconfiguration. Should be treated as an unrecoverable
- authorization error.
- */
- OIDErrorCodeOAuthClientError = -0xEFFF,
-
- /*! @brief An OAuth error not known to this library
- @discussion Indicates an OAuth error as per RFC6749, but the error code was not in our
- list. It could be a custom error code, or one from an OAuth extension. See the "error" key
- of the \NSError_userInfo property. Such errors are assumed to invalidate the
- authentication state
- */
- OIDErrorCodeOAuthOther = -0xF000,
-};
-
-/*! @brief The error codes for the @c ::OIDOAuthAuthorizationErrorDomain error domain
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
-typedef NS_ENUM(NSInteger, OIDErrorCodeOAuthAuthorization) {
- /*! @remarks invalid_request
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAuthorizationInvalidRequest = OIDErrorCodeOAuthInvalidRequest,
-
- /*! @remarks unauthorized_client
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAuthorizationUnauthorizedClient = OIDErrorCodeOAuthUnauthorizedClient,
-
- /*! @remarks access_denied
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAuthorizationAccessDenied =
- OIDErrorCodeOAuthAccessDenied,
-
- /*! @remarks unsupported_response_type
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAuthorizationUnsupportedResponseType =
- OIDErrorCodeOAuthUnsupportedResponseType,
-
- /*! @brief Indicates a network error or server error occurred.
- @remarks invalid_scope
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAuthorizationAuthorizationInvalidScope = OIDErrorCodeOAuthInvalidScope,
-
- /*! @brief Indicates a server error occurred.
- @remarks server_error
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAuthorizationServerError = OIDErrorCodeOAuthServerError,
-
- /*! @remarks temporarily_unavailable
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAuthorizationTemporarilyUnavailable = OIDErrorCodeOAuthTemporarilyUnavailable,
-
- /*! @brief An authorization error occurring on the client rather than the server. For example,
- due to a state mismatch or client misconfiguration. Should be treated as an unrecoverable
- authorization error.
- */
- OIDErrorCodeOAuthAuthorizationClientError = OIDErrorCodeOAuthClientError,
-
- /*! @brief An authorization OAuth error not known to this library
- @discussion this indicates an OAuth error as per RFC6749, but the error code was not in our
- list. It could be a custom error code, or one from an OAuth extension. See the "error" key
- of the \NSError_userInfo property. We assume such errors are not transient.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- */
- OIDErrorCodeOAuthAuthorizationOther = OIDErrorCodeOAuthOther,
-};
-
-
-/*! @brief The error codes for the @c ::OIDOAuthTokenErrorDomain error domain
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-typedef NS_ENUM(NSInteger, OIDErrorCodeOAuthToken) {
- /*! @remarks invalid_request
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthTokenInvalidRequest = OIDErrorCodeOAuthInvalidRequest,
-
- /*! @remarks invalid_client
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthTokenInvalidClient = OIDErrorCodeOAuthInvalidClient,
-
- /*! @remarks invalid_grant
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthTokenInvalidGrant = OIDErrorCodeOAuthInvalidGrant,
-
- /*! @remarks unauthorized_client
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthTokenUnauthorizedClient = OIDErrorCodeOAuthUnauthorizedClient,
-
- /*! @remarks unsupported_grant_type
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthTokenUnsupportedGrantType = OIDErrorCodeOAuthUnsupportedGrantType,
-
- /*! @remarks invalid_scope
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthTokenInvalidScope = OIDErrorCodeOAuthInvalidScope,
-
- /*! @brief An unrecoverable token error occurring on the client rather than the server.
- */
- OIDErrorCodeOAuthTokenClientError = OIDErrorCodeOAuthClientError,
-
- /*! @brief A token endpoint OAuth error not known to this library
- @discussion this indicates an OAuth error as per RFC6749, but the error code was not in our
- list. It could be a custom error code, or one from an OAuth extension. See the "error" key
- of the \NSError_userInfo property. We assume such errors are not transient.
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthTokenOther = OIDErrorCodeOAuthOther,
-};
-
-/*! @brief The error codes for the @c ::OIDOAuthRegistrationErrorDomain error domain
- @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError
- */
-typedef NS_ENUM(NSInteger, OIDErrorCodeOAuthRegistration) {
- /*! @remarks invalid_request
- @see http://tools.ietf.org/html/rfc6750#section-3.1
- */
- OIDErrorCodeOAuthRegistrationInvalidRequest = OIDErrorCodeOAuthInvalidRequest,
-
- /*! @remarks invalid_redirect_uri
- @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError
- */
- OIDErrorCodeOAuthRegistrationInvalidRedirectURI = OIDErrorCodeOAuthInvalidRedirectURI,
-
- /*! @remarks invalid_client_metadata
- @see https://openid.net/specs/openid-connect-registration-1_0.html#RegistrationError
- */
- OIDErrorCodeOAuthRegistrationInvalidClientMetadata = OIDErrorCodeOAuthInvalidClientMetadata,
-
- /*! @brief An unrecoverable token error occurring on the client rather than the server.
- */
- OIDErrorCodeOAuthRegistrationClientError = OIDErrorCodeOAuthClientError,
-
- /*! @brief A registration endpoint OAuth error not known to this library
- @discussion this indicates an OAuth error, but the error code was not in our
- list. It could be a custom error code, or one from an OAuth extension. See the "error" key
- of the \NSError_userInfo property. We assume such errors are not transient.
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
- OIDErrorCodeOAuthRegistrationOther = OIDErrorCodeOAuthOther,
-};
-
-
-/*! @brief The exception text for the exception which occurs when a
- @c OIDExternalUserAgentSession receives a message after it has already completed.
- */
-extern NSString *const OIDOAuthExceptionInvalidAuthorizationFlow;
-
-/*! @brief The text for the exception which occurs when a Token Request is constructed
- with a null redirectURL for a grant_type that requires a nonnull Redirect
- */
-extern NSString *const OIDOAuthExceptionInvalidTokenRequestNullRedirectURL;
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDError.m b/Pods/AppAuth/Source/AppAuthCore/OIDError.m
deleted file mode 100644
index 87c8623eef..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDError.m
+++ /dev/null
@@ -1,45 +0,0 @@
-/*! @file OIDError.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDError.h"
-
-NSString *const OIDGeneralErrorDomain = @"org.openid.appauth.general";
-
-NSString *const OIDOAuthTokenErrorDomain = @"org.openid.appauth.oauth_token";
-
-NSString *const OIDOAuthAuthorizationErrorDomain = @"org.openid.appauth.oauth_authorization";
-
-NSString *const OIDOAuthRegistrationErrorDomain = @"org.openid.appauth.oauth_registration";
-
-NSString *const OIDResourceServerAuthorizationErrorDomain = @"org.openid.appauth.resourceserver";
-
-NSString *const OIDHTTPErrorDomain = @"org.openid.appauth.remote-http";
-
-NSString *const OIDOAuthExceptionInvalidAuthorizationFlow = @"An OAuth redirect was sent to a "
- "OIDExternalUserAgentSession after it already completed.";
-
-NSString *const OIDOAuthExceptionInvalidTokenRequestNullRedirectURL = @"A OIDTokenRequest was "
- "created with a grant_type that requires a redirectURL, but a null redirectURL was given";
-
-NSString *const OIDOAuthErrorResponseErrorKey = @"OIDOAuthErrorResponseErrorKey";
-
-NSString *const OIDOAuthErrorFieldError = @"error";
-
-NSString *const OIDOAuthErrorFieldErrorDescription = @"error_description";
-
-NSString *const OIDOAuthErrorFieldErrorURI = @"error_uri";
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDErrorUtilities.h b/Pods/AppAuth/Source/AppAuthCore/OIDErrorUtilities.h
deleted file mode 100644
index 3380f6fe1f..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDErrorUtilities.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*! @file OIDErrorUtilities.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-#import "OIDError.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @brief Convenience methods for creating standardized \NSError instances.
- */
-@interface OIDErrorUtilities : NSObject
-
-/*! @brief Creates a standard \NSError from an @c ::OIDErrorCode and custom user info.
- Automatically populates the localized error description.
- @param code The error code.
- @param underlyingError The underlying error which occurred, if applicable.
- @param description A custom description, if applicable.
- @return An \NSError representing the error code.
- */
-+ (NSError *)errorWithCode:(OIDErrorCode)code
- underlyingError:(nullable NSError *)underlyingError
- description:(nullable NSString *)description;
-
-/*! @brief Creates a standard \NSError from an @c ::OIDErrorCode and custom user info.
- Automatically populates the localized error description.
- @param OAuthErrorDomain The OAuth error domain. Must be @c ::OIDOAuthAuthorizationErrorDomain or
- @c ::OIDOAuthTokenErrorDomain.
- @param errorResponse The dictionary from an OAuth error response (as per RFC6749 Section 5.2).
- @param underlyingError The underlying error which occurred, if applicable.
- @return An \NSError representing the OAuth error.
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-+ (NSError *)OAuthErrorWithDomain:(NSString *)OAuthErrorDomain
- OAuthResponse:(NSDictionary *)errorResponse
- underlyingError:(nullable NSError *)underlyingError;
-
-/*! @brief Creates a \NSError indicating that the resource server responded with an authorization
- error.
- @param code Your error code.
- @param errorResponse The resource server error response, if any.
- @param underlyingError The underlying error which occurred, if applicable.
- @return An \NSError representing the authorization error from the resource server.
- */
-+ (NSError *)resourceServerAuthorizationErrorWithCode:(NSInteger)code
- errorResponse:(nullable NSDictionary *)errorResponse
- underlyingError:(nullable NSError *)underlyingError;
-
-
-/*! @brief Creates a standard \NSError from an \NSHTTPURLResponse. Automatically
- populates the localized error description with the response data associated with the
- \NSHTTPURLResponse, if available.
- @param HTTPURLResponse The response which indicates an error occurred.
- @param data The response data associated with the response which should be converted to an
- @c NSString assuming a UTF-8 encoding, if available.
- @return An \NSError representing the error.
- */
-+ (NSError *)HTTPErrorWithHTTPResponse:(NSHTTPURLResponse *)HTTPURLResponse
- data:(nullable NSData *)data;
-
-/*! @brief Raises an exception with the given name as both the name, and the message.
- @param name The name of the exception.
- */
-+ (void)raiseException:(NSString *)name;
-
-/*! @brief Raises an exception with the given name and message.
- @param name The name of the exception.
- @param message The message of the exception.
- */
-+ (void)raiseException:(NSString *)name message:(NSString *)message;
-
-/*! @brief Converts an OAuth error code into an @c ::OIDErrorCodeOAuth error code.
- @param errorCode The OAuth error code.
- @discussion Returns @c ::OIDErrorCodeOAuthOther if the string is not in AppAuth's list.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-+ (OIDErrorCodeOAuth)OAuthErrorCodeFromString:(NSString *)errorCode;
-
-/*! @brief Returns true if the given error domain is an OAuth error domain.
- @param errorDomain The error domain to test.
- @discussion An OAuth error domain is used for errors returned per RFC6749 sections 4.1.2.1 and
- 5.2. Other errors, such as network errors can also occur but they will not have an OAuth
- error domain.
- @see https://tools.ietf.org/html/rfc6749#section-4.1.2.1
- @see https://tools.ietf.org/html/rfc6749#section-5.2
- */
-+ (BOOL)isOAuthErrorDomain:(NSString*)errorDomain;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDErrorUtilities.m b/Pods/AppAuth/Source/AppAuthCore/OIDErrorUtilities.m
deleted file mode 100644
index 3b3c060753..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDErrorUtilities.m
+++ /dev/null
@@ -1,172 +0,0 @@
-/*! @file OIDErrorUtilities.m
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2015 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import "OIDErrorUtilities.h"
-
-@implementation OIDErrorUtilities
-
-+ (NSError *)errorWithCode:(OIDErrorCode)code
- underlyingError:(NSError *)underlyingError
- description:(NSString *)description {
- NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
- if (underlyingError) {
- userInfo[NSUnderlyingErrorKey] = underlyingError;
- }
- if (description) {
- userInfo[NSLocalizedDescriptionKey] = description;
- }
- // TODO: Populate localized description based on code.
- NSError *error = [NSError errorWithDomain:OIDGeneralErrorDomain
- code:code
- userInfo:userInfo];
- return error;
-}
-
-+ (BOOL)isOAuthErrorDomain:(NSString *)errorDomain {
- return errorDomain == OIDOAuthRegistrationErrorDomain
- || errorDomain == OIDOAuthAuthorizationErrorDomain
- || errorDomain == OIDOAuthTokenErrorDomain;
-}
-
-+ (NSError *)resourceServerAuthorizationErrorWithCode:(NSInteger)code
- errorResponse:(nullable NSDictionary *)errorResponse
- underlyingError:(nullable NSError *)underlyingError {
- // builds the userInfo dictionary with the full OAuth response and other information
- NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
- if (errorResponse) {
- userInfo[OIDOAuthErrorResponseErrorKey] = errorResponse;
- }
- if (underlyingError) {
- userInfo[NSUnderlyingErrorKey] = underlyingError;
- }
- NSError *error = [NSError errorWithDomain:OIDResourceServerAuthorizationErrorDomain
- code:code
- userInfo:userInfo];
- return error;
-}
-
-+ (NSError *)OAuthErrorWithDomain:(NSString *)oAuthErrorDomain
- OAuthResponse:(NSDictionary *)errorResponse
- underlyingError:(NSError *)underlyingError {
- // not a valid OAuth error
- if (![self isOAuthErrorDomain:oAuthErrorDomain]
- || !errorResponse
- || !errorResponse[OIDOAuthErrorFieldError]
- || ![errorResponse[OIDOAuthErrorFieldError] isKindOfClass:[NSString class]]) {
- return [[self class] errorWithCode:OIDErrorCodeNetworkError
- underlyingError:underlyingError
- description:underlyingError.localizedDescription];
- }
-
- // builds the userInfo dictionary with the full OAuth response and other information
- NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
- userInfo[OIDOAuthErrorResponseErrorKey] = errorResponse;
- if (underlyingError) {
- userInfo[NSUnderlyingErrorKey] = underlyingError;
- }
-
- NSString *oauthErrorCodeString = errorResponse[OIDOAuthErrorFieldError];
- NSString *oauthErrorMessage = nil;
- if ([errorResponse[OIDOAuthErrorFieldErrorDescription] isKindOfClass:[NSString class]]) {
- oauthErrorMessage = errorResponse[OIDOAuthErrorFieldErrorDescription];
- } else {
- oauthErrorMessage = [errorResponse[OIDOAuthErrorFieldErrorDescription] description];
- }
- NSString *oauthErrorURI = nil;
- if ([errorResponse[OIDOAuthErrorFieldErrorURI] isKindOfClass:[NSString class]]) {
- oauthErrorURI = errorResponse[OIDOAuthErrorFieldErrorURI];
- } else {
- oauthErrorURI = [errorResponse[OIDOAuthErrorFieldErrorURI] description];
- }
-
- // builds the error description, using the information supplied by the server if possible
- NSMutableString *description = [NSMutableString string];
- [description appendString:oauthErrorCodeString];
- if (oauthErrorMessage) {
- [description appendString:@": "];
- [description appendString:oauthErrorMessage];
- }
- if (oauthErrorURI) {
- if ([description length] > 0) {
- [description appendString:@" - "];
- }
- [description appendString:oauthErrorURI];
- }
- if ([description length] == 0) {
- // backup description
- [description appendFormat:@"OAuth error: %@ - https://tools.ietf.org/html/rfc6749#section-5.2",
- oauthErrorCodeString];
- }
- userInfo[NSLocalizedDescriptionKey] = description;
-
- // looks up the error code based on the "error" response param
- OIDErrorCodeOAuth code = [[self class] OAuthErrorCodeFromString:oauthErrorCodeString];
-
- NSError *error = [NSError errorWithDomain:oAuthErrorDomain
- code:code
- userInfo:userInfo];
- return error;
-}
-
-+ (NSError *)HTTPErrorWithHTTPResponse:(NSHTTPURLResponse *)HTTPURLResponse
- data:(nullable NSData *)data {
- NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
- if (data) {
- NSString *serverResponse =
- [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
- if (serverResponse) {
- userInfo[NSLocalizedDescriptionKey] = serverResponse;
- }
- }
- NSError *serverError =
- [NSError errorWithDomain:OIDHTTPErrorDomain
- code:HTTPURLResponse.statusCode
- userInfo:userInfo];
- return serverError;
-}
-
-+ (OIDErrorCodeOAuth)OAuthErrorCodeFromString:(NSString *)errorCode {
- NSDictionary *errorCodes = @{
- @"invalid_request": @(OIDErrorCodeOAuthInvalidRequest),
- @"unauthorized_client": @(OIDErrorCodeOAuthUnauthorizedClient),
- @"access_denied": @(OIDErrorCodeOAuthAccessDenied),
- @"unsupported_response_type": @(OIDErrorCodeOAuthUnsupportedResponseType),
- @"invalid_scope": @(OIDErrorCodeOAuthInvalidScope),
- @"server_error": @(OIDErrorCodeOAuthServerError),
- @"temporarily_unavailable": @(OIDErrorCodeOAuthTemporarilyUnavailable),
- @"invalid_client": @(OIDErrorCodeOAuthInvalidClient),
- @"invalid_grant": @(OIDErrorCodeOAuthInvalidGrant),
- @"unsupported_grant_type": @(OIDErrorCodeOAuthUnsupportedGrantType),
- };
- NSNumber *code = errorCodes[errorCode];
- if (code) {
- return [code integerValue];
- } else {
- return OIDErrorCodeOAuthOther;
- }
-}
-
-+ (void)raiseException:(NSString *)name {
- [[self class] raiseException:name message:name];
-}
-
-+ (void)raiseException:(NSString *)name message:(NSString *)message {
- [NSException raise:name format:@"%@", message];
-}
-
-@end
diff --git a/Pods/AppAuth/Source/AppAuthCore/OIDExternalUserAgent.h b/Pods/AppAuth/Source/AppAuthCore/OIDExternalUserAgent.h
deleted file mode 100644
index c4eb0a9087..0000000000
--- a/Pods/AppAuth/Source/AppAuthCore/OIDExternalUserAgent.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*! @file OIDExternalUserAgent.h
- @brief AppAuth iOS SDK
- @copyright
- Copyright 2016 Google Inc. All Rights Reserved.
- @copydetails
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#import
-
-@protocol OIDExternalUserAgentSession;
-@protocol OIDExternalUserAgentRequest;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*! @protocol OIDExternalUserAgent
- @brief An external user-agent UI that presents displays the request to the user. Clients may
- provide custom implementations of an external user-agent to customize the way the requests
- are presented to the end user.
- */
-@protocol OIDExternalUserAgent