Skip to content

Commit

Permalink
Firebase iOS 4.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Apr 8, 2018
1 parent 7eb9627 commit b880051
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ nbproject
/metadata.json
/ios/metadata.json
ios/firebase.performance-iphone-*.zip
/ios/dist
12 changes: 6 additions & 6 deletions ios/Classes/FirebasePerformanceModuleAssets.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

@implementation FirebasePerformanceModuleAssets

- (NSData*) moduleAsset
- (NSData *)moduleAsset
{

return nil;
return nil;
}

- (NSData*) resolveModuleAsset:(NSString*)path
- (NSData *)resolveModuleAsset:(NSString *)path
{

return nil;
return nil;
}

@end
6 changes: 3 additions & 3 deletions ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 1.0.0
version: 1.1.0
apiversion: 2
architectures: armv7 arm64 i386 x86_64
description: titanium-firebase-performance
author: Hans Knoechel
license: Apache 2
copyright: Copyright (c) 2017 by Hans Knöchel
copyright: Copyright (c) 2017-present by Hans Knöchel

# these should not be edited
name: titanium-firebase-performance
moduleid: firebase.performance
guid: 0f3ea40e-0a87-4ded-8402-44770ed6a41e
platform: iphone
minsdk: 6.2.0
minsdk: 6.3.0
Binary file modified ios/platform/FirebasePerformance.framework/FirebasePerformance
Binary file not shown.
68 changes: 68 additions & 0 deletions ios/platform/FirebasePerformance.framework/Headers/FIRHTTPMetric.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#import <Foundation/Foundation.h>

#import "FIRPerformanceAttributable.h"

/* Different HTTP methods. */
typedef NS_ENUM(NSInteger, FIRHTTPMethod) {
FIRHTTPMethodGET NS_SWIFT_NAME(get),
FIRHTTPMethodPUT NS_SWIFT_NAME(put),
FIRHTTPMethodPOST NS_SWIFT_NAME(post),
FIRHTTPMethodDELETE NS_SWIFT_NAME(delete),
FIRHTTPMethodHEAD NS_SWIFT_NAME(head),
FIRHTTPMethodPATCH NS_SWIFT_NAME(patch),
FIRHTTPMethodOPTIONS NS_SWIFT_NAME(options),
FIRHTTPMethodTRACE NS_SWIFT_NAME(trace),
FIRHTTPMethodCONNECT NS_SWIFT_NAME(connect)
} NS_SWIFT_NAME(HTTPMethod);

/**
* FIRHTTPMetric object can be used to make the SDK record information about a HTTP network request.
*/
NS_SWIFT_NAME(HTTPMetric)
@interface FIRHTTPMetric : NSObject <FIRPerformanceAttributable>

/**
* Creates HTTPMetric object for a network request.
* @param URL The URL for which the metrics are recorded.
* @param httpMethod HTTP method used by the request.
*/
- (nullable instancetype)initWithURL:(nonnull NSURL *)URL HTTPMethod:(FIRHTTPMethod)httpMethod
NS_SWIFT_NAME(init(url:httpMethod:));

/**
* Use `initWithURL:HTTPMethod:` for Objective-C and `init(url:httpMethod:)` for Swift.
*/
- (nonnull instancetype)init NS_UNAVAILABLE;

/**
* @brief HTTP Response code. Values are greater than 0.
*/
@property(nonatomic, assign) NSInteger responseCode;

/**
* @brief Size of the request payload.
*/
@property(nonatomic, assign) long requestPayloadSize;

/**
* @brief Size of the response payload.
*/
@property(nonatomic, assign) long responsePayloadSize;

/**
* @brief HTTP Response content type.
*/
@property(nonatomic, nullable, copy) NSString *responseContentType;

/**
* Marks the start time of the request.
*/
- (void)start;

/**
* Marks the end time of the response and queues the network request metric on the device for
* transmission. Check the logs if the metric is valid.
*/
- (void)stop;

@end
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#import <Foundation/Foundation.h>

#import "FIRPerformanceSwiftNameSupport.h"
#import "FIRTrace.h"

/** This class allows you to configure the Firebase Performance Reporting SDK. It also provides the
* interfaces to create timers and enable or disable automatic metrics capture.
*/
NS_EXTENSION_UNAVAILABLE("FirebasePerformance does not support app extensions at this time.")
FIR_SWIFT_NAME(Performance)
NS_SWIFT_NAME(Performance)
@interface FIRPerformance : NSObject

/**
Expand All @@ -30,7 +29,7 @@ FIR_SWIFT_NAME(Performance)
@property(nonatomic, assign, getter=isInstrumentationEnabled) BOOL instrumentationEnabled;

/** @return The shared instance. */
+ (nonnull instancetype)sharedInstance FIR_SWIFT_NAME(sharedInstance());
+ (nonnull instancetype)sharedInstance NS_SWIFT_NAME(sharedInstance());

