2
0

Localytics update.

[UPDATED]   Localytics update.
[ADDED]     When sendInfo is enabled, set the user identifier on Localytics.
This commit is contained in:
Maarten Billemont 2013-04-27 16:24:29 -04:00
parent 3219fc764f
commit dc3c30a2f7
12 changed files with 2828 additions and 2021 deletions

21
External/Localytics/LICENSE vendored Executable file
View File

@ -0,0 +1,21 @@
Copyright (c) 2009, Char Software, Inc. d/b/a Localytics
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Neither the name of Char Software, Inc., Localytics nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY CHAR SOFTWARE, INC. D/B/A LOCALYTICS ''AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL CHAR SOFTWARE, INC. D/B/A LOCALYTICS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

18
External/Localytics/LocalyticsDatabase.h vendored Executable file → Normal file
View File

@ -1,6 +1,6 @@
//
// LocalyticsDatabase.h
// Copyright (C) 2012 Char Software Inc., DBA Localytics
// Copyright (C) 2013 Char Software Inc., DBA Localytics
//
// This code is provided under the Localytics Modified BSD License.
// A copy of this license has been distributed in a file called LICENSE
@ -18,9 +18,7 @@
sqlite3 *_databaseConnection;
}
+ (LocalyticsDatabase *)sharedLocalyticsDatabase;
- (NSUInteger)databaseSize;
- (unsigned long long)databaseSize;
- (int)eventCount;
- (NSTimeInterval)createdTimestamp;
@ -48,7 +46,7 @@
- (BOOL)vacuumIfRequired;
- (NSTimeInterval)lastSessionStartTimestamp;
- (BOOL)setLastsessionStartTimestamp:(NSTimeInterval)timestamp;
- (BOOL)setLastSessionStartTimestamp:(NSTimeInterval)timestamp;
- (BOOL)isOptedOut;
- (BOOL)setOptedOut:(BOOL)optOut;
@ -58,8 +56,14 @@
- (NSString *)customDimension:(int)dimension;
- (BOOL)setCustomDimension:(int)dimension value:(NSString *)value;
- (NSString *)customerId;
- (BOOL)setCustomerId:(NSString *)newCustomerId;
- (BOOL)setValueForIdentifier:(NSString *)identifierName value:(NSString *)value;
- (NSString *)valueForIdentifier:(NSString *)identifierName;
- (BOOL)deleteIdentifer:(NSString *)identifierName;
- (NSDictionary *)identifiers;
- (BOOL)setFacebookAttribution:(NSString *)fbAttribution;
- (NSString *)facebookAttributionFromDb;
- (NSString *)facebookAttributionFromPasteboard;
- (NSInteger)safeIntegerValueFromDictionary:(NSDictionary *)dict forKey:(NSString *)key;
- (NSString *)safeStringValueFromDictionary:(NSDictionary *)dict forKey:(NSString *)key;

