Skip to content

Commit

Permalink
Merge pull request #23 from GameSmash/update/4.5.0
Browse files Browse the repository at this point in the history
Update to v4.5.0 and add Firestore and ABTesting
  • Loading branch information
soheilbm authored Nov 6, 2017
2 parents c2c4a5c + eecffad commit 74208ba
Show file tree
Hide file tree
Showing 764 changed files with 121,914 additions and 8,098 deletions.
6 changes: 4 additions & 2 deletions Firebase.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
7B720AD41E6D158A009F2AE8 /* Storage */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Storage; sourceTree = "<group>"; };
D95E1BDD1D88D63300F94976 /* Firebase.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Firebase.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D95E1BE11D88D63300F94976 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DE6B5E6D1FAD01E7003AE8BC /* ABTesting */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ABTesting; sourceTree = "<group>"; };
DE6B5E6F1FAD021E003AE8BC /* Firestore */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Firestore; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -57,6 +59,8 @@
D95E1BDF1D88D63300F94976 /* Source */ = {
isa = PBXGroup;
children = (
DE6B5E6F1FAD021E003AE8BC /* Firestore */,
DE6B5E6D1FAD01E7003AE8BC /* ABTesting */,
7B2812A21F40400400F51B4D /* Performance */,
7B720AD31E6D158A009F2AE8 /* RemoteConfig */,
7B720AD41E6D158A009F2AE8 /* Storage */,
Expand Down Expand Up @@ -303,7 +307,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Tests",
"$(PROJECT_DIR)/Source/Analytics",
"$(PROJECT_DIR)/Source/AppIndexing",
"$(PROJECT_DIR)/Source/Auth",
Expand Down Expand Up @@ -342,7 +345,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Tests",
"$(PROJECT_DIR)/Source/Analytics",
"$(PROJECT_DIR)/Source/AppIndexing",
"$(PROJECT_DIR)/Source/Auth",
Expand Down
76 changes: 51 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,45 @@ Add the following Framework to your project with [carthage copy-framework](https
- GoogleToolboxForMac.framework
- nanopb.framework

#### ABTesting (~> Analytics)
- FirebaseABTesting.framework
- Protobuf.framework

#### AdMob (~> Analytics)
- GoogleMobileAds.framework


#### Auth (~> Analytics)
- FirebaseAuth.framework
- GTMSessionFetcher.framework


#### Crash (~> Analytics)
- FirebaseCrash.framework
- Protobuf.framework


#### Database (~> Analytics)
- FirebaseDatabase.framework

- leveldb-library.framework

#### DynamicLinks (~> Analytics)
- FirebaseDynamicLinks.framework

#### Firestore (~> Analytics)
- BoringSSL.framework
- FirebaseAuth.framework
- FirebaseFirestore.framework
- GTMSessionFetcher.framework
- Protobuf.framework
- gRPC.framework
- gRPC-Core.framework
- gRPC-ProtoRPC.framework
- gRPC-RxLibrary.framework
- leveldb-library.framework

#### Invites (~> Analytics)
You'll also need to add the resources in the
Resources directory into your target's main
bundle.

- FirebaseDynamicLinks.framework
- FirebaseInvites.framework
- GTMOAuth2.framework
Expand All @@ -89,62 +104,73 @@ Add the following Framework to your project with [carthage copy-framework](https
- GoogleSignIn.framework
- Protobuf.framework


#### Messaging (~> Analytics)
You'll also need to add the resources in the
Resources directory into your target's main
bundle.


#### Messaging (~> Analytics)
- FirebaseMessaging.framework
- Protobuf.framework


#### Performance (~> Analytics)
- FirebasePerformance.framework
- GTMSessionFetcher.framework
- Protobuf.framework


#### RemoteConfig (~> Analytics)
- FirebaseABTesting.framework
- FirebaseRemoteConfig.framework
- Protobuf.framework


#### Storage (~> Analytics)
- FirebaseStorage.framework
- GTMSessionFetcher.framework

# Samples

You can get samples for Firebase from https://github.com/firebase/quickstart-ios:

git clone https://github.com/firebase/quickstart-ios

Note that several of the samples depend on SDKs that are not included with
this archive; for example, FirebaseUI. For the samples that depend on SDKs not
included in this archive, you'll need to use CocoaPods.

### Current Version of Firebase libraries
# Versions

The frameworks in this directory map to these versions of the Firebase SDKs in
Carthage.

| Carthage | Version |
| ----------------------------- | ------- |
| Firebase | 4.4.0 |
----------------------------- | ------- |
| BoringSSL | 9.0 |
| Firebase | 4.5.0 |
| FirebaseABTesting | 1.0.0 |
| FirebaseAnalytics | 4.0.4 |
| FirebaseAuth | 4.3.0 |
| FirebaseCore | 4.0.9 |
| FirebaseAuth | 4.3.1 |
| FirebaseCore | 4.0.10 |
| FirebaseCrash | 2.0.2 |
| FirebaseDatabase | 4.1.1 |
| FirebaseDatabase | 4.1.0 |
| FirebaseDynamicLinks | 2.1.0 |
| FirebaseFirestore | 0.9.1 |
| FirebaseInstanceID | 2.0.5 |
| FirebaseInvites | 2.0.1 |
| FirebaseMessaging | 2.0.5 |
| FirebaseMessaging | 2.0.6 |
| FirebasePerformance | 1.0.6 |
| FirebaseRemoteConfig | 2.0.3 |
| FirebaseRemoteConfig | 2.0.3 |
| FirebaseFirestore | 0.9.0 |
| FirebaseRemoteConfig | 2.1.0 |
| FirebaseStorage | 2.0.2 |
| GTMOAuth2 | 1.1.5 |
| GTMSessionFetcher | 1.1.12 |
| Google-Mobile-Ads-SDK | 7.24.1 |
| Google-Mobile-Ads-SDK | 7.25.0 |
| GoogleAPIClientForREST | 1.3.1 |
| GoogleSignIn | 4.1.0 |
| GoogleSignIn | 4.1.1 |
| GoogleToolboxForMac | 2.1.3 |
| Protobuf | 3.4.0 |
| nanopb | 0.3.8 |


| gRPC | 1.6.5 |
| gRPC-Core | 1.6.5 |
| gRPC-ProtoRPC | 1.6.5 |
| gRPC-RxLibrary | 1.6.5 |
| leveldb-library | 1.18.3 |

## Author

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#import <Foundation/Foundation.h>

#import "developers/mobile/abt/proto/ExperimentPayload.pbobjc.h"

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 ABTExperimentPayload_ExperimentOverflowPolicy FIRDefaultExperimentOverflowPolicy;

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

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

/// Updates the list of experiments. 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.
/// @param origin The originating service affected by the experiment, it is defined at
/// Firebase Analytics FIREventOrigins.h.
/// @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.
- (void)updateExperimentsWithServiceOrigin:(NSString *)origin
events:(FIRLifecycleEvents *)events
policy:(ABTExperimentPayload_ExperimentOverflowPolicy)policy
lastStartTime:(NSTimeInterval)lastStartTime
payloads:(NSArray<NSData *> *)payloads;

/// 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;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/// Default event name for when an experiment is set.
extern NSString *const FIRSetExperimentEventName;
/// Default event name for when an experiment is activated.
extern NSString *const FIRActivateExperimentEventName;
/// Default event name for when an experiment is cleared.
extern NSString *const FIRClearExperimentEventName;
/// Default event name for when an experiment times out for being activated.
extern NSString *const FIRTimeoutExperimentEventName;
/// Default event name for when an experiment is expired as it reaches the end of TTL.
extern NSString *const FIRExpireExperimentEventName;

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

/// Event name for when an experiment is set. It is default to FIRSetExperimentEventName and can be
/// overriden. 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 overriden. 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 clearred. It is default to FIRClearExperimentEventName and
/// can be overriden. 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 overriden. 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 overriden. 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,2 @@
#import "FIRExperimentController.h"
#import "FIRLifecycleEvents.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
framework module FirebaseABTesting {
umbrella header "FirebaseABTesting.h"
export *
module * { export *}
link "z"
link framework "Security"
link framework "SystemConfiguration"}
Loading

0 comments on commit 74208ba

Please sign in to comment.