Skip to content

Commit

Permalink
Merge pull request #1 from Astrovic/master
Browse files Browse the repository at this point in the history
Update Firebase iOS to v8.8.0
  • Loading branch information
hansemannn authored Dec 25, 2021
2 parents 3e0180a + 1db8b46 commit b84ec1f
Show file tree
Hide file tree
Showing 51 changed files with 1,624 additions and 68 deletions.
2 changes: 1 addition & 1 deletion 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: 1.1.0
version: 2.0.0
apiversion: 2
architectures: arm64 x86_64
description: titanium-firebase-in-app-messaging
Expand Down
97 changes: 97 additions & 0 deletions ios/platform/FirebaseABTesting.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>FirebaseABTesting.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>FirebaseABTesting.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>FirebaseABTesting.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>FirebaseABTesting.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_x86_64-simulator</string>
<key>LibraryPath</key>
<string>FirebaseABTesting.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>tvos-arm64</string>
<key>LibraryPath</key>
<string>FirebaseABTesting.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// 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 ABTExperimentPayload;

// Forward declaration to avoid importing into the module header
typedef NS_ENUM(int32_t, ABTExperimentPayloadExperimentOverflowPolicy);

NS_ASSUME_NONNULL_BEGIN

@class FIRLifecycleEvents;

/// The default experiment overflow policy, that is to discard the experiment with the oldest start
/// time when users start the experiment on the web console.
extern const ABTExperimentPayloadExperimentOverflowPolicy FIRDefaultExperimentOverflowPolicy;

/// This class is for Firebase services to handle experiments updates to Firebase Analytics.
/// Experiments can be set, cleared and updated through this controller.
NS_SWIFT_NAME(ExperimentController)
@interface FIRExperimentController : NSObject

/// Returns the FIRExperimentController singleton.
+ (FIRExperimentController *)sharedInstance;

/// Updates the list of experiments with an optional completion handler. Experiments already
/// existing in payloads are not affected, whose state and payload is preserved. This method
/// compares whether the experiments have changed or not by their variant ID. This runs in a
/// background queue and calls the completion handler when finished executing.
/// @param origin The originating service affected by the experiment.
/// @param events A list of event names to be used for logging experiment lifecycle events,
/// if they are not defined in the payload.
/// @param policy The policy to handle new experiments when slots are full.
/// @param lastStartTime The last known experiment start timestamp for this affected service.
/// (Timestamps are specified by the number of seconds from 00:00:00 UTC on 1
/// January 1970.).
/// @param payloads List of experiment metadata.
/// @param completionHandler Code to be executed after experiments are updated in the background
/// thread.
- (void)updateExperimentsWithServiceOrigin:(NSString *)origin
events:(FIRLifecycleEvents *)events
policy:(ABTExperimentPayloadExperimentOverflowPolicy)policy
lastStartTime:(NSTimeInterval)lastStartTime
payloads:(NSArray<NSData *> *)payloads
completionHandler:
(nullable void (^)(NSError *_Nullable error))completionHandler;

/// Returns the latest experiment start timestamp given a current latest timestamp and a list of
/// experiment payloads. Timestamps are specified by the number of seconds from 00:00:00 UTC on 1
/// January 1970.
/// @param timestamp Current latest experiment start timestamp. If not known, affected service
/// should specify -1;
/// @param payloads List of experiment metadata.
- (NSTimeInterval)latestExperimentStartTimestampBetweenTimestamp:(NSTimeInterval)timestamp
andPayloads:(NSArray<NSData *> *)payloads;

/// Expires experiments that aren't in the list of running experiment payloads.
/// @param origin The originating service affected by the experiment.
/// @param payloads The list of valid, running experiments.
- (void)validateRunningExperimentsForServiceOrigin:(NSString *)origin
runningExperimentPayloads:(NSArray<ABTExperimentPayload *> *)payloads;

/// Directly sets a given experiment to be active.
/// @param experimentPayload The payload for the experiment that should be activated.
/// @param origin The originating service affected by the experiment.
- (void)activateExperiment:(ABTExperimentPayload *)experimentPayload
forServiceOrigin:(NSString *)origin;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// 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

/// Default event name for when an experiment is set.
extern NSString *const FIRSetExperimentEventName NS_SWIFT_NAME(DefaultSetExperimentEventName);
/// Default event name for when an experiment is activated.
// clang-format off
// clang-format12 will merge lines and exceed 100 character limit.
extern NSString *const FIRActivateExperimentEventName
NS_SWIFT_NAME(DefaultActivateExperimentEventName);
/// Default event name for when an experiment is cleared.
extern NSString *const FIRClearExperimentEventName NS_SWIFT_NAME(DefaultClearExperimentEventName);
/// Default event name for when an experiment times out for being activated.
extern NSString *const FIRTimeoutExperimentEventName
NS_SWIFT_NAME(DefaultTimeoutExperimentEventName);
// clang-format on
/// Default event name for when an experiment is expired as it reaches the end of TTL.
extern NSString *const FIRExpireExperimentEventName NS_SWIFT_NAME(DefaultExpireExperimentEventName);