/**
* Creates an instance of FIRTrace after creating the shared instance of FIRPerformance. The trace
Expand All @@ -41,7 +40,7 @@ FIR_SWIFT_NAME(Performance)
* @return The FIRTrace object.
*/
+ (nullable FIRTrace *)startTraceWithName:(nonnull NSString *)name
FIR_SWIFT_NAME(startTrace(name:));
NS_SWIFT_NAME(startTrace(name:));

/**
* Creates an instance of FIRTrace. This API does not start the trace. To start the trace, use the
Expand All @@ -50,6 +49,6 @@ FIR_SWIFT_NAME(Performance)
* @param name The name of the Trace.
* @return The FIRTrace object.
*/
- (nullable FIRTrace *)traceWithName:(nonnull NSString *)name FIR_SWIFT_NAME(trace(name:));
- (nullable FIRTrace *)traceWithName:(nonnull NSString *)name NS_SWIFT_NAME(trace(name:));

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

/** Defines the interface that allows adding/removing attributes to any object.
*/
NS_SWIFT_NAME(PerformanceAttributable)
@protocol FIRPerformanceAttributable <NSObject>

/** List of attributes. */
@property(nonatomic, nonnull, readonly) NSDictionary<NSString *, NSString *> *attributes;

/**
* Sets a value as a string for the specified attribute. Updates the value of the attribute if a
* value had already existed.
*
* @param value The value that needs to be set/updated for an attribute. If the length of the value
* exceeds the maximum allowed, the value will be truncated to the maximum allowed.
* @param attribute The name of the attribute. If the length of the value exceeds the maximum
* allowed, the value will be truncated to the maximum allowed.
*/
- (void)setValue:(nonnull NSString *)value forAttribute:(nonnull NSString *)attribute;

/**
* Reads the value for the specified attribute. If the attribute does not exist, returns nil.
*
* @param attribute The name of the attribute.
* @return The value for the attribute. Returns nil if the attribute does not exist.
*/
- (nullable NSString *)valueForAttribute:(nonnull NSString *)attribute;

/**
* Removes an attribute from the list. Does nothing if the attribute does not exist.
*
* @param attribute The name of the attribute.
*/
- (void)removeAttribute:(nonnull NSString *)attribute;

@end

This file was deleted.

10 changes: 5 additions & 5 deletions ios/platform/FirebasePerformance.framework/Headers/FIRTrace.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <Foundation/Foundation.h>

#import "FIRPerformanceSwiftNameSupport.h"
#import "FIRPerformanceAttributable.h"

/**
* FIRTrace objects contain information about a "Trace", which is a sequence of steps. Traces can be
Expand All @@ -9,8 +9,8 @@
* nature (e.g., Bytes downloaded). Counters are scoped to an FIRTrace object.
*/
NS_EXTENSION_UNAVAILABLE("FirebasePerformance does not support app extensions at this time.")
FIR_SWIFT_NAME(Trace)
@interface FIRTrace : NSObject
NS_SWIFT_NAME(Trace)
@interface FIRTrace : NSObject <FIRPerformanceAttributable>

/** @brief Name of the trace. */
@property(nonatomic, copy, readonly, nonnull) NSString *name;
Expand All @@ -36,7 +36,7 @@ FIR_SWIFT_NAME(Trace)
* @param counterName The name of the counter to increment.
*/
- (void)incrementCounterNamed:(nonnull NSString *)counterName
FIR_SWIFT_NAME(incrementCounter(named:));
NS_SWIFT_NAME(incrementCounter(named:));

/**
* Increments the counter for the provided counter name with the provided value. If it is a new
Expand All @@ -47,6 +47,6 @@ FIR_SWIFT_NAME(Trace)
* @param incrementValue The value the counter would be incremented with.
*/
- (void)incrementCounterNamed:(nonnull NSString *)counterName by:(NSInteger)incrementValue
FIR_SWIFT_NAME(incrementCounter(named:by:));
NS_SWIFT_NAME(incrementCounter(named:by:));

@end
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#import "FIRHTTPMetric.h"
#import "FIRPerformance.h"
#import "FIRPerformanceSwiftNameSupport.h"
#import "FIRPerformanceAttributable.h"
#import "FIRTrace.h"
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ framework module FirebasePerformance {
link framework "CoreTelephony"
link framework "QuartzCore"
link framework "Security"
link framework "StoreKit"
link framework "SystemConfiguration"
link framework "UIKit"}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
framework module FirebaseSwizzlingUtilities {
export *
module * { export *}
link "c++"}

0 comments on commit b880051

Please sign in to comment.