summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-08-31 23:07:20 +0200
committerJules Laplace <julescarbon@gmail.com>2020-08-31 23:07:20 +0200
commit22721a013bdd10d5eb395ba18453585f5f3f1f7f (patch)
tree5a920e31d6026ed5dc55265e5fd057febccc50e3 /StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private
parentd22d51a1ae49680015326857360eb699f31efced (diff)
rebuild the ios platform and the plugins
Diffstat (limited to 'StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private')
-rw-r--r--StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceID+Private.h63
-rw-r--r--StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceIDCheckinPreferences.h62
-rw-r--r--StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceID_Private.h74
3 files changed, 199 insertions, 0 deletions
diff --git a/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceID+Private.h b/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceID+Private.h
new file mode 100644
index 00000000..632e21bc
--- /dev/null
+++ b/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceID+Private.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2019 Google
+ *
+ * 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 <FirebaseInstanceID/FIRInstanceID.h>
+#import <FirebaseInstanceID/FIRInstanceIDCheckinPreferences.h>
+
+/**
+ * @related FIRInstanceIDCheckinService
+ *
+ * The completion handler invoked once the fetch from Checkin server finishes.
+ * For successful fetches we returned checkin information by the checkin service
+ * and `nil` error, else we return the appropriate error object as reported by the
+ * Checkin Service.
+ *
+ * @param checkinPreferences The checkin preferences as fetched from the server.
+ * @param error The error object which fetching GServices data.
+ */
+typedef void (^FIRInstanceIDDeviceCheckinCompletion)(
+ FIRInstanceIDCheckinPreferences *_Nullable checkinPreferences, NSError *_Nullable error);
+
+/**
+ * Private API used by Firebase SDK teams by calling in reflection or internal teams.
+ */
+@interface FIRInstanceID (Private)
+
+/**
+ * Fetches checkin info for the app. If the app has valid cached checkin preferences
+ * they are returned instead of making a network request.
+ *
+ * @param handler The completion handler to invoke once the request has completed.
+ */
+- (void)fetchCheckinInfoWithHandler:(nullable FIRInstanceIDDeviceCheckinCompletion)handler;
+
+/**
+ * Get the InstanceID for the app. If an ID was created before and cached
+ * successfully we will return that ID. If no cached ID exists we create
+ * a new ID, cache it and return that.
+ *
+ * This is a blocking call and should not really be called on the main thread.
+ *
+ * @param error The error object that represents the error while trying to
+ * retrieve the instance id.
+ *
+ * @return The InstanceID for the app.
+ */
+- (nullable NSString *)appInstanceID:(NSError *_Nullable *_Nullable)error
+ DEPRECATED_MSG_ATTRIBUTE("Please use getID(handler:) for Swift or "
+ "getIDWithHandler: for Objective-C instead.");
+
+@end
diff --git a/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceIDCheckinPreferences.h b/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceIDCheckinPreferences.h
new file mode 100644
index 00000000..be3ec572
--- /dev/null
+++ b/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceIDCheckinPreferences.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2019 Google
+ *
+ * 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 <Foundation/Foundation.h>
+
+/**
+ * The preferences InstanceID loads from checkin server. The deviceID and secret that checkin
+ * provides is used to authenticate all future requests to the server. Besides the deviceID
+ * and secret the other information that checkin provides is stored in a plist on the device.
+ * The deviceID and secret are persisted in the device keychain.
+ */
+@interface FIRInstanceIDCheckinPreferences : NSObject
+
+/**
+ * DeviceID and secretToken are the checkin auth credentials and are stored in the Keychain.
+ */
+@property(nonatomic, readonly, copy) NSString *deviceID;
+@property(nonatomic, readonly, copy) NSString *secretToken;
+
+/**
+ * All the other checkin preferences other than deviceID and secret are stored in a plist.
+ */
+@property(nonatomic, readonly, copy) NSString *deviceDataVersion;
+@property(nonatomic, readonly, copy) NSString *digest;
+@property(nonatomic, readonly, copy) NSString *versionInfo;
+@property(nonatomic, readonly, assign) int64_t lastCheckinTimestampMillis;
+
+/**
+ * The content retrieved from checkin server that should be persisted in a plist. This
+ * doesn't contain the deviceID and secret which are stored in the Keychain since they
+ * should be more private.
+ *
+ * @return The checkin preferences that should be persisted in a plist.
+ */
+- (NSDictionary *)checkinPlistContents;
+
+/**
+ * Return whether checkin info exists, valid or not.
+ */
+- (BOOL)hasCheckinInfo;
+
+/**
+ * Verify if checkin preferences are valid or not.
+ *
+ * @return YES if valid checkin preferences else NO.
+ */
+- (BOOL)hasValidCheckinInfo;
+
+@end
diff --git a/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceID_Private.h b/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceID_Private.h
new file mode 100644
index 00000000..c343f88d
--- /dev/null
+++ b/StoneIsland/platforms/ios/Pods/FirebaseInstanceID/Firebase/InstanceID/Private/FIRInstanceID_Private.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2019 Google
+ *
+ * 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 <FirebaseInstanceID/FIRInstanceID.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class FIRInstanceIDCheckinPreferences;
+@class FIRInstallations;
+
+/**
+ * Private API used by other Firebase SDKs.
+ */
+@interface FIRInstanceID ()
+
+@property(nonatomic, readonly, strong) NSString *deviceAuthID;
+@property(nonatomic, readonly, strong) NSString *secretToken;
+@property(nonatomic, readonly, strong) NSString *versionInfo;
+
+@property(nonatomic, readonly, strong) FIRInstallations *installations;
+
+/// A cached value of FID. Should be used only for `-[FIRInstanceID appInstanceID:]`.
+@property(atomic, readonly, copy, nullable) NSString *firebaseInstallationsID;
+
+/**
+ * Private initializer.
+ */
+- (instancetype)initPrivately;
+
+/**
+ * Returns a Firebase Messaging scoped token for the firebase app.
+ *
+ * @return Returns the stored token if the device has registered with Firebase Messaging, otherwise
+ * returns nil.
+ */
+- (nullable NSString *)token;
+
+/**
+ * Verify if valid checkin preferences have been loaded in memory.
+ *
+ * @return YES if valid checkin preferences exist in memory else NO.
+ */
+- (BOOL)hasValidCheckinInfo;
+
+/**
+ * Try to load prefetched checkin preferences from the cache. This supports the use case where
+ * InstanceID library has already obtained a valid checkin and we should be using that.
+ *
+ * This should be used as a last gasp effort to retreive any cached checkin preferences before
+ * hitting the FIRMessaging backend to retrieve new preferences.
+ *
+ * Note this is only required because InstanceID and FIRMessaging both require checkin preferences
+ * which need to be synced with each other.
+ *
+ * @return YES if successfully loaded cached checkin preferences into memory else NO.
+ */
+- (BOOL)tryToLoadValidCheckinInfo;
+
+@end
+
+NS_ASSUME_NONNULL_END