/// An Experiment Lifecycle Event Object that specifies the name of the experiment event to be
/// logged by Firebase Analytics.
NS_SWIFT_NAME(LifecycleEvents)
@interface FIRLifecycleEvents : NSObject

/// Event name for when an experiment is set. It is default to FIRSetExperimentEventName and can be
/// overridden. If experiment payload has a valid string of this field, always use experiment
/// payload.
@property(nonatomic, copy) NSString *setExperimentEventName;

/// Event name for when an experiment is activated. It is default to FIRActivateExperimentEventName
/// and can be overridden. If experiment payload has a valid string of this field, always use
/// experiment payload.
@property(nonatomic, copy) NSString *activateExperimentEventName;

/// Event name for when an experiment is cleared. It is default to FIRClearExperimentEventName and
/// can be overridden. If experiment payload has a valid string of this field, always use experiment
/// payload.
@property(nonatomic, copy) NSString *clearExperimentEventName;
/// Event name for when an experiment is timeout from being STANDBY. It is default to
/// FIRTimeoutExperimentEventName and can be overridden. If experiment payload has a valid string
/// of this field, always use experiment payload.
@property(nonatomic, copy) NSString *timeoutExperimentEventName;

/// Event name when an experiment is expired when it reaches the end of its TTL.
/// It is default to FIRExpireExperimentEventName and can be overridden. If experiment payload has a
/// valid string of this field, always use experiment payload.
@property(nonatomic, copy) NSString *expireExperimentEventName;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 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 "FIRExperimentController.h"
#import "FIRLifecycleEvents.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>FirebaseABTesting</string>
<key>CFBundleIdentifier</key>
<string>com.firebase.Firebase-FirebaseABTesting</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>FirebaseABTesting</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleVersion</key>
<string>8.8.0</string>
<key>DTSDKName</key>
<string>iphonesimulator11.2</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
framework module FirebaseABTesting {
umbrella header "FirebaseABTesting.h"
export *
module * { export * }
link framework "CoreTelephony"
link framework "Foundation"
link framework "Security"
link framework "SystemConfiguration"
link framework "UIKit"
link "z"
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// 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 ABTExperimentPayload;

// Forward declaration to avoid importing into the module header
typedef NS_ENUM(int32_t, ABTExperimentPayloadExperimentOverflowPolicy);

NS_ASSUME_NONNULL_BEGIN

@class FIRLifecycleEvents;

/// The default experiment overflow policy, that is to discard the experiment with the oldest start
/// time when users start the experiment on the web console.
extern const ABTExperimentPayloadExperimentOverflowPolicy FIRDefaultExperimentOverflowPolicy;

/// This class is for Firebase services to handle experiments updates to Firebase Analytics.
/// Experiments can be set, cleared and updated through this controller.
NS_SWIFT_NAME(ExperimentController)
@interface FIRExperimentController : NSObject

/// Returns the FIRExperimentController singleton.
+ (FIRExperimentController *)sharedInstance;

/// Updates the list of experiments with an optional completion handler. Experiments already
/// existing in payloads are not affected, whose state and payload is preserved. This method
/// compares whether the experiments have changed or not by their variant ID. This runs in a
/// background queue and calls the completion handler when finished executing.
/// @param origin The originating service affected by the experiment.
/// @param events A list of event names to be used for logging experiment lifecycle events,
/// if they are not defined in the payload.
/// @param policy The policy to handle new experiments when slots are full.
/// @param lastStartTime The last known experiment start timestamp for this affected service.
/// (Timestamps are specified by the number of seconds from 00:00:00 UTC on 1
/// January 1970.).
/// @param payloads List of experiment metadata.
/// @param completionHandler Code to be executed after experiments are updated in the background
/// thread.
- (void)updateExperimentsWithServiceOrigin:(NSString *)origin
events:(FIRLifecycleEvents *)events
policy:(ABTExperimentPayloadExperimentOverflowPolicy)policy
lastStartTime:(NSTimeInterval)lastStartTime
payloads:(NSArray<NSData *> *)payloads
completionHandler:
(nullable void (^)(NSError *_Nullable error))completionHandler;

/// Returns the latest experiment start timestamp given a current latest timestamp and a list of
/// experiment payloads. Timestamps are specified by the number of seconds from 00:00:00 UTC on 1
/// January 1970.
/// @param timestamp Current latest experiment start timestamp. If not known, affected service
/// should specify -1;
/// @param payloads List of experiment metadata.
- (NSTimeInterval)latestExperimentStartTimestampBetweenTimestamp:(NSTimeInterval)timestamp
andPayloads:(NSArray<NSData *> *)payloads;

/// Expires experiments that aren't in the list of running experiment payloads.
/// @param origin The originating service affected by the experiment.
/// @param payloads The list of valid, running experiments.
- (void)validateRunningExperimentsForServiceOrigin:(NSString *)origin
runningExperimentPayloads:(NSArray<ABTExperimentPayload *> *)payloads;

/// Directly sets a given experiment to be active.
/// @param experimentPayload The payload for the experiment that should be activated.
/// @param origin The originating service affected by the experiment.
- (void)activateExperiment:(ABTExperimentPayload *)experimentPayload
forServiceOrigin:(NSString *)origin;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit b84ec1f

Please sign in to comment.