Skip to content
This repository was archived by the owner on Nov 10, 2019. It is now read-only.

Commit 4c5e1af

Browse files
author
Da Costa Faro Rémy
authored
Merge pull request #7 from RemyDCF/v13
Version 13
2 parents 25acfa2 + f7fd14e commit 4c5e1af

File tree

4,422 files changed

+16326
-2139154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,422 files changed

+16326
-2139154
lines changed

.gitignore

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
# OS X
2-
.DS_Store
3-
4-
# Xcode
5-
build/
6-
*.pbxuser
7-
!default.pbxuser
8-
*.mode1v3
9-
!default.mode1v3
10-
*.mode2v3
11-
!default.mode2v3
12-
*.perspectivev3
13-
!default.perspectivev3
14-
xcuserdata/
15-
*.xccheckout
16-
profile
17-
*.moved-aside
18-
DerivedData
19-
*.hmap
20-
*.ipa
21-
22-
# Bundler
23-
.bundle
24-
25-
Carthage
26-
.gitkeep
1+
# OS X
2+
.DS_Store
3+
4+
# Xcode
5+
build/
6+
*.pbxuser
7+
!default.pbxuser
8+
*.mode1v3
9+
!default.mode1v3
10+
*.mode2v3
11+
!default.mode2v3
12+
*.perspectivev3
13+
!default.perspectivev3
14+
xcuserdata/
15+
*.xccheckout
16+
profile
17+
*.moved-aside
18+
DerivedData
19+
*.hmap
20+
*.ipa
21+
22+
# Bundler
23+
.bundle
24+
25+
Carthage
26+
.gitkeep
27+
28+
tpg offline/Project Requirements/API.swift

.swiftlint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
excluded: # paths to ignore during linting. Takes precedence over `included`.
2+
- Carthage
3+
- tpg offline/UI
4+
- genstrings.swift
5+
- tpg offline UITests
6+
disabled_rules:
7+
- redundant_string_enum_value
8+
- nesting
9+
cyclomatic_complexity: 12
10+
file_length: 550
11+
function_body_length: 80
12+
function_parameter_count: 8
13+
line_length: 150
14+
type_body_length: 300
15+
identifier_name:
16+
min_length:
17+
error: 1
18+
warning: 1
19+
excluded:
20+
- N
21+
22+
custom_rules:
23+
smiley_face:
24+
name: "Smiley Face"
25+
regex: '( :\))'
26+
match_kinds:
27+
- comment
28+
- string
29+
message: "A closing parenthesis smiley :) creates a half-hearted smile, and thus is not preferred. Use :]"
30+
severity: warning

Cartfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github "Alamofire/Alamofire" "master"

Cartfile.resolved

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github "Alamofire/Alamofire" "5da547fdd8a7352709a0c849f9feac8fc84c944c"

Crashlytics.framework/Crashlytics