1716
External/Localytics/LocalyticsDatabase.m vendored Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,104 @@
// LocalyticsSession+Private.h
// Copyright (C) 2013 Char Software Inc., DBA Localytics
//
// This code is provided under the Localytics Modified BSD License.
// A copy of this license has been distributed in a file called LICENSE
// with this source code.
//
// Please visit www.localytics.com for more information.
#import "LocalyticsSession.h"
#import "LocalyticsUploader.h"
#import "LocalyticsDatabase.h"
#define CLIENT_VERSION_PREFIX @"iOS"
#define LOCALYTICS_LOGGING_ENABLED [[LocalyticsSession shared] loggingEnabled]
#define LocalyticsLog(message, ...)if([[LocalyticsSession shared] loggingEnabled]) \
[LocalyticsSession logMessage:[NSString stringWithFormat:@"%s:\n + " message "\n\n", __PRETTY_FUNCTION__, ##__VA_ARGS__]]
@interface LocalyticsSession()
{
BOOL _hasInitialized; // Whether or not the session object has been initialized.
BOOL _isSessionOpen; // Whether or not this session has been opened.
float _sessionTimeoutInterval; // If an App stays in the background for more
// than this many seconds, start a new session
// when it returns to foreground.
@private
#pragma mark Member Variables
dispatch_queue_t _queue; // Queue of Localytics block objects.
dispatch_group_t _criticalGroup; // Group of blocks the must complete before backgrounding.
NSString *_sessionUUID; // Unique identifier for this session.
NSString *_applicationKey; // Unique identifier for the instrumented application
NSString *_facebookAttribution; // Facebook attribution cookie
NSTimeInterval _lastSessionStartTimestamp; // The start time of the most recent session.
NSDate *_sessionResumeTime; // Time session was started or resumed.
NSDate *_sessionCloseTime; // Time session was closed.
NSMutableString *_unstagedFlowEvents; // Comma-delimited list of app screens and events tagged during this
// session that have NOT been staged for upload.
NSMutableString *_stagedFlowEvents; // App screens and events tagged during this session that HAVE been staged
// for upload.
NSMutableString *_screens; // Comma-delimited list of screens tagged during this session.
NSTimeInterval _sessionActiveDuration; // Duration that session open.
BOOL _sessionHasBeenOpen; // Whether or not this session has ever been open.
BOOL _delaySession; // Whether or not the server should delay processing on this upload
LocalyticsDatabase *_db; // Localytics database reference
LocalyticsUploader *_uploader; // Localytics uploader reference
}
@property (nonatomic, retain) NSString *applicationKey;
@property (nonatomic, retain) NSString *facebookAttribution;
@property (nonatomic,readonly) dispatch_queue_t queue;
@property (nonatomic,readonly) dispatch_group_t criticalGroup;
@property (atomic) BOOL isSessionOpen;
@property (atomic) BOOL hasInitialized;
@property (nonatomic, retain) NSString *sessionUUID;
@property (nonatomic, assign) NSTimeInterval lastSessionStartTimestamp;
@property (nonatomic, retain) NSDate *sessionResumeTime;
@property (nonatomic, retain) NSDate *sessionCloseTime;
@property (nonatomic, retain) NSMutableString *unstagedFlowEvents;
@property (nonatomic, retain) NSMutableString *stagedFlowEvents;
@property (nonatomic, retain) NSMutableString *screens;
@property (nonatomic, assign) NSTimeInterval sessionActiveDuration;
@property (nonatomic, assign) BOOL sessionHasBeenOpen;
@property (nonatomic, assign) BOOL delaySession;
@property (nonatomic, assign) NSInteger sessionNumber;
// Private methods.
+ (id)allocFactory;
- (void)reopenPreviousSession;
- (void)addFlowEventWithName:(NSString *)name type:(NSString *)eventType;
- (void)addScreenWithName:(NSString *)name;
- (NSString *)blobHeaderStringWithSequenceNumber:(int)nextSequenceNumber;
- (BOOL)ll_isOptedIn;
- (BOOL)createOptEvent:(BOOL)optState;
- (BOOL)saveApplicationFlowAndRemoveOnResume:(BOOL)removeOnResume;
- (NSString *)formatAttributeWithName:(NSString *)paramName value:(NSString *)paramValue;
- (NSString *)formatAttributeWithName:(NSString *)paramName value:(NSString *)paramValue first:(BOOL)firstAttribute;
- (void)uploadCallback:(NSDictionary*)info;
+ (BOOL)appKeyIsValid:(NSString *)appKey;
- (void)ll_open;
- (LocalyticsDatabase *)db;
- (LocalyticsUploader *)uploader;
- (BOOL)uploadIsNeeded;
// Datapoint methods.
- (NSString *)customDimensions;
- (NSString *)locationDimensions;
- (NSString *)hashString:(NSString *)input;
- (NSString *)randomUUID;
- (NSString *)escapeString:(NSString *)input;
- (NSString *)installationId;
- (NSString *)appVersion;
- (NSTimeInterval)currentTimestamp;
- (BOOL)isDeviceJailbroken;
- (NSString *)deviceModel;
- (NSString *)modelSizeString;
- (double)availableMemory;
- (NSString *)advertisingIdentifier;
- (NSString *)uniqueDeviceIdentifier;
@end

230
External/Localytics/LocalyticsSession.h vendored Executable file → Normal file
View File

@ -1,5 +1,5 @@
// LocalyticsSession.h
// Copyright (C) 2012 Char Software Inc., DBA Localytics
// Copyright (C) 2013 Char Software Inc., DBA Localytics
//
// This code is provided under the Localytics Modified BSD License.
// A copy of this license has been distributed in a file called LICENSE
@ -10,8 +10,8 @@
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
// Set this to true to enable localytics traces (useful for debugging)
#define DO_LOCALYTICS_LOGGING false
#define CLIENT_VERSION @"2.17.3"
#define MARKETING_PLATFORM
/*!
@class LocalyticsSession
@ -19,7 +19,8 @@
Please see the following guides for information on how to best use this
library, sample code, and other useful information:
<ul>
<li><a href="http://wiki.localytics.com/index.php?title=Developer's_Integration_Guide">Main Developer's Integration Guide</a></li>
<li><a href="http://wiki.localytics.com/index.php?title=Developer's_Integration_Guide">
Main Developer's Integration Guide</a></li>
</ul>
<strong>Best Practices</strong>
@ -40,68 +41,56 @@
@author Localytics
*/
@interface LocalyticsSession : NSObject {
// Forward declaration
@protocol LocalyticsSessionDelegate;
BOOL _hasInitialized; // Whether or not the session object has been initialized.
BOOL _isSessionOpen; // Whether or not this session has been opened.
float _backgroundSessionTimeout; // If an App stays in the background for more
// than this many seconds, start a new session
// when it returns to foreground.
@private
#pragma mark Member Variables
dispatch_queue_t _queue; // Queue of Localytics block objects.
dispatch_group_t _criticalGroup; // Group of blocks the must complete before backgrounding.
NSString *_sessionUUID; // Unique identifier for this session.
NSString *_applicationKey; // Unique identifier for the instrumented application
NSTimeInterval _lastSessionStartTimestamp; // The start time of the most recent session.
NSDate *_sessionResumeTime; // Time session was started or resumed.
NSDate *_sessionCloseTime; // Time session was closed.
NSMutableString *_unstagedFlowEvents; // Comma-delimited list of app screens and events tagged during this
// session that have NOT been staged for upload.
NSMutableString *_stagedFlowEvents; // App screens and events tagged during this session that HAVE been staged
// for upload.
NSMutableString *_screens; // Comma-delimited list of screens tagged during this session.
NSTimeInterval _sessionActiveDuration; // Duration that session open.
BOOL _sessionHasBeenOpen; // Whether or not this session has ever been open.
}
@interface LocalyticsSession : NSObject
@property (nonatomic,readonly) dispatch_queue_t queue;
@property (nonatomic,readonly) dispatch_group_t criticalGroup;
@property BOOL isSessionOpen;
@property BOOL hasInitialized;
@property float backgroundSessionTimeout;
- (void)logMessage:(NSString *)message;
@property (nonatomic, assign, readonly) NSTimeInterval lastSessionStartTimestamp;
@property (nonatomic, assign, readonly) NSInteger sessionNumber;
+ (void)logMessage:(NSString *)message;
/*!
@property enableHTTPS
@abstract Determines whether or not HTTPS is used when calling the Localytics
@abstract (Optional) Determines whether or not HTTPS is used when calling the Localytics
post URL. The default is NO.
*/
@property (nonatomic, assign) BOOL enableHTTPS; // Defaults to NO.
@property (nonatomic, assign) BOOL enableHTTPS;
/*!
@property loggingEnabled
@abstract (Optional) Determines whether or Localytics debugging information is shown
to the console. The default is NO
*/
@property (nonatomic, assign) BOOL loggingEnabled;
/*!
@property sessionTimeoutInterval
@abstrac (Optional) If an App stays in the background for more than this many seconds,
start a new session when it returns to foreground.
*/
@property (atomic) float sessionTimeoutInterval;
/*!
@property localyticsDelegate
@abstract (Optional) Assign this delegate to the class you'd like to register to recieve
the Localytics delegate callbacks (Defined at the end of this file)
*/
@property (nonatomic, assign) id<LocalyticsSessionDelegate> localyticsDelegate;
#pragma mark Public Methods
/*!
@method sharedLocalyticsSession
@method shared
@abstract Accesses the Session object. This is a Singleton class which maintains
a single session throughout your application. It is possible to manage your own
session, but this is the easiest way to access the Localytics object throughout your code.
The class is accessed within the code using the following syntax:
[[LocalyticsSession sharedLocalyticsSession] functionHere]
[[LocalyticsSession shared] functionHere]
So, to tag an event, all that is necessary, anywhere in the code is:
[[LocalyticsSession sharedLocalyticsSession] tagEvent:@"MY_EVENT"];
[[LocalyticsSession shared] tagEvent:@"MY_EVENT"];
*/
+ (LocalyticsSession *)sharedLocalyticsSession;
+ (LocalyticsSession *)shared;
/*!
@method LocalyticsSession
@abstract Initializes the Localytics Object. Not necessary if you choose to use startSession.
@param applicationKey The key unique for each application generated at www.localytics.com
*/
- (void)LocalyticsSession:(NSString *)appKey;
/*!
@method startSession
@ -114,27 +103,6 @@
*/
- (void)startSession:(NSString *)appKey;
/*!
@method setOptIn
@abstract (OPTIONAL) Allows the application to control whether or not it will collect user data.
Even if this call is used, it is necessary to continue calling upload(). No new data will be
collected, so nothing new will be uploaded but it is necessary to upload an event telling the
server this user has opted out.
@param optedIn True if the user is opted in, false otherwise.
*/
- (void)setOptIn:(BOOL)optedIn;
/*!
@method isOptedIn
@abstract (OPTIONAL) Whether or not this user has is opted in or out. The only way they can be
opted out is if setOptIn(false) has been called before this. This function should only be
used to pre-populate a checkbox in an options menu. It is not recommended that an application
branch based on Localytics instrumentation because this creates an additional test case. If
the app is opted out, all subsequent Localytics calls will return immediately.
@result true if the user is opted in, false otherwise.
*/
- (BOOL)isOptedIn;
/*!
@method open
@abstract Opens the Localytics session. Not necessary if you choose to use startSession.
@ -155,10 +123,8 @@
is resumed. If the time since closing is greater than BACKGROUND_SESSION_TIMEOUT, (15 seconds
by default) a new session is created, and uploading is triggered. Otherwise, the previous session
is reopened.
@return Returns whether the session was resumed or a new session was started. If the user has opted
out of analytics then the return from this method is undefined.
*/
- (BOOL)resume;
*/
- (void)resume;
/*!
@method close
@ -193,12 +159,31 @@
<br>
See the tagging guide at: http://wiki.localytics.com/
@param event The name of the event which occurred.
@param attributes (Optional) An object/hash/dictionary of key-value pairs, contains
contextual data specific to the event.
@param rerportAttributes (Optional) Additional attributes used for custom reporting.
Available to Enterprise customers, please contact services for more details.
@param customerValueIncrease (Optional) Numeric value, added to customer lifetime value.
Integer expected. Try to use lowest possible unit, such as cents for US currency.
*/
- (void)tagEvent:(NSString *)event;
- (void)tagEvent:(NSString *)event attributes:(NSDictionary *)attributes;
- (void)tagEvent:(NSString *)event
attributes:(NSDictionary *)attributes;
- (void)tagEvent:(NSString *)event
attributes:(NSDictionary *)attributes
customerValueIncrease:(NSNumber *)customerValueIncrease;
- (void)tagEvent:(NSString *)event
attributes:(NSDictionary *)attributes
reportAttributes:(NSDictionary *)reportAttributes;
- (void)tagEvent:(NSString *)event
attributes:(NSDictionary *)attributes
reportAttributes:(NSDictionary *)reportAttributes
customerValueIncrease:(NSNumber *)customerValueIncrease;
- (void)tagEvent:(NSString *)event attributes:(NSDictionary *)attributes reportAttributes:(NSDictionary *)reportAttributes;
/*!
@method tagScreen
@ -218,16 +203,21 @@
- (void)upload;
/*!
@method setCustomDimension
@abstract (ENTERPRISE ONLY) Sets the value of a custom dimension. Custom dimensions are dimensions
which contain user defined data unlike the predefined dimensions such as carrier, model, and country.
Once a value for a custom dimension is set, the device it was set on will continue to upload that value
until the value is changed. To clear a value pass nil as the value.
The proper use of custom dimensions involves defining a dimension with less than ten distinct possible
values and assigning it to one of the four available custom dimensions. Once assigned this definition should
never be changed without changing the App Key otherwise old installs of the application will pollute new data.
@method LocalyticsSession
@abstract Initializes the Localytics Object. Not necessary if you choose to use startSession.
@param applicationKey The key unique for each application generated at www.localytics.com
*/
- (void)setCustomDimension:(int)dimension value:(NSString *)value;
- (void)LocalyticsSession:(NSString *)appKey;
/*!
@method setOptIn
@abstract (OPTIONAL) Allows the application to control whether or not it will collect user data.
Even if this call is used, it is necessary to continue calling upload(). No new data will be
collected, so nothing new will be uploaded but it is necessary to upload an event telling the
server this user has opted out.
@param optedIn True if the user is opted in, false otherwise.
*/
- (void)setOptIn:(BOOL)optedIn;
/*!
@method setLocation
@ -239,13 +229,75 @@
*/
- (void)setLocation:(CLLocationCoordinate2D)deviceLocation;
/*!
@method ampTrigger
@abstract Displays the AMP message for the specific event.
Is a stub implementation here to prevent crashes if this class is accidentally used inplace of
the LocalyticsAmpSession
@param event Name of the event.
@method setCustomDimension
@abstract Sets the value of a custom dimension. Custom dimensions are dimensions
which contain user defined data unlike the predefined dimensions such as carrier, model, and country.
Once a value for a custom dimension is set, the device it was set on will continue to upload that value
until the value is changed. To clear a value pass nil as the value.
The proper use of custom dimensions involves defining a dimension with less than ten distinct possible
values and assigning it to one of the four available custom dimensions. Once assigned this definition should
never be changed without changing the App Key otherwise old installs of the application will pollute new data.
*/
- (void)ampTrigger:(NSString *)event;
- (void)setCustomDimension:(int)dimension value:(NSString *)value;
/*!
@method customDimension
@abstract Gets the custom dimension value for a given dimension. Avoid calling this on the main thread, as it
may take some time for all pending database execution. */
- (NSString *)customDimension:(int)dimension;
/*!
@method setValueForIdentifier
@abstract Sets the value of a custom identifier. Identifiers are a form of key/value storage
which contain custom user data. Identifiers might include things like email addresses, customer IDs, twitter
handles, and facebook IDs.
Once a value is set, the device it was set on will continue to upload that value until the value is changed.
To delete a property, pass in nil as the value.
*/
- (void)setValueForIdentifier:(NSString *)identifierName value:(NSString *)value;
/*!
@method setCustomerName
@abstract Record the customer name
Once this value is set, the device it was set on will continue to upload that value until the value is changed.
To delete the value, pass in nil.
*/
- (void)setCustomerName:(NSString *)email;
/*!
@method setCustomerId
@abstract Record your custom customer identifier
Once this value is set, the device it was set on will continue to upload that value until the value is changed.
To delete the value, pass in nil.
*/
- (void)setCustomerId:(NSString *)customerId;
/*!
@method setCustomerId
@abstract Record the customer's email address
Once this value is set, the device it was set on will continue to upload that value until the value is changed.
To delete the value, pass in nil.
*/
- (void)setCustomerEmail:(NSString *)email;
@end
@protocol LocalyticsSessionDelegate <NSObject>
@optional
/*!
@method localyticsResumedSession
@abstract Register for this callback to be notified when Localytics has either
resumed a previous session or created a new one. See the on the 'resume' method
for additional details.
@param didResumeExistingSession This flag will indicate if Localytics restored an existing
session or started a new one.
*/
- (void)localyticsResumedSession:(BOOL)didResumeExistingSession;
@end

1764
External/Localytics/LocalyticsSession.m vendored Executable file → Normal file

File diff suppressed because it is too large Load Diff

37
External/Localytics/LocalyticsUploader.h vendored Executable file → Normal file
View File

@ -1,11 +1,11 @@
// LocalyticsUploader.h
// Copyright (C) 2012 Char Software Inc., DBA Localytics
// Copyright (C) 2013 Char Software Inc., DBA Localytics
//
// This code is provided under the Localytics Modified BSD License.
// A copy of this license has been distributed in a file called LICENSE
// with this source code.
//
// Please visit www.localytics.com for more information.
// Please visit www.localytics.com for more information.
#import <UIKit/UIKit.h>
@ -19,15 +19,7 @@ extern NSString * const kLocalyticsKeyResponseBody;
@interface LocalyticsUploader : NSObject {
}
@property (readonly) BOOL isUploading;
/*!
@method sharedLocalyticsUploader
@abstract Establishes this as a Singleton Class allowing for data persistence.
The class is accessed within the code using the following syntax:
[[LocalyticsUploader sharedLocalyticsUploader] functionHere]
*/
+ (LocalyticsUploader *)sharedLocalyticsUploader;
@property (readonly, atomic) BOOL isUploading;
/*!
@method LocalyticsUploader
@ -42,8 +34,9 @@ extern NSString * const kLocalyticsKeyResponseBody;
@param localyticsApplicationKey the Localytics application ID
@param useHTTPS Flag determining whether HTTP or HTTPS is used for the post URL.
@param installId Install id passed to the server in the x-install-id header field.
@param libraryVersion Library version to be passed to the server in the x-client-version header field.
*/
- (void)uploaderWithApplicationKey:(NSString *)localyticsApplicationKey useHTTPS:(BOOL)useHTTPS installId:(NSString *)installId;
- (void)uploaderWithApplicationKey:(NSString *)localyticsApplicationKey useHTTPS:(BOOL)useHTTPS installId:(NSString *)installId libraryVersion:(NSString *)libraryVersion;
/*!
@method LocalyticsUploader
@ -56,9 +49,27 @@ extern NSString * const kLocalyticsKeyResponseBody;
@param localyticsApplicationKey the Localytics application ID
@param useHTTPS Flag determining whether HTTP or HTTPS is used for the post URL.
@param installId Install id passed to the server in the x-install-id header field.
@param libraryVersion Library version to be passed to the server in the x-client-version header field.
@param resultTarget Result target is the target for the callback method that knows how to handle response data
@param callback Callback is the method of the target class that is to be called with the data begin returned by an upload
*/
- (void)uploaderWithApplicationKey:(NSString *)localyticsApplicationKey useHTTPS:(BOOL)useHTTPS installId:(NSString *)installId resultTarget:(id)target callback:(SEL)callbackMethod;
- (void)uploaderWithApplicationKey:(NSString *)localyticsApplicationKey useHTTPS:(BOOL)useHTTPS installId:(NSString *)installId libraryVersion:(NSString *)libraryVersion resultTarget:(id)target callback:(SEL)callbackMethod;
/*!
@method LocalyticsUploader
@abstract Upload attribution data to Localytics.
@param localyticsApplicationKey the Localytics application ID
@param attribution Attribution cookie captured at install time
@param installId Install id passed to the server in the x-install-id header field.
@param advertisingIdentifier The Apple 'advertisingidentifier'
*/
- (void)uploaderAttributionWithApplicationKey:(NSString *)appKey attribution:(NSString *)attribution installId:(NSString *)installId advertisingIdentifier:(NSString *)advertisingIdentifier;
/*!
@method uploadTimeStamp
@abstract Retrieve upload TimeStamp.
*/
- (NSString *)uploadTimeStamp;
@end

324
External/Localytics/LocalyticsUploader.m vendored Executable file → Normal file
View File

@ -1,5 +1,5 @@
// LocalyticsUploader.m
// Copyright (C) 2012 Char Software Inc., DBA Localytics
// Copyright (C) 2013 Char Software Inc., DBA Localytics
//
// This code is provided under the Localytics Modified BSD License.
// A copy of this license has been distributed in a file called LICENSE
@ -9,6 +9,7 @@
#import "LocalyticsUploader.h"
#import "LocalyticsSession.h"
#import "LocalyticsSession+Private.h"
#import "LocalyticsDatabase.h"
#import "WebserviceConstants.h"
#import <zlib.h>
@ -20,15 +21,16 @@
#ifndef LOCALYTICS_URL_SECURED
#define LOCALYTICS_URL_SECURED @"https://analytics.localytics.com/api/v2/applications/%@/uploads"
#endif
static LocalyticsUploader *_sharedUploader = nil;
#ifndef LOCALYTICS_ATTRIBUTION_SERVER
#define LOCALYTICS_ATTRIBUTION_SERVER @"http://a.localytics.com/fb_install/"
#endif
NSString * const kLocalyticsKeyResponseBody = @"localytics.key.responseBody";
@interface LocalyticsUploader ()
- (void)finishUpload;
- (NSData *)gzipDeflatedDataWithData:(NSData *)data;
- (void)logMessage:(NSString *)message;
- (NSString *)uploadTimeStamp;
@property (readwrite) BOOL isUploading;
@ -37,146 +39,231 @@ NSString * const kLocalyticsKeyResponseBody = @"localytics.key.responseBody";
@implementation LocalyticsUploader
@synthesize isUploading = _isUploading;
#pragma mark - Singleton Class
+ (LocalyticsUploader *)sharedLocalyticsUploader {
@synchronized(self) {
if (_sharedUploader == nil) {
_sharedUploader = [[self alloc] init];
}
}
return _sharedUploader;
}
#pragma mark - Class Methods
- (void)uploaderWithApplicationKey:(NSString *)localyticsApplicationKey useHTTPS:(BOOL)useHTTPS installId:(NSString *)installId
- (void)uploaderWithApplicationKey:(NSString *)localyticsApplicationKey useHTTPS:(BOOL)useHTTPS installId:(NSString *)installId libraryVersion:(NSString *)libraryVersion
{
[self uploaderWithApplicationKey:localyticsApplicationKey useHTTPS:useHTTPS installId:installId resultTarget:nil callback:NULL];
[self uploaderWithApplicationKey:localyticsApplicationKey useHTTPS:useHTTPS installId:installId libraryVersion:libraryVersion resultTarget:nil callback:NULL];
}
- (void)uploaderWithApplicationKey:(NSString *)localyticsApplicationKey useHTTPS:(BOOL)useHTTPS installId:(NSString *)installId resultTarget:(id)target callback:(SEL)callbackMethod;
- (void)uploaderWithApplicationKey:(NSString *)localyticsApplicationKey useHTTPS:(BOOL)useHTTPS installId:(NSString *)installId libraryVersion:(NSString *)libraryVersion resultTarget:(id)target callback:(SEL)callbackMethod
{
// Do nothing if already uploading.
if (self.isUploading == true)
{
[self logMessage:@"Upload already in progress. Aborting."];
LocalyticsLog("Upload already in progress. Aborting.");
return;
}
[self logMessage:@"Beginning upload process"];
LocalyticsLog("Beginning upload process");
self.isUploading = true;
// Prepare the data for upload. The upload could take a long time, so some effort has to be made to be sure that events
// which get written while the upload is taking place don't get lost or duplicated. To achieve this, the logic is:
// 1) Append every header row blob string and and those of its associated events to the upload string.
// 2) Deflate and upload the data.
// 3) On success, delete all blob headers and staged events. Events added while an upload is in process are not
// deleted because they are not associated a header (and cannot be until the upload completes).
// 1) Append every header row blob string and and those of its associated events to the upload string.
// 2) Deflate and upload the data.
// 3) On success, delete all blob headers and staged events. Events added while an upload is in process are not
// deleted because they are not associated a header (and cannot be until the upload completes).
// Step 1
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// Step 1
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
LocalyticsDatabase *db = [LocalyticsDatabase sharedLocalyticsDatabase];
NSString *blobString = [db uploadBlobString];
LocalyticsDatabase *db = [[LocalyticsSession shared] db];
NSString *blobString = [db uploadBlobString];
if ([blobString length] == 0) {
// There is nothing outstanding to upload.
[self logMessage:@"Abandoning upload. There are no new events."];
[pool drain];
[self finishUpload];
if ([blobString length] == 0) {
// There is nothing outstanding to upload.
LocalyticsLog("Abandoning upload. There are no new events.");
[pool drain];
[self finishUpload];
return;
}
return;
}
NSData *requestData = [blobString dataUsingEncoding:NSUTF8StringEncoding];
NSString *myString = [[[NSString alloc] initWithData:requestData encoding:NSUTF8StringEncoding] autorelease];
[self logMessage:[NSString stringWithFormat:@"Uploading data (length: %u)", [myString length]]];
[self logMessage:myString];
if(LOCALYTICS_LOGGING_ENABLED) {
NSString *logString = [[[NSString alloc] initWithData:requestData
encoding:NSUTF8StringEncoding] autorelease];
NSUInteger stringLength = [logString length];
// Step 2
NSData *deflatedRequestData = [[self gzipDeflatedDataWithData:requestData] retain];
logString = [logString stringByReplacingOccurrencesOfString:@"{"
withString:@"\n\t{"];
logString = [logString stringByReplacingOccurrencesOfString:@",\""
withString:@",\n\t\""];
[pool drain];
LocalyticsLog("Uploading data (length: %u)\n%@",
stringLength,
logString);
}
NSString *urlStringFormat;
if (useHTTPS) {
urlStringFormat = LOCALYTICS_URL_SECURED;
} else {
urlStringFormat = LOCALYTICS_URL;
}
NSString *apiUrlString = [NSString stringWithFormat:urlStringFormat, [localyticsApplicationKey stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSMutableURLRequest *submitRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:apiUrlString]
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:60.0];
// Step 2
NSData *deflatedRequestData = [[self gzipDeflatedDataWithData:requestData] retain];
[pool drain];
NSString *urlStringFormat;
if (useHTTPS) {
urlStringFormat = LOCALYTICS_URL_SECURED;
} else {
urlStringFormat = LOCALYTICS_URL;
}
NSURL *apiUrl = [NSURL URLWithString:[NSString stringWithFormat:urlStringFormat,[localyticsApplicationKey stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
NSMutableURLRequest *submitRequest = [self createRequestWithURL:apiUrl
installId:installId
libraryVersion:libraryVersion
requestData:deflatedRequestData];
[deflatedRequestData release];
// Perform synchronous upload in an async dispatch. This is necessary because the calling block will not persist to
// receive the response data.
dispatch_group_async([[LocalyticsSession shared] criticalGroup], [[LocalyticsSession shared] queue], ^{
@try {
NSURLResponse *response = nil;
NSError *responseError = nil;
NSData *responseData = [NSURLConnection sendSynchronousRequest:submitRequest returningResponse:&response error:&responseError];
NSInteger responseStatusCode = [(NSHTTPURLResponse *)response statusCode];
if (responseError) {
// On error, simply print the error and close the uploader. We have to assume the data was not transmited
// so it is not deleted. In the event that we accidently store data which was succesfully uploaded, the
// duplicate data will be ignored by the server when it is next uploaded.
LocalyticsLog("Error Uploading. Code: %d, Description: %@",
[responseError code],
[responseError localizedDescription]);
} else {
// Step 3
// While response status codes in the 5xx range leave upload rows intact, the default case is to delete.
if (responseStatusCode >= 500 && responseStatusCode < 600) {
LocalyticsLog("Upload failed with response status code %d", responseStatusCode);
} else {
// Because only one instance of the uploader can be running at a time it should not be possible for
// new upload rows to appear so there is no fear of deleting data which has not yet been uploaded.
LocalyticsLog("Upload completed successfully. Response code %d", responseStatusCode);
[[[LocalyticsSession shared] db] deleteUploadedData];
}
}
if ([responseData length] > 0) {
if (LOCALYTICS_LOGGING_ENABLED) {
NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
LocalyticsLog("Response body: %@", responseString);
[responseString release];
}
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:responseData forKey:kLocalyticsKeyResponseBody];
if (target) {
[target performSelector:callbackMethod withObject:userInfo];
}
}
[self finishUpload];
}
@catch (NSException * e) {}
});
}
- (NSMutableURLRequest *)createRequestWithURL:(NSURL *)URL installId:(NSString *)installId libraryVersion:(NSString *)libraryVersion requestData:(NSData *)requestData
{
NSMutableURLRequest *submitRequest = [NSMutableURLRequest requestWithURL:URL
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:60.0];
[submitRequest setHTTPMethod:@"POST"];
[submitRequest setValue:[self uploadTimeStamp] forHTTPHeaderField:HEADER_CLIENT_TIME];
[submitRequest setValue:installId forHTTPHeaderField:HEADER_INSTALL_ID];
[submitRequest setValue:[self uploadTimeStamp] forHTTPHeaderField:HEADER_CLIENT_TIME];
[submitRequest setValue:installId forHTTPHeaderField:HEADER_INSTALL_ID];
[submitRequest setValue:libraryVersion forHTTPHeaderField:HEADER_CLIENT_VERSION];
[submitRequest setValue:@"application/x-gzip" forHTTPHeaderField:@"Content-Type"];
[submitRequest setValue:@"gzip" forHTTPHeaderField:@"Content-Encoding"];
[submitRequest setValue:[NSString stringWithFormat:@"%d", [deflatedRequestData length]] forHTTPHeaderField:@"Content-Length"];
[submitRequest setHTTPBody:deflatedRequestData];
[deflatedRequestData release];
[submitRequest setValue:@"gzip" forHTTPHeaderField:@"Content-Encoding"];
[submitRequest setValue:[NSString stringWithFormat:@"%d", requestData.length] forHTTPHeaderField:@"Content-Length"];
// Perform synchronous upload in an async dispatch. This is necessary because the calling block will not persist to
// receive the response data.
dispatch_group_async([[LocalyticsSession sharedLocalyticsSession] criticalGroup], [[LocalyticsSession sharedLocalyticsSession] queue], ^{
@try {
NSURLResponse *response = nil;
NSError *responseError = nil;
NSData *responseData = [NSURLConnection sendSynchronousRequest:submitRequest returningResponse:&response error:&responseError];
NSInteger responseStatusCode = [(NSHTTPURLResponse *)response statusCode];
if ([LocalyticsSession shared].delaySession == YES)
{
[submitRequest setValue:@"true" forHTTPHeaderField:HEADER_DELAY_SESSION];
}
if (responseError) {
// On error, simply print the error and close the uploader. We have to assume the data was not transmited
// so it is not deleted. In the event that we accidently store data which was succesfully uploaded, the
// duplicate data will be ignored by the server when it is next uploaded.
[self logMessage:[NSString stringWithFormat:
@"Error Uploading. Code: %d, Description: %@",
[responseError code],
[responseError localizedDescription]]];
} else {
// Step 3
// While response status codes in the 5xx range leave upload rows intact, the default case is to delete.
if (responseStatusCode >= 500 && responseStatusCode < 600) {
[self logMessage:[NSString stringWithFormat:@"Upload failed with response status code %d", responseStatusCode]];
} else {
// Because only one instance of the uploader can be running at a time it should not be possible for
// new upload rows to appear so there is no fear of deleting data which has not yet been uploaded.
[self logMessage:[NSString stringWithFormat:@"Upload completed successfully. Response code %d", responseStatusCode]];
[[LocalyticsDatabase sharedLocalyticsDatabase] deleteUploadedData];
}
}
[submitRequest setHTTPBody:requestData];
if ([responseData length] > 0) {
if (DO_LOCALYTICS_LOGGING) {
NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
[self logMessage:[NSString stringWithFormat:@"Response body: %@", responseString]];
[responseString release];
}
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:responseData forKey:kLocalyticsKeyResponseBody];
if (target) {
[target performSelector:callbackMethod withObject:userInfo];
}
}
}
@catch (NSException * e) {}
[self finishUpload];
});
return submitRequest;
}
- (void)finishUpload
{
self.isUploading = false;
self.isUploading = false;
// Upload data has been deleted. Recover the disk space if necessary.
[[LocalyticsDatabase sharedLocalyticsDatabase] vacuumIfRequired];
// Upload data has been deleted. Recover the disk space if necessary.
[[[LocalyticsSession shared] db] vacuumIfRequired];
}
- (void)uploaderAttributionWithApplicationKey:(NSString *)appKey attribution:(NSString *)attribution installId:(NSString *)installId advertisingIdentifier:(NSString *)advertisingIdentifier
{
// Required parameters
if(!attribution)
return;
NSString *apiUrlString = [LOCALYTICS_ATTRIBUTION_SERVER stringByAppendingString:appKey];
NSMutableURLRequest *submitRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:apiUrlString]
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:60.0];
NSMutableString *postBody = [NSMutableString string];
[postBody appendFormat:@"%@=%@", FB_ATTRIBUTION, attribution];
[postBody appendFormat:@"&%@=%ld", FB_ATTRIBUTION_TIME, (long)[[[LocalyticsSession shared] db] createdTimestamp]];
if(advertisingIdentifier)
{
[postBody appendFormat:@"&%@=%@", FB_DEVICE_ID_TYPE, @"adid"];
[postBody appendFormat:@"&%@=%@", FB_DEVICE_ID, advertisingIdentifier];
}
if(installId)
{
[postBody appendFormat:@"&%@=%@", FB_INSTALL_ID, installId];
}
[submitRequest setHTTPMethod:@"POST"];
[submitRequest setHTTPBody:[postBody dataUsingEncoding:NSUTF8StringEncoding]];
// Perform synchronous upload in an async dispatch. This is necessary because the calling block will not persist to
// receive the response data.
dispatch_group_async([[LocalyticsSession shared] criticalGroup], [[LocalyticsSession shared] queue], ^{
@try {
NSURLResponse *response = nil;
NSError *responseError = nil;
[NSURLConnection sendSynchronousRequest:submitRequest
returningResponse:&response
error:&responseError];
NSInteger responseStatusCode = [(NSHTTPURLResponse *)response statusCode];
if (responseError) {
// On error, simply print the error and close the uploader. We have to assume the data was not transmited
// so it is not deleted.
LocalyticsLog("Error uploading Facebook attribution. Code: %d, Description: %@",
[responseError code],
[responseError localizedDescription]);
}
else
{
// While response status codes in the 5xx range leave upload rows intact, the default case is to delete.
if (responseStatusCode >= 500 && responseStatusCode < 600) {
LocalyticsLog("Facebook attribution upload unsuccessful. Response code %d", responseStatusCode);
}
else
{
LocalyticsLog("Facebook attribution upload completed successfully. Response code %d", responseStatusCode);
[[[LocalyticsSession shared] db] setFacebookAttribution:nil];
[LocalyticsSession shared].facebookAttribution = nil;
}
}
}
@catch (NSException * e) {}
});
}
/*!
@method gzipDeflatedDataWithData
@abstract Deflates the provided data using gzip at the default compression level (6). Complete NSData gzip category available on CocoaDev. http://www.cocoadev.com/index.pl?NSDataCategory.
@abstract Deflates the provided data using gzip at the default compression level (6).
@return the deflated data
*/
- (NSData *)gzipDeflatedDataWithData:(NSData *)data
@ -220,39 +307,19 @@ NSString * const kLocalyticsKeyResponseBody = @"localytics.key.responseBody";
return [NSData dataWithData:compressed];
}
/*!
@method logMessage
@abstract Logs a message with (localytics uploader) prepended to it
@param message The message to log
*/
- (void) logMessage:(NSString *)message {
if(DO_LOCALYTICS_LOGGING) {
NSLog(@"(localytics uploader) %s\n", [message UTF8String]);
}
}
/*!
@method uploadTimeStamp
@abstract Gets the current time, along with local timezone, formatted as a DateTime for the webservice.
@return a DateTime of the current local time and timezone.
*/
- (NSString *)uploadTimeStamp {
return [ NSString stringWithFormat:@"%ld", (long)[[NSDate date] timeIntervalSince1970] ];
return [ NSString stringWithFormat:@"%ld", (long)[[NSDate date] timeIntervalSince1970] ];
}
#pragma mark - System Functions
+ (id)allocWithZone:(NSZone *)zone {
@synchronized(self) {
if (_sharedUploader == nil) {
_sharedUploader = [super allocWithZone:zone];
return _sharedUploader;
}
}
// returns nil on subsequent allocations
return nil;
}
- (id)copyWithZone:(NSZone *)zone {
#pragma unused(zone)
return self;
}
@ -273,9 +340,4 @@ NSString * const kLocalyticsKeyResponseBody = @"localytics.key.responseBody";
return self;
}
- (void)dealloc {
[_sharedUploader release];
[super dealloc];
}
@end

