Skip to content

Commit

Permalink
ios Example changes
Browse files Browse the repository at this point in the history
  • Loading branch information
soheilbm committed Aug 13, 2017
1 parent b9a0604 commit 115f9a6
Show file tree
Hide file tree
Showing 34 changed files with 662 additions and 146 deletions.
Binary file modified iOS Example/FirebaseAnalytics.framework/FirebaseAnalytics
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#import "FIRAnalytics.h"

NS_ASSUME_NONNULL_BEGIN

/**
* Provides App Delegate handlers to be used in your App Delegate.
*
Expand Down Expand Up @@ -29,7 +31,7 @@
* updated and a new snapshot can be taken.
*/
+ (void)handleEventsForBackgroundURLSession:(NSString *)identifier
completionHandler:(void (^)(void))completionHandler;
completionHandler:(nullable void (^)(void))completionHandler;

/**
* Handles the event when the app is launched by a URL.
Expand All @@ -55,3 +57,6 @@
+ (void)handleUserActivity:(id)userActivity;

@end

NS_ASSUME_NONNULL_END

30 changes: 21 additions & 9 deletions iOS Example/FirebaseAnalytics.framework/Headers/FIRAnalytics.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>

#import "FIRAnalyticsSwiftNameSupport.h"
#import "FIREventNames.h"
#import "FIRParameterNames.h"
#import "FIRUserPropertyNames.h"
Expand All @@ -9,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
/// The top level Firebase Analytics singleton that provides methods for logging events and setting
/// user properties. See <a href="http://goo.gl/gz8SLz">the developer guides</a> for general
/// information on using Firebase Analytics in your apps.
FIR_SWIFT_NAME(Analytics)
@interface FIRAnalytics : NSObject

/// Logs an app event. The event can have up to 25 parameters. Events with the same name must have
Expand All @@ -17,6 +19,12 @@ NS_ASSUME_NONNULL_BEGIN
///
/// The following event names are reserved and cannot be used:
/// <ul>
/// <li>ad_activeview</li>
/// <li>ad_click</li>
/// <li>ad_exposure</li>
/// <li>ad_impression</li>
/// <li>ad_query</li>
/// <li>adunit_exposure</li>
/// <li>app_clear_data</li>
/// <li>app_remove</li>
/// <li>app_update</li>
Expand All @@ -28,23 +36,26 @@ NS_ASSUME_NONNULL_BEGIN
/// <li>notification_open</li>
/// <li>notification_receive</li>
/// <li>os_update</li>
/// <li>screen_view</li>
/// <li>session_start</li>
/// <li>user_engagement</li>
/// </ul>
///
/// @param name The name of the event. Should contain 1 to 40 alphanumeric characters or
/// underscores. The name must start with an alphabetic character. Some event names are
/// reserved. See FIREventNames.h for the list of reserved event names. The "firebase_" prefix
/// is reserved and should not be used. Note that event names are case-sensitive and that
/// logging two events whose names differ only in case will result in two distinct events.
/// reserved. See FIREventNames.h for the list of reserved event names. The "firebase_",
/// "google_", and "ga_" prefixes are reserved and should not be used. Note that event names are
/// case-sensitive and that logging two events whose names differ only in case will result in
/// two distinct events.
/// @param parameters The dictionary of event parameters. Passing nil indicates that the event has
/// no parameters. Parameter names can be up to 40 characters long and must start with an
/// alphabetic character and contain only alphanumeric characters and underscores. Only NSString
/// and NSNumber (signed 64-bit integer and 64-bit floating-point number) parameter types are
/// supported. NSString parameter values can be up to 100 characters long. The "firebase_"
/// prefix is reserved and should not be used for parameter names.
/// supported. NSString parameter values can be up to 100 characters long. The "firebase_",
/// "google_", and "ga_" prefixes are reserved and should not be used for parameter names.
+ (void)logEventWithName:(NSString *)name
parameters:(nullable NSDictionary<NSString *, id> *)parameters;
parameters:(nullable NSDictionary<NSString *, id> *)parameters
FIR_SWIFT_NAME(logEvent(_:parameters:));

/// Sets a user property to a given value. Up to 25 user property names are supported. Once set,
/// user property values persist throughout the app lifecycle and across sessions.
Expand All @@ -59,9 +70,10 @@ NS_ASSUME_NONNULL_BEGIN
/// @param value The value of the user property. Values can be up to 36 characters long. Setting the
/// value to nil removes the user property.
/// @param name The name of the user property to set. Should contain 1 to 24 alphanumeric characters
/// or underscores and must start with an alphabetic character. The "firebase_" prefix is
/// reserved and should not be used for user property names.
+ (void)setUserPropertyString:(nullable NSString *)value forName:(NSString *)name;
/// or underscores and must start with an alphabetic character. The "firebase_", "google_", and
/// "ga_" prefixes are reserved and should not be used for user property names.
+ (void)setUserPropertyString:(nullable NSString *)value forName:(NSString *)name
FIR_SWIFT_NAME(setUserProperty(_:forName:));

/// Sets the user ID property. This feature must be used in accordance with
/// <a href="https://www.google.com/policies/privacy">Google's Privacy Policy</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef FIR_SWIFT_NAME

#import <Foundation/Foundation.h>

// NS_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
// Wrap it in our own macro if it's a non-compatible SDK.
#ifdef __IPHONE_9_3
#define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
#else
#define FIR_SWIFT_NAME(X) // Intentionally blank.
#endif // #ifdef __IPHONE_9_3

#endif // FIR_SWIFT_NAME
Loading

0 comments on commit 115f9a6

Please sign in to comment.