12.3 MB
Binary file not shown.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//
2+
// ANSCompatibility.h
3+
// AnswersKit
4+
//
5+
// Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
6+
//
7+
8+
#pragma once
9+
10+
#if !__has_feature(nullability)
11+
#define nonnull
12+
#define nullable
13+
#define _Nullable
14+
#define _Nonnull
15+
#endif
16+
17+
#ifndef NS_ASSUME_NONNULL_BEGIN
18+
#define NS_ASSUME_NONNULL_BEGIN
19+
#endif
20+
21+
#ifndef NS_ASSUME_NONNULL_END
22+
#define NS_ASSUME_NONNULL_END
23+
#endif
24+
25+
#if __has_feature(objc_generics)
26+
#define ANS_GENERIC_NSARRAY(type) NSArray<type>
27+
#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary<key_type, object_key>
28+
#else
29+
#define ANS_GENERIC_NSARRAY(type) NSArray
30+
#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary
31+
#endif
Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
//
2+
// Answers.h
3+
// Crashlytics
4+
//
5+
// Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
#import "ANSCompatibility.h"
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
/**
14+
* This class exposes the Answers Events API, allowing you to track key
15+
* user user actions and metrics in your app.
16+
*/
17+
@interface Answers : NSObject
18+
19+
/**
20+
* Log a Sign Up event to see users signing up for your app in real-time, understand how
21+
* many users are signing up with different methods and their success rate signing up.
22+
*
23+
* @param signUpMethodOrNil The method by which a user logged in, e.g. Twitter or Digits.
24+
* @param signUpSucceededOrNil The ultimate success or failure of the login
25+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
26+
*/
27+
+ (void)logSignUpWithMethod:(nullable NSString *)signUpMethodOrNil
28+
success:(nullable NSNumber *)signUpSucceededOrNil
29+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
30+
31+
/**
32+
* Log an Log In event to see users logging into your app in real-time, understand how many
33+
* users are logging in with different methods and their success rate logging into your app.
34+
*
35+
* @param loginMethodOrNil The method by which a user logged in, e.g. email, Twitter or Digits.
36+
* @param loginSucceededOrNil The ultimate success or failure of the login
37+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
38+
*/
39+
+ (void)logLoginWithMethod:(nullable NSString *)loginMethodOrNil
40+
success:(nullable NSNumber *)loginSucceededOrNil
41+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
42+
43+
/**
44+
* Log a Share event to see users sharing from your app in real-time, letting you
45+
* understand what content they're sharing from the type or genre down to the specific id.
46+
*
47+
* @param shareMethodOrNil The method by which a user shared, e.g. email, Twitter, SMS.
48+
* @param contentNameOrNil The human readable name for this piece of content.
49+
* @param contentTypeOrNil The type of content shared.
50+
* @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item.
51+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
52+
*/
53+
+ (void)logShareWithMethod:(nullable NSString *)shareMethodOrNil
54+
contentName:(nullable NSString *)contentNameOrNil
55+
contentType:(nullable NSString *)contentTypeOrNil
56+
contentId:(nullable NSString *)contentIdOrNil
57+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
58+
59+
/**
60+
* Log an Invite Event to track how users are inviting other users into
61+
* your application.
62+
*
63+
* @param inviteMethodOrNil The method of invitation, e.g. GameCenter, Twitter, email.
64+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
65+
*/
66+
+ (void)logInviteWithMethod:(nullable NSString *)inviteMethodOrNil
67+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
68+
69+
/**
70+
* Log a Purchase event to see your revenue in real-time, understand how many users are making purchases, see which
71+
* items are most popular, and track plenty of other important purchase-related metrics.
72+
*
73+
* @param itemPriceOrNil The purchased item's price.
74+
* @param currencyOrNil The ISO4217 currency code. Example: USD
75+
* @param purchaseSucceededOrNil Was the purchase succesful or unsuccesful
76+
* @param itemNameOrNil The human-readable form of the item's name. Example:
77+
* @param itemTypeOrNil The type, or genre of the item. Example: Song
78+
* @param itemIdOrNil The machine-readable, unique item identifier Example: SKU
79+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase.
80+
*/
81+
+ (void)logPurchaseWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil
82+
currency:(nullable NSString *)currencyOrNil
83+
success:(nullable NSNumber *)purchaseSucceededOrNil
84+
itemName:(nullable NSString *)itemNameOrNil
85+
itemType:(nullable NSString *)itemTypeOrNil
86+
itemId:(nullable NSString *)itemIdOrNil
87+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
88+
89+
/**
90+
* Log a Level Start Event to track where users are in your game.
91+
*
92+
* @param levelNameOrNil The level name
93+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this level start event.
94+
*/
95+
+ (void)logLevelStart:(nullable NSString *)levelNameOrNil
96+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
97+
98+
/**
99+
* Log a Level End event to track how users are completing levels in your game.
100+
*
101+
* @param levelNameOrNil The name of the level completed, E.G. "1" or "Training"
102+
* @param scoreOrNil The score the user completed the level with.
103+
* @param levelCompletedSuccesfullyOrNil A boolean representing whether or not the level was completed succesfully.
104+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
105+
*/
106+
+ (void)logLevelEnd:(nullable NSString *)levelNameOrNil
107+
score:(nullable NSNumber *)scoreOrNil
108+
success:(nullable NSNumber *)levelCompletedSuccesfullyOrNil
109+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
110+
111+
/**
112+
* Log an Add to Cart event to see users adding items to a shopping cart in real-time, understand how
113+
* many users start the purchase flow, see which items are most popular, and track plenty of other important
114+
* purchase-related metrics.
115+
*
116+
* @param itemPriceOrNil The purchased item's price.
117+
* @param currencyOrNil The ISO4217 currency code. Example: USD
118+
* @param itemNameOrNil The human-readable form of the item's name. Example:
119+
* @param itemTypeOrNil The type, or genre of the item. Example: Song
120+
* @param itemIdOrNil The machine-readable, unique item identifier Example: SKU
121+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
122+
*/
123+
+ (void)logAddToCartWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil
124+
currency:(nullable NSString *)currencyOrNil
125+
itemName:(nullable NSString *)itemNameOrNil
126+
itemType:(nullable NSString *)itemTypeOrNil
127+
itemId:(nullable NSString *)itemIdOrNil
128+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
129+
130+
/**
131+
* Log a Start Checkout event to see users moving through the purchase funnel in real-time, understand how many
132+
* users are doing this and how much they're spending per checkout, and see how it related to other important
133+
* purchase-related metrics.
134+
*
135+
* @param totalPriceOrNil The total price of the cart.
136+
* @param currencyOrNil The ISO4217 currency code. Example: USD
137+
* @param itemCountOrNil The number of items in the cart.
138+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
139+
*/
140+
+ (void)logStartCheckoutWithPrice:(nullable NSDecimalNumber *)totalPriceOrNil
141+
currency:(nullable NSString *)currencyOrNil
142+
itemCount:(nullable NSNumber *)itemCountOrNil
143+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
144+
145+
/**
146+
* Log a Rating event to see users rating content within your app in real-time and understand what
147+
* content is most engaging, from the type or genre down to the specific id.
148+
*
149+
* @param ratingOrNil The integer rating given by the user.
150+
* @param contentNameOrNil The human readable name for this piece of content.
151+
* @param contentTypeOrNil The type of content shared.
152+
* @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item.
153+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
154+
*/
155+
+ (void)logRating:(nullable NSNumber *)ratingOrNil
156+
contentName:(nullable NSString *)contentNameOrNil
157+
contentType:(nullable NSString *)contentTypeOrNil
158+
contentId:(nullable NSString *)contentIdOrNil
159+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
160+
161+
/**
162+
* Log a Content View event to see users viewing content within your app in real-time and
163+
* understand what content is most engaging, from the type or genre down to the specific id.
164+
*
165+
* @param contentNameOrNil The human readable name for this piece of content.
166+
* @param contentTypeOrNil The type of content shared.
167+
* @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item.
168+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
169+
*/
170+
+ (void)logContentViewWithName:(nullable NSString *)contentNameOrNil
171+
contentType:(nullable NSString *)contentTypeOrNil
172+
contentId:(nullable NSString *)contentIdOrNil
173+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
174+
175+
/**
176+
* Log a Search event allows you to see users searching within your app in real-time and understand
177+
* exactly what they're searching for.
178+
*
179+
* @param queryOrNil The user's query.
180+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event.
181+
*/
182+
+ (void)logSearchWithQuery:(nullable NSString *)queryOrNil
183+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
184+
185+
/**
186+
* Log a Custom Event to see user actions that are uniquely important for your app in real-time, to see how often
187+
* they're performing these actions with breakdowns by different categories you add. Use a human-readable name for
188+
* the name of the event, since this is how the event will appear in Answers.
189+
*
190+
* @param eventName The human-readable name for the event.
191+
* @param customAttributesOrNil A dictionary of custom attributes to associate with this event. Attribute keys
192+
* must be <code>NSString</code> and and values must be <code>NSNumber</code> or <code>NSString</code>.
193+
* @discussion How we treat <code>NSNumbers</code>:
194+
* We will provide information about the distribution of values over time.
195+
*
196+
* How we treat <code>NSStrings</code>:
197+
* NSStrings are used as categorical data, allowing comparison across different category values.
198+
* Strings are limited to a maximum length of 100 characters, attributes over this length will be
199+
* truncated.
200+
*
201+
* When tracking the Tweet views to better understand user engagement, sending the tweet's length
202+
* and the type of media present in the tweet allows you to track how tweet length and the type of media influence
203+
* engagement.
204+
*/
205+
+ (void)logCustomEventWithName:(NSString *)eventName
206+
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;
207+
208+
@end
209+
210+
NS_ASSUME_NONNULL_END
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// CLSAttributes.h
3+
// Crashlytics
4+
//
5+
// Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
6+
//
7+
8+
#pragma once
9+
10+
#define CLS_DEPRECATED(x) __attribute__ ((deprecated(x)))
11+
12+
#if !__has_feature(nullability)
13+
#define nonnull
14+
#define nullable
15+
#define _Nullable
16+
#define _Nonnull
17+
#endif
18+
19+
#ifndef NS_ASSUME_NONNULL_BEGIN
20+
#define NS_ASSUME_NONNULL_BEGIN
21+
#endif
22+
23+
#ifndef NS_ASSUME_NONNULL_END
24+
#define NS_ASSUME_NONNULL_END
25+
#endif
26+
27+
#if __has_feature(objc_generics)
28+
#define CLS_GENERIC_NSARRAY(type) NSArray<type>
29+
#define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary<key_type, object_key>
30+
#else
31+
#define CLS_GENERIC_NSARRAY(type) NSArray
32+
#define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary
33+
#endif

0 commit comments

Comments
 (0)