summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/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/FirebaseRemoteConfig/GoogleUtilities/Environment/Private
parentd22d51a1ae49680015326857360eb699f31efced (diff)
rebuild the ios platform and the plugins
Diffstat (limited to 'StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private')
-rw-r--r--StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h47
-rw-r--r--StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h49
-rw-r--r--StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULKeychainStorage.h79
-rw-r--r--StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULKeychainUtils.h61
-rw-r--r--StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULSecureCoding.h36
5 files changed, 272 insertions, 0 deletions
diff --git a/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h
new file mode 100644
index 00000000..2fb16226
--- /dev/null
+++ b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2017 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>
+
+@interface GULAppEnvironmentUtil : NSObject
+
+/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator,
+/// development environment or sideloaded.
++ (BOOL)isFromAppStore;
+
+/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt.
+/// Returns NO otherwise.
++ (BOOL)isAppStoreReceiptSandbox;
+
+/// Indicates whether the app is on simulator or not at runtime depending on the device
+/// architecture.
++ (BOOL)isSimulator;
+
+/// The current device model. Returns an empty string if device model cannot be retrieved.
++ (NSString *)deviceModel;
+
+/// The current operating system version. Returns an empty string if the system version cannot be
+/// retrieved.
++ (NSString *)systemVersion;
+
+/// Indicates whether it is running inside an extension or an app.
++ (BOOL)isAppExtension;
+
+/// @return Returns @YES when is run on iOS version greater or equal to 7.0
++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE(
+ "Always `YES` because only iOS 8 and higher supported. The method will be removed.");
+
+@end
diff --git a/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h
new file mode 100644
index 00000000..9432dfc0
--- /dev/null
+++ b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h
@@ -0,0 +1,49 @@
+/*
+ * 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>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// Stores either a date or a dictionary to a specified file.
+@interface GULHeartbeatDateStorage : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@property(nonatomic, readonly) NSURL *fileURL;
+
+/**
+ * Default initializer.
+ * @param fileName The name of the file to store the date information.
+ * exist, it will be created if needed.
+ */
+- (instancetype)initWithFileName:(NSString *)fileName;
+
+/**
+ * Reads the date from the specified file for the given tag.
+ * @return Returns date if exists, otherwise `nil`.
+ */
+- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag;
+
+/**
+ * Saves the date for the specified tag in the specified file.
+ * @return YES on success, NO otherwise.
+ */
+- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULKeychainStorage.h b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULKeychainStorage.h
new file mode 100644
index 00000000..dc01a836
--- /dev/null
+++ b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULKeychainStorage.h
@@ -0,0 +1,79 @@
+/*
+ * 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>
+
+@class FBLPromise<ValueType>;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// The class provides a convenient abstraction on top of the iOS Keychain API to save data.
+@interface GULKeychainStorage : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/** Initializes the keychain storage with Keychain Service name.
+ * @param service A Keychain Service name that will be used to store and retrieve objects. See also
+ * `kSecAttrService`.
+ */
+- (instancetype)initWithService:(NSString *)service;
+
+/**
+ * Get an object by key.
+ * @param key The key.
+ * @param objectClass The expected object class required by `NSSecureCoding`.
+ * @param accessGroup The Keychain Access Group.
+ *
+ * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved
+ * with `nil` when the object not found. It fails on a Keychain error.
+ */
+- (FBLPromise<id<NSSecureCoding>> *)getObjectForKey:(NSString *)key
+ objectClass:(Class)objectClass
+ accessGroup:(nullable NSString *)accessGroup;
+
+/**
+ * Saves the given object by the given key.
+ * @param object The object to store.
+ * @param key The key to store the object. If there is an existing object by the key, it will be
+ * overridden.
+ * @param accessGroup The Keychain Access Group.
+ *
+ * @return Returns which is resolved with `[NSNull null]` on success.
+ */
+- (FBLPromise<NSNull *> *)setObject:(id<NSSecureCoding>)object
+ forKey:(NSString *)key
+ accessGroup:(nullable NSString *)accessGroup;
+
+/**
+ * Removes the object by the given key.
+ * @param key The key to store the object. If there is an existing object by the key, it will be
+ * overridden.
+ * @param accessGroup The Keychain Access Group.
+ *
+ * @return Returns which is resolved with `[NSNull null]` on success.
+ */
+- (FBLPromise<NSNull *> *)removeObjectForKey:(NSString *)key
+ accessGroup:(nullable NSString *)accessGroup;
+
+#if TARGET_OS_OSX
+/// If not `nil`, then only this keychain will be used to save and read data (see
+/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests.
+@property(nonatomic, nullable) SecKeychainRef keychainRef;
+#endif // TARGET_OSX
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULKeychainUtils.h b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULKeychainUtils.h
new file mode 100644
index 00000000..de4bef2f
--- /dev/null
+++ b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULKeychainUtils.h
@@ -0,0 +1,61 @@
+/*
+ * 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>
+
+NS_ASSUME_NONNULL_BEGIN
+
+FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain;
+
+/// Helper functions to access Keychain.
+@interface GULKeychainUtils : NSObject
+
+/** Fetches a keychain item data matching to the provided query.
+ * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for
+ * details.
+ * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be
+ * assigned with an error if there is.
+ * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not
+ * such an item (`outError` will be `nil` in this case) or an error occurred.
+ */
++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query
+ error:(NSError *_Nullable *_Nullable)outError;
+
+/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item
+ * matching the query parameters will be updated or a new will be created.
+ * @param item A Keychain Item data to store.
+ * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and
+ * `SecItemUpdate` for details.
+ * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be
+ * assigned with an error if there is.
+ * @returns `YES` when data was successfully stored, `NO` otherwise.
+ */
++ (BOOL)setItem:(NSData *)item
+ withQuery:(NSDictionary *)query
+ error:(NSError *_Nullable *_Nullable)outError;
+
+/** Removes a Keychain Item matching to the provided query.
+ * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for
+ * details.
+ * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be
+ * assigned with an error if there is.
+ * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise.
+ */
++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULSecureCoding.h b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULSecureCoding.h
new file mode 100644
index 00000000..8484b395
--- /dev/null
+++ b/StoneIsland/platforms/ios/Pods/FirebaseRemoteConfig/GoogleUtilities/Environment/Private/GULSecureCoding.h
@@ -0,0 +1,36 @@
+// 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>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding
+ * methods for iOS versions before and after 11.
+ */
+@interface GULSecureCoding : NSObject
+
++ (nullable id)unarchivedObjectOfClasses:(NSSet<Class> *)classes
+ fromData:(NSData *)data
+ error:(NSError **)outError;
+
++ (nullable id)unarchivedObjectOfClass:(Class)class
+ fromData:(NSData *)data
+ error:(NSError **)outError;
+
++ (nullable NSData *)archivedDataWithRootObject:(id<NSCoding>)object error:(NSError **)outError;
+
+@end
+
+NS_ASSUME_NONNULL_END