27
External/Localytics/WebserviceConstants.h vendored Executable file → Normal file
View File

@ -1,5 +1,5 @@
// WebserviceConstants.h
// Copyright (C) 2012 Char Software Inc., DBA Localytics
// Copyright (C) 2013 Char Software Inc., DBA Localytics
//
// This code is provided under the Localytics Modified BSD License.
// A copy of this license has been distributed in a file called LICENSE
@ -14,8 +14,10 @@
/*****************
* Upload Header *
*****************/
#define HEADER_CLIENT_TIME @"x-upload-time"
#define HEADER_INSTALL_ID @"x-install-id"
#define HEADER_CLIENT_TIME @"x-upload-time"
#define HEADER_INSTALL_ID @"x-install-id"
#define HEADER_CLIENT_VERSION @"x-client-version"
#define HEADER_DELAY_SESSION @"ll-first-session"
/*********************
* Shared Attributes *
@ -62,8 +64,11 @@
#define PARAM_DEVICE_MODEL @"dmo" // Device Model
#define PARAM_DEVICE_OS_VERSION @"dov" // Device OS Version
#define PARAM_NETWORK_CARRIER @"nca" // Network Carrier
#define PARAM_OPT_VALUE @"out" // Opt Out (boolean)
#define PARAM_OPT_VALUE @"out" // Opt Out (boolean)
#define PARAM_DEVICE_MEMORY @"dmem" // Device Memory
#define PARAM_IDENTIFIERS @"ids" // Identifiers (dictionary)
#define PARAM_BIRTH_TIME @"b" // Birth time (Since epoch)
#define PARAM_TIMEZONE_OFFSET @"tz" // Device offset from GMT in seconds
/*****************
* Session Start *
@ -101,6 +106,7 @@
// PARAM_ATTRIBUTES => dictionary containing attributes for this event as key-value string pairs
#define PARAM_EVENT_NAME @"n" // Event Name, (eg. 'Button Click')
#define PARAM_REPORT_ATTRIBUTES @"rattrs" // Attributes used in custom reports
#define PARAM_VALUE_NAME @"v" // Added customer value for an event, such as revenue
/********************
* Application flow *
@ -112,3 +118,16 @@
#define PARAM_SESSION_START @"ss" // Start time for the current session.
#define PARAM_NEW_FLOW_EVENTS @"nw" // Events and screens encountered during this session that have NOT been staged for upload.
#define PARAM_OLD_FLOW_EVENTS @"od" // Events and screens encountered during this session that HAVE been staged for upload.
/************************
* Partner attributions *
***********************/
#define FB_ATTRIBUTION @"fb_attrib_first" // Facebook attribution cookie
#define FB_ATTRIBUTION_TIME @"fb_attrib_first_date" // Time original attribution cookie was collected
#define FB_ATTRIBUTION_CURRENT @"fb_attrib_current" // Facebook attribution cookie
#define FB_ATTRIBUTION_CURRENT_TIME @"fb_attrib_current_date" // Time original attribution cookie was collected
#define FB_DEVICE_ID @"dpid" // Device unique identifiers
#define FB_DEVICE_ID_TYPE @"dpid_type" // Either UDID or ADID (advertisingIdentifier)
#define FB_INSTALL_ID @"install_id" // Device install ID

View File

@ -142,6 +142,9 @@ static NSDictionary *keyQuery(MPUserEntity *user) {
#ifdef CRASHLYTICS
[Crashlytics setObjectValue:user.userID forKey:@"username"];
[Crashlytics setUserName:user.userID];
#endif
#if TARGET_OS_IPHONE
[[LocalyticsSession sharedLocalyticsSession] setCustomerName:user.userID];
#endif
}
}

View File

@ -11,6 +11,7 @@
#import "MPAppDelegate_Store.h"
#import "IASKSettingsReader.h"
#import "LocalyticsAmpSession.h"
@interface MPiOSAppDelegate()
@ -116,6 +117,8 @@
[[LocalyticsSession sharedLocalyticsSession] LocalyticsSession:localyticsKey];
[[LocalyticsSession sharedLocalyticsSession] open];
[LocalyticsSession sharedLocalyticsSession].enableHTTPS = YES;
[[LocalyticsSession sharedLocalyticsSession] setCustomerId:[PearlKeyChain deviceIdentifier]];
[[LocalyticsSession sharedLocalyticsSession] setCustomerName:@"Anonymous"];
[[LocalyticsSession sharedLocalyticsSession] upload];
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
if (message.level >= PearlLogLevelWarn)
@ -279,6 +282,10 @@
if ([self.googlePlus handleURL:url sourceApplication:sourceApplication annotation:annotation])
return YES;
// Localytics
if ([[LocalyticsAmpSession shared] handleURL:url])
return YES;
// Arbitrary URL to mpsites data.
dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{
NSError *error;

View File

@ -811,13 +811,6 @@
DACA22BD1705DE7D002C6C22 /* NSError+UbiquityStoreManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DACA22B91705DE7D002C6C22 /* NSError+UbiquityStoreManager.m */; };
DACA22BE1705DE7D002C6C22 /* UbiquityStoreManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DACA22BA1705DE7D002C6C22 /* UbiquityStoreManager.h */; };
DACA22C61705DE9D002C6C22 /* libTestFlight.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DACA22C31705DE9D002C6C22 /* libTestFlight.a */; };
DACA22CF1705DEB0002C6C22 /* LocalyticsDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = DACA22C81705DEB0002C6C22 /* LocalyticsDatabase.m */; };
DACA22D01705DEB0002C6C22 /* LocalyticsSession.h in Headers */ = {isa = PBXBuildFile; fileRef = DACA22C91705DEB0002C6C22 /* LocalyticsSession.h */; };
DACA22D11705DEB0002C6C22 /* WebserviceConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = DACA22CA1705DEB0002C6C22 /* WebserviceConstants.h */; };
DACA22D21705DEB0002C6C22 /* LocalyticsUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = DACA22CB1705DEB0002C6C22 /* LocalyticsUploader.m */; };
DACA22D31705DEB0002C6C22 /* LocalyticsUploader.h in Headers */ = {isa = PBXBuildFile; fileRef = DACA22CC1705DEB0002C6C22 /* LocalyticsUploader.h */; };
DACA22D41705DEB0002C6C22 /* LocalyticsDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = DACA22CD1705DEB0002C6C22 /* LocalyticsDatabase.h */; };
DACA22D51705DEB0002C6C22 /* LocalyticsSession.m in Sources */ = {isa = PBXBuildFile; fileRef = DACA22CE1705DEB0002C6C22 /* LocalyticsSession.m */; };
DACA296C1705DF81002C6C22 /* TestFlight.plist in Resources */ = {isa = PBXBuildFile; fileRef = DACA26941705DF81002C6C22 /* TestFlight.plist */; };
DACA296D1705DF81002C6C22 /* Localytics.plist in Resources */ = {isa = PBXBuildFile; fileRef = DACA26961705DF81002C6C22 /* Localytics.plist */; };
DACA296E1705DF81002C6C22 /* Google+.plist in Resources */ = {isa = PBXBuildFile; fileRef = DACA26981705DF81002C6C22 /* Google+.plist */; };
@ -850,6 +843,17 @@
DAFC568F172C57EC00CB5CC5 /* IASKSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFC5680172C57EC00CB5CC5 /* IASKSwitch.m */; };
DAFC5690172C57EC00CB5CC5 /* IASKTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFC5682172C57EC00CB5CC5 /* IASKTextField.m */; };
DAFC5691172C582A00CB5CC5 /* libInAppSettingsKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAFC5655172C573B00CB5CC5 /* libInAppSettingsKit.a */; };
DAFC56A2172C6E8500CB5CC5 /* LocalyticsDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = DAFC569A172C6E8500CB5CC5 /* LocalyticsDatabase.h */; };
DAFC56A3172C6E8500CB5CC5 /* LocalyticsDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFC569B172C6E8500CB5CC5 /* LocalyticsDatabase.m */; };
DAFC56A4172C6E8500CB5CC5 /* LocalyticsDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFC569B172C6E8500CB5CC5 /* LocalyticsDatabase.m */; };
DAFC56A5172C6E8500CB5CC5 /* LocalyticsSession.h in Headers */ = {isa = PBXBuildFile; fileRef = DAFC569C172C6E8500CB5CC5 /* LocalyticsSession.h */; };
DAFC56A6172C6E8500CB5CC5 /* LocalyticsSession.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFC569D172C6E8500CB5CC5 /* LocalyticsSession.m */; };
DAFC56A7172C6E8500CB5CC5 /* LocalyticsSession.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFC569D172C6E8500CB5CC5 /* LocalyticsSession.m */; };
DAFC56A8172C6E8500CB5CC5 /* LocalyticsSession+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DAFC569E172C6E8500CB5CC5 /* LocalyticsSession+Private.h */; };
DAFC56A9172C6E8500CB5CC5 /* LocalyticsUploader.h in Headers */ = {isa = PBXBuildFile; fileRef = DAFC569F172C6E8500CB5CC5 /* LocalyticsUploader.h */; };
DAFC56AA172C6E8500CB5CC5 /* LocalyticsUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFC56A0172C6E8500CB5CC5 /* LocalyticsUploader.m */; };
DAFC56AB172C6E8500CB5CC5 /* LocalyticsUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFC56A0172C6E8500CB5CC5 /* LocalyticsUploader.m */; };
DAFC56AC172C6E8500CB5CC5 /* WebserviceConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = DAFC56A1172C6E8500CB5CC5 /* WebserviceConstants.h */; };
DAFE4A1315039824003ABA7C /* NSObject+PearlExport.h in Headers */ = {isa = PBXBuildFile; fileRef = DAFE45D815039823003ABA7C /* NSObject+PearlExport.h */; };
DAFE4A1415039824003ABA7C /* NSObject+PearlExport.m in Sources */ = {isa = PBXBuildFile; fileRef = DAFE45D915039823003ABA7C /* NSObject+PearlExport.m */; };
DAFE4A1515039824003ABA7C /* NSString+PearlNSArrayFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = DAFE45DA15039823003ABA7C /* NSString+PearlNSArrayFormat.h */; };
@ -1838,13 +1842,6 @@
DACA22BA1705DE7D002C6C22 /* UbiquityStoreManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UbiquityStoreManager.h; sourceTree = "<group>"; };
DACA22C11705DE9D002C6C22 /* TestFlight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestFlight.h; sourceTree = "<group>"; };
DACA22C31705DE9D002C6C22 /* libTestFlight.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libTestFlight.a; sourceTree = "<group>"; };
DACA22C81705DEB0002C6C22 /* LocalyticsDatabase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalyticsDatabase.m; sourceTree = "<group>"; };
DACA22C91705DEB0002C6C22 /* LocalyticsSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalyticsSession.h; sourceTree = "<group>"; };
DACA22CA1705DEB0002C6C22 /* WebserviceConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebserviceConstants.h; sourceTree = "<group>"; };
DACA22CB1705DEB0002C6C22 /* LocalyticsUploader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalyticsUploader.m; sourceTree = "<group>"; };
DACA22CC1705DEB0002C6C22 /* LocalyticsUploader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalyticsUploader.h; sourceTree = "<group>"; };
DACA22CD1705DEB0002C6C22 /* LocalyticsDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalyticsDatabase.h; sourceTree = "<group>"; };
DACA22CE1705DEB0002C6C22 /* LocalyticsSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalyticsSession.m; sourceTree = "<group>"; };
DACA26941705DF81002C6C22 /* TestFlight.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = TestFlight.plist; sourceTree = "<group>"; };
DACA26961705DF81002C6C22 /* Localytics.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Localytics.plist; sourceTree = "<group>"; };
DACA26981705DF81002C6C22 /* Google+.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Google+.plist"; sourceTree = "<group>"; };
@ -1893,6 +1890,14 @@
DAFC5680172C57EC00CB5CC5 /* IASKSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSwitch.m; sourceTree = "<group>"; };
DAFC5681172C57EC00CB5CC5 /* IASKTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKTextField.h; sourceTree = "<group>"; };
DAFC5682172C57EC00CB5CC5 /* IASKTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKTextField.m; sourceTree = "<group>"; };
DAFC569A172C6E8500CB5CC5 /* LocalyticsDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalyticsDatabase.h; sourceTree = "<group>"; };
DAFC569B172C6E8500CB5CC5 /* LocalyticsDatabase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalyticsDatabase.m; sourceTree = "<group>"; };
DAFC569C172C6E8500CB5CC5 /* LocalyticsSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalyticsSession.h; sourceTree = "<group>"; };
DAFC569D172C6E8500CB5CC5 /* LocalyticsSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalyticsSession.m; sourceTree = "<group>"; };
DAFC569E172C6E8500CB5CC5 /* LocalyticsSession+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "LocalyticsSession+Private.h"; sourceTree = "<group>"; };
DAFC569F172C6E8500CB5CC5 /* LocalyticsUploader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalyticsUploader.h; sourceTree = "<group>"; };
DAFC56A0172C6E8500CB5CC5 /* LocalyticsUploader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalyticsUploader.m; sourceTree = "<group>"; };
DAFC56A1172C6E8500CB5CC5 /* WebserviceConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebserviceConstants.h; sourceTree = "<group>"; };
DAFE45D815039823003ABA7C /* NSObject+PearlExport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+PearlExport.h"; sourceTree = "<group>"; };
DAFE45D915039823003ABA7C /* NSObject+PearlExport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+PearlExport.m"; sourceTree = "<group>"; };
DAFE45DA15039823003ABA7C /* NSString+PearlNSArrayFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+PearlNSArrayFormat.h"; sourceTree = "<group>"; };
@ -3176,13 +3181,14 @@
DACA22C71705DEB0002C6C22 /* Localytics */ = {
isa = PBXGroup;
children = (
DACA22C81705DEB0002C6C22 /* LocalyticsDatabase.m */,
DACA22C91705DEB0002C6C22 /* LocalyticsSession.h */,
DACA22CA1705DEB0002C6C22 /* WebserviceConstants.h */,
DACA22CB1705DEB0002C6C22 /* LocalyticsUploader.m */,
DACA22CC1705DEB0002C6C22 /* LocalyticsUploader.h */,
DACA22CD1705DEB0002C6C22 /* LocalyticsDatabase.h */,
DACA22CE1705DEB0002C6C22 /* LocalyticsSession.m */,
DAFC569A172C6E8500CB5CC5 /* LocalyticsDatabase.h */,
DAFC569B172C6E8500CB5CC5 /* LocalyticsDatabase.m */,
DAFC569C172C6E8500CB5CC5 /* LocalyticsSession.h */,
DAFC569D172C6E8500CB5CC5 /* LocalyticsSession.m */,
DAFC569E172C6E8500CB5CC5 /* LocalyticsSession+Private.h */,
DAFC569F172C6E8500CB5CC5 /* LocalyticsUploader.h */,
DAFC56A0172C6E8500CB5CC5 /* LocalyticsUploader.m */,
DAFC56A1172C6E8500CB5CC5 /* WebserviceConstants.h */,
);
path = Localytics;
sourceTree = "<group>";
@ -3590,10 +3596,11 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
DACA22D01705DEB0002C6C22 /* LocalyticsSession.h in Headers */,
DACA22D11705DEB0002C6C22 /* WebserviceConstants.h in Headers */,
DACA22D31705DEB0002C6C22 /* LocalyticsUploader.h in Headers */,
DACA22D41705DEB0002C6C22 /* LocalyticsDatabase.h in Headers */,
DAFC56A2172C6E8500CB5CC5 /* LocalyticsDatabase.h in Headers */,
DAFC56A5172C6E8500CB5CC5 /* LocalyticsSession.h in Headers */,
DAFC56A8172C6E8500CB5CC5 /* LocalyticsSession+Private.h in Headers */,
DAFC56A9172C6E8500CB5CC5 /* LocalyticsUploader.h in Headers */,
DAFC56AC172C6E8500CB5CC5 /* WebserviceConstants.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -4733,9 +4740,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DACA22CF1705DEB0002C6C22 /* LocalyticsDatabase.m in Sources */,
DACA22D21705DEB0002C6C22 /* LocalyticsUploader.m in Sources */,
DACA22D51705DEB0002C6C22 /* LocalyticsSession.m in Sources */,
DAFC56A3172C6E8500CB5CC5 /* LocalyticsDatabase.m in Sources */,
DAFC56A6172C6E8500CB5CC5 /* LocalyticsSession.m in Sources */,
DAFC56AA172C6E8500CB5CC5 /* LocalyticsUploader.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -4757,6 +4764,9 @@
DAFC568E172C57EC00CB5CC5 /* IASKSlider.m in Sources */,
DAFC568F172C57EC00CB5CC5 /* IASKSwitch.m in Sources */,
DAFC5690172C57EC00CB5CC5 /* IASKTextField.m in Sources */,
DAFC56A4172C6E8500CB5CC5 /* LocalyticsDatabase.m in Sources */,
DAFC56A7172C6E8500CB5CC5 /* LocalyticsSession.m in Sources */,
DAFC56AB172C6E8500CB5CC5 /* LocalyticsUploader.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -5321,6 +5331,10 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../External/Localytics\"",
);
};
name = "Debug-iOS";
};
@ -5328,6 +5342,10 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../External/Localytics\"",
);
};
name = "AdHoc-iOS";
};
@ -5335,6 +5353,10 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../External/Localytics\"",
);
};
name = "AppStore-iOS";
};
@ -5342,6 +5364,10 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../External/Localytics\"",
);
};
name = "Debug-iOS";
};
@ -5349,6 +5375,10 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../External/Localytics\"",
);
};
name = "AdHoc-iOS";
};
@ -5356,6 +5386,10 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../External/Localytics\"",
);
};
name = "AppStore-iOS";
};