commit | author | age
|
bad748
|
1 |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
W |
2 |
// |
|
3 |
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, |
|
4 |
// copy, modify, and distribute this software in source code or binary form for use |
|
5 |
// in connection with the web services and APIs provided by Facebook. |
|
6 |
// |
|
7 |
// As with any software that integrates with the Facebook platform, your use of |
|
8 |
// this software is subject to the Facebook Developer Principles and Policies |
|
9 |
// [http://developers.facebook.com/policy/]. This copyright notice shall be |
|
10 |
// included in all copies or substantial portions of the software. |
|
11 |
// |
|
12 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
13 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
|
14 |
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
|
15 |
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
|
16 |
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
|
17 |
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
18 |
|
|
19 |
#import <UIKit/UIKit.h> |
|
20 |
|
e81c27
|
21 |
NS_ASSUME_NONNULL_BEGIN |
H |
22 |
|
bad748
|
23 |
/* |
W |
24 |
* Constants defining logging behavior. Use with <[FBSDKSettings setLoggingBehavior]>. |
|
25 |
*/ |
|
26 |
|
e81c27
|
27 |
/// typedef for FBSDKAppEventName |
H |
28 |
typedef NSString *const FBSDKLoggingBehavior NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(LoggingBehavior); |
|
29 |
|
9febd9
|
30 |
/** Include access token in logging. */ |
e81c27
|
31 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorAccessTokens; |
bad748
|
32 |
|
9febd9
|
33 |
/** Log performance characteristics */ |
e81c27
|
34 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorPerformanceCharacteristics; |
bad748
|
35 |
|
9febd9
|
36 |
/** Log FBSDKAppEvents interactions */ |
e81c27
|
37 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorAppEvents; |
bad748
|
38 |
|
9febd9
|
39 |
/** Log Informational occurrences */ |
e81c27
|
40 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorInformational; |
bad748
|
41 |
|
9febd9
|
42 |
/** Log cache errors. */ |
e81c27
|
43 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorCacheErrors; |
bad748
|
44 |
|
9febd9
|
45 |
/** Log errors from SDK UI controls */ |
e81c27
|
46 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorUIControlErrors; |
bad748
|
47 |
|
9febd9
|
48 |
/** Log debug warnings from API response, i.e. when friends fields requested, but user_friends permission isn't granted. */ |
e81c27
|
49 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorGraphAPIDebugWarning; |
bad748
|
50 |
|
9febd9
|
51 |
/** Log warnings from API response, i.e. when requested feature will be deprecated in next version of API. |
bad748
|
52 |
Info is the lowest level of severity, using it will result in logging all previously mentioned levels. |
W |
53 |
*/ |
e81c27
|
54 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorGraphAPIDebugInfo; |
bad748
|
55 |
|
9febd9
|
56 |
/** Log errors from SDK network requests */ |
e81c27
|
57 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorNetworkRequests; |
bad748
|
58 |
|
9febd9
|
59 |
/** Log errors likely to be preventable by the developer. This is in the default set of enabled logging behaviors. */ |
e81c27
|
60 |
FOUNDATION_EXPORT FBSDKLoggingBehavior FBSDKLoggingBehaviorDeveloperErrors; |
bad748
|
61 |
|
e81c27
|
62 |
NS_SWIFT_NAME(Settings) |
bad748
|
63 |
@interface FBSDKSettings : NSObject |
13e53a
|
64 |
|
H |
65 |
- (instancetype)init NS_UNAVAILABLE; |
|
66 |
+ (instancetype)new NS_UNAVAILABLE; |
bad748
|
67 |
|
9febd9
|
68 |
/** |
e81c27
|
69 |
Retrieve the current iOS SDK version. |
bad748
|
70 |
*/ |
e81c27
|
71 |
@property (class, nonatomic, copy, readonly) NSString *sdkVersion; |
bad748
|
72 |
|
9febd9
|
73 |
/** |
e81c27
|
74 |
Retrieve the current default Graph API version. |
bad748
|
75 |
*/ |
e81c27
|
76 |
@property (class, nonatomic, copy, readonly) NSString *defaultGraphAPIVersion; |
bad748
|
77 |
|
9febd9
|
78 |
/** |
e81c27
|
79 |
The quality of JPEG images sent to Facebook from the SDK, |
H |
80 |
expressed as a value from 0.0 to 1.0. |
9febd9
|
81 |
|
W |
82 |
If not explicitly set, the default is 0.9. |
|
83 |
|
13e53a
|
84 |
@see [UIImageJPEGRepresentation](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIImageJPEGRepresentation) */ |
e81c27
|
85 |
@property (class, nonatomic, assign) CGFloat JPEGCompressionQuality |
H |
86 |
NS_SWIFT_NAME(jpegCompressionQuality); |
bad748
|
87 |
|
9febd9
|
88 |
/** |
e81c27
|
89 |
Controls sdk auto initailization. |
H |
90 |
If not explicitly set, the default is true |
37c026
|
91 |
*/ |
e81c27
|
92 |
@property (class, nonatomic, assign, getter=isAutoInitEnabled) BOOL autoInitEnabled; |
37c026
|
93 |
|
H |
94 |
/** |
e81c27
|
95 |
Controls the auto logging of basic app events, such as activateApp and deactivateApp. |
H |
96 |
If not explicitly set, the default is true |
37c026
|
97 |
*/ |
e81c27
|
98 |
@property (class, nonatomic, assign, getter=isAutoLogAppEventsEnabled) BOOL autoLogAppEventsEnabled; |
37c026
|
99 |
|
H |
100 |
/** |
e81c27
|
101 |
Controls the fb_codeless_debug logging event |
H |
102 |
If not explicitly set, the default is true |
9f077b
|
103 |
*/ |
e81c27
|
104 |
@property (class, nonatomic, assign, getter=isCodelessDebugLogEnabled) BOOL codelessDebugLogEnabled; |
9f077b
|
105 |
|
H |
106 |
/** |
e81c27
|
107 |
Controls the fb_codeless_debug logging event |
H |
108 |
If not explicitly set, the default is true |
9f077b
|
109 |
*/ |
e81c27
|
110 |
@property (class, nonatomic, assign, getter=isAdvertiserIDCollectionEnabled) BOOL advertiserIDCollectionEnabled; |
13e53a
|
111 |
|
H |
112 |
/** |
e81c27
|
113 |
Whether data such as that generated through FBSDKAppEvents and sent to Facebook |
H |
114 |
should be restricted from being used for other than analytics and conversions. |
|
115 |
Defaults to NO. This value is stored on the device and persists across app launches. |
13e53a
|
116 |
*/ |
e81c27
|
117 |
@property (class, nonatomic, assign, getter=shouldLimitEventAndDataUsage) BOOL limitEventAndDataUsage; |
13e53a
|
118 |
|
H |
119 |
/** |
e81c27
|
120 |
A convenient way to toggle error recovery for all FBSDKGraphRequest instances created after this is set. |
13e53a
|
121 |
*/ |
e81c27
|
122 |
@property (class, nonatomic, assign, getter=isGraphErrorRecoveryEnabled) BOOL graphErrorRecoveryEnabled; |
9f077b
|
123 |
|
H |
124 |
/** |
e81c27
|
125 |
The Facebook App ID used by the SDK. |
H |
126 |
|
|
127 |
If not explicitly set, the default will be read from the application's plist (FacebookAppID). |
bad748
|
128 |
*/ |
e81c27
|
129 |
@property (class, nonatomic, copy, null_resettable) NSString *appID; |
bad748
|
130 |
|
9febd9
|
131 |
/** |
e81c27
|
132 |
The default url scheme suffix used for sessions. |
bad748
|
133 |
|
e81c27
|
134 |
If not explicitly set, the default will be read from the application's plist (FacebookUrlSchemeSuffix). |
bad748
|
135 |
*/ |
e81c27
|
136 |
@property (class, nonatomic, copy, null_resettable) NSString *appURLSchemeSuffix; |
bad748
|
137 |
|
9febd9
|
138 |
/** |
e81c27
|
139 |
The Client Token that has been set via [FBSDKSettings setClientToken]. |
H |
140 |
This is needed for certain API calls when made anonymously, without a user-based access token. |
|
141 |
|
|
142 |
The Facebook App's "client token", which, for a given appid can be found in the Security |
|
143 |
section of the Advanced tab of the Facebook App settings found at <https://developers.facebook.com/apps/[your-app-id]> |
|
144 |
|
|
145 |
If not explicitly set, the default will be read from the application's plist (FacebookClientToken). |
bad748
|
146 |
*/ |
e81c27
|
147 |
@property (class, nonatomic, copy, null_resettable) NSString *clientToken; |
bad748
|
148 |
|
9febd9
|
149 |
/** |
e81c27
|
150 |
The Facebook Display Name used by the SDK. |
H |
151 |
|
|
152 |
This should match the Display Name that has been set for the app with the corresponding Facebook App ID, |
|
153 |
in the Facebook App Dashboard. |
|
154 |
|
|
155 |
If not explicitly set, the default will be read from the application's plist (FacebookDisplayName). |
bad748
|
156 |
*/ |
e81c27
|
157 |
@property (class, nonatomic, copy, null_resettable) NSString *displayName; |
bad748
|
158 |
|
9febd9
|
159 |
/** |
e81c27
|
160 |
The Facebook domain part. This can be used to change the Facebook domain |
H |
161 |
(e.g. @"beta") so that requests will be sent to `graph.beta.facebook.com` |
bad748
|
162 |
|
e81c27
|
163 |
If not explicitly set, the default will be read from the application's plist (FacebookDomainPart). |
H |
164 |
*/ |
|
165 |
@property (class, nonatomic, copy, null_resettable) NSString *facebookDomainPart; |
bad748
|
166 |
|
e81c27
|
167 |
/** |
H |
168 |
The current Facebook SDK logging behavior. This should consist of strings |
|
169 |
defined as constants with FBSDKLoggingBehavior*. |
|
170 |
|
|
171 |
This should consist a set of strings indicating what information should be logged |
|
172 |
defined as constants with FBSDKLoggingBehavior*. Set to an empty set in order to disable all logging. |
9febd9
|
173 |
|
W |
174 |
You can also define this via an array in your app plist with key "FacebookLoggingBehavior" or add and remove individual values via enableLoggingBehavior: or disableLogginBehavior: |
e81c27
|
175 |
|
H |
176 |
The default is a set consisting of FBSDKLoggingBehaviorDeveloperErrors |
bad748
|
177 |
*/ |
e81c27
|
178 |
@property (class, nonatomic, copy) NSSet<FBSDKLoggingBehavior> *loggingBehaviors |
H |
179 |
NS_REFINED_FOR_SWIFT; |
bad748
|
180 |
|
9febd9
|
181 |
/** |
W |
182 |
Overrides the default Graph API version to use with `FBSDKGraphRequests`. This overrides `FBSDK_TARGET_PLATFORM_VERSION`. |
|
183 |
|
|
184 |
The string should be of the form `@"v2.7"`. |
e81c27
|
185 |
|
H |
186 |
Defaults to `FBSDK_TARGET_PLATFORM_VERSION`. |
9febd9
|
187 |
*/ |
e81c27
|
188 |
@property (class, nonatomic, copy, null_resettable) NSString *graphAPIVersion; |
9febd9
|
189 |
|
W |
190 |
/** |
e81c27
|
191 |
Enable a particular Facebook SDK logging behavior. |
H |
192 |
|
|
193 |
@param loggingBehavior The LoggingBehavior to enable. This should be a string defined as a constant with FBSDKLoggingBehavior*. |
|
194 |
*/ |
|
195 |
+ (void)enableLoggingBehavior:(FBSDKLoggingBehavior)loggingBehavior; |
|
196 |
|
|
197 |
/** |
|
198 |
Disable a particular Facebook SDK logging behavior. |
|
199 |
|
|
200 |
@param loggingBehavior The LoggingBehavior to disable. This should be a string defined as a constant with FBSDKLoggingBehavior*. |
|
201 |
*/ |
|
202 |
+ (void)disableLoggingBehavior:(FBSDKLoggingBehavior)loggingBehavior; |
9febd9
|
203 |
|
bad748
|
204 |
@end |
e81c27
|
205 |
|
H |
206 |
NS_ASSUME_NONNULL_END |