commit | author | age
|
2e29a3
|
1 |
#if 0 |
L |
2 |
#elif defined(__arm64__) && __arm64__ |
2a6e18
|
3 |
// Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4) |
2e29a3
|
4 |
#ifndef FBSDKLOGINKIT_SWIFT_H |
L |
5 |
#define FBSDKLOGINKIT_SWIFT_H |
|
6 |
#pragma clang diagnostic push |
|
7 |
#pragma clang diagnostic ignored "-Wgcc-compat" |
|
8 |
|
|
9 |
#if !defined(__has_include) |
|
10 |
# define __has_include(x) 0 |
|
11 |
#endif |
|
12 |
#if !defined(__has_attribute) |
|
13 |
# define __has_attribute(x) 0 |
|
14 |
#endif |
|
15 |
#if !defined(__has_feature) |
|
16 |
# define __has_feature(x) 0 |
|
17 |
#endif |
|
18 |
#if !defined(__has_warning) |
|
19 |
# define __has_warning(x) 0 |
|
20 |
#endif |
|
21 |
|
|
22 |
#if __has_include(<swift/objc-prologue.h>) |
|
23 |
# include <swift/objc-prologue.h> |
|
24 |
#endif |
|
25 |
|
|
26 |
#pragma clang diagnostic ignored "-Wauto-import" |
e0ec42
|
27 |
#if defined(__OBJC__) |
2e29a3
|
28 |
#include <Foundation/Foundation.h> |
e0ec42
|
29 |
#endif |
L |
30 |
#if defined(__cplusplus) |
|
31 |
#include <cstdint> |
|
32 |
#include <cstddef> |
|
33 |
#include <cstdbool> |
97fc0a
|
34 |
#include <cstring> |
L |
35 |
#include <stdlib.h> |
|
36 |
#include <new> |
|
37 |
#include <type_traits> |
e0ec42
|
38 |
#else |
2e29a3
|
39 |
#include <stdint.h> |
L |
40 |
#include <stddef.h> |
|
41 |
#include <stdbool.h> |
97fc0a
|
42 |
#include <string.h> |
L |
43 |
#endif |
|
44 |
#if defined(__cplusplus) |
|
45 |
#if defined(__arm64e__) && __has_include(<ptrauth.h>) |
|
46 |
# include <ptrauth.h> |
|
47 |
#else |
|
48 |
#pragma clang diagnostic push |
|
49 |
#pragma clang diagnostic ignored "-Wreserved-macro-identifier" |
|
50 |
# ifndef __ptrauth_swift_value_witness_function_pointer |
|
51 |
# define __ptrauth_swift_value_witness_function_pointer(x) |
|
52 |
# endif |
|
53 |
# ifndef __ptrauth_swift_class_method_pointer |
|
54 |
# define __ptrauth_swift_class_method_pointer(x) |
|
55 |
# endif |
|
56 |
#pragma clang diagnostic pop |
|
57 |
#endif |
e0ec42
|
58 |
#endif |
2e29a3
|
59 |
|
L |
60 |
#if !defined(SWIFT_TYPEDEFS) |
|
61 |
# define SWIFT_TYPEDEFS 1 |
|
62 |
# if __has_include(<uchar.h>) |
|
63 |
# include <uchar.h> |
|
64 |
# elif !defined(__cplusplus) |
|
65 |
typedef uint_least16_t char16_t; |
|
66 |
typedef uint_least32_t char32_t; |
|
67 |
# endif |
|
68 |
typedef float swift_float2 __attribute__((__ext_vector_type__(2))); |
|
69 |
typedef float swift_float3 __attribute__((__ext_vector_type__(3))); |
|
70 |
typedef float swift_float4 __attribute__((__ext_vector_type__(4))); |
|
71 |
typedef double swift_double2 __attribute__((__ext_vector_type__(2))); |
|
72 |
typedef double swift_double3 __attribute__((__ext_vector_type__(3))); |
|
73 |
typedef double swift_double4 __attribute__((__ext_vector_type__(4))); |
|
74 |
typedef int swift_int2 __attribute__((__ext_vector_type__(2))); |
|
75 |
typedef int swift_int3 __attribute__((__ext_vector_type__(3))); |
|
76 |
typedef int swift_int4 __attribute__((__ext_vector_type__(4))); |
|
77 |
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); |
|
78 |
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); |
|
79 |
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); |
|
80 |
#endif |
|
81 |
|
|
82 |
#if !defined(SWIFT_PASTE) |
|
83 |
# define SWIFT_PASTE_HELPER(x, y) x##y |
|
84 |
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) |
|
85 |
#endif |
|
86 |
#if !defined(SWIFT_METATYPE) |
|
87 |
# define SWIFT_METATYPE(X) Class |
|
88 |
#endif |
|
89 |
#if !defined(SWIFT_CLASS_PROPERTY) |
|
90 |
# if __has_feature(objc_class_property) |
|
91 |
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ |
|
92 |
# else |
97fc0a
|
93 |
# define SWIFT_CLASS_PROPERTY(...) |
2e29a3
|
94 |
# endif |
L |
95 |
#endif |
97fc0a
|
96 |
#if !defined(SWIFT_RUNTIME_NAME) |
L |
97 |
# if __has_attribute(objc_runtime_name) |
|
98 |
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) |
|
99 |
# else |
|
100 |
# define SWIFT_RUNTIME_NAME(X) |
|
101 |
# endif |
2e29a3
|
102 |
#endif |
97fc0a
|
103 |
#if !defined(SWIFT_COMPILE_NAME) |
L |
104 |
# if __has_attribute(swift_name) |
|
105 |
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) |
|
106 |
# else |
|
107 |
# define SWIFT_COMPILE_NAME(X) |
|
108 |
# endif |
2e29a3
|
109 |
#endif |
97fc0a
|
110 |
#if !defined(SWIFT_METHOD_FAMILY) |
L |
111 |
# if __has_attribute(objc_method_family) |
|
112 |
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) |
|
113 |
# else |
|
114 |
# define SWIFT_METHOD_FAMILY(X) |
|
115 |
# endif |
2e29a3
|
116 |
#endif |
97fc0a
|
117 |
#if !defined(SWIFT_NOESCAPE) |
L |
118 |
# if __has_attribute(noescape) |
|
119 |
# define SWIFT_NOESCAPE __attribute__((noescape)) |
|
120 |
# else |
|
121 |
# define SWIFT_NOESCAPE |
|
122 |
# endif |
2e29a3
|
123 |
#endif |
97fc0a
|
124 |
#if !defined(SWIFT_RELEASES_ARGUMENT) |
L |
125 |
# if __has_attribute(ns_consumed) |
|
126 |
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) |
|
127 |
# else |
|
128 |
# define SWIFT_RELEASES_ARGUMENT |
|
129 |
# endif |
2e29a3
|
130 |
#endif |
97fc0a
|
131 |
#if !defined(SWIFT_WARN_UNUSED_RESULT) |
L |
132 |
# if __has_attribute(warn_unused_result) |
|
133 |
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
|
134 |
# else |
|
135 |
# define SWIFT_WARN_UNUSED_RESULT |
|
136 |
# endif |
2e29a3
|
137 |
#endif |
97fc0a
|
138 |
#if !defined(SWIFT_NORETURN) |
L |
139 |
# if __has_attribute(noreturn) |
|
140 |
# define SWIFT_NORETURN __attribute__((noreturn)) |
|
141 |
# else |
|
142 |
# define SWIFT_NORETURN |
|
143 |
# endif |
2e29a3
|
144 |
#endif |
L |
145 |
#if !defined(SWIFT_CLASS_EXTRA) |
97fc0a
|
146 |
# define SWIFT_CLASS_EXTRA |
2e29a3
|
147 |
#endif |
L |
148 |
#if !defined(SWIFT_PROTOCOL_EXTRA) |
97fc0a
|
149 |
# define SWIFT_PROTOCOL_EXTRA |
2e29a3
|
150 |
#endif |
L |
151 |
#if !defined(SWIFT_ENUM_EXTRA) |
97fc0a
|
152 |
# define SWIFT_ENUM_EXTRA |
2e29a3
|
153 |
#endif |
L |
154 |
#if !defined(SWIFT_CLASS) |
|
155 |
# if __has_attribute(objc_subclassing_restricted) |
|
156 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA |
|
157 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
158 |
# else |
|
159 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
160 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
161 |
# endif |
|
162 |
#endif |
|
163 |
#if !defined(SWIFT_RESILIENT_CLASS) |
|
164 |
# if __has_attribute(objc_class_stub) |
|
165 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) |
|
166 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
167 |
# else |
|
168 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) |
|
169 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
170 |
# endif |
|
171 |
#endif |
|
172 |
#if !defined(SWIFT_PROTOCOL) |
|
173 |
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
174 |
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
175 |
#endif |
|
176 |
#if !defined(SWIFT_EXTENSION) |
|
177 |
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) |
|
178 |
#endif |
|
179 |
#if !defined(OBJC_DESIGNATED_INITIALIZER) |
|
180 |
# if __has_attribute(objc_designated_initializer) |
|
181 |
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) |
|
182 |
# else |
97fc0a
|
183 |
# define OBJC_DESIGNATED_INITIALIZER |
2e29a3
|
184 |
# endif |
L |
185 |
#endif |
|
186 |
#if !defined(SWIFT_ENUM_ATTR) |
97fc0a
|
187 |
# if __has_attribute(enum_extensibility) |
2e29a3
|
188 |
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) |
L |
189 |
# else |
97fc0a
|
190 |
# define SWIFT_ENUM_ATTR(_extensibility) |
2e29a3
|
191 |
# endif |
L |
192 |
#endif |
|
193 |
#if !defined(SWIFT_ENUM) |
|
194 |
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
195 |
# if __has_feature(generalized_swift_name) |
|
196 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
197 |
# else |
|
198 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) |
|
199 |
# endif |
|
200 |
#endif |
|
201 |
#if !defined(SWIFT_UNAVAILABLE) |
|
202 |
# define SWIFT_UNAVAILABLE __attribute__((unavailable)) |
|
203 |
#endif |
|
204 |
#if !defined(SWIFT_UNAVAILABLE_MSG) |
|
205 |
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) |
|
206 |
#endif |
|
207 |
#if !defined(SWIFT_AVAILABILITY) |
|
208 |
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) |
|
209 |
#endif |
|
210 |
#if !defined(SWIFT_WEAK_IMPORT) |
|
211 |
# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) |
|
212 |
#endif |
|
213 |
#if !defined(SWIFT_DEPRECATED) |
|
214 |
# define SWIFT_DEPRECATED __attribute__((deprecated)) |
|
215 |
#endif |
|
216 |
#if !defined(SWIFT_DEPRECATED_MSG) |
|
217 |
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) |
|
218 |
#endif |
97fc0a
|
219 |
#if !defined(SWIFT_DEPRECATED_OBJC) |
L |
220 |
# if __has_feature(attribute_diagnose_if_objc) |
|
221 |
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) |
|
222 |
# else |
|
223 |
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) |
|
224 |
# endif |
2e29a3
|
225 |
#endif |
e0ec42
|
226 |
#if defined(__OBJC__) |
2e29a3
|
227 |
#if !defined(IBSegueAction) |
97fc0a
|
228 |
# define IBSegueAction |
2e29a3
|
229 |
#endif |
e0ec42
|
230 |
#endif |
L |
231 |
#if !defined(SWIFT_EXTERN) |
|
232 |
# if defined(__cplusplus) |
|
233 |
# define SWIFT_EXTERN extern "C" |
|
234 |
# else |
|
235 |
# define SWIFT_EXTERN extern |
|
236 |
# endif |
|
237 |
#endif |
|
238 |
#if !defined(SWIFT_CALL) |
|
239 |
# define SWIFT_CALL __attribute__((swiftcall)) |
|
240 |
#endif |
97fc0a
|
241 |
#if !defined(SWIFT_INDIRECT_RESULT) |
L |
242 |
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) |
e0ec42
|
243 |
#endif |
97fc0a
|
244 |
#if !defined(SWIFT_CONTEXT) |
L |
245 |
# define SWIFT_CONTEXT __attribute__((swift_context)) |
|
246 |
#endif |
|
247 |
#if !defined(SWIFT_ERROR_RESULT) |
|
248 |
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) |
|
249 |
#endif |
|
250 |
#if defined(__cplusplus) |
|
251 |
# define SWIFT_NOEXCEPT noexcept |
e0ec42
|
252 |
#else |
L |
253 |
# define SWIFT_NOEXCEPT |
|
254 |
#endif |
97fc0a
|
255 |
#if !defined(SWIFT_C_INLINE_THUNK) |
L |
256 |
# if __has_attribute(always_inline) |
|
257 |
# if __has_attribute(nodebug) |
|
258 |
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug)) |
|
259 |
# else |
|
260 |
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) |
|
261 |
# endif |
|
262 |
# else |
|
263 |
# define SWIFT_C_INLINE_THUNK inline |
|
264 |
# endif |
e0ec42
|
265 |
#endif |
97fc0a
|
266 |
#if defined(_WIN32) |
L |
267 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
268 |
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) |
|
269 |
#endif |
|
270 |
#else |
|
271 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
272 |
# define SWIFT_IMPORT_STDLIB_SYMBOL |
e0ec42
|
273 |
#endif |
L |
274 |
#endif |
|
275 |
#if defined(__OBJC__) |
97fc0a
|
276 |
#if __has_feature(objc_modules) |
2e29a3
|
277 |
#if __has_warning("-Watimport-in-framework-header") |
L |
278 |
#pragma clang diagnostic ignored "-Watimport-in-framework-header" |
|
279 |
#endif |
e0ec42
|
280 |
@import CoreFoundation; |
L |
281 |
@import FBSDKCoreKit; |
|
282 |
@import Foundation; |
|
283 |
@import ObjectiveC; |
|
284 |
@import UIKit; |
2e29a3
|
285 |
#endif |
L |
286 |
|
e0ec42
|
287 |
#import <FBSDKLoginKit/FBSDKLoginKit.h> |
L |
288 |
|
|
289 |
#endif |
2e29a3
|
290 |
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" |
L |
291 |
#pragma clang diagnostic ignored "-Wduplicate-method-arg" |
|
292 |
#if __has_warning("-Wpragma-clang-attribute") |
|
293 |
# pragma clang diagnostic ignored "-Wpragma-clang-attribute" |
|
294 |
#endif |
|
295 |
#pragma clang diagnostic ignored "-Wunknown-pragmas" |
|
296 |
#pragma clang diagnostic ignored "-Wnullability" |
e0ec42
|
297 |
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
2e29a3
|
298 |
|
L |
299 |
#if __has_attribute(external_source_symbol) |
|
300 |
# pragma push_macro("any") |
|
301 |
# undef any |
|
302 |
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FBSDKLoginKit",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) |
|
303 |
# pragma pop_macro("any") |
|
304 |
#endif |
|
305 |
|
e0ec42
|
306 |
#if defined(__OBJC__) |
L |
307 |
|
|
308 |
@class NSString; |
|
309 |
|
|
310 |
/// Represents a code verifier used in the PKCE (Proof Key for Code Exchange) |
|
311 |
/// process. This is a cryptographically random string using the characters |
|
312 |
/// A-Z, a-z, 0-9, and the punctuation characters -._~ (hyphen, period, |
|
313 |
/// underscore, and tilde), between 43 and 128 characters long. |
|
314 |
SWIFT_CLASS_NAMED("CodeVerifier") |
|
315 |
@interface FBSDKCodeVerifier : NSObject |
|
316 |
/// The string value of the code verifier |
|
317 |
@property (nonatomic, readonly, copy) NSString * _Nonnull value; |
|
318 |
/// The SHA256 hashed challenge of the code verifier |
|
319 |
@property (nonatomic, readonly, copy) NSString * _Nonnull challenge; |
|
320 |
/// Attempts to initialize a new code verifier instance with the given string. |
|
321 |
/// Creation will fail and return nil if the string is invalid. |
|
322 |
/// @param string the code verifier string |
|
323 |
- (nullable instancetype)initWithString:(NSString * _Nonnull)string; |
|
324 |
/// Initializes a new code verifier instance with a random string value |
|
325 |
- (nonnull instancetype)init; |
|
326 |
@end |
|
327 |
|
|
328 |
/// Passed to openURL to indicate which default audience to use for sessions that post data to Facebook. |
|
329 |
/// Certain operations such as publishing a status or publishing a photo require an audience. When the user |
|
330 |
/// grants an application permission to perform a publish operation, a default audience is selected as the |
|
331 |
/// publication ceiling for the application. This enumerated value allows the application to select which |
|
332 |
/// audience to ask the user to grant publish permission for. |
|
333 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKDefaultAudience, "DefaultAudience", open) { |
|
334 |
/// Indicates that the user’s friends are able to see posts made by the application |
|
335 |
FBSDKDefaultAudienceFriends = 0, |
|
336 |
/// Indicates that only the user is able to see posts made by the application |
|
337 |
FBSDKDefaultAudienceOnlyMe = 1, |
|
338 |
/// Indicates that all Facebook users are able to see posts made by the application |
|
339 |
FBSDKDefaultAudienceEveryone = 2, |
|
340 |
}; |
|
341 |
|
|
342 |
@class NSURL; |
|
343 |
@class NSDate; |
|
344 |
|
|
345 |
/// Describes the initial response when starting the device login flow. |
|
346 |
/// This is used by <code>DeviceLoginManager</code>. |
|
347 |
SWIFT_CLASS_NAMED("DeviceLoginCodeInfo") |
|
348 |
@interface FBSDKDeviceLoginCodeInfo : NSObject |
|
349 |
/// The unique id for this login flow. |
|
350 |
@property (nonatomic, readonly, copy) NSString * _Nonnull identifier; |
|
351 |
/// The short “user_code” that should be presented to the user. |
|
352 |
@property (nonatomic, readonly, copy) NSString * _Nonnull loginCode; |
|
353 |
/// The verification URL. |
|
354 |
@property (nonatomic, readonly, copy) NSURL * _Nonnull verificationURL; |
|
355 |
/// The expiration date. |
|
356 |
@property (nonatomic, readonly, copy) NSDate * _Nonnull expirationDate; |
|
357 |
/// The polling interval |
|
358 |
@property (nonatomic, readonly) NSUInteger pollingInterval; |
|
359 |
- (nonnull instancetype)initWithIdentifier:(NSString * _Nonnull)identifier loginCode:(NSString * _Nonnull)loginCode verificationURL:(NSURL * _Nonnull)verificationURL expirationDate:(NSDate * _Nonnull)expirationDate pollingInterval:(NSUInteger)pollingInterval OBJC_DESIGNATED_INITIALIZER; |
|
360 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
361 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
362 |
@end |
|
363 |
|
|
364 |
/// Custom error codes for device login errors in the login error domain |
|
365 |
typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKDeviceLoginError, "DeviceLoginErrorCode", open) { |
|
366 |
/// Your device is polling too frequently. |
|
367 |
FBSDKDeviceLoginErrorExcessivePolling = 1349172, |
|
368 |
/// User has declined to authorize your application. |
|
369 |
FBSDKDeviceLoginErrorAuthorizationDeclined = 1349173, |
|
370 |
/// User has not yet authorized your application. Continue polling. |
|
371 |
FBSDKDeviceLoginErrorAuthorizationPending = 1349174, |
|
372 |
/// The code you entered has expired. |
|
373 |
FBSDKDeviceLoginErrorCodeExpired = 1349152, |
|
374 |
}; |
|
375 |
|
|
376 |
@protocol FBSDKDeviceLoginManagerDelegate; |
|
377 |
|
|
378 |
/// Use this class to perform a device login flow. |
|
379 |
/// The device login flow starts by requesting a code from the device login API. |
|
380 |
/// This class informs the delegate when this code is received. You should then present the |
|
381 |
/// code to the user to enter. In the meantime, this class polls the device login API |
|
382 |
/// periodically and informs the delegate of the results. |
|
383 |
/// See <a href="https://developers.facebook.com/docs/facebook-login/for-devices">Facebook Device Login</a>. |
|
384 |
SWIFT_CLASS_NAMED("DeviceLoginManager") |
|
385 |
@interface FBSDKDeviceLoginManager : NSObject |
|
386 |
/// The device login manager delegate. |
|
387 |
@property (nonatomic, weak) id <FBSDKDeviceLoginManagerDelegate> _Nullable delegate; |
|
388 |
/// The requested permissions. |
|
389 |
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull permissions; |
|
390 |
/// The optional URL to redirect the user to after they complete the login. |
|
391 |
/// The URL must be configured in your App Settings -> Advanced -> OAuth Redirect URIs |
|
392 |
@property (nonatomic, copy) NSURL * _Nullable redirectURL; |
|
393 |
/// Initializes a new instance. |
|
394 |
/// @param permissions The permissions to request. |
|
395 |
/// @param enableSmartLogin Whether to enable smart login. |
|
396 |
- (nonnull instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions enableSmartLogin:(BOOL)enableSmartLogin OBJC_DESIGNATED_INITIALIZER; |
|
397 |
/// Starts the device login flow |
|
398 |
/// This instance will retain self until the flow is finished or cancelled. |
|
399 |
- (void)start; |
|
400 |
/// Attempts to cancel the device login flow. |
|
401 |
- (void)cancel; |
|
402 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
403 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
404 |
@end |
|
405 |
|
|
406 |
@class NSNetService; |
|
407 |
@class NSNumber; |
|
408 |
|
|
409 |
@interface FBSDKDeviceLoginManager (SWIFT_EXTENSION(FBSDKLoginKit)) <NSNetServiceDelegate> |
|
410 |
- (void)netService:(NSNetService * _Nonnull)service didNotPublish:(NSDictionary<NSString *, NSNumber *> * _Nonnull)errorValues; |
|
411 |
@end |
|
412 |
|
|
413 |
|
|
414 |
@class FBSDKDeviceLoginManagerResult; |
|
415 |
|
|
416 |
/// A delegate for <code>DeviceLoginManager</code>. |
|
417 |
SWIFT_PROTOCOL_NAMED("DeviceLoginManagerDelegate") |
|
418 |
@protocol FBSDKDeviceLoginManagerDelegate |
|
419 |
/// Indicates the device login flow has started. You should parse <code>codeInfo</code> to present the code to the user to enter. |
|
420 |
/// @param loginManager the login manager instance. |
|
421 |
/// @param codeInfo the code info data. |
|
422 |
- (void)deviceLoginManager:(FBSDKDeviceLoginManager * _Nonnull)loginManager startedWithCodeInfo:(FBSDKDeviceLoginCodeInfo * _Nonnull)codeInfo; |
|
423 |
/// Indicates the device login flow has finished. |
|
424 |
/// @param loginManager the login manager instance. |
|
425 |
/// @param result the results of the login flow. |
|
426 |
/// @param error the error, if available. |
|
427 |
/// The flow can be finished if the user completed the flow, cancelled, or if the code has expired. |
|
428 |
- (void)deviceLoginManager:(FBSDKDeviceLoginManager * _Nonnull)loginManager completedWithResult:(FBSDKDeviceLoginManagerResult * _Nullable)result error:(NSError * _Nullable)error; |
|
429 |
@end |
|
430 |
|
|
431 |
@class FBSDKAccessToken; |
|
432 |
|
|
433 |
/// Represents the results of the a device login flow. This is used by <code>DeviceLoginManager</code> |
|
434 |
SWIFT_CLASS_NAMED("DeviceLoginManagerResult") |
|
435 |
@interface FBSDKDeviceLoginManagerResult : NSObject |
|
436 |
/// The token |
|
437 |
@property (nonatomic, readonly, strong) FBSDKAccessToken * _Nullable accessToken; |
|
438 |
/// Indicates if the login was cancelled by the user, or if the device login code has expired. |
|
439 |
@property (nonatomic, readonly) BOOL isCancelled; |
|
440 |
/// Internal method exposed to facilitate transition to Swift. |
|
441 |
/// API Subject to change or removal without warning. Do not use. |
|
442 |
/// @warning INTERNAL - DO NOT USE |
|
443 |
- (nonnull instancetype)initWithToken:(FBSDKAccessToken * _Nullable)token isCancelled:(BOOL)cancelled OBJC_DESIGNATED_INITIALIZER; |
|
444 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
445 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
446 |
@end |
|
447 |
|
|
448 |
@protocol FBSDKLoginButtonDelegate; |
|
449 |
enum FBSDKLoginButtonTooltipBehavior : NSUInteger; |
|
450 |
enum FBSDKTooltipColorStyle : NSUInteger; |
|
451 |
enum FBSDKLoginTracking : NSUInteger; |
|
452 |
@class NSCoder; |
|
453 |
|
|
454 |
/// A button that initiates a log in or log out flow upon tapping. |
|
455 |
/// <code>LoginButton</code> works with <code>AccessToken.current</code> to determine what to display, |
|
456 |
/// and automatically starts authentication when tapped (i.e., you do not need to manually subscribe action targets). |
|
457 |
/// Like <code>LoginManager</code>, you should make sure your app delegate is connected to <code>ApplicationDelegate</code> |
|
458 |
/// in order for the button’s delegate to receive messages. |
|
459 |
/// <code>LoginButton</code> has a fixed height of 30 pixels, but you may change the width. |
|
460 |
/// Initializing the button with <code>nil</code> frame will size the button to its minimum frame. |
|
461 |
SWIFT_CLASS_NAMED("FBLoginButton") |
|
462 |
@interface FBSDKLoginButton : FBSDKButton |
|
463 |
/// The default audience to use, if publish permissions are requested at login time. |
|
464 |
@property (nonatomic) enum FBSDKDefaultAudience defaultAudience; |
|
465 |
/// Gets or sets the delegate. |
|
466 |
@property (nonatomic, weak) IBOutlet id <FBSDKLoginButtonDelegate> _Nullable delegate; |
|
467 |
/// The permissions to request. |
|
468 |
/// To provide the best experience, you should minimize the number of permissions you request, and only ask for them when needed. |
|
469 |
/// For example, do not ask for “user_location” until you the information is actually used by the app. |
|
470 |
/// Note this is converted to NSSet and is only |
|
471 |
/// an NSArray for the convenience of literal syntax. |
|
472 |
/// See <a href="https://developers.facebook.com/docs/facebook-login/permissions/">the permissions guide</a> for more details. |
|
473 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull permissions; |
|
474 |
/// Gets or sets the desired tooltip behavior. |
|
475 |
@property (nonatomic) enum FBSDKLoginButtonTooltipBehavior tooltipBehavior; |
|
476 |
/// Gets or sets the desired tooltip color style. |
|
477 |
@property (nonatomic) enum FBSDKTooltipColorStyle tooltipColorStyle; |
|
478 |
/// Gets or sets the desired tracking preference to use for login attempts. Defaults to <code>.enabled</code> |
|
479 |
@property (nonatomic) enum FBSDKLoginTracking loginTracking; |
|
480 |
/// Gets or sets an optional nonce to use for login attempts. A valid nonce must be a non-empty string without whitespace. |
|
481 |
/// An invalid nonce will not be set. Instead, default unique nonces will be used for login attempts. |
|
482 |
@property (nonatomic, copy) NSString * _Nullable nonce; |
|
483 |
/// Gets or sets an optional page id to use for login attempts. |
|
484 |
@property (nonatomic, copy) NSString * _Nullable messengerPageId; |
|
485 |
/// Gets or sets the login authorization type to use in the login request. Defaults to <code>rerequest</code>. Use <code>nil</code> to avoid |
|
486 |
/// requesting permissions that were previously denied. |
|
487 |
@property (nonatomic) FBSDKLoginAuthType _Nullable authType; |
|
488 |
/// The code verifier used in the PKCE process. |
|
489 |
/// If not provided, a code verifier will be randomly generated. |
|
490 |
@property (nonatomic, strong) FBSDKCodeVerifier * _Nonnull codeVerifier; |
|
491 |
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; |
|
492 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; |
|
493 |
- (void)didMoveToWindow; |
|
494 |
- (CGRect)imageRectForContentRect:(CGRect)contentRect SWIFT_WARN_UNUSED_RESULT; |
|
495 |
- (CGRect)titleRectForContentRect:(CGRect)contentRect SWIFT_WARN_UNUSED_RESULT; |
|
496 |
- (void)layoutSubviews; |
|
497 |
- (CGSize)sizeThatFits:(CGSize)size SWIFT_WARN_UNUSED_RESULT; |
|
498 |
@end |
|
499 |
|
|
500 |
/// Indicates the desired login tooltip behavior. |
|
501 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKLoginButtonTooltipBehavior, "TooltipBehavior", open) { |
|
502 |
/// The default behavior. The tooltip will only be displayed if |
|
503 |
/// the app is eligible (determined by possible server round trip) |
|
504 |
FBSDKLoginButtonTooltipBehaviorAutomatic = 0, |
|
505 |
/// Force display of the tooltip (typically for UI testing) |
|
506 |
FBSDKLoginButtonTooltipBehaviorForceDisplay = 1, |
|
507 |
/// Force disable. In this case you can still exert more refined |
|
508 |
/// control by manually constructing a <code>FBSDKLoginTooltipView</code> instance. |
|
509 |
FBSDKLoginButtonTooltipBehaviorDisable = 2, |
|
510 |
}; |
|
511 |
|
|
512 |
enum FBSDKTooltipViewArrowDirection : NSUInteger; |
|
513 |
|
|
514 |
/// Tooltip bubble with text in it used to display tips for UI elements, |
|
515 |
/// with a pointed arrow (to refer to the UI element). |
|
516 |
/// The tooltip fades in and will automatically fade out. See <code>displayDuration</code>. |
|
517 |
SWIFT_CLASS_NAMED("FBTooltipView") |
|
518 |
@interface FBSDKTooltipView : UIView |
|
519 |
/// Gets or sets the amount of time in seconds the tooltip should be displayed. |
|
520 |
/// Set this to zero to make the display permanent until explicitly dismissed. |
|
521 |
/// Defaults to six seconds. |
|
522 |
@property (nonatomic) NSTimeInterval displayDuration; |
|
523 |
/// Gets or sets the color style after initialization. |
|
524 |
/// Defaults to value passed to -initWithTagline:message:colorStyle:. |
|
525 |
@property (nonatomic) enum FBSDKTooltipColorStyle colorStyle; |
|
526 |
/// Gets or sets the message. |
|
527 |
@property (nonatomic, copy) NSString * _Nullable message; |
|
528 |
/// Gets or sets the optional phrase that comprises the first part of the label (and is highlighted differently). |
|
529 |
@property (nonatomic, copy) NSString * _Nullable tagline; |
|
530 |
/// Convenience constructor |
|
531 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
532 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
533 |
/// Designated initializer. |
|
534 |
/// If you need to show a tooltip for login, consider using the <code>FBSDKLoginTooltipView</code> view. |
|
535 |
/// See FBSDKLoginTooltipView |
|
536 |
/// \param tagline First part of the label, that will be highlighted with different color. Can be nil. |
|
537 |
/// |
|
538 |
/// \param message Main message to display. |
|
539 |
/// |
|
540 |
/// \param colorStyle Color style to use for tooltip. |
|
541 |
/// |
|
542 |
- (nonnull instancetype)initWithTagline:(NSString * _Nullable)tagline message:(NSString * _Nullable)message colorStyle:(enum FBSDKTooltipColorStyle)colorStyle OBJC_DESIGNATED_INITIALIZER; |
|
543 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE; |
|
544 |
/// Show tooltip at the top or at the bottom of given view. |
|
545 |
/// Tooltip will be added to anchorView.window.rootViewController.view |
|
546 |
/// Use this method to present the tooltip with automatic positioning or |
|
547 |
/// use -presentInView:withArrowPosition:direction: for manual positioning |
|
548 |
/// If anchorView is nil or has no window - this method does nothing. |
|
549 |
/// \param anchorView view to show at, must be already added to window view hierarchy, in order to decide |
|
550 |
/// where tooltip will be shown. (If there’s not enough space at the top of the anchorView in window bounds - |
|
551 |
/// tooltip will be shown at the bottom of it) |
|
552 |
/// |
|
553 |
- (void)presentFromView:(UIView * _Nonnull)anchorView; |
|
554 |
/// Adds tooltip to given view, with given position and arrow direction. |
|
555 |
/// \param view View to be used as superview. |
|
556 |
/// |
|
557 |
/// \param arrowPosition Point in view’s cordinates, where arrow will be pointing |
|
558 |
/// |
|
559 |
/// \param direction whenever arrow should be pointing up (message bubble is below the arrow) or down (message bubble is above the arrow). |
|
560 |
/// |
|
561 |
- (void)presentInView:(UIView * _Nonnull)view withArrowPosition:(CGPoint)arrowPosition direction:(enum FBSDKTooltipViewArrowDirection)direction; |
|
562 |
/// Remove tooltip manually. |
|
563 |
/// Calling this method isn’t necessary - tooltip will dismiss itself automatically after the <code>displayDuration</code>. |
|
564 |
- (void)dismiss; |
|
565 |
- (void)drawRect:(CGRect)rect; |
|
566 |
- (void)layoutSubviews; |
|
567 |
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE; |
|
568 |
@end |
|
569 |
|
|
570 |
/// FBSDKTooltipViewArrowDirection enum |
|
571 |
/// Passed on construction to determine arrow orientation. |
|
572 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKTooltipViewArrowDirection, "ArrowDirection", closed) { |
|
573 |
FBSDKTooltipViewArrowDirectionDown = 0, |
|
574 |
FBSDKTooltipViewArrowDirectionUp = 1, |
|
575 |
}; |
|
576 |
|
|
577 |
/// FBSDKTooltipColorStyle enum |
|
578 |
/// Passed on construction to determine color styling. |
|
579 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKTooltipColorStyle, "ColorStyle", closed) { |
|
580 |
FBSDKTooltipColorStyleFriendlyBlue = 0, |
|
581 |
FBSDKTooltipColorStyleNeutralGray = 1, |
|
582 |
}; |
|
583 |
|
|
584 |
@protocol FBSDKLoginTooltipViewDelegate; |
|
585 |
|
|
586 |
/// Represents a tooltip to be displayed next to a Facebook login button |
|
587 |
/// to highlight features for new users. |
|
588 |
/// The <code>FBSDKLoginButton</code> may display this view automatically. If you do |
|
589 |
/// not use the <code>FBSDKLoginButton</code>, you can manually call one of the <code>present*</code> methods |
|
590 |
/// as appropriate and customize behavior via <code>FBSDKLoginTooltipViewDelegate</code> delegate. |
|
591 |
/// By default, the <code>FBSDKLoginTooltipView</code> is not added to the superview until it is |
|
592 |
/// determined the app has migrated to the new login experience. You can override this |
|
593 |
/// (e.g., to test the UI layout) by implementing the delegate or setting <code>forceDisplay</code> to YES. |
|
594 |
SWIFT_CLASS_NAMED("FBLoginTooltipView") |
|
595 |
@interface FBSDKLoginTooltipView : FBSDKTooltipView |
|
596 |
/// the delegate |
|
597 |
@property (nonatomic, weak) id <FBSDKLoginTooltipViewDelegate> _Nullable delegate; |
|
598 |
/// if set to YES, the view will always be displayed and the delegate’s |
|
599 |
/// <code>loginTooltipView:shouldAppear:</code> will NOT be called. |
|
600 |
@property (nonatomic) BOOL forceDisplay; |
|
601 |
/// if set to YES, the view will always be displayed and the delegate’s |
|
602 |
/// <code>loginTooltipView:shouldAppear:</code> will NOT be called. |
|
603 |
@property (nonatomic) BOOL shouldForceDisplay; |
|
604 |
/// Create tooltip |
|
605 |
- (nonnull instancetype)init; |
|
606 |
- (nonnull instancetype)initWithTagline:(NSString * _Nullable)tagline message:(NSString * _Nullable)message colorStyle:(enum FBSDKTooltipColorStyle)colorStyle OBJC_DESIGNATED_INITIALIZER; |
|
607 |
- (void)presentInView:(UIView * _Nonnull)view withArrowPosition:(CGPoint)arrowPosition direction:(enum FBSDKTooltipViewArrowDirection)direction; |
|
608 |
@end |
|
609 |
|
|
610 |
|
|
611 |
/// Internal Type exposed to facilitate transition to Swift. |
|
612 |
/// API Subject to change or removal without warning. Do not use. |
|
613 |
/// <ul> |
|
614 |
/// <li> |
|
615 |
/// Warning INTERNAL: DO NOT USE |
|
616 |
/// </li> |
|
617 |
/// </ul> |
|
618 |
SWIFT_CLASS_NAMED("FBPermission") |
|
619 |
@interface FBSDKPermission : NSObject |
|
620 |
@property (nonatomic, readonly, copy) NSString * _Nonnull description; |
|
621 |
@property (nonatomic, readonly) NSUInteger hash; |
|
622 |
/// Attempts to initialize a new permission with the given string. |
|
623 |
/// Creation will fail and return nil if the string is invalid. |
|
624 |
/// \param string The raw permission string |
|
625 |
/// |
|
626 |
- (nullable instancetype)initWithString:(NSString * _Nonnull)string OBJC_DESIGNATED_INITIALIZER; |
|
627 |
/// Returns a set of <code>FBPermission</code> from a set of raw permissions strings. |
|
628 |
/// Will return nil if any of the input permissions is invalid. |
|
629 |
+ (NSSet<FBSDKPermission *> * _Nullable)permissionsFromRawPermissions:(NSSet<NSString *> * _Nonnull)rawPermissions SWIFT_WARN_UNUSED_RESULT; |
|
630 |
/// Returns a set of string permissions from a set of <code>FBPermission</code> by |
|
631 |
/// extracting the “value” property for each element. |
|
632 |
+ (NSSet<NSString *> * _Nonnull)rawPermissionsFromPermissions:(NSSet<FBSDKPermission *> * _Nonnull)permissions SWIFT_WARN_UNUSED_RESULT; |
|
633 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
634 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
635 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
636 |
@end |
2e29a3
|
637 |
|
L |
638 |
|
|
639 |
|
e0ec42
|
640 |
|
L |
641 |
@class FBSDKLoginManagerLoginResult; |
|
642 |
|
|
643 |
/// A delegate for <code>FBSDKLoginButton</code> |
|
644 |
SWIFT_PROTOCOL_NAMED("LoginButtonDelegate") |
|
645 |
@protocol FBSDKLoginButtonDelegate <NSObject> |
|
646 |
/// Sent to the delegate when the button was used to login. |
|
647 |
/// @param loginButton The button being used to log in |
|
648 |
/// @param result The results of the login |
|
649 |
/// @param error The error (if any) from the login |
|
650 |
- (void)loginButton:(FBSDKLoginButton * _Nonnull)loginButton didCompleteWithResult:(FBSDKLoginManagerLoginResult * _Nullable)result error:(NSError * _Nullable)error; |
|
651 |
/// Sent to the delegate when the button was used to logout. |
|
652 |
/// @param loginButton The button being used to log out. |
|
653 |
- (void)loginButtonDidLogOut:(FBSDKLoginButton * _Nonnull)loginButton; |
|
654 |
@optional |
|
655 |
/// Sent to the delegate when the button is about to login. |
|
656 |
/// @param loginButton The button being used to log in |
|
657 |
/// @return <code>true</code> if the login should be allowed to proceed, <code>false</code> otherwise |
|
658 |
- (BOOL)loginButtonWillLogin:(FBSDKLoginButton * _Nonnull)loginButton SWIFT_WARN_UNUSED_RESULT; |
|
659 |
@end |
|
660 |
|
|
661 |
|
|
662 |
/// A configuration to use for modifying the behavior of a login attempt. |
|
663 |
SWIFT_CLASS_NAMED("LoginConfiguration") |
|
664 |
@interface FBSDKLoginConfiguration : NSObject |
|
665 |
/// The nonce that the configuration was created with. |
|
666 |
/// A unique nonce will be used if none is provided to the initializer. |
|
667 |
@property (nonatomic, readonly, copy) NSString * _Nonnull nonce; |
|
668 |
/// The tracking preference. Defaults to <code>.enabled</code>. |
|
669 |
@property (nonatomic, readonly) enum FBSDKLoginTracking tracking; |
|
670 |
/// The requested permissions for the login attempt. Defaults to an empty set. |
|
671 |
@property (nonatomic, readonly, copy) NSSet<FBSDKPermission *> * _Nonnull requestedPermissions; |
|
672 |
/// The Messenger Page Id associated with this login request. |
|
673 |
@property (nonatomic, readonly, copy) NSString * _Nullable messengerPageId; |
|
674 |
/// The auth type associated with this login request. |
|
675 |
@property (nonatomic, readonly) FBSDKLoginAuthType _Nullable authType; |
|
676 |
/// The code verifier used in the PKCE process. |
|
677 |
/// If not provided, a code verifier will be randomly generated. |
|
678 |
@property (nonatomic, readonly, strong) FBSDKCodeVerifier * _Nonnull codeVerifier; |
|
679 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
680 |
/// @param permissions the requested permissions for a login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
681 |
/// @param tracking the tracking preference to use for a login attempt. |
|
682 |
/// @param nonce an optional nonce to use for the login attempt. A valid nonce must be a non-empty string without whitespace. |
|
683 |
/// Creation of the configuration will fail if the nonce is invalid. |
|
684 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
685 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking nonce:(NSString * _Nonnull)nonce messengerPageId:(NSString * _Nullable)messengerPageId; |
|
686 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
687 |
/// @param permissions the requested permissions for a login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
688 |
/// @param tracking the tracking preference to use for a login attempt. |
|
689 |
/// @param nonce an optional nonce to use for the login attempt. A valid nonce must be a non-empty string without whitespace. |
|
690 |
/// Creation of the configuration will fail if the nonce is invalid. |
|
691 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
692 |
/// @param authType auth_type param to use for login. |
|
693 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking nonce:(NSString * _Nonnull)nonce messengerPageId:(NSString * _Nullable)messengerPageId authType:(FBSDKLoginAuthType _Nullable)authType; |
|
694 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
695 |
/// @param permissions the requested permissions for a login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
696 |
/// @param tracking the tracking preference to use for a login attempt. |
|
697 |
/// @param nonce an optional nonce to use for the login attempt. A valid nonce must be a non-empty string without whitespace. |
|
698 |
/// Creation of the configuration will fail if the nonce is invalid. |
|
699 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking nonce:(NSString * _Nonnull)nonce; |
|
700 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
701 |
/// @param permissions the requested permissions for the login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
702 |
/// @param tracking the tracking preference to use for a login attempt. |
|
703 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
704 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking messengerPageId:(NSString * _Nullable)messengerPageId; |
|
705 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
706 |
/// @param permissions the requested permissions for the login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
707 |
/// @param tracking the tracking preference to use for a login attempt. |
|
708 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
709 |
/// @param authType auth_type param to use for login. |
|
710 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking messengerPageId:(NSString * _Nullable)messengerPageId authType:(FBSDKLoginAuthType _Nullable)authType; |
|
711 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
712 |
/// @param permissions the requested permissions for a login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
713 |
/// @param tracking the tracking preference to use for a login attempt. |
|
714 |
/// @param nonce an optional nonce to use for the login attempt. A valid nonce must be a non-empty string without whitespace. |
|
715 |
/// Creation of the configuration will fail if the nonce is invalid. |
|
716 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
717 |
/// @param authType auth_type param to use for login. |
|
718 |
/// @param codeVerifier The code verifier used in the PKCE process. |
|
719 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking nonce:(NSString * _Nonnull)nonce messengerPageId:(NSString * _Nullable)messengerPageId authType:(FBSDKLoginAuthType _Nullable)authType codeVerifier:(FBSDKCodeVerifier * _Nonnull)codeVerifier OBJC_DESIGNATED_INITIALIZER; |
|
720 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
721 |
/// @param permissions the requested permissions for the login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
722 |
/// @param tracking the tracking preference to use for a login attempt. |
|
723 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking; |
|
724 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
725 |
/// @param tracking the login tracking preference to use for a login attempt. |
|
726 |
- (nullable instancetype)initWithTracking:(enum FBSDKLoginTracking)tracking; |
|
727 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
728 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
729 |
@end |
|
730 |
|
|
731 |
/// Custom error codes for login errors in the login error domain |
|
732 |
typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKLoginError, "LoginErrorCode", open) { |
|
733 |
/// Reserved |
|
734 |
FBSDKLoginErrorReserved = 300, |
|
735 |
/// The error code for unknown errors |
|
736 |
FBSDKLoginErrorUnknown = 301, |
|
737 |
/// The user’s password has changed and must log in again |
|
738 |
FBSDKLoginErrorPasswordChanged = 302, |
|
739 |
/// The user must log in to their account on www.facebook.com to restore access |
|
740 |
FBSDKLoginErrorUserCheckpointed = 303, |
|
741 |
/// Indicates a failure to request new permissions because the user has changed |
|
742 |
FBSDKLoginErrorUserMismatch = 304, |
|
743 |
/// The user must confirm their account with Facebook before logging in |
|
744 |
FBSDKLoginErrorUnconfirmedUser = 305, |
|
745 |
/// The Accounts framework failed without returning an error, indicating the app’s slider in the |
|
746 |
/// iOS Facebook Settings (device Settings -> Facebook -> App Name) has been disabled. |
|
747 |
FBSDKLoginErrorSystemAccountAppDisabled = 306, |
|
748 |
/// An error occurred related to Facebook system Account store |
|
749 |
FBSDKLoginErrorSystemAccountUnavailable = 307, |
|
750 |
/// The login response was missing a valid challenge string |
|
751 |
FBSDKLoginErrorBadChallengeString = 308, |
|
752 |
/// The ID token returned in login response was invalid |
|
753 |
FBSDKLoginErrorInvalidIDToken = 309, |
|
754 |
/// A current access token was required and not provided |
|
755 |
FBSDKLoginErrorMissingAccessToken = 310, |
|
756 |
}; |
|
757 |
|
|
758 |
@class UIViewController; |
|
759 |
|
|
760 |
/// Provides methods for logging the user in and out. |
|
761 |
/// It works directly with <code>AccessToken</code> (for data access) and <code>AuthenticationToken</code> (for authentication); |
|
762 |
/// it sets the “current” tokens upon successful authorizations (or sets to <code>nil</code> in case of <code>logOut</code>). |
|
763 |
/// You should check <code>AccessToken.current</code> before calling a login method to see if there is |
|
764 |
/// a cached token available (typically in a <code>viewDidLoad</code> implementation). |
|
765 |
/// @warning If you are managing your own tokens outside of <code>AccessToken</code>, you will need to set |
|
766 |
/// <code>AccessToken.current</code> before calling a login method to authorize further permissions on your tokens. |
|
767 |
SWIFT_CLASS_NAMED("LoginManager") |
|
768 |
@interface FBSDKLoginManager : NSObject |
|
769 |
/// The default audience. You should set this if you intend to ask for publish permissions. |
|
770 |
@property (nonatomic) enum FBSDKDefaultAudience defaultAudience; |
|
771 |
/// Initialize an instance of <code>LoginManager.</code> |
|
772 |
/// \param defaultAudience Optional default audience to use. Default: <code>.friends</code>. |
|
773 |
/// |
|
774 |
- (nonnull instancetype)initWithDefaultAudience:(enum FBSDKDefaultAudience)defaultAudience; |
|
775 |
/// Logs the user in or authorizes additional permissions. |
|
776 |
/// @param viewController the view controller from which to present the login UI. If nil, the topmost view |
|
777 |
/// controller will be automatically determined and used. |
|
778 |
/// @param configuration the login configuration to use. |
|
779 |
/// @param completion the login completion handler. |
|
780 |
/// Use this method when asking for permissions. You should only ask for permissions when they |
|
781 |
/// are needed and the value should be explained to the user. You can inspect the |
|
782 |
/// <code>FBSDKLoginManagerLoginResultBlock</code>’s <code>result.declinedPermissions</code> to provide more information |
|
783 |
/// to the user if they decline permissions. |
|
784 |
/// To reduce unnecessary login attempts, you should typically check if <code>AccessToken.current</code> |
|
785 |
/// already contains the permissions you need. If it does, you probably do not need to call this method. |
|
786 |
/// @warning You can only perform one login call at a time. Calling a login method before the completion handler is |
|
787 |
/// called on a previous login attempt will result in an error. |
|
788 |
/// @warning This method will present a UI to the user and thus should be called on the main thread. |
|
789 |
- (void)logInFromViewController:(UIViewController * _Nullable)viewController configuration:(FBSDKLoginConfiguration * _Nullable)configuration completion:(FBSDKLoginManagerLoginResultBlock _Nonnull)completion; |
|
790 |
/// Logs the user in or authorizes additional permissions. |
|
791 |
/// @param permissions the optional array of permissions. Note this is converted to NSSet and is only |
|
792 |
/// an NSArray for the convenience of literal syntax. |
|
793 |
/// @param viewController the view controller to present from. If nil, the topmost view controller will be |
|
794 |
/// automatically determined as best as possible. |
|
795 |
/// @param handler the callback. |
|
796 |
/// Use this method when asking for read permissions. You should only ask for permissions when they |
|
797 |
/// are needed and explain the value to the user. You can inspect the <code>FBSDKLoginManagerLoginResultBlock</code>’s |
|
798 |
/// <code>result.declinedPermissions</code> to provide more information to the user if they decline permissions. |
|
799 |
/// You typically should check if <code>AccessToken.current</code> already contains the permissions you need before |
|
800 |
/// asking to reduce unnecessary login attempts. For example, you could perform that check in <code>viewDidLoad</code>. |
|
801 |
/// @warning You can only perform one login call at a time. Calling a login method before the completion handler is |
|
802 |
/// called on a previous login attempt will result in an error. |
|
803 |
/// @warning This method will present a UI to the user and thus should be called on the main thread. |
|
804 |
- (void)logInWithPermissions:(NSArray<NSString *> * _Nonnull)permissions fromViewController:(UIViewController * _Nullable)viewController handler:(FBSDKLoginManagerLoginResultBlock _Nullable)handler; |
|
805 |
/// Requests user’s permission to reathorize application’s data access, after it has expired due to inactivity. |
|
806 |
/// @param viewController the view controller from which to present the login UI. If nil, the topmost view |
|
807 |
/// controller will be automatically determined and used. |
|
808 |
/// @param handler the callback. |
|
809 |
/// Use this method when you need to reathorize your app’s access to user data via the Graph API. |
|
810 |
/// You should only call this after access has expired. |
|
811 |
/// You should provide as much context to the user as possible as to why you need to reauthorize the access, the |
|
812 |
/// scope of access being reathorized, and what added value your app provides when the access is reathorized. |
|
813 |
/// You can inspect the <code>result.declinedPermissions</code> to determine if you should provide more information to the |
|
814 |
/// user based on any declined permissions. |
|
815 |
/// @warning This method will reauthorize using a <code>LoginConfiguration</code> with <code>FBSDKLoginTracking</code> set to <code>.enabled</code>. |
|
816 |
/// @warning This method will present UI the user. You typically should call this if <code>AccessToken.isDataAccessExpired</code> |
|
817 |
/// is true. |
|
818 |
- (void)reauthorizeDataAccess:(UIViewController * _Nonnull)viewController handler:(FBSDKLoginManagerLoginResultBlock _Nonnull)handler; |
|
819 |
/// Logs the user out |
|
820 |
/// This nils out the singleton instances of <code>AccessToken</code>, <code>AuthenticationToken</code> and <code>Profle</code>. |
|
821 |
/// @note This is only a client side logout. It will not log the user out of their Facebook account. |
|
822 |
- (void)logOut; |
|
823 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
824 |
@end |
|
825 |
|
|
826 |
|
|
827 |
|
|
828 |
@class UIApplication; |
|
829 |
|
|
830 |
@interface FBSDKLoginManager (SWIFT_EXTENSION(FBSDKLoginKit)) <FBSDKURLOpening> |
|
831 |
+ (FBSDKLoginManager * _Nonnull)makeOpener SWIFT_WARN_UNUSED_RESULT; |
|
832 |
- (BOOL)application:(UIApplication * _Nullable)application openURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT; |
|
833 |
- (BOOL)canOpenURL:(NSURL * _Nonnull)url forApplication:(UIApplication * _Nullable)application sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT; |
|
834 |
- (void)applicationDidBecomeActive:(UIApplication * _Nonnull)application; |
|
835 |
- (BOOL)isAuthenticationURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; |
|
836 |
- (BOOL)shouldStopPropagationOfURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; |
|
837 |
@end |
|
838 |
|
|
839 |
@class FBSDKAuthenticationToken; |
|
840 |
|
|
841 |
/// Describes the result of a login attempt. |
|
842 |
SWIFT_CLASS_NAMED("LoginManagerLoginResult") |
|
843 |
@interface FBSDKLoginManagerLoginResult : NSObject |
|
844 |
/// The access token |
|
845 |
@property (nonatomic, readonly, strong) FBSDKAccessToken * _Nullable token; |
|
846 |
/// The authentication token |
|
847 |
@property (nonatomic, readonly, strong) FBSDKAuthenticationToken * _Nullable authenticationToken; |
|
848 |
/// Whether the login was cancelled by the user |
|
849 |
@property (nonatomic, readonly) BOOL isCancelled; |
|
850 |
/// The set of permissions granted by the user in the associated request. |
|
851 |
/// Inspect the token’s permissions set for a complete list. |
|
852 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull grantedPermissions; |
|
853 |
/// The set of permissions declined by the user in the associated request. |
|
854 |
/// Inspect the token’s permissions set for a complete list. |
|
855 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull declinedPermissions; |
|
856 |
/// Creates a new result |
|
857 |
/// @param token The access token |
|
858 |
/// @param authenticationToken The authentication token |
|
859 |
/// @param isCancelled whether The login was cancelled by the user |
|
860 |
/// @param grantedPermissions The set of granted permissions |
|
861 |
/// @param declinedPermissions The set of declined permissions |
|
862 |
- (nonnull instancetype)initWithToken:(FBSDKAccessToken * _Nullable)token authenticationToken:(FBSDKAuthenticationToken * _Nullable)authenticationToken isCancelled:(BOOL)isCancelled grantedPermissions:(NSSet<NSString *> * _Nonnull)grantedPermissions declinedPermissions:(NSSet<NSString *> * _Nonnull)declinedPermissions OBJC_DESIGNATED_INITIALIZER; |
|
863 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
864 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
865 |
@end |
|
866 |
|
|
867 |
|
|
868 |
/// The <code>LoginTooltipViewDelegate</code> protocol defines the methods used to receive event |
|
869 |
/// notifications from <code>FBLoginTooltipView</code> objects. |
|
870 |
SWIFT_PROTOCOL_NAMED("LoginTooltipViewDelegate") |
|
871 |
@protocol FBSDKLoginTooltipViewDelegate |
|
872 |
@optional |
|
873 |
/// Asks the delegate if the tooltip view should appear |
|
874 |
/// @param view The tooltip view. |
|
875 |
/// @param appIsEligible The value fetched from the server identifying if the app |
|
876 |
/// is eligible for the new login experience. |
|
877 |
/// Use this method to customize display behavior. |
|
878 |
- (BOOL)loginTooltipView:(FBSDKLoginTooltipView * _Nonnull)view shouldAppear:(BOOL)appIsEligible SWIFT_WARN_UNUSED_RESULT; |
|
879 |
/// Tells the delegate the tooltip view will appear, specifically after it’s been |
|
880 |
/// added to the super view but before the fade in animation. |
|
881 |
/// @param view The tooltip view. |
|
882 |
- (void)loginTooltipViewWillAppear:(FBSDKLoginTooltipView * _Nonnull)view; |
|
883 |
/// Tells the delegate the tooltip view will not appear (i.e., was not |
|
884 |
/// added to the super view). |
|
885 |
/// @param view The tooltip view. |
|
886 |
- (void)loginTooltipViewWillNotAppear:(FBSDKLoginTooltipView * _Nonnull)view; |
|
887 |
@end |
|
888 |
|
|
889 |
/// <code>enabled</code> and <code>limited</code> see: https://developers.facebook.com/docs/facebook-login/ios/limited-login/ |
|
890 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKLoginTracking, "LoginTracking", open) { |
|
891 |
FBSDKLoginTrackingEnabled = 0, |
|
892 |
FBSDKLoginTrackingLimited = 1, |
|
893 |
}; |
|
894 |
|
|
895 |
|
|
896 |
@class FBSDKProfile; |
|
897 |
|
|
898 |
/// Internal Type exposed to facilitate transition to Swift. |
|
899 |
/// API Subject to change or removal without warning. Do not use. |
|
900 |
/// <ul> |
|
901 |
/// <li> |
|
902 |
/// Warning INTERNAL: DO NOT USE |
|
903 |
/// </li> |
|
904 |
/// </ul> |
|
905 |
/// Structured interface for accessing the parameters used to complete a log in request. |
|
906 |
/// If <code>authenticationTokenString</code> is non-<code>nil</code>, the authentication succeeded. If <code>error</code> is |
|
907 |
/// non-<code>nil</code> the request failed. If both are <code>nil</code>, the request was cancelled. |
|
908 |
SWIFT_CLASS_NAMED("_LoginCompletionParameters") |
|
909 |
@interface FBSDKLoginCompletionParameters : NSObject |
|
910 |
@property (nonatomic, strong) FBSDKAuthenticationToken * _Nullable authenticationToken; |
|
911 |
@property (nonatomic, strong) FBSDKProfile * _Nullable profile; |
|
912 |
@property (nonatomic, copy) NSString * _Nullable accessTokenString; |
|
913 |
@property (nonatomic, copy) NSString * _Nullable nonceString; |
|
914 |
@property (nonatomic, copy) NSString * _Nullable authenticationTokenString; |
|
915 |
@property (nonatomic, copy) NSString * _Nullable code; |
|
916 |
@property (nonatomic, copy) NSSet<FBSDKPermission *> * _Nullable permissions; |
|
917 |
@property (nonatomic, copy) NSSet<FBSDKPermission *> * _Nullable declinedPermissions; |
|
918 |
@property (nonatomic, copy) NSSet<FBSDKPermission *> * _Nullable expiredPermissions; |
|
919 |
@property (nonatomic, copy) NSString * _Nullable appID; |
|
920 |
@property (nonatomic, copy) NSString * _Nullable userID; |
|
921 |
@property (nonatomic) NSError * _Nullable error; |
|
922 |
@property (nonatomic, copy) NSDate * _Nullable expirationDate; |
|
923 |
@property (nonatomic, copy) NSDate * _Nullable dataAccessExpirationDate; |
|
924 |
@property (nonatomic, copy) NSString * _Nullable challenge; |
|
925 |
@property (nonatomic, copy) NSString * _Nullable graphDomain; |
97fc0a
|
926 |
@property (nonatomic, copy) NSString * _Nullable userTokenNonce; |
e0ec42
|
927 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
L |
928 |
@end |
|
929 |
|
|
930 |
#endif |
2e29a3
|
931 |
#if __has_attribute(external_source_symbol) |
L |
932 |
# pragma clang attribute pop |
97fc0a
|
933 |
#endif |
L |
934 |
#if defined(__cplusplus) |
2e29a3
|
935 |
#endif |
L |
936 |
#pragma clang diagnostic pop |
|
937 |
#endif |
|
938 |
|
|
939 |
#elif defined(__x86_64__) && __x86_64__ |
2a6e18
|
940 |
// Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4) |
2e29a3
|
941 |
#ifndef FBSDKLOGINKIT_SWIFT_H |
L |
942 |
#define FBSDKLOGINKIT_SWIFT_H |
|
943 |
#pragma clang diagnostic push |
|
944 |
#pragma clang diagnostic ignored "-Wgcc-compat" |
|
945 |
|
|
946 |
#if !defined(__has_include) |
|
947 |
# define __has_include(x) 0 |
|
948 |
#endif |
|
949 |
#if !defined(__has_attribute) |
|
950 |
# define __has_attribute(x) 0 |
|
951 |
#endif |
|
952 |
#if !defined(__has_feature) |
|
953 |
# define __has_feature(x) 0 |
|
954 |
#endif |
|
955 |
#if !defined(__has_warning) |
|
956 |
# define __has_warning(x) 0 |
|
957 |
#endif |
|
958 |
|
|
959 |
#if __has_include(<swift/objc-prologue.h>) |
|
960 |
# include <swift/objc-prologue.h> |
|
961 |
#endif |
|
962 |
|
|
963 |
#pragma clang diagnostic ignored "-Wauto-import" |
e0ec42
|
964 |
#if defined(__OBJC__) |
2e29a3
|
965 |
#include <Foundation/Foundation.h> |
e0ec42
|
966 |
#endif |
L |
967 |
#if defined(__cplusplus) |
|
968 |
#include <cstdint> |
|
969 |
#include <cstddef> |
|
970 |
#include <cstdbool> |
97fc0a
|
971 |
#include <cstring> |
L |
972 |
#include <stdlib.h> |
|
973 |
#include <new> |
|
974 |
#include <type_traits> |
e0ec42
|
975 |
#else |
2e29a3
|
976 |
#include <stdint.h> |
L |
977 |
#include <stddef.h> |
|
978 |
#include <stdbool.h> |
97fc0a
|
979 |
#include <string.h> |
L |
980 |
#endif |
|
981 |
#if defined(__cplusplus) |
|
982 |
#if defined(__arm64e__) && __has_include(<ptrauth.h>) |
|
983 |
# include <ptrauth.h> |
|
984 |
#else |
|
985 |
#pragma clang diagnostic push |
|
986 |
#pragma clang diagnostic ignored "-Wreserved-macro-identifier" |
|
987 |
# ifndef __ptrauth_swift_value_witness_function_pointer |
|
988 |
# define __ptrauth_swift_value_witness_function_pointer(x) |
|
989 |
# endif |
|
990 |
# ifndef __ptrauth_swift_class_method_pointer |
|
991 |
# define __ptrauth_swift_class_method_pointer(x) |
|
992 |
# endif |
|
993 |
#pragma clang diagnostic pop |
|
994 |
#endif |
e0ec42
|
995 |
#endif |
2e29a3
|
996 |
|
L |
997 |
#if !defined(SWIFT_TYPEDEFS) |
|
998 |
# define SWIFT_TYPEDEFS 1 |
|
999 |
# if __has_include(<uchar.h>) |
|
1000 |
# include <uchar.h> |
|
1001 |
# elif !defined(__cplusplus) |
|
1002 |
typedef uint_least16_t char16_t; |
|
1003 |
typedef uint_least32_t char32_t; |
|
1004 |
# endif |
|
1005 |
typedef float swift_float2 __attribute__((__ext_vector_type__(2))); |
|
1006 |
typedef float swift_float3 __attribute__((__ext_vector_type__(3))); |
|
1007 |
typedef float swift_float4 __attribute__((__ext_vector_type__(4))); |
|
1008 |
typedef double swift_double2 __attribute__((__ext_vector_type__(2))); |
|
1009 |
typedef double swift_double3 __attribute__((__ext_vector_type__(3))); |
|
1010 |
typedef double swift_double4 __attribute__((__ext_vector_type__(4))); |
|
1011 |
typedef int swift_int2 __attribute__((__ext_vector_type__(2))); |
|
1012 |
typedef int swift_int3 __attribute__((__ext_vector_type__(3))); |
|
1013 |
typedef int swift_int4 __attribute__((__ext_vector_type__(4))); |
|
1014 |
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); |
|
1015 |
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); |
|
1016 |
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); |
|
1017 |
#endif |
|
1018 |
|
|
1019 |
#if !defined(SWIFT_PASTE) |
|
1020 |
# define SWIFT_PASTE_HELPER(x, y) x##y |
|
1021 |
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) |
|
1022 |
#endif |
|
1023 |
#if !defined(SWIFT_METATYPE) |
|
1024 |
# define SWIFT_METATYPE(X) Class |
|
1025 |
#endif |
|
1026 |
#if !defined(SWIFT_CLASS_PROPERTY) |
|
1027 |
# if __has_feature(objc_class_property) |
|
1028 |
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ |
|
1029 |
# else |
97fc0a
|
1030 |
# define SWIFT_CLASS_PROPERTY(...) |
2e29a3
|
1031 |
# endif |
L |
1032 |
#endif |
97fc0a
|
1033 |
#if !defined(SWIFT_RUNTIME_NAME) |
L |
1034 |
# if __has_attribute(objc_runtime_name) |
|
1035 |
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) |
|
1036 |
# else |
|
1037 |
# define SWIFT_RUNTIME_NAME(X) |
|
1038 |
# endif |
2e29a3
|
1039 |
#endif |
97fc0a
|
1040 |
#if !defined(SWIFT_COMPILE_NAME) |
L |
1041 |
# if __has_attribute(swift_name) |
|
1042 |
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) |
|
1043 |
# else |
|
1044 |
# define SWIFT_COMPILE_NAME(X) |
|
1045 |
# endif |
2e29a3
|
1046 |
#endif |
97fc0a
|
1047 |
#if !defined(SWIFT_METHOD_FAMILY) |
L |
1048 |
# if __has_attribute(objc_method_family) |
|
1049 |
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) |
|
1050 |
# else |
|
1051 |
# define SWIFT_METHOD_FAMILY(X) |
|
1052 |
# endif |
2e29a3
|
1053 |
#endif |
97fc0a
|
1054 |
#if !defined(SWIFT_NOESCAPE) |
L |
1055 |
# if __has_attribute(noescape) |
|
1056 |
# define SWIFT_NOESCAPE __attribute__((noescape)) |
|
1057 |
# else |
|
1058 |
# define SWIFT_NOESCAPE |
|
1059 |
# endif |
2e29a3
|
1060 |
#endif |
97fc0a
|
1061 |
#if !defined(SWIFT_RELEASES_ARGUMENT) |
L |
1062 |
# if __has_attribute(ns_consumed) |
|
1063 |
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) |
|
1064 |
# else |
|
1065 |
# define SWIFT_RELEASES_ARGUMENT |
|
1066 |
# endif |
2e29a3
|
1067 |
#endif |
97fc0a
|
1068 |
#if !defined(SWIFT_WARN_UNUSED_RESULT) |
L |
1069 |
# if __has_attribute(warn_unused_result) |
|
1070 |
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
|
1071 |
# else |
|
1072 |
# define SWIFT_WARN_UNUSED_RESULT |
|
1073 |
# endif |
2e29a3
|
1074 |
#endif |
97fc0a
|
1075 |
#if !defined(SWIFT_NORETURN) |
L |
1076 |
# if __has_attribute(noreturn) |
|
1077 |
# define SWIFT_NORETURN __attribute__((noreturn)) |
|
1078 |
# else |
|
1079 |
# define SWIFT_NORETURN |
|
1080 |
# endif |
2e29a3
|
1081 |
#endif |
L |
1082 |
#if !defined(SWIFT_CLASS_EXTRA) |
97fc0a
|
1083 |
# define SWIFT_CLASS_EXTRA |
2e29a3
|
1084 |
#endif |
L |
1085 |
#if !defined(SWIFT_PROTOCOL_EXTRA) |
97fc0a
|
1086 |
# define SWIFT_PROTOCOL_EXTRA |
2e29a3
|
1087 |
#endif |
L |
1088 |
#if !defined(SWIFT_ENUM_EXTRA) |
97fc0a
|
1089 |
# define SWIFT_ENUM_EXTRA |
2e29a3
|
1090 |
#endif |
L |
1091 |
#if !defined(SWIFT_CLASS) |
|
1092 |
# if __has_attribute(objc_subclassing_restricted) |
|
1093 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA |
|
1094 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1095 |
# else |
|
1096 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1097 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1098 |
# endif |
|
1099 |
#endif |
|
1100 |
#if !defined(SWIFT_RESILIENT_CLASS) |
|
1101 |
# if __has_attribute(objc_class_stub) |
|
1102 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) |
|
1103 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
1104 |
# else |
|
1105 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) |
|
1106 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
1107 |
# endif |
|
1108 |
#endif |
|
1109 |
#if !defined(SWIFT_PROTOCOL) |
|
1110 |
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
1111 |
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
1112 |
#endif |
|
1113 |
#if !defined(SWIFT_EXTENSION) |
|
1114 |
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) |
|
1115 |
#endif |
|
1116 |
#if !defined(OBJC_DESIGNATED_INITIALIZER) |
|
1117 |
# if __has_attribute(objc_designated_initializer) |
|
1118 |
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) |
|
1119 |
# else |
97fc0a
|
1120 |
# define OBJC_DESIGNATED_INITIALIZER |
2e29a3
|
1121 |
# endif |
L |
1122 |
#endif |
|
1123 |
#if !defined(SWIFT_ENUM_ATTR) |
97fc0a
|
1124 |
# if __has_attribute(enum_extensibility) |
2e29a3
|
1125 |
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) |
L |
1126 |
# else |
97fc0a
|
1127 |
# define SWIFT_ENUM_ATTR(_extensibility) |
2e29a3
|
1128 |
# endif |
L |
1129 |
#endif |
|
1130 |
#if !defined(SWIFT_ENUM) |
|
1131 |
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
1132 |
# if __has_feature(generalized_swift_name) |
|
1133 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
1134 |
# else |
|
1135 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) |
|
1136 |
# endif |
|
1137 |
#endif |
|
1138 |
#if !defined(SWIFT_UNAVAILABLE) |
|
1139 |
# define SWIFT_UNAVAILABLE __attribute__((unavailable)) |
|
1140 |
#endif |
|
1141 |
#if !defined(SWIFT_UNAVAILABLE_MSG) |
|
1142 |
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) |
|
1143 |
#endif |
|
1144 |
#if !defined(SWIFT_AVAILABILITY) |
|
1145 |
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) |
|
1146 |
#endif |
|
1147 |
#if !defined(SWIFT_WEAK_IMPORT) |
|
1148 |
# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) |
|
1149 |
#endif |
|
1150 |
#if !defined(SWIFT_DEPRECATED) |
|
1151 |
# define SWIFT_DEPRECATED __attribute__((deprecated)) |
|
1152 |
#endif |
|
1153 |
#if !defined(SWIFT_DEPRECATED_MSG) |
|
1154 |
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) |
|
1155 |
#endif |
97fc0a
|
1156 |
#if !defined(SWIFT_DEPRECATED_OBJC) |
L |
1157 |
# if __has_feature(attribute_diagnose_if_objc) |
|
1158 |
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) |
|
1159 |
# else |
|
1160 |
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) |
|
1161 |
# endif |
2e29a3
|
1162 |
#endif |
e0ec42
|
1163 |
#if defined(__OBJC__) |
2e29a3
|
1164 |
#if !defined(IBSegueAction) |
97fc0a
|
1165 |
# define IBSegueAction |
2e29a3
|
1166 |
#endif |
e0ec42
|
1167 |
#endif |
L |
1168 |
#if !defined(SWIFT_EXTERN) |
|
1169 |
# if defined(__cplusplus) |
|
1170 |
# define SWIFT_EXTERN extern "C" |
|
1171 |
# else |
|
1172 |
# define SWIFT_EXTERN extern |
|
1173 |
# endif |
|
1174 |
#endif |
|
1175 |
#if !defined(SWIFT_CALL) |
|
1176 |
# define SWIFT_CALL __attribute__((swiftcall)) |
|
1177 |
#endif |
97fc0a
|
1178 |
#if !defined(SWIFT_INDIRECT_RESULT) |
L |
1179 |
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) |
e0ec42
|
1180 |
#endif |
97fc0a
|
1181 |
#if !defined(SWIFT_CONTEXT) |
L |
1182 |
# define SWIFT_CONTEXT __attribute__((swift_context)) |
|
1183 |
#endif |
|
1184 |
#if !defined(SWIFT_ERROR_RESULT) |
|
1185 |
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) |
|
1186 |
#endif |
|
1187 |
#if defined(__cplusplus) |
|
1188 |
# define SWIFT_NOEXCEPT noexcept |
e0ec42
|
1189 |
#else |
L |
1190 |
# define SWIFT_NOEXCEPT |
|
1191 |
#endif |
97fc0a
|
1192 |
#if !defined(SWIFT_C_INLINE_THUNK) |
L |
1193 |
# if __has_attribute(always_inline) |
|
1194 |
# if __has_attribute(nodebug) |
|
1195 |
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug)) |
|
1196 |
# else |
|
1197 |
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) |
|
1198 |
# endif |
|
1199 |
# else |
|
1200 |
# define SWIFT_C_INLINE_THUNK inline |
|
1201 |
# endif |
e0ec42
|
1202 |
#endif |
97fc0a
|
1203 |
#if defined(_WIN32) |
L |
1204 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
1205 |
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) |
|
1206 |
#endif |
|
1207 |
#else |
|
1208 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
1209 |
# define SWIFT_IMPORT_STDLIB_SYMBOL |
e0ec42
|
1210 |
#endif |
L |
1211 |
#endif |
|
1212 |
#if defined(__OBJC__) |
97fc0a
|
1213 |
#if __has_feature(objc_modules) |
2e29a3
|
1214 |
#if __has_warning("-Watimport-in-framework-header") |
L |
1215 |
#pragma clang diagnostic ignored "-Watimport-in-framework-header" |
|
1216 |
#endif |
e0ec42
|
1217 |
@import CoreFoundation; |
L |
1218 |
@import FBSDKCoreKit; |
|
1219 |
@import Foundation; |
|
1220 |
@import ObjectiveC; |
|
1221 |
@import UIKit; |
2e29a3
|
1222 |
#endif |
L |
1223 |
|
e0ec42
|
1224 |
#import <FBSDKLoginKit/FBSDKLoginKit.h> |
L |
1225 |
|
|
1226 |
#endif |
2e29a3
|
1227 |
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" |
L |
1228 |
#pragma clang diagnostic ignored "-Wduplicate-method-arg" |
|
1229 |
#if __has_warning("-Wpragma-clang-attribute") |
|
1230 |
# pragma clang diagnostic ignored "-Wpragma-clang-attribute" |
|
1231 |
#endif |
|
1232 |
#pragma clang diagnostic ignored "-Wunknown-pragmas" |
|
1233 |
#pragma clang diagnostic ignored "-Wnullability" |
e0ec42
|
1234 |
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
2e29a3
|
1235 |
|
L |
1236 |
#if __has_attribute(external_source_symbol) |
|
1237 |
# pragma push_macro("any") |
|
1238 |
# undef any |
|
1239 |
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FBSDKLoginKit",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) |
|
1240 |
# pragma pop_macro("any") |
|
1241 |
#endif |
|
1242 |
|
e0ec42
|
1243 |
#if defined(__OBJC__) |
L |
1244 |
|
|
1245 |
@class NSString; |
|
1246 |
|
|
1247 |
/// Represents a code verifier used in the PKCE (Proof Key for Code Exchange) |
|
1248 |
/// process. This is a cryptographically random string using the characters |
|
1249 |
/// A-Z, a-z, 0-9, and the punctuation characters -._~ (hyphen, period, |
|
1250 |
/// underscore, and tilde), between 43 and 128 characters long. |
|
1251 |
SWIFT_CLASS_NAMED("CodeVerifier") |
|
1252 |
@interface FBSDKCodeVerifier : NSObject |
|
1253 |
/// The string value of the code verifier |
|
1254 |
@property (nonatomic, readonly, copy) NSString * _Nonnull value; |
|
1255 |
/// The SHA256 hashed challenge of the code verifier |
|
1256 |
@property (nonatomic, readonly, copy) NSString * _Nonnull challenge; |
|
1257 |
/// Attempts to initialize a new code verifier instance with the given string. |
|
1258 |
/// Creation will fail and return nil if the string is invalid. |
|
1259 |
/// @param string the code verifier string |
|
1260 |
- (nullable instancetype)initWithString:(NSString * _Nonnull)string; |
|
1261 |
/// Initializes a new code verifier instance with a random string value |
|
1262 |
- (nonnull instancetype)init; |
|
1263 |
@end |
|
1264 |
|
|
1265 |
/// Passed to openURL to indicate which default audience to use for sessions that post data to Facebook. |
|
1266 |
/// Certain operations such as publishing a status or publishing a photo require an audience. When the user |
|
1267 |
/// grants an application permission to perform a publish operation, a default audience is selected as the |
|
1268 |
/// publication ceiling for the application. This enumerated value allows the application to select which |
|
1269 |
/// audience to ask the user to grant publish permission for. |
|
1270 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKDefaultAudience, "DefaultAudience", open) { |
|
1271 |
/// Indicates that the user’s friends are able to see posts made by the application |
|
1272 |
FBSDKDefaultAudienceFriends = 0, |
|
1273 |
/// Indicates that only the user is able to see posts made by the application |
|
1274 |
FBSDKDefaultAudienceOnlyMe = 1, |
|
1275 |
/// Indicates that all Facebook users are able to see posts made by the application |
|
1276 |
FBSDKDefaultAudienceEveryone = 2, |
|
1277 |
}; |
|
1278 |
|
|
1279 |
@class NSURL; |
|
1280 |
@class NSDate; |
|
1281 |
|
|
1282 |
/// Describes the initial response when starting the device login flow. |
|
1283 |
/// This is used by <code>DeviceLoginManager</code>. |
|
1284 |
SWIFT_CLASS_NAMED("DeviceLoginCodeInfo") |
|
1285 |
@interface FBSDKDeviceLoginCodeInfo : NSObject |
|
1286 |
/// The unique id for this login flow. |
|
1287 |
@property (nonatomic, readonly, copy) NSString * _Nonnull identifier; |
|
1288 |
/// The short “user_code” that should be presented to the user. |
|
1289 |
@property (nonatomic, readonly, copy) NSString * _Nonnull loginCode; |
|
1290 |
/// The verification URL. |
|
1291 |
@property (nonatomic, readonly, copy) NSURL * _Nonnull verificationURL; |
|
1292 |
/// The expiration date. |
|
1293 |
@property (nonatomic, readonly, copy) NSDate * _Nonnull expirationDate; |
|
1294 |
/// The polling interval |
|
1295 |
@property (nonatomic, readonly) NSUInteger pollingInterval; |
|
1296 |
- (nonnull instancetype)initWithIdentifier:(NSString * _Nonnull)identifier loginCode:(NSString * _Nonnull)loginCode verificationURL:(NSURL * _Nonnull)verificationURL expirationDate:(NSDate * _Nonnull)expirationDate pollingInterval:(NSUInteger)pollingInterval OBJC_DESIGNATED_INITIALIZER; |
|
1297 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1298 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1299 |
@end |
|
1300 |
|
|
1301 |
/// Custom error codes for device login errors in the login error domain |
|
1302 |
typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKDeviceLoginError, "DeviceLoginErrorCode", open) { |
|
1303 |
/// Your device is polling too frequently. |
|
1304 |
FBSDKDeviceLoginErrorExcessivePolling = 1349172, |
|
1305 |
/// User has declined to authorize your application. |
|
1306 |
FBSDKDeviceLoginErrorAuthorizationDeclined = 1349173, |
|
1307 |
/// User has not yet authorized your application. Continue polling. |
|
1308 |
FBSDKDeviceLoginErrorAuthorizationPending = 1349174, |
|
1309 |
/// The code you entered has expired. |
|
1310 |
FBSDKDeviceLoginErrorCodeExpired = 1349152, |
|
1311 |
}; |
|
1312 |
|
|
1313 |
@protocol FBSDKDeviceLoginManagerDelegate; |
|
1314 |
|
|
1315 |
/// Use this class to perform a device login flow. |
|
1316 |
/// The device login flow starts by requesting a code from the device login API. |
|
1317 |
/// This class informs the delegate when this code is received. You should then present the |
|
1318 |
/// code to the user to enter. In the meantime, this class polls the device login API |
|
1319 |
/// periodically and informs the delegate of the results. |
|
1320 |
/// See <a href="https://developers.facebook.com/docs/facebook-login/for-devices">Facebook Device Login</a>. |
|
1321 |
SWIFT_CLASS_NAMED("DeviceLoginManager") |
|
1322 |
@interface FBSDKDeviceLoginManager : NSObject |
|
1323 |
/// The device login manager delegate. |
|
1324 |
@property (nonatomic, weak) id <FBSDKDeviceLoginManagerDelegate> _Nullable delegate; |
|
1325 |
/// The requested permissions. |
|
1326 |
@property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull permissions; |
|
1327 |
/// The optional URL to redirect the user to after they complete the login. |
|
1328 |
/// The URL must be configured in your App Settings -> Advanced -> OAuth Redirect URIs |
|
1329 |
@property (nonatomic, copy) NSURL * _Nullable redirectURL; |
|
1330 |
/// Initializes a new instance. |
|
1331 |
/// @param permissions The permissions to request. |
|
1332 |
/// @param enableSmartLogin Whether to enable smart login. |
|
1333 |
- (nonnull instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions enableSmartLogin:(BOOL)enableSmartLogin OBJC_DESIGNATED_INITIALIZER; |
|
1334 |
/// Starts the device login flow |
|
1335 |
/// This instance will retain self until the flow is finished or cancelled. |
|
1336 |
- (void)start; |
|
1337 |
/// Attempts to cancel the device login flow. |
|
1338 |
- (void)cancel; |
|
1339 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1340 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1341 |
@end |
|
1342 |
|
|
1343 |
@class NSNetService; |
|
1344 |
@class NSNumber; |
|
1345 |
|
|
1346 |
@interface FBSDKDeviceLoginManager (SWIFT_EXTENSION(FBSDKLoginKit)) <NSNetServiceDelegate> |
|
1347 |
- (void)netService:(NSNetService * _Nonnull)service didNotPublish:(NSDictionary<NSString *, NSNumber *> * _Nonnull)errorValues; |
|
1348 |
@end |
|
1349 |
|
|
1350 |
|
|
1351 |
@class FBSDKDeviceLoginManagerResult; |
|
1352 |
|
|
1353 |
/// A delegate for <code>DeviceLoginManager</code>. |
|
1354 |
SWIFT_PROTOCOL_NAMED("DeviceLoginManagerDelegate") |
|
1355 |
@protocol FBSDKDeviceLoginManagerDelegate |
|
1356 |
/// Indicates the device login flow has started. You should parse <code>codeInfo</code> to present the code to the user to enter. |
|
1357 |
/// @param loginManager the login manager instance. |
|
1358 |
/// @param codeInfo the code info data. |
|
1359 |
- (void)deviceLoginManager:(FBSDKDeviceLoginManager * _Nonnull)loginManager startedWithCodeInfo:(FBSDKDeviceLoginCodeInfo * _Nonnull)codeInfo; |
|
1360 |
/// Indicates the device login flow has finished. |
|
1361 |
/// @param loginManager the login manager instance. |
|
1362 |
/// @param result the results of the login flow. |
|
1363 |
/// @param error the error, if available. |
|
1364 |
/// The flow can be finished if the user completed the flow, cancelled, or if the code has expired. |
|
1365 |
- (void)deviceLoginManager:(FBSDKDeviceLoginManager * _Nonnull)loginManager completedWithResult:(FBSDKDeviceLoginManagerResult * _Nullable)result error:(NSError * _Nullable)error; |
|
1366 |
@end |
|
1367 |
|
|
1368 |
@class FBSDKAccessToken; |
|
1369 |
|
|
1370 |
/// Represents the results of the a device login flow. This is used by <code>DeviceLoginManager</code> |
|
1371 |
SWIFT_CLASS_NAMED("DeviceLoginManagerResult") |
|
1372 |
@interface FBSDKDeviceLoginManagerResult : NSObject |
|
1373 |
/// The token |
|
1374 |
@property (nonatomic, readonly, strong) FBSDKAccessToken * _Nullable accessToken; |
|
1375 |
/// Indicates if the login was cancelled by the user, or if the device login code has expired. |
|
1376 |
@property (nonatomic, readonly) BOOL isCancelled; |
|
1377 |
/// Internal method exposed to facilitate transition to Swift. |
|
1378 |
/// API Subject to change or removal without warning. Do not use. |
|
1379 |
/// @warning INTERNAL - DO NOT USE |
|
1380 |
- (nonnull instancetype)initWithToken:(FBSDKAccessToken * _Nullable)token isCancelled:(BOOL)cancelled OBJC_DESIGNATED_INITIALIZER; |
|
1381 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1382 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1383 |
@end |
|
1384 |
|
|
1385 |
@protocol FBSDKLoginButtonDelegate; |
|
1386 |
enum FBSDKLoginButtonTooltipBehavior : NSUInteger; |
|
1387 |
enum FBSDKTooltipColorStyle : NSUInteger; |
|
1388 |
enum FBSDKLoginTracking : NSUInteger; |
|
1389 |
@class NSCoder; |
|
1390 |
|
|
1391 |
/// A button that initiates a log in or log out flow upon tapping. |
|
1392 |
/// <code>LoginButton</code> works with <code>AccessToken.current</code> to determine what to display, |
|
1393 |
/// and automatically starts authentication when tapped (i.e., you do not need to manually subscribe action targets). |
|
1394 |
/// Like <code>LoginManager</code>, you should make sure your app delegate is connected to <code>ApplicationDelegate</code> |
|
1395 |
/// in order for the button’s delegate to receive messages. |
|
1396 |
/// <code>LoginButton</code> has a fixed height of 30 pixels, but you may change the width. |
|
1397 |
/// Initializing the button with <code>nil</code> frame will size the button to its minimum frame. |
|
1398 |
SWIFT_CLASS_NAMED("FBLoginButton") |
|
1399 |
@interface FBSDKLoginButton : FBSDKButton |
|
1400 |
/// The default audience to use, if publish permissions are requested at login time. |
|
1401 |
@property (nonatomic) enum FBSDKDefaultAudience defaultAudience; |
|
1402 |
/// Gets or sets the delegate. |
|
1403 |
@property (nonatomic, weak) IBOutlet id <FBSDKLoginButtonDelegate> _Nullable delegate; |
|
1404 |
/// The permissions to request. |
|
1405 |
/// To provide the best experience, you should minimize the number of permissions you request, and only ask for them when needed. |
|
1406 |
/// For example, do not ask for “user_location” until you the information is actually used by the app. |
|
1407 |
/// Note this is converted to NSSet and is only |
|
1408 |
/// an NSArray for the convenience of literal syntax. |
|
1409 |
/// See <a href="https://developers.facebook.com/docs/facebook-login/permissions/">the permissions guide</a> for more details. |
|
1410 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull permissions; |
|
1411 |
/// Gets or sets the desired tooltip behavior. |
|
1412 |
@property (nonatomic) enum FBSDKLoginButtonTooltipBehavior tooltipBehavior; |
|
1413 |
/// Gets or sets the desired tooltip color style. |
|
1414 |
@property (nonatomic) enum FBSDKTooltipColorStyle tooltipColorStyle; |
|
1415 |
/// Gets or sets the desired tracking preference to use for login attempts. Defaults to <code>.enabled</code> |
|
1416 |
@property (nonatomic) enum FBSDKLoginTracking loginTracking; |
|
1417 |
/// Gets or sets an optional nonce to use for login attempts. A valid nonce must be a non-empty string without whitespace. |
|
1418 |
/// An invalid nonce will not be set. Instead, default unique nonces will be used for login attempts. |
|
1419 |
@property (nonatomic, copy) NSString * _Nullable nonce; |
|
1420 |
/// Gets or sets an optional page id to use for login attempts. |
|
1421 |
@property (nonatomic, copy) NSString * _Nullable messengerPageId; |
|
1422 |
/// Gets or sets the login authorization type to use in the login request. Defaults to <code>rerequest</code>. Use <code>nil</code> to avoid |
|
1423 |
/// requesting permissions that were previously denied. |
|
1424 |
@property (nonatomic) FBSDKLoginAuthType _Nullable authType; |
|
1425 |
/// The code verifier used in the PKCE process. |
|
1426 |
/// If not provided, a code verifier will be randomly generated. |
|
1427 |
@property (nonatomic, strong) FBSDKCodeVerifier * _Nonnull codeVerifier; |
|
1428 |
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; |
|
1429 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; |
|
1430 |
- (void)didMoveToWindow; |
|
1431 |
- (CGRect)imageRectForContentRect:(CGRect)contentRect SWIFT_WARN_UNUSED_RESULT; |
|
1432 |
- (CGRect)titleRectForContentRect:(CGRect)contentRect SWIFT_WARN_UNUSED_RESULT; |
|
1433 |
- (void)layoutSubviews; |
|
1434 |
- (CGSize)sizeThatFits:(CGSize)size SWIFT_WARN_UNUSED_RESULT; |
|
1435 |
@end |
|
1436 |
|
|
1437 |
/// Indicates the desired login tooltip behavior. |
|
1438 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKLoginButtonTooltipBehavior, "TooltipBehavior", open) { |
|
1439 |
/// The default behavior. The tooltip will only be displayed if |
|
1440 |
/// the app is eligible (determined by possible server round trip) |
|
1441 |
FBSDKLoginButtonTooltipBehaviorAutomatic = 0, |
|
1442 |
/// Force display of the tooltip (typically for UI testing) |
|
1443 |
FBSDKLoginButtonTooltipBehaviorForceDisplay = 1, |
|
1444 |
/// Force disable. In this case you can still exert more refined |
|
1445 |
/// control by manually constructing a <code>FBSDKLoginTooltipView</code> instance. |
|
1446 |
FBSDKLoginButtonTooltipBehaviorDisable = 2, |
|
1447 |
}; |
|
1448 |
|
|
1449 |
enum FBSDKTooltipViewArrowDirection : NSUInteger; |
|
1450 |
|
|
1451 |
/// Tooltip bubble with text in it used to display tips for UI elements, |
|
1452 |
/// with a pointed arrow (to refer to the UI element). |
|
1453 |
/// The tooltip fades in and will automatically fade out. See <code>displayDuration</code>. |
|
1454 |
SWIFT_CLASS_NAMED("FBTooltipView") |
|
1455 |
@interface FBSDKTooltipView : UIView |
|
1456 |
/// Gets or sets the amount of time in seconds the tooltip should be displayed. |
|
1457 |
/// Set this to zero to make the display permanent until explicitly dismissed. |
|
1458 |
/// Defaults to six seconds. |
|
1459 |
@property (nonatomic) NSTimeInterval displayDuration; |
|
1460 |
/// Gets or sets the color style after initialization. |
|
1461 |
/// Defaults to value passed to -initWithTagline:message:colorStyle:. |
|
1462 |
@property (nonatomic) enum FBSDKTooltipColorStyle colorStyle; |
|
1463 |
/// Gets or sets the message. |
|
1464 |
@property (nonatomic, copy) NSString * _Nullable message; |
|
1465 |
/// Gets or sets the optional phrase that comprises the first part of the label (and is highlighted differently). |
|
1466 |
@property (nonatomic, copy) NSString * _Nullable tagline; |
|
1467 |
/// Convenience constructor |
|
1468 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1469 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1470 |
/// Designated initializer. |
|
1471 |
/// If you need to show a tooltip for login, consider using the <code>FBSDKLoginTooltipView</code> view. |
|
1472 |
/// See FBSDKLoginTooltipView |
|
1473 |
/// \param tagline First part of the label, that will be highlighted with different color. Can be nil. |
|
1474 |
/// |
|
1475 |
/// \param message Main message to display. |
|
1476 |
/// |
|
1477 |
/// \param colorStyle Color style to use for tooltip. |
|
1478 |
/// |
|
1479 |
- (nonnull instancetype)initWithTagline:(NSString * _Nullable)tagline message:(NSString * _Nullable)message colorStyle:(enum FBSDKTooltipColorStyle)colorStyle OBJC_DESIGNATED_INITIALIZER; |
|
1480 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE; |
|
1481 |
/// Show tooltip at the top or at the bottom of given view. |
|
1482 |
/// Tooltip will be added to anchorView.window.rootViewController.view |
|
1483 |
/// Use this method to present the tooltip with automatic positioning or |
|
1484 |
/// use -presentInView:withArrowPosition:direction: for manual positioning |
|
1485 |
/// If anchorView is nil or has no window - this method does nothing. |
|
1486 |
/// \param anchorView view to show at, must be already added to window view hierarchy, in order to decide |
|
1487 |
/// where tooltip will be shown. (If there’s not enough space at the top of the anchorView in window bounds - |
|
1488 |
/// tooltip will be shown at the bottom of it) |
|
1489 |
/// |
|
1490 |
- (void)presentFromView:(UIView * _Nonnull)anchorView; |
|
1491 |
/// Adds tooltip to given view, with given position and arrow direction. |
|
1492 |
/// \param view View to be used as superview. |
|
1493 |
/// |
|
1494 |
/// \param arrowPosition Point in view’s cordinates, where arrow will be pointing |
|
1495 |
/// |
|
1496 |
/// \param direction whenever arrow should be pointing up (message bubble is below the arrow) or down (message bubble is above the arrow). |
|
1497 |
/// |
|
1498 |
- (void)presentInView:(UIView * _Nonnull)view withArrowPosition:(CGPoint)arrowPosition direction:(enum FBSDKTooltipViewArrowDirection)direction; |
|
1499 |
/// Remove tooltip manually. |
|
1500 |
/// Calling this method isn’t necessary - tooltip will dismiss itself automatically after the <code>displayDuration</code>. |
|
1501 |
- (void)dismiss; |
|
1502 |
- (void)drawRect:(CGRect)rect; |
|
1503 |
- (void)layoutSubviews; |
|
1504 |
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE; |
|
1505 |
@end |
|
1506 |
|
|
1507 |
/// FBSDKTooltipViewArrowDirection enum |
|
1508 |
/// Passed on construction to determine arrow orientation. |
|
1509 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKTooltipViewArrowDirection, "ArrowDirection", closed) { |
|
1510 |
FBSDKTooltipViewArrowDirectionDown = 0, |
|
1511 |
FBSDKTooltipViewArrowDirectionUp = 1, |
|
1512 |
}; |
|
1513 |
|
|
1514 |
/// FBSDKTooltipColorStyle enum |
|
1515 |
/// Passed on construction to determine color styling. |
|
1516 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKTooltipColorStyle, "ColorStyle", closed) { |
|
1517 |
FBSDKTooltipColorStyleFriendlyBlue = 0, |
|
1518 |
FBSDKTooltipColorStyleNeutralGray = 1, |
|
1519 |
}; |
|
1520 |
|
|
1521 |
@protocol FBSDKLoginTooltipViewDelegate; |
|
1522 |
|
|
1523 |
/// Represents a tooltip to be displayed next to a Facebook login button |
|
1524 |
/// to highlight features for new users. |
|
1525 |
/// The <code>FBSDKLoginButton</code> may display this view automatically. If you do |
|
1526 |
/// not use the <code>FBSDKLoginButton</code>, you can manually call one of the <code>present*</code> methods |
|
1527 |
/// as appropriate and customize behavior via <code>FBSDKLoginTooltipViewDelegate</code> delegate. |
|
1528 |
/// By default, the <code>FBSDKLoginTooltipView</code> is not added to the superview until it is |
|
1529 |
/// determined the app has migrated to the new login experience. You can override this |
|
1530 |
/// (e.g., to test the UI layout) by implementing the delegate or setting <code>forceDisplay</code> to YES. |
|
1531 |
SWIFT_CLASS_NAMED("FBLoginTooltipView") |
|
1532 |
@interface FBSDKLoginTooltipView : FBSDKTooltipView |
|
1533 |
/// the delegate |
|
1534 |
@property (nonatomic, weak) id <FBSDKLoginTooltipViewDelegate> _Nullable delegate; |
|
1535 |
/// if set to YES, the view will always be displayed and the delegate’s |
|
1536 |
/// <code>loginTooltipView:shouldAppear:</code> will NOT be called. |
|
1537 |
@property (nonatomic) BOOL forceDisplay; |
|
1538 |
/// if set to YES, the view will always be displayed and the delegate’s |
|
1539 |
/// <code>loginTooltipView:shouldAppear:</code> will NOT be called. |
|
1540 |
@property (nonatomic) BOOL shouldForceDisplay; |
|
1541 |
/// Create tooltip |
|
1542 |
- (nonnull instancetype)init; |
|
1543 |
- (nonnull instancetype)initWithTagline:(NSString * _Nullable)tagline message:(NSString * _Nullable)message colorStyle:(enum FBSDKTooltipColorStyle)colorStyle OBJC_DESIGNATED_INITIALIZER; |
|
1544 |
- (void)presentInView:(UIView * _Nonnull)view withArrowPosition:(CGPoint)arrowPosition direction:(enum FBSDKTooltipViewArrowDirection)direction; |
|
1545 |
@end |
|
1546 |
|
|
1547 |
|
|
1548 |
/// Internal Type exposed to facilitate transition to Swift. |
|
1549 |
/// API Subject to change or removal without warning. Do not use. |
|
1550 |
/// <ul> |
|
1551 |
/// <li> |
|
1552 |
/// Warning INTERNAL: DO NOT USE |
|
1553 |
/// </li> |
|
1554 |
/// </ul> |
|
1555 |
SWIFT_CLASS_NAMED("FBPermission") |
|
1556 |
@interface FBSDKPermission : NSObject |
|
1557 |
@property (nonatomic, readonly, copy) NSString * _Nonnull description; |
|
1558 |
@property (nonatomic, readonly) NSUInteger hash; |
|
1559 |
/// Attempts to initialize a new permission with the given string. |
|
1560 |
/// Creation will fail and return nil if the string is invalid. |
|
1561 |
/// \param string The raw permission string |
|
1562 |
/// |
|
1563 |
- (nullable instancetype)initWithString:(NSString * _Nonnull)string OBJC_DESIGNATED_INITIALIZER; |
|
1564 |
/// Returns a set of <code>FBPermission</code> from a set of raw permissions strings. |
|
1565 |
/// Will return nil if any of the input permissions is invalid. |
|
1566 |
+ (NSSet<FBSDKPermission *> * _Nullable)permissionsFromRawPermissions:(NSSet<NSString *> * _Nonnull)rawPermissions SWIFT_WARN_UNUSED_RESULT; |
|
1567 |
/// Returns a set of string permissions from a set of <code>FBPermission</code> by |
|
1568 |
/// extracting the “value” property for each element. |
|
1569 |
+ (NSSet<NSString *> * _Nonnull)rawPermissionsFromPermissions:(NSSet<FBSDKPermission *> * _Nonnull)permissions SWIFT_WARN_UNUSED_RESULT; |
|
1570 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1571 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1572 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1573 |
@end |
2e29a3
|
1574 |
|
L |
1575 |
|
|
1576 |
|
e0ec42
|
1577 |
|
L |
1578 |
@class FBSDKLoginManagerLoginResult; |
|
1579 |
|
|
1580 |
/// A delegate for <code>FBSDKLoginButton</code> |
|
1581 |
SWIFT_PROTOCOL_NAMED("LoginButtonDelegate") |
|
1582 |
@protocol FBSDKLoginButtonDelegate <NSObject> |
|
1583 |
/// Sent to the delegate when the button was used to login. |
|
1584 |
/// @param loginButton The button being used to log in |
|
1585 |
/// @param result The results of the login |
|
1586 |
/// @param error The error (if any) from the login |
|
1587 |
- (void)loginButton:(FBSDKLoginButton * _Nonnull)loginButton didCompleteWithResult:(FBSDKLoginManagerLoginResult * _Nullable)result error:(NSError * _Nullable)error; |
|
1588 |
/// Sent to the delegate when the button was used to logout. |
|
1589 |
/// @param loginButton The button being used to log out. |
|
1590 |
- (void)loginButtonDidLogOut:(FBSDKLoginButton * _Nonnull)loginButton; |
|
1591 |
@optional |
|
1592 |
/// Sent to the delegate when the button is about to login. |
|
1593 |
/// @param loginButton The button being used to log in |
|
1594 |
/// @return <code>true</code> if the login should be allowed to proceed, <code>false</code> otherwise |
|
1595 |
- (BOOL)loginButtonWillLogin:(FBSDKLoginButton * _Nonnull)loginButton SWIFT_WARN_UNUSED_RESULT; |
|
1596 |
@end |
|
1597 |
|
|
1598 |
|
|
1599 |
/// A configuration to use for modifying the behavior of a login attempt. |
|
1600 |
SWIFT_CLASS_NAMED("LoginConfiguration") |
|
1601 |
@interface FBSDKLoginConfiguration : NSObject |
|
1602 |
/// The nonce that the configuration was created with. |
|
1603 |
/// A unique nonce will be used if none is provided to the initializer. |
|
1604 |
@property (nonatomic, readonly, copy) NSString * _Nonnull nonce; |
|
1605 |
/// The tracking preference. Defaults to <code>.enabled</code>. |
|
1606 |
@property (nonatomic, readonly) enum FBSDKLoginTracking tracking; |
|
1607 |
/// The requested permissions for the login attempt. Defaults to an empty set. |
|
1608 |
@property (nonatomic, readonly, copy) NSSet<FBSDKPermission *> * _Nonnull requestedPermissions; |
|
1609 |
/// The Messenger Page Id associated with this login request. |
|
1610 |
@property (nonatomic, readonly, copy) NSString * _Nullable messengerPageId; |
|
1611 |
/// The auth type associated with this login request. |
|
1612 |
@property (nonatomic, readonly) FBSDKLoginAuthType _Nullable authType; |
|
1613 |
/// The code verifier used in the PKCE process. |
|
1614 |
/// If not provided, a code verifier will be randomly generated. |
|
1615 |
@property (nonatomic, readonly, strong) FBSDKCodeVerifier * _Nonnull codeVerifier; |
|
1616 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
1617 |
/// @param permissions the requested permissions for a login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
1618 |
/// @param tracking the tracking preference to use for a login attempt. |
|
1619 |
/// @param nonce an optional nonce to use for the login attempt. A valid nonce must be a non-empty string without whitespace. |
|
1620 |
/// Creation of the configuration will fail if the nonce is invalid. |
|
1621 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
1622 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking nonce:(NSString * _Nonnull)nonce messengerPageId:(NSString * _Nullable)messengerPageId; |
|
1623 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
1624 |
/// @param permissions the requested permissions for a login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
1625 |
/// @param tracking the tracking preference to use for a login attempt. |
|
1626 |
/// @param nonce an optional nonce to use for the login attempt. A valid nonce must be a non-empty string without whitespace. |
|
1627 |
/// Creation of the configuration will fail if the nonce is invalid. |
|
1628 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
1629 |
/// @param authType auth_type param to use for login. |
|
1630 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking nonce:(NSString * _Nonnull)nonce messengerPageId:(NSString * _Nullable)messengerPageId authType:(FBSDKLoginAuthType _Nullable)authType; |
|
1631 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
1632 |
/// @param permissions the requested permissions for a login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
1633 |
/// @param tracking the tracking preference to use for a login attempt. |
|
1634 |
/// @param nonce an optional nonce to use for the login attempt. A valid nonce must be a non-empty string without whitespace. |
|
1635 |
/// Creation of the configuration will fail if the nonce is invalid. |
|
1636 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking nonce:(NSString * _Nonnull)nonce; |
|
1637 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
1638 |
/// @param permissions the requested permissions for the login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
1639 |
/// @param tracking the tracking preference to use for a login attempt. |
|
1640 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
1641 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking messengerPageId:(NSString * _Nullable)messengerPageId; |
|
1642 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
1643 |
/// @param permissions the requested permissions for the login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
1644 |
/// @param tracking the tracking preference to use for a login attempt. |
|
1645 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
1646 |
/// @param authType auth_type param to use for login. |
|
1647 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking messengerPageId:(NSString * _Nullable)messengerPageId authType:(FBSDKLoginAuthType _Nullable)authType; |
|
1648 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
1649 |
/// @param permissions the requested permissions for a login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
1650 |
/// @param tracking the tracking preference to use for a login attempt. |
|
1651 |
/// @param nonce an optional nonce to use for the login attempt. A valid nonce must be a non-empty string without whitespace. |
|
1652 |
/// Creation of the configuration will fail if the nonce is invalid. |
|
1653 |
/// @param messengerPageId the associated page id to use for a login attempt. |
|
1654 |
/// @param authType auth_type param to use for login. |
|
1655 |
/// @param codeVerifier The code verifier used in the PKCE process. |
|
1656 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking nonce:(NSString * _Nonnull)nonce messengerPageId:(NSString * _Nullable)messengerPageId authType:(FBSDKLoginAuthType _Nullable)authType codeVerifier:(FBSDKCodeVerifier * _Nonnull)codeVerifier OBJC_DESIGNATED_INITIALIZER; |
|
1657 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
1658 |
/// @param permissions the requested permissions for the login attempt. Permissions must be an array of strings that do not contain whitespace. |
|
1659 |
/// @param tracking the tracking preference to use for a login attempt. |
|
1660 |
- (nullable instancetype)initWithPermissions:(NSArray<NSString *> * _Nonnull)permissions tracking:(enum FBSDKLoginTracking)tracking; |
|
1661 |
/// Attempts to initialize a new configuration with the expected parameters. |
|
1662 |
/// @param tracking the login tracking preference to use for a login attempt. |
|
1663 |
- (nullable instancetype)initWithTracking:(enum FBSDKLoginTracking)tracking; |
|
1664 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1665 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1666 |
@end |
|
1667 |
|
|
1668 |
/// Custom error codes for login errors in the login error domain |
|
1669 |
typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKLoginError, "LoginErrorCode", open) { |
|
1670 |
/// Reserved |
|
1671 |
FBSDKLoginErrorReserved = 300, |
|
1672 |
/// The error code for unknown errors |
|
1673 |
FBSDKLoginErrorUnknown = 301, |
|
1674 |
/// The user’s password has changed and must log in again |
|
1675 |
FBSDKLoginErrorPasswordChanged = 302, |
|
1676 |
/// The user must log in to their account on www.facebook.com to restore access |
|
1677 |
FBSDKLoginErrorUserCheckpointed = 303, |
|
1678 |
/// Indicates a failure to request new permissions because the user has changed |
|
1679 |
FBSDKLoginErrorUserMismatch = 304, |
|
1680 |
/// The user must confirm their account with Facebook before logging in |
|
1681 |
FBSDKLoginErrorUnconfirmedUser = 305, |
|
1682 |
/// The Accounts framework failed without returning an error, indicating the app’s slider in the |
|
1683 |
/// iOS Facebook Settings (device Settings -> Facebook -> App Name) has been disabled. |
|
1684 |
FBSDKLoginErrorSystemAccountAppDisabled = 306, |
|
1685 |
/// An error occurred related to Facebook system Account store |
|
1686 |
FBSDKLoginErrorSystemAccountUnavailable = 307, |
|
1687 |
/// The login response was missing a valid challenge string |
|
1688 |
FBSDKLoginErrorBadChallengeString = 308, |
|
1689 |
/// The ID token returned in login response was invalid |
|
1690 |
FBSDKLoginErrorInvalidIDToken = 309, |
|
1691 |
/// A current access token was required and not provided |
|
1692 |
FBSDKLoginErrorMissingAccessToken = 310, |
|
1693 |
}; |
|
1694 |
|
|
1695 |
@class UIViewController; |
|
1696 |
|
|
1697 |
/// Provides methods for logging the user in and out. |
|
1698 |
/// It works directly with <code>AccessToken</code> (for data access) and <code>AuthenticationToken</code> (for authentication); |
|
1699 |
/// it sets the “current” tokens upon successful authorizations (or sets to <code>nil</code> in case of <code>logOut</code>). |
|
1700 |
/// You should check <code>AccessToken.current</code> before calling a login method to see if there is |
|
1701 |
/// a cached token available (typically in a <code>viewDidLoad</code> implementation). |
|
1702 |
/// @warning If you are managing your own tokens outside of <code>AccessToken</code>, you will need to set |
|
1703 |
/// <code>AccessToken.current</code> before calling a login method to authorize further permissions on your tokens. |
|
1704 |
SWIFT_CLASS_NAMED("LoginManager") |
|
1705 |
@interface FBSDKLoginManager : NSObject |
|
1706 |
/// The default audience. You should set this if you intend to ask for publish permissions. |
|
1707 |
@property (nonatomic) enum FBSDKDefaultAudience defaultAudience; |
|
1708 |
/// Initialize an instance of <code>LoginManager.</code> |
|
1709 |
/// \param defaultAudience Optional default audience to use. Default: <code>.friends</code>. |
|
1710 |
/// |
|
1711 |
- (nonnull instancetype)initWithDefaultAudience:(enum FBSDKDefaultAudience)defaultAudience; |
|
1712 |
/// Logs the user in or authorizes additional permissions. |
|
1713 |
/// @param viewController the view controller from which to present the login UI. If nil, the topmost view |
|
1714 |
/// controller will be automatically determined and used. |
|
1715 |
/// @param configuration the login configuration to use. |
|
1716 |
/// @param completion the login completion handler. |
|
1717 |
/// Use this method when asking for permissions. You should only ask for permissions when they |
|
1718 |
/// are needed and the value should be explained to the user. You can inspect the |
|
1719 |
/// <code>FBSDKLoginManagerLoginResultBlock</code>’s <code>result.declinedPermissions</code> to provide more information |
|
1720 |
/// to the user if they decline permissions. |
|
1721 |
/// To reduce unnecessary login attempts, you should typically check if <code>AccessToken.current</code> |
|
1722 |
/// already contains the permissions you need. If it does, you probably do not need to call this method. |
|
1723 |
/// @warning You can only perform one login call at a time. Calling a login method before the completion handler is |
|
1724 |
/// called on a previous login attempt will result in an error. |
|
1725 |
/// @warning This method will present a UI to the user and thus should be called on the main thread. |
|
1726 |
- (void)logInFromViewController:(UIViewController * _Nullable)viewController configuration:(FBSDKLoginConfiguration * _Nullable)configuration completion:(FBSDKLoginManagerLoginResultBlock _Nonnull)completion; |
|
1727 |
/// Logs the user in or authorizes additional permissions. |
|
1728 |
/// @param permissions the optional array of permissions. Note this is converted to NSSet and is only |
|
1729 |
/// an NSArray for the convenience of literal syntax. |
|
1730 |
/// @param viewController the view controller to present from. If nil, the topmost view controller will be |
|
1731 |
/// automatically determined as best as possible. |
|
1732 |
/// @param handler the callback. |
|
1733 |
/// Use this method when asking for read permissions. You should only ask for permissions when they |
|
1734 |
/// are needed and explain the value to the user. You can inspect the <code>FBSDKLoginManagerLoginResultBlock</code>’s |
|
1735 |
/// <code>result.declinedPermissions</code> to provide more information to the user if they decline permissions. |
|
1736 |
/// You typically should check if <code>AccessToken.current</code> already contains the permissions you need before |
|
1737 |
/// asking to reduce unnecessary login attempts. For example, you could perform that check in <code>viewDidLoad</code>. |
|
1738 |
/// @warning You can only perform one login call at a time. Calling a login method before the completion handler is |
|
1739 |
/// called on a previous login attempt will result in an error. |
|
1740 |
/// @warning This method will present a UI to the user and thus should be called on the main thread. |
|
1741 |
- (void)logInWithPermissions:(NSArray<NSString *> * _Nonnull)permissions fromViewController:(UIViewController * _Nullable)viewController handler:(FBSDKLoginManagerLoginResultBlock _Nullable)handler; |
|
1742 |
/// Requests user’s permission to reathorize application’s data access, after it has expired due to inactivity. |
|
1743 |
/// @param viewController the view controller from which to present the login UI. If nil, the topmost view |
|
1744 |
/// controller will be automatically determined and used. |
|
1745 |
/// @param handler the callback. |
|
1746 |
/// Use this method when you need to reathorize your app’s access to user data via the Graph API. |
|
1747 |
/// You should only call this after access has expired. |
|
1748 |
/// You should provide as much context to the user as possible as to why you need to reauthorize the access, the |
|
1749 |
/// scope of access being reathorized, and what added value your app provides when the access is reathorized. |
|
1750 |
/// You can inspect the <code>result.declinedPermissions</code> to determine if you should provide more information to the |
|
1751 |
/// user based on any declined permissions. |
|
1752 |
/// @warning This method will reauthorize using a <code>LoginConfiguration</code> with <code>FBSDKLoginTracking</code> set to <code>.enabled</code>. |
|
1753 |
/// @warning This method will present UI the user. You typically should call this if <code>AccessToken.isDataAccessExpired</code> |
|
1754 |
/// is true. |
|
1755 |
- (void)reauthorizeDataAccess:(UIViewController * _Nonnull)viewController handler:(FBSDKLoginManagerLoginResultBlock _Nonnull)handler; |
|
1756 |
/// Logs the user out |
|
1757 |
/// This nils out the singleton instances of <code>AccessToken</code>, <code>AuthenticationToken</code> and <code>Profle</code>. |
|
1758 |
/// @note This is only a client side logout. It will not log the user out of their Facebook account. |
|
1759 |
- (void)logOut; |
|
1760 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1761 |
@end |
|
1762 |
|
|
1763 |
|
|
1764 |
|
|
1765 |
@class UIApplication; |
|
1766 |
|
|
1767 |
@interface FBSDKLoginManager (SWIFT_EXTENSION(FBSDKLoginKit)) <FBSDKURLOpening> |
|
1768 |
+ (FBSDKLoginManager * _Nonnull)makeOpener SWIFT_WARN_UNUSED_RESULT; |
|
1769 |
- (BOOL)application:(UIApplication * _Nullable)application openURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT; |
|
1770 |
- (BOOL)canOpenURL:(NSURL * _Nonnull)url forApplication:(UIApplication * _Nullable)application sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT; |
|
1771 |
- (void)applicationDidBecomeActive:(UIApplication * _Nonnull)application; |
|
1772 |
- (BOOL)isAuthenticationURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; |
|
1773 |
- (BOOL)shouldStopPropagationOfURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; |
|
1774 |
@end |
|
1775 |
|
|
1776 |
@class FBSDKAuthenticationToken; |
|
1777 |
|
|
1778 |
/// Describes the result of a login attempt. |
|
1779 |
SWIFT_CLASS_NAMED("LoginManagerLoginResult") |
|
1780 |
@interface FBSDKLoginManagerLoginResult : NSObject |
|
1781 |
/// The access token |
|
1782 |
@property (nonatomic, readonly, strong) FBSDKAccessToken * _Nullable token; |
|
1783 |
/// The authentication token |
|
1784 |
@property (nonatomic, readonly, strong) FBSDKAuthenticationToken * _Nullable authenticationToken; |
|
1785 |
/// Whether the login was cancelled by the user |
|
1786 |
@property (nonatomic, readonly) BOOL isCancelled; |
|
1787 |
/// The set of permissions granted by the user in the associated request. |
|
1788 |
/// Inspect the token’s permissions set for a complete list. |
|
1789 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull grantedPermissions; |
|
1790 |
/// The set of permissions declined by the user in the associated request. |
|
1791 |
/// Inspect the token’s permissions set for a complete list. |
|
1792 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull declinedPermissions; |
|
1793 |
/// Creates a new result |
|
1794 |
/// @param token The access token |
|
1795 |
/// @param authenticationToken The authentication token |
|
1796 |
/// @param isCancelled whether The login was cancelled by the user |
|
1797 |
/// @param grantedPermissions The set of granted permissions |
|
1798 |
/// @param declinedPermissions The set of declined permissions |
|
1799 |
- (nonnull instancetype)initWithToken:(FBSDKAccessToken * _Nullable)token authenticationToken:(FBSDKAuthenticationToken * _Nullable)authenticationToken isCancelled:(BOOL)isCancelled grantedPermissions:(NSSet<NSString *> * _Nonnull)grantedPermissions declinedPermissions:(NSSet<NSString *> * _Nonnull)declinedPermissions OBJC_DESIGNATED_INITIALIZER; |
|
1800 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1801 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1802 |
@end |
|
1803 |
|
|
1804 |
|
|
1805 |
/// The <code>LoginTooltipViewDelegate</code> protocol defines the methods used to receive event |
|
1806 |
/// notifications from <code>FBLoginTooltipView</code> objects. |
|
1807 |
SWIFT_PROTOCOL_NAMED("LoginTooltipViewDelegate") |
|
1808 |
@protocol FBSDKLoginTooltipViewDelegate |
|
1809 |
@optional |
|
1810 |
/// Asks the delegate if the tooltip view should appear |
|
1811 |
/// @param view The tooltip view. |
|
1812 |
/// @param appIsEligible The value fetched from the server identifying if the app |
|
1813 |
/// is eligible for the new login experience. |
|
1814 |
/// Use this method to customize display behavior. |
|
1815 |
- (BOOL)loginTooltipView:(FBSDKLoginTooltipView * _Nonnull)view shouldAppear:(BOOL)appIsEligible SWIFT_WARN_UNUSED_RESULT; |
|
1816 |
/// Tells the delegate the tooltip view will appear, specifically after it’s been |
|
1817 |
/// added to the super view but before the fade in animation. |
|
1818 |
/// @param view The tooltip view. |
|
1819 |
- (void)loginTooltipViewWillAppear:(FBSDKLoginTooltipView * _Nonnull)view; |
|
1820 |
/// Tells the delegate the tooltip view will not appear (i.e., was not |
|
1821 |
/// added to the super view). |
|
1822 |
/// @param view The tooltip view. |
|
1823 |
- (void)loginTooltipViewWillNotAppear:(FBSDKLoginTooltipView * _Nonnull)view; |
|
1824 |
@end |
|
1825 |
|
|
1826 |
/// <code>enabled</code> and <code>limited</code> see: https://developers.facebook.com/docs/facebook-login/ios/limited-login/ |
|
1827 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKLoginTracking, "LoginTracking", open) { |
|
1828 |
FBSDKLoginTrackingEnabled = 0, |
|
1829 |
FBSDKLoginTrackingLimited = 1, |
|
1830 |
}; |
|
1831 |
|
|
1832 |
|
|
1833 |
@class FBSDKProfile; |
|
1834 |
|
|
1835 |
/// Internal Type exposed to facilitate transition to Swift. |
|
1836 |
/// API Subject to change or removal without warning. Do not use. |
|
1837 |
/// <ul> |
|
1838 |
/// <li> |
|
1839 |
/// Warning INTERNAL: DO NOT USE |
|
1840 |
/// </li> |
|
1841 |
/// </ul> |
|
1842 |
/// Structured interface for accessing the parameters used to complete a log in request. |
|
1843 |
/// If <code>authenticationTokenString</code> is non-<code>nil</code>, the authentication succeeded. If <code>error</code> is |
|
1844 |
/// non-<code>nil</code> the request failed. If both are <code>nil</code>, the request was cancelled. |
|
1845 |
SWIFT_CLASS_NAMED("_LoginCompletionParameters") |
|
1846 |
@interface FBSDKLoginCompletionParameters : NSObject |
|
1847 |
@property (nonatomic, strong) FBSDKAuthenticationToken * _Nullable authenticationToken; |
|
1848 |
@property (nonatomic, strong) FBSDKProfile * _Nullable profile; |
|
1849 |
@property (nonatomic, copy) NSString * _Nullable accessTokenString; |
|
1850 |
@property (nonatomic, copy) NSString * _Nullable nonceString; |
|
1851 |
@property (nonatomic, copy) NSString * _Nullable authenticationTokenString; |
|
1852 |
@property (nonatomic, copy) NSString * _Nullable code; |
|
1853 |
@property (nonatomic, copy) NSSet<FBSDKPermission *> * _Nullable permissions; |
|
1854 |
@property (nonatomic, copy) NSSet<FBSDKPermission *> * _Nullable declinedPermissions; |
|
1855 |
@property (nonatomic, copy) NSSet<FBSDKPermission *> * _Nullable expiredPermissions; |
|
1856 |
@property (nonatomic, copy) NSString * _Nullable appID; |
|
1857 |
@property (nonatomic, copy) NSString * _Nullable userID; |
|
1858 |
@property (nonatomic) NSError * _Nullable error; |
|
1859 |
@property (nonatomic, copy) NSDate * _Nullable expirationDate; |
|
1860 |
@property (nonatomic, copy) NSDate * _Nullable dataAccessExpirationDate; |
|
1861 |
@property (nonatomic, copy) NSString * _Nullable challenge; |
|
1862 |
@property (nonatomic, copy) NSString * _Nullable graphDomain; |
97fc0a
|
1863 |
@property (nonatomic, copy) NSString * _Nullable userTokenNonce; |
e0ec42
|
1864 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
L |
1865 |
@end |
|
1866 |
|
|
1867 |
#endif |
2e29a3
|
1868 |
#if __has_attribute(external_source_symbol) |
L |
1869 |
# pragma clang attribute pop |
|
1870 |
#endif |
97fc0a
|
1871 |
#if defined(__cplusplus) |
L |
1872 |
#endif |
2e29a3
|
1873 |
#pragma clang diagnostic pop |
L |
1874 |
#endif |
|
1875 |
|
e0ec42
|
1876 |
#else |
L |
1877 |
#error unsupported Swift architecture |
2e29a3
|
1878 |
#endif |