Skip to content

Commit

Permalink
chore: update Firebase to 9.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Sep 23, 2022
1 parent 428cdaf commit f541e2d
Show file tree
Hide file tree
Showing 39 changed files with 411 additions and 329 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ thank you!
## Requirements

- [x] The [Firebase Core](https://github.com/hansemannn/titanium-firebase-core) module
- [x] Titanium SDK 7.0.0+
- [x] Titanium SDK 10.0.0+

## Download

Expand Down
2 changes: 1 addition & 1 deletion ios/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" "7.3.0"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" "9.6.0"
4 changes: 2 additions & 2 deletions ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 7.1.0
version: 8.0.0
apiversion: 2
architectures: arm64 x86_64
description: titanium-firebase-config
Expand All @@ -16,4 +16,4 @@ name: titanium-firebase-config
moduleid: firebase.config
guid: 020977b2-c61c-4269-94c0-45cec7c2ab98
platform: iphone
minsdk: 9.2.0
minsdk: 10.0.0
34 changes: 16 additions & 18 deletions ios/platform/FirebaseRemoteConfig.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,19 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<string>tvos-arm64</string>
<key>LibraryPath</key>
<string>FirebaseRemoteConfig.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>FirebaseRemoteConfig.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -32,52 +29,51 @@
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>FirebaseRemoteConfig.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>tvos-arm64</string>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>FirebaseRemoteConfig.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>FirebaseRemoteConfig.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<string>macos</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>FirebaseRemoteConfig.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -86,7 +82,9 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
<string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ typedef NS_ENUM(NSInteger, FIRRemoteConfigFetchAndActivateStatus) {
/// Remote Config error domain that handles errors when fetching data from the service.
extern NSString *const _Nonnull FIRRemoteConfigErrorDomain NS_SWIFT_NAME(RemoteConfigErrorDomain);
/// Firebase Remote Config service fetch error.
typedef NS_ENUM(NSInteger, FIRRemoteConfigError) {
/// Unknown or no error.
FIRRemoteConfigErrorUnknown = 8001,
/// Frequency of fetch requests exceeds throttled limit.
FIRRemoteConfigErrorThrottled = 8002,
/// Internal error that covers all internal HTTP errors.
FIRRemoteConfigErrorInternalError = 8003,
typedef NS_ERROR_ENUM(FIRRemoteConfigErrorDomain, FIRRemoteConfigError){
/// Unknown or no error.
FIRRemoteConfigErrorUnknown = 8001,
/// Frequency of fetch requests exceeds throttled limit.
FIRRemoteConfigErrorThrottled = 8002,
/// Internal error that covers all internal HTTP errors.
FIRRemoteConfigErrorInternalError = 8003,
} NS_SWIFT_NAME(RemoteConfigError);

/// Enumerated value that indicates the source of Remote Config data. Data can come from
Expand All @@ -80,26 +80,26 @@ typedef NS_ENUM(NSInteger, FIRRemoteConfigSource) {
/// @param error Error message on failure.
typedef void (^FIRRemoteConfigFetchCompletion)(FIRRemoteConfigFetchStatus status,
NSError *_Nullable error)
NS_SWIFT_NAME(RemoteConfigFetchCompletion);
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");

/// Completion handler invoked by activate method upon completion.
/// @param error Error message on failure. Nil if activation was successful.
typedef void (^FIRRemoteConfigActivateCompletion)(NSError *_Nullable error)
NS_SWIFT_NAME(RemoteConfigActivateCompletion);
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");

/// Completion handler invoked upon completion of Remote Config initialization.
///
/// @param initializationError nil if initialization succeeded.
typedef void (^FIRRemoteConfigInitializationCompletion)(NSError *_Nullable initializationError)
NS_SWIFT_NAME(RemoteConfigInitializationCompletion);
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");

/// Completion handler invoked by the fetchAndActivate method. Used to convey status of fetch and,
/// if successful, resultant activate call
/// @param status Config fetching status.
/// @param error Error message on failure of config fetch
typedef void (^FIRRemoteConfigFetchAndActivateCompletion)(
FIRRemoteConfigFetchAndActivateStatus status, NSError *_Nullable error)
NS_SWIFT_NAME(RemoteConfigFetchAndActivateCompletion);
NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");

#pragma mark - FIRRemoteConfigValue
/// This class provides a wrapper for Remote Config parameter values, with methods to get parameter
Expand Down Expand Up @@ -129,46 +129,44 @@ NS_SWIFT_NAME(RemoteConfigSettings)
/// before a fetch request can again be made to the Remote Config backend. After a fetch request to
/// the backend has succeeded, no additional fetch requests to the backend will be allowed until the
/// minimum fetch interval expires. Note that you can override this default on a per-fetch request
/// basis using -[FIRRemoteConfig fetchWithExpirationDuration:completionHandler]. For E.g. setting
/// the expiration duration to 0 in the fetch request will override the minimumFetchInterval and
/// allow the request to the backend.
/// basis using `RemoteConfig.fetch(withExpirationDuration:)`. For example, setting
/// the expiration duration to 0 in the fetch request will override the `minimumFetchInterval` and
/// allow the request to proceed.
@property(nonatomic, assign) NSTimeInterval minimumFetchInterval;
/// Indicates the default value in seconds to abandon a pending fetch request made to the backend.
/// This value is set for outgoing requests as the timeoutIntervalForRequest as well as the
/// timeoutIntervalForResource on the NSURLSession's configuration.
/// This value is set for outgoing requests as the `timeoutIntervalForRequest` as well as the
/// `timeoutIntervalForResource` on the `NSURLSession`'s configuration.
@property(nonatomic, assign) NSTimeInterval fetchTimeout;
@end

#pragma mark - FIRRemoteConfig
/// Firebase Remote Config class. The shared instance method +remoteConfig can be created and used
/// to fetch, activate and read config results and set default config results.
/// Firebase Remote Config class. The class method `remoteConfig()` can be used
/// to fetch, activate and read config results and set default config results on the default
/// Remote Config instance.
NS_SWIFT_NAME(RemoteConfig)
@interface FIRRemoteConfig : NSObject <NSFastEnumeration>
/// Last successful fetch completion time.
@property(nonatomic, readonly, strong, nullable) NSDate *lastFetchTime;
/// Last fetch status. The status can be any enumerated value from FIRRemoteConfigFetchStatus.
/// Last fetch status. The status can be any enumerated value from `RemoteConfigFetchStatus`.
@property(nonatomic, readonly, assign) FIRRemoteConfigFetchStatus lastFetchStatus;
/// Config settings are custom settings.
@property(nonatomic, readwrite, strong, nonnull) FIRRemoteConfigSettings *configSettings;

/// Returns the FIRRemoteConfig instance configured for the default Firebase app. This singleton
/// Returns the `RemoteConfig` instance configured for the default Firebase app. This singleton
/// object contains the complete set of Remote Config parameter values available to the app,
/// including the Active Config and Default Config. This object also caches values fetched from the
/// Remote Config Server until they are copied to the Active Config by calling
/// `activateWithCompletion:`. When you fetch values from the Remote Config Server using the default
/// Firebase namespace service, you should use this class method to create a shared instance of the
/// FIRRemoteConfig object to ensure that your app will function properly with the Remote Config
/// Server and the Firebase service.
/// Remote Config server until they are copied to the Active Config by calling `activate()`. When
/// you fetch values from the Remote Config server using the default Firebase app, you should use
/// this class method to create and reuse a shared instance of `RemoteConfig`.
+ (nonnull FIRRemoteConfig *)remoteConfig NS_SWIFT_NAME(remoteConfig());

/// Returns the FIRRemoteConfig instance for your (non-default) Firebase appID. Note that Firebase
/// Returns the `RemoteConfig` instance for your (non-default) Firebase appID. Note that Firebase
/// analytics does not work for non-default app instances. This singleton object contains the
/// complete set of Remote Config parameter values available to the app, including the Active Config
/// and Default Config. This object also caches values fetched from the Remote Config Server until
/// they are copied to the Active Config by calling `activateWithCompletion:`. When you fetch values
/// from the Remote Config Server using the default Firebase namespace service, you should use this
/// class method to create a shared instance of the FIRRemoteConfig object to ensure that your app
/// will function properly with the Remote Config Server and the Firebase service.
/// they are copied to the Active Config by calling `activate())`. When you fetch values
/// from the Remote Config Server using the non-default Firebase app, you should use this
/// class method to create and reuse shared instance of `RemoteConfig`.
+ (nonnull FIRRemoteConfig *)remoteConfigWithApp:(nonnull FIRApp *)app
NS_SWIFT_NAME(remoteConfig(app:));

Expand All @@ -180,13 +178,13 @@ NS_SWIFT_NAME(RemoteConfig)
- (void)ensureInitializedWithCompletionHandler:
(void (^_Nonnull)(NSError *_Nullable initializationError))completionHandler;
#pragma mark - Fetch
/// Fetches Remote Config data with a callback. Call `activateWithCompletion:` to make fetched data
/// Fetches Remote Config data with a callback. Call `activate()` to make fetched data
/// available to your app.
///
/// Note: This method uses a Firebase Installations token to identify the app instance, and once
/// it's called, it periodically sends data to the Firebase backend. (see
/// `[FIRInstallations authTokenWithCompletion:]`).
/// To stop the periodic sync, developers need to call `[FIRInstallations deleteWithCompletion:]`
/// `Installations.authToken(completion:)`).
/// To stop the periodic sync, call `Installations.delete(completion:)`
/// and avoid calling this method again.
///
/// @param completionHandler Fetch operation callback with status and error parameters.
Expand All @@ -198,13 +196,13 @@ NS_SWIFT_NAME(RemoteConfig)
///
/// Note: This method uses a Firebase Installations token to identify the app instance, and once
/// it's called, it periodically sends data to the Firebase backend. (see
/// `[FIRInstallations authTokenWithCompletion:]`).
/// To stop the periodic sync, developers need to call `[FIRInstallations deleteWithCompletion:]`
/// `Installations.authToken(completion:)`).
/// To stop the periodic sync, call `Installations.delete(completion:)`
/// and avoid calling this method again.
///
/// @param expirationDuration Override the (default or optionally set minimumFetchInterval property
/// in FIRRemoteConfigSettings) minimumFetchInterval for only the current request, in seconds.
/// Setting a value of 0 seconds will force a fetch to the backend.
/// @param expirationDuration Override the (default or optionally set `minimumFetchInterval`
/// property in RemoteConfigSettings) `minimumFetchInterval` for only the current request, in
/// seconds. Setting a value of 0 seconds will force a fetch to the backend.
/// @param completionHandler Fetch operation callback with status and error parameters.
- (void)fetchWithExpirationDuration:(NSTimeInterval)expirationDuration
completionHandler:(void (^_Nullable)(FIRRemoteConfigFetchStatus status,
Expand All @@ -215,8 +213,8 @@ NS_SWIFT_NAME(RemoteConfig)
///
/// Note: This method uses a Firebase Installations token to identify the app instance, and once
/// it's called, it periodically sends data to the Firebase backend. (see
/// `[FIRInstallations authTokenWithCompletion:]`).
/// To stop the periodic sync, developers need to call `[FIRInstallations deleteWithCompletion:]`
/// `Installations.authToken(completion:)`).
/// To stop the periodic sync, call `Installations.delete(completion:)`
/// and avoid calling this method again.
///
/// @param completionHandler Fetch operation callback with status and error parameters.
Expand All @@ -234,13 +232,11 @@ NS_SWIFT_NAME(RemoteConfig)

#pragma mark - Get Config
/// Enables access to configuration values by using object subscripting syntax.
/// <pre>
/// // Example:
/// FIRRemoteConfig *config = [FIRRemoteConfig remoteConfig];
/// FIRRemoteConfigValue *value = config[@"yourKey"];
/// BOOL b = value.boolValue;
/// NSNumber *number = config[@"yourKey"].numberValue;
/// </pre>
/// For example:
/// let config = RemoteConfig.remoteConfig()
/// let value = config["yourKey"]
/// let boolValue = value.boolValue
/// let number = config["yourKey"].numberValue
- (nonnull FIRRemoteConfigValue *)objectForKeyedSubscript:(nonnull NSString *)key;

/// Gets the config value.
Expand Down Expand Up @@ -275,8 +271,8 @@ NS_SWIFT_NAME(RemoteConfig)
/// Sets default configs from plist for default namespace.
///
/// @param fileName The plist file name, with no file name extension. For example, if the plist file
/// is defaultSamples.plist, call:
/// [[FIRRemoteConfig remoteConfig] setDefaultsFromPlistFileName:@"defaultSamples"];
/// is named `defaultSamples.plist`:
/// `RemoteConfig.remoteConfig().setDefaults(fromPlist: "defaultSamples")`
- (void)setDefaultsFromPlistFileName:(nullable NSString *)fileName
NS_SWIFT_NAME(setDefaults(fromPlist:));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif

#import "FirebaseRemoteConfig.h"
#import "FIRRemoteConfig.h"

FOUNDATION_EXPORT double FirebaseRemoteConfigVersionNumber;
FOUNDATION_EXPORT const unsigned char FirebaseRemoteConfigVersionString[];

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleVersion</key>
<string>8.12.0</string>
<string>9.6.0</string>
<key>DTSDKName</key>
<string>iphonesimulator11.2</string>
</dict>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
framework module FirebaseRemoteConfig {
umbrella header "FirebaseRemoteConfig.h"
umbrella header "FirebaseRemoteConfig-umbrella.h"
export *
module * { export * }
link framework "CoreTelephony"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit f541e2d

Please sign in to comment.