commit | author | age
|
2e29a3
|
1 |
#if 0 |
L |
2 |
#elif defined(__arm64__) && __arm64__ |
97fc0a
|
3 |
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) |
2e29a3
|
4 |
#ifndef FBSDKSHAREKIT_SWIFT_H |
L |
5 |
#define FBSDKSHAREKIT_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; |
2e29a3
|
284 |
#endif |
L |
285 |
|
e0ec42
|
286 |
#import <FBSDKShareKit/FBSDKShareKit.h> |
L |
287 |
|
|
288 |
#endif |
2e29a3
|
289 |
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" |
L |
290 |
#pragma clang diagnostic ignored "-Wduplicate-method-arg" |
|
291 |
#if __has_warning("-Wpragma-clang-attribute") |
|
292 |
# pragma clang diagnostic ignored "-Wpragma-clang-attribute" |
|
293 |
#endif |
|
294 |
#pragma clang diagnostic ignored "-Wunknown-pragmas" |
|
295 |
#pragma clang diagnostic ignored "-Wnullability" |
e0ec42
|
296 |
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
2e29a3
|
297 |
|
L |
298 |
#if __has_attribute(external_source_symbol) |
|
299 |
# pragma push_macro("any") |
|
300 |
# undef any |
|
301 |
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FBSDKShareKit",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) |
|
302 |
# pragma pop_macro("any") |
|
303 |
#endif |
|
304 |
|
e0ec42
|
305 |
#if defined(__OBJC__) |
L |
306 |
|
|
307 |
@class NSURL; |
|
308 |
@class NSString; |
|
309 |
enum FBSDKAppInviteDestination : NSInteger; |
|
310 |
|
|
311 |
/// A model for app invite |
|
312 |
SWIFT_CLASS_NAMED("AppInviteContent") |
|
313 |
@interface FBSDKAppInviteContent : NSObject |
|
314 |
/// A URL to a preview image that will be displayed with the app invite |
|
315 |
/// This is optional. If you don’t include it a fallback image will be used. |
|
316 |
@property (nonatomic, copy) NSURL * _Nullable appInvitePreviewImageURL; |
|
317 |
/// An app link target that will be used as a target when the user accept the invite. |
|
318 |
@property (nonatomic, copy) NSURL * _Nonnull appLinkURL; |
|
319 |
/// Promotional code to be displayed while sending and receiving the invite. |
|
320 |
/// This is optional. This can be between 0 and 10 characters long and can contain |
|
321 |
/// alphanumeric characters only. To set a promo code, you need to set promo text. |
|
322 |
@property (nonatomic, copy) NSString * _Nullable promotionCode; |
|
323 |
/// Promotional text to be displayed while sending and receiving the invite. |
|
324 |
/// This is optional. This can be between 0 and 80 characters long and can contain |
|
325 |
/// alphanumeric and spaces only. |
|
326 |
@property (nonatomic, copy) NSString * _Nullable promotionText; |
|
327 |
/// Destination for the app invite. The default value is <code>.facebook</code>. |
|
328 |
@property (nonatomic) enum FBSDKAppInviteDestination destination; |
|
329 |
- (nonnull instancetype)initWithAppLinkURL:(NSURL * _Nonnull)appLinkURL OBJC_DESIGNATED_INITIALIZER; |
|
330 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
331 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
332 |
@end |
|
333 |
|
|
334 |
/// Specifies the privacy of a group. |
|
335 |
typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKAppInviteDestination, "Destination", open) { |
|
336 |
/// Deliver to Facebook |
|
337 |
FBSDKAppInviteDestinationFacebook = 0, |
|
338 |
FBSDKAppInviteDestinationMessenger = 1, |
|
339 |
}; |
|
340 |
|
|
341 |
|
|
342 |
/// An interface for validatable content and media. |
|
343 |
SWIFT_PROTOCOL_NAMED("SharingValidatable") |
|
344 |
@protocol FBSDKSharingValidatable |
|
345 |
/// Validate that this content or media contains valid values. |
|
346 |
/// \param options The share bridge options to use for validation. |
|
347 |
/// |
|
348 |
/// |
|
349 |
/// throws: |
|
350 |
/// If the values are not valid. |
|
351 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)options error:(NSError * _Nullable * _Nullable)error; |
|
352 |
@end |
|
353 |
|
|
354 |
|
|
355 |
@interface FBSDKAppInviteContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
356 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
357 |
@end |
|
358 |
|
|
359 |
|
|
360 |
|
|
361 |
/// A container of arguments for a camera effect. |
|
362 |
/// An argument is a <code>String</code> or <code>[String]</code> identified by a <code>String</code> key. |
|
363 |
SWIFT_CLASS_NAMED("CameraEffectArguments") |
|
364 |
@interface FBSDKCameraEffectArguments : NSObject |
|
365 |
/// Sets a string argument in the container. |
|
366 |
/// @param string The argument |
|
367 |
/// @param key The key for the argument |
|
368 |
- (void)setString:(NSString * _Nullable)string forKey:(NSString * _Nonnull)key; |
|
369 |
/// Gets a string argument from the container. |
|
370 |
/// @param key The key for the argument |
|
371 |
/// @return The string value or nil |
|
372 |
- (NSString * _Nullable)stringForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
373 |
/// Sets a string array argument in the container. |
|
374 |
/// @param array The array argument |
|
375 |
/// @param key The key for the argument |
|
376 |
- (void)setArray:(NSArray<NSString *> * _Nullable)array forKey:(NSString * _Nonnull)key; |
|
377 |
/// Gets an array argument from the container. |
|
378 |
/// @param key The key for the argument |
|
379 |
/// @return The array argument |
|
380 |
- (NSArray<NSString *> * _Nullable)arrayForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
381 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
382 |
@end |
|
383 |
|
|
384 |
@class UIImage; |
|
385 |
|
|
386 |
/// A container of textures for a camera effect. |
|
387 |
/// A texture for a camera effect is an UIImages identified by a NSString key. |
|
388 |
SWIFT_CLASS_NAMED("CameraEffectTextures") |
|
389 |
@interface FBSDKCameraEffectTextures : NSObject |
|
390 |
/// Sets the image for a texture key. |
|
391 |
/// @param image The <code>UIImage</code> for the texture |
|
392 |
/// @param key The key for the texture |
|
393 |
- (void)setImage:(UIImage * _Nullable)image forKey:(NSString * _Nonnull)key; |
|
394 |
/// Gets the image for a texture key. |
|
395 |
/// @param key The key for the texture |
|
396 |
/// @return The texture <code>UIImage</code> or nil |
|
397 |
- (UIImage * _Nullable)imageForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
398 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
399 |
@end |
|
400 |
|
|
401 |
@protocol FBSDKSharingContent; |
|
402 |
|
|
403 |
/// The common interface for sharing buttons. |
|
404 |
/// See FBSendButton and FBShareButton |
|
405 |
SWIFT_PROTOCOL_NAMED("SharingButton") |
|
406 |
@protocol FBSDKSharingButton |
|
407 |
/// The content to be shared. |
|
408 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
409 |
@end |
|
410 |
|
|
411 |
@class FBSDKMessageDialog; |
|
412 |
@class NSCoder; |
|
413 |
|
|
414 |
/// A button to send content through Messenger. |
|
415 |
/// Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot |
|
416 |
/// be shown, the button will be disable. |
|
417 |
SWIFT_CLASS_NAMED("FBSendButton") |
|
418 |
@interface FBSDKSendButton : FBSDKButton <FBSDKButtonImpressionLogging, FBSDKSharingButton> |
|
419 |
@property (nonatomic, strong) FBSDKMessageDialog * _Nullable dialog; |
|
420 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
421 |
@property (nonatomic, readonly, copy) NSDictionary<FBSDKAppEventParameterName, id> * _Nullable analyticsParameters; |
|
422 |
@property (nonatomic, readonly) FBSDKAppEventName _Nonnull impressionTrackingEventName; |
|
423 |
@property (nonatomic, readonly, copy) NSString * _Nonnull impressionTrackingIdentifier; |
|
424 |
@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; |
|
425 |
- (void)configureButton; |
|
426 |
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; |
|
427 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; |
|
428 |
@end |
|
429 |
|
|
430 |
|
|
431 |
|
|
432 |
/// A button to share content. |
|
433 |
/// Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot |
|
434 |
/// be shown, the button will be disabled. |
|
435 |
SWIFT_CLASS_NAMED("FBShareButton") |
|
436 |
@interface FBSDKShareButton : FBSDKButton <FBSDKSharingButton> |
|
437 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
438 |
@property (nonatomic, readonly, copy) NSDictionary<FBSDKAppEventParameterName, id> * _Nullable analyticsParameters; |
|
439 |
@property (nonatomic, readonly) FBSDKAppEventName _Nonnull impressionTrackingEventName; |
|
440 |
@property (nonatomic, readonly, copy) NSString * _Nonnull impressionTrackingIdentifier; |
|
441 |
@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; |
|
442 |
- (void)configureButton; |
|
443 |
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; |
|
444 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; |
|
445 |
@end |
|
446 |
|
|
447 |
|
|
448 |
|
|
449 |
/// Represents a single hashtag that can be used with the share dialog. |
|
450 |
SWIFT_CLASS_NAMED("Hashtag") |
|
451 |
@interface FBSDKHashtag : NSObject |
|
452 |
/// The hashtag string. |
|
453 |
/// You are responsible for making sure that <code>stringRepresentation</code> is a valid hashtag (a single ‘#’ followed by one or more |
|
454 |
/// word characters). Invalid hashtags are ignored when sharing content. You can check validity with the<code>valid</code> property. |
|
455 |
/// @return The hashtag string |
|
456 |
@property (nonatomic, copy) NSString * _Nonnull stringRepresentation; |
|
457 |
- (nonnull instancetype)initWithString:(NSString * _Nonnull)string OBJC_DESIGNATED_INITIALIZER; |
|
458 |
@property (nonatomic, readonly, copy) NSString * _Nonnull description; |
|
459 |
/// Tests if a hashtag is valid. |
|
460 |
/// A valid hashtag matches the regular expression “#\w+”: A single ‘#’ followed by one or more word characters. |
|
461 |
/// @return true if the hashtag is valid, false otherwise. |
|
462 |
@property (nonatomic, readonly) BOOL isValid; |
|
463 |
@property (nonatomic, readonly) NSUInteger hash; |
|
464 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
465 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
466 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
467 |
@end |
|
468 |
|
|
469 |
|
|
470 |
@protocol FBSDKSharingDelegate; |
|
471 |
|
|
472 |
/// The common interface for components that initiate sharing. |
|
473 |
/// See ShareDialog, MessageDialog |
|
474 |
SWIFT_PROTOCOL_NAMED("Sharing") |
|
475 |
@protocol FBSDKSharing |
|
476 |
/// The receiver’s delegate or nil if it doesn’t have a delegate. |
|
477 |
@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; |
|
478 |
/// The content to be shared. |
|
479 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
480 |
/// A boolean value that indicates whether the receiver should fail if it finds an error with the share content. |
|
481 |
/// If <code>false</code>, the sharer will still be displayed without the data that was misconfigured. For example, an |
|
482 |
/// invalid <code>placeID</code> specified on the <code>shareContent</code> would produce a data error. |
|
483 |
@property (nonatomic) BOOL shouldFailOnDataError; |
|
484 |
/// Validates the content on the receiver. |
|
485 |
/// @throws An error if the content is invalid |
|
486 |
- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; |
|
487 |
@end |
|
488 |
|
|
489 |
|
|
490 |
/// The common interface for dialogs that initiate sharing. |
|
491 |
SWIFT_PROTOCOL_NAMED("SharingDialog") |
|
492 |
@protocol FBSDKSharingDialog <FBSDKSharing> |
|
493 |
/// A boolean value that indicates whether the receiver can initiate a share. |
|
494 |
/// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is |
|
495 |
/// required but not available. This method does not validate the content on the receiver, so this can be checked before |
|
496 |
/// building up the content. |
|
497 |
/// See <code>Sharing.validate(error:)</code> |
|
498 |
/// @return <code>true</code> if the receiver can share, otherwise <code>false</code>. |
|
499 |
@property (nonatomic, readonly) BOOL canShow; |
|
500 |
/// Shows the dialog. |
|
501 |
/// @return <code>true</code> if the receiver was able to begin sharing, otherwise <code>false</code>. |
|
502 |
- (BOOL)show; |
|
503 |
@end |
|
504 |
|
|
505 |
|
|
506 |
/// A dialog for sharing content through Messenger. |
|
507 |
/// SUPPORTED SHARE TYPES |
|
508 |
/// <ul> |
|
509 |
/// <li> |
|
510 |
/// FBSDKShareLinkContent |
|
511 |
/// </li> |
|
512 |
/// </ul> |
|
513 |
/// UNSUPPORTED SHARE TYPES (DEPRECATED AUGUST 2018) |
|
514 |
/// <ul> |
|
515 |
/// <li> |
|
516 |
/// FBSDKShareOpenGraphContent |
|
517 |
/// </li> |
|
518 |
/// <li> |
|
519 |
/// FBSDKSharePhotoContent |
|
520 |
/// </li> |
|
521 |
/// <li> |
|
522 |
/// FBSDKShareVideoContent |
|
523 |
/// </li> |
|
524 |
/// <li> |
|
525 |
/// FBSDKShareMessengerOpenGraphMusicTemplateContent |
|
526 |
/// </li> |
|
527 |
/// <li> |
|
528 |
/// FBSDKShareMessengerMediaTemplateContent |
|
529 |
/// </li> |
|
530 |
/// <li> |
|
531 |
/// FBSDKShareMessengerGenericTemplateContent |
|
532 |
/// </li> |
|
533 |
/// <li> |
|
534 |
/// Any other types that are not one of the four supported types listed above |
|
535 |
/// </li> |
|
536 |
/// </ul> |
|
537 |
SWIFT_CLASS_NAMED("MessageDialog") |
|
538 |
@interface FBSDKMessageDialog : NSObject <FBSDKSharingDialog> |
|
539 |
/// The receiver’s delegate or nil if it doesn’t have a delegate. |
|
540 |
@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; |
|
541 |
/// The content to be shared. |
|
542 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
543 |
/// A Boolean value that indicates whether the receiver should fail if it finds an error with the share content. |
|
544 |
/// If <code>false</code>, the sharer will still be displayed without the data that was mis-configured. For example, an |
|
545 |
/// invalid placeID specified on the shareContent would produce a data error. |
|
546 |
@property (nonatomic) BOOL shouldFailOnDataError; |
|
547 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
548 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
549 |
/// Convenience initializer to return a Message Share Dialog with content and a delegate. |
|
550 |
/// @param content The content to be shared. |
|
551 |
/// @param delegate The receiver’s delegate. |
|
552 |
- (nonnull instancetype)initWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate; |
|
553 |
/// Convenience method to return a Message Share Dialog with content and a delegate. |
|
554 |
/// @param content The content to be shared. |
|
555 |
/// @param delegate The receiver’s delegate. |
|
556 |
+ (FBSDKMessageDialog * _Nonnull)dialogWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; |
|
557 |
/// Convenience method to show a Message Share Dialog with content and a delegate. |
|
558 |
/// @param content The content to be shared. |
|
559 |
/// @param delegate The receiver’s delegate. |
|
560 |
+ (FBSDKMessageDialog * _Nonnull)showWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; |
|
561 |
/// A Boolean value that indicates whether the receiver can initiate a share. |
|
562 |
/// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is |
|
563 |
/// required but not available. This method does not validate the content on the receiver, so this can be checked before |
|
564 |
/// building up the content. |
|
565 |
/// See <code>Sharing.validate()</code> |
|
566 |
/// @return <code>true</code> if the receiver can share, otherwise <code>false</code>. |
|
567 |
@property (nonatomic, readonly) BOOL canShow; |
|
568 |
/// Shows the dialog. |
|
569 |
/// @return <code>true</code> if the receiver was able to begin sharing, otherwise <code>false</code>. |
|
570 |
- (BOOL)show; |
|
571 |
/// Validates the content on the receiver. |
|
572 |
/// @return <code>true</code> if the content is valid, otherwise <code>false</code>. |
|
573 |
- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; |
|
574 |
@end |
|
575 |
|
|
576 |
|
|
577 |
|
|
578 |
|
|
579 |
/// A model for content to share with a Facebook camera effect. |
|
580 |
SWIFT_CLASS_NAMED("ShareCameraEffectContent") |
|
581 |
@interface FBSDKShareCameraEffectContent : NSObject |
|
582 |
/// ID of the camera effect to use. |
|
583 |
@property (nonatomic, copy) NSString * _Nonnull effectID; |
|
584 |
/// Arguments for the effect. |
|
585 |
@property (nonatomic, strong) FBSDKCameraEffectArguments * _Nonnull effectArguments; |
|
586 |
/// Textures for the effect. |
|
587 |
@property (nonatomic, strong) FBSDKCameraEffectTextures * _Nonnull effectTextures; |
|
588 |
/// URL for the content being shared. |
|
589 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
590 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
591 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
592 |
/// Hashtag for the content being shared. |
|
593 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
594 |
/// List of IDs for taggable people to tag with this content. |
|
595 |
/// See documentation for Taggable Friends |
|
596 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
597 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
598 |
/// The ID for a place to tag with this content. |
|
599 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
600 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
601 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
602 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
603 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
604 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
605 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
606 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
607 |
@end |
|
608 |
|
|
609 |
|
|
610 |
/// A base interface for content to be shared. |
|
611 |
SWIFT_PROTOCOL_NAMED("SharingContent") |
|
612 |
@protocol FBSDKSharingContent <FBSDKSharingValidatable, NSObject> |
|
613 |
/// URL for the content being shared. |
|
614 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. |
|
615 |
/// See documentation for App Links (https://developers.facebook.com/docs/applinks/) |
|
616 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
617 |
/// Hashtag for the content being shared. |
|
618 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
619 |
/// List of IDs for taggable people to tag with this content. |
|
620 |
/// See documentation for Taggable Friends |
|
621 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
622 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
623 |
/// The ID for a place to tag with this content. |
|
624 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
625 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
626 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
627 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
628 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
629 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
630 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
631 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
632 |
/// updated dictionary |
|
633 |
/// @param existingParameters An immutable dictionary of existing values |
|
634 |
/// @param bridgeOptions The options for bridging |
|
635 |
/// @return A new dictionary with the modified contents |
|
636 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
637 |
@end |
|
638 |
|
|
639 |
|
|
640 |
@interface FBSDKShareCameraEffectContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
641 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
642 |
/// updated dictionary |
|
643 |
/// @param existingParameters An immutable dictionary of existing values |
|
644 |
/// @param bridgeOptions The options for bridging |
|
645 |
/// @return A new dictionary with the modified contents |
|
646 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
647 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
648 |
@end |
|
649 |
|
|
650 |
|
|
651 |
@class UIViewController; |
|
652 |
enum FBSDKShareDialogMode : NSUInteger; |
|
653 |
|
|
654 |
/// A dialog for sharing content on Facebook. |
|
655 |
SWIFT_CLASS_NAMED("ShareDialog") |
|
656 |
@interface FBSDKShareDialog : NSObject <FBSDKSharingDialog> |
|
657 |
/// A UIViewController from which to present the dialog. |
|
658 |
/// If not specified, the topmost view controller will be automatically determined as best as possible. |
|
659 |
@property (nonatomic, weak) UIViewController * _Nullable fromViewController; |
|
660 |
/// The mode with which to display the dialog. |
|
661 |
/// Defaults to <code>.automatic</code>, which will automatically choose the best available mode. |
|
662 |
@property (nonatomic) enum FBSDKShareDialogMode mode; |
|
663 |
/// The receiver’s delegate or nil if it doesn’t have a delegate. |
|
664 |
@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; |
|
665 |
/// The content to be shared. |
|
666 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
667 |
/// A Boolean value that indicates whether the receiver should fail if it finds an error with the share content. |
|
668 |
/// If <code>false</code>, the sharer will still be displayed without the data that was misconfigured. For example, an |
|
669 |
/// invalid <code>placeID</code> specified on the <code>shareContent</code> would produce a data error. |
|
670 |
@property (nonatomic) BOOL shouldFailOnDataError; |
|
671 |
/// Convenience initializer to initialize a <code>ShareDialog</code> with a view controller, content and delegate. |
|
672 |
/// @param viewController A view controller from which to present the dialog, if appropriate. |
|
673 |
/// @param content The content to be shared. |
|
674 |
/// @param delegate The dialog’s delegate. |
|
675 |
- (nonnull instancetype)initWithViewController:(UIViewController * _Nullable)viewController content:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER; |
|
676 |
/// Convenience method to create a <code>ShareDialog</code> with a view controller, content and delegate. |
|
677 |
/// @param viewController A view controller from which to present the dialog, if appropriate. |
|
678 |
/// @param content The content to be shared. |
|
679 |
/// @param delegate The dialog’s delegate. |
|
680 |
+ (FBSDKShareDialog * _Nonnull)dialogWithViewController:(UIViewController * _Nullable)viewController withContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; |
|
681 |
/// Convenience method to show a <code>ShareDialog</code> with a view controller, content and delegate. |
|
682 |
/// @param viewController A view controller from which to present the dialog, if appropriate. |
|
683 |
/// @param content The content to be shared. |
|
684 |
/// @param delegate The dialog’s delegate. |
|
685 |
+ (FBSDKShareDialog * _Nonnull)showFromViewController:(UIViewController * _Nullable)viewController withContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate; |
|
686 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
687 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
688 |
@end |
|
689 |
|
|
690 |
|
|
691 |
@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) |
|
692 |
@end |
|
693 |
|
|
694 |
/// Modes for the FBSDKShareDialog. |
|
695 |
/// The automatic mode will progressively check the availability of different modes and open the most |
|
696 |
/// appropriate mode for the dialog that is available. |
|
697 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKShareDialogMode, "Mode", open) { |
|
698 |
/// Acts with the most appropriate mode that is available. |
|
699 |
FBSDKShareDialogModeAutomatic = 0, |
|
700 |
/// Displays the dialog in the main native Facebook app. |
|
701 |
FBSDKShareDialogModeNative = 1, |
|
702 |
/// Displays the dialog in the iOS integrated share sheet. |
|
703 |
FBSDKShareDialogModeShareSheet = 2, |
|
704 |
/// Displays the dialog in Safari. |
|
705 |
FBSDKShareDialogModeBrowser = 3, |
|
706 |
/// Displays the dialog in a WKWebView within the app. |
|
707 |
FBSDKShareDialogModeWeb = 4, |
|
708 |
/// Displays the feed dialog in Safari. |
|
709 |
FBSDKShareDialogModeFeedBrowser = 5, |
|
710 |
/// Displays the feed dialog in a WKWebView within the app. |
|
711 |
FBSDKShareDialogModeFeedWeb = 6, |
|
712 |
}; |
|
713 |
|
|
714 |
@class FBSDKWebDialog; |
|
715 |
|
|
716 |
@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKWebDialogDelegate> |
|
717 |
- (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results; |
|
718 |
- (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didFailWithError:(NSError * _Nonnull)error; |
|
719 |
- (void)webDialogDidCancel:(FBSDKWebDialog * _Nonnull)webDialog; |
|
720 |
@end |
|
721 |
|
|
722 |
|
|
723 |
|
|
724 |
@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) |
|
725 |
@property (nonatomic, readonly) BOOL canShow; |
|
726 |
- (BOOL)show; |
|
727 |
- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; |
|
728 |
@end |
|
729 |
|
|
730 |
/// ShareError |
|
731 |
/// Error codes for ShareErrorDomain. |
|
732 |
typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKShareError, "ShareError", open) { |
|
733 |
/// Reserved |
|
734 |
FBSDKShareErrorReserved = 200, |
|
735 |
/// The error code for errors from uploading open graph objects. |
|
736 |
FBSDKShareErrorOpenGraph = 201, |
|
737 |
/// The error code for when a sharing dialog is not available. |
|
738 |
/// Use the canShare methods to check for this case before calling show. |
|
739 |
FBSDKShareErrorDialogNotAvailable = 202, |
|
740 |
/// The error code for unknown errors. |
|
741 |
FBSDKShareErrorUnknown = 203, |
|
742 |
}; |
|
743 |
|
|
744 |
|
|
745 |
/// A model for status and link content to be shared. |
|
746 |
SWIFT_CLASS_NAMED("ShareLinkContent") |
|
747 |
@interface FBSDKShareLinkContent : NSObject |
|
748 |
/// Some quote text of the link. |
|
749 |
/// If specified, the quote text will render with custom styling on top of the link. |
|
750 |
@property (nonatomic, copy) NSString * _Nullable quote; |
|
751 |
/// URL for the content being shared. |
|
752 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
753 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
754 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
755 |
/// Hashtag for the content being shared. |
|
756 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
757 |
/// List of IDs for taggable people to tag with this content. |
|
758 |
/// See documentation for Taggable Friends |
|
759 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
760 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
761 |
/// The ID for a place to tag with this content. |
|
762 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
763 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
764 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
765 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
766 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
767 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
768 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
769 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
770 |
@end |
|
771 |
|
|
772 |
|
|
773 |
@interface FBSDKShareLinkContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
774 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
775 |
/// updated dictionary |
|
776 |
/// @param existingParameters An immutable dictionary of existing values |
|
777 |
/// @param bridgeOptions The options for bridging |
|
778 |
/// @return A new dictionary with the modified contents |
|
779 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
780 |
@end |
|
781 |
|
|
782 |
|
|
783 |
@interface FBSDKShareLinkContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
784 |
/// Asks the receiver to validate that its content or media values are valid. |
|
785 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
786 |
@end |
|
787 |
|
|
788 |
|
|
789 |
/// A protocol for media content (photo or video) to be shared. |
|
790 |
SWIFT_PROTOCOL_NAMED("ShareMedia") |
|
791 |
@protocol FBSDKShareMedia |
|
792 |
@end |
|
793 |
|
|
794 |
|
|
795 |
/// A model for media content (photo or video) to be shared. |
|
796 |
SWIFT_CLASS_NAMED("ShareMediaContent") |
|
797 |
@interface FBSDKShareMediaContent : NSObject |
|
798 |
/// Media to be shared: an array of <code>SharePhoto</code> or <code>ShareVideo</code> |
|
799 |
@property (nonatomic, copy) NSArray<id <FBSDKShareMedia>> * _Nonnull media; |
|
800 |
/// URL for the content being shared. |
|
801 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
802 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
803 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
804 |
/// Hashtag for the content being shared. |
|
805 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
806 |
/// List of IDs for taggable people to tag with this content. |
|
807 |
/// See documentation for Taggable Friends |
|
808 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
809 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
810 |
/// The ID for a place to tag with this content. |
|
811 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
812 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
813 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
814 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
815 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
816 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
817 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
818 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
819 |
@end |
|
820 |
|
|
821 |
|
|
822 |
@interface FBSDKShareMediaContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
823 |
/// Asks the receiver to validate that its content or media values are valid. |
|
824 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
825 |
@end |
|
826 |
|
|
827 |
|
|
828 |
@interface FBSDKShareMediaContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
829 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
830 |
/// updated dictionary |
|
831 |
/// @param existingParameters An immutable dictionary of existing values |
|
832 |
/// @param bridgeOptions The options for bridging |
|
833 |
/// @return A new dictionary with the modified contents |
|
834 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
835 |
@end |
|
836 |
|
|
837 |
@class PHAsset; |
|
838 |
|
|
839 |
/// A photo for sharing. |
|
840 |
SWIFT_CLASS_NAMED("SharePhoto") |
|
841 |
@interface FBSDKSharePhoto : NSObject <FBSDKShareMedia> |
|
842 |
/// If the photo is resident in memory, this method supplies the data. |
|
843 |
@property (nonatomic, strong) UIImage * _Nullable image; |
|
844 |
/// URL that points to a network location or the location of the photo on disk |
|
845 |
@property (nonatomic, copy) NSURL * _Nullable imageURL; |
|
846 |
/// The representation of the photo in the Photos library. |
|
847 |
@property (nonatomic, strong) PHAsset * _Nullable photoAsset; |
|
848 |
/// Specifies whether the photo represented by the receiver was generated by the user (<code>true</code>) |
|
849 |
/// or by the application (<code>false</code>). |
|
850 |
@property (nonatomic) BOOL isUserGenerated; |
|
851 |
/// The user-generated caption for the photo. Note that the ‘caption’ must come from |
|
852 |
/// the user, as pre-filled content is forbidden by the Platform Policies (2.3). |
|
853 |
@property (nonatomic, copy) NSString * _Nullable caption; |
|
854 |
/// Convenience method to build a new photo object with an image. |
|
855 |
/// \param image If the photo is resident in memory, this method supplies the data |
|
856 |
/// |
|
857 |
/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by the |
|
858 |
/// application |
|
859 |
/// |
|
860 |
- (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image isUserGenerated:(BOOL)isUserGenerated; |
|
861 |
/// Convenience method to build a new photo object with an imageURL. |
|
862 |
/// This method should only be used when adding photo content to open graph stories. |
|
863 |
/// For example, if you’re trying to share a photo from the web by itself, download the image and use |
|
864 |
/// <code>init(image:isUserGenerated:)</code> instead. |
|
865 |
/// \param imageURL The URL to the photo |
|
866 |
/// |
|
867 |
/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by the |
|
868 |
/// application |
|
869 |
/// |
|
870 |
- (nonnull instancetype)initWithImageURL:(NSURL * _Nonnull)imageURL isUserGenerated:(BOOL)isUserGenerated; |
|
871 |
/// Convenience method to build a new photo object with a PHAsset. |
|
872 |
/// \param photoAsset The PHAsset that represents the photo in the Photos library. |
|
873 |
/// |
|
874 |
/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by |
|
875 |
/// the application |
|
876 |
/// |
|
877 |
- (nonnull instancetype)initWithPhotoAsset:(PHAsset * _Nonnull)photoAsset isUserGenerated:(BOOL)isUserGenerated; |
|
878 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
879 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
880 |
@end |
|
881 |
|
|
882 |
|
|
883 |
|
|
884 |
@interface FBSDKSharePhoto (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
885 |
/// Asks the receiver to validate that its content or media values are valid. |
|
886 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
887 |
@end |
|
888 |
|
|
889 |
|
|
890 |
|
|
891 |
/// A model for photo content to be shared. |
|
892 |
SWIFT_CLASS_NAMED("SharePhotoContent") |
|
893 |
@interface FBSDKSharePhotoContent : NSObject |
|
894 |
/// Photos to be shared. |
|
895 |
@property (nonatomic, copy) NSArray<FBSDKSharePhoto *> * _Nonnull photos; |
|
896 |
/// URL for the content being shared. |
|
897 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
898 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
899 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
900 |
/// Hashtag for the content being shared. |
|
901 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
902 |
/// List of IDs for taggable people to tag with this content. |
|
903 |
/// See documentation for Taggable Friends |
|
904 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
905 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
906 |
/// The ID for a place to tag with this content. |
|
907 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
908 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
909 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
910 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
911 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
912 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
913 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
914 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
915 |
@end |
|
916 |
|
|
917 |
|
|
918 |
@interface FBSDKSharePhotoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
919 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
920 |
/// updated dictionary |
|
921 |
/// @param existingParameters An immutable dictionary of existing values |
|
922 |
/// @param bridgeOptions The options for bridging |
|
923 |
/// @return A new dictionary with the modified contents |
|
924 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
925 |
@end |
|
926 |
|
|
927 |
|
|
928 |
@interface FBSDKSharePhotoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
929 |
/// Validate that this content contains valid values |
|
930 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
931 |
@end |
|
932 |
|
|
933 |
|
|
934 |
@class NSData; |
|
935 |
|
|
936 |
/// A video for sharing. |
|
937 |
SWIFT_CLASS_NAMED("ShareVideo") |
|
938 |
@interface FBSDKShareVideo : NSObject <FBSDKShareMedia> |
|
939 |
/// The raw video data. |
|
940 |
@property (nonatomic, copy) NSData * _Nullable data; |
|
941 |
/// The representation of the video in the Photos library. |
|
942 |
@property (nonatomic, strong) PHAsset * _Nullable videoAsset; |
|
943 |
/// The file URL to the video. |
|
944 |
@property (nonatomic, copy) NSURL * _Nullable videoURL; |
|
945 |
/// The photo that represents the video. |
|
946 |
@property (nonatomic, strong) FBSDKSharePhoto * _Nullable previewPhoto; |
|
947 |
/// Convenience method to build a new video object from raw data and an optional preview photo. |
|
948 |
/// \param data The Data object that holds the raw video data. |
|
949 |
/// |
|
950 |
/// \param previewPhoto The photo that represents the video. |
|
951 |
/// |
|
952 |
- (nonnull instancetype)initWithData:(NSData * _Nonnull)data previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; |
|
953 |
/// Convenience method to build a new video object from a PHAsset and an optional preview photo. |
|
954 |
/// \param videoAsset The PHAsset that represents the video in the Photos library. |
|
955 |
/// |
|
956 |
/// \param previewPhoto The photo that represents the video. |
|
957 |
/// |
|
958 |
- (nonnull instancetype)initWithVideoAsset:(PHAsset * _Nonnull)videoAsset previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; |
|
959 |
/// Convenience method to build a new video object from a URL and an optional preview photo. |
|
960 |
/// \param videoURL The URL to the video. |
|
961 |
/// |
|
962 |
/// \param previewPhoto The photo that represents the video. |
|
963 |
/// |
|
964 |
- (nonnull instancetype)initWithVideoURL:(NSURL * _Nonnull)videoURL previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; |
|
965 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
966 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
967 |
@end |
|
968 |
|
|
969 |
|
|
970 |
|
|
971 |
@interface FBSDKShareVideo (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
972 |
/// Asks the receiver to validate that its content or media values are valid. |
|
973 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
974 |
@end |
|
975 |
|
|
976 |
|
|
977 |
|
|
978 |
/// A model for video content to be shared. |
|
979 |
SWIFT_CLASS_NAMED("ShareVideoContent") |
|
980 |
@interface FBSDKShareVideoContent : NSObject |
|
981 |
/// The video to be shared |
|
982 |
@property (nonatomic, strong) FBSDKShareVideo * _Nonnull video; |
|
983 |
/// URL for the content being shared. |
|
984 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
985 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
986 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
987 |
/// Hashtag for the content being shared. |
|
988 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
989 |
/// List of IDs for taggable people to tag with this content. |
|
990 |
/// See documentation for Taggable Friends |
|
991 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
992 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
993 |
/// The ID for a place to tag with this content. |
|
994 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
995 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
996 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
997 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
998 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
999 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
1000 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
1001 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1002 |
@end |
|
1003 |
|
|
1004 |
|
|
1005 |
@interface FBSDKShareVideoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
1006 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
1007 |
/// updated dictionary |
|
1008 |
/// @param existingParameters An immutable dictionary of existing values |
|
1009 |
/// @param bridgeOptions The options for bridging |
|
1010 |
/// @return A new dictionary with the modified contents |
|
1011 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
1012 |
@end |
|
1013 |
|
|
1014 |
|
|
1015 |
@interface FBSDKShareVideoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
1016 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
1017 |
@end |
|
1018 |
|
|
1019 |
|
|
1020 |
|
|
1021 |
|
|
1022 |
|
|
1023 |
|
|
1024 |
/// A delegate for types conforming to the <code>Sharing</code> protocol. |
|
1025 |
/// The delegate is notified with the results of the sharer as long as the application has permissions to |
|
1026 |
/// receive the information. For example, if the person is not signed into the containing app, the sharer may not be able |
|
1027 |
/// to distinguish between completion of a share and cancellation. |
|
1028 |
SWIFT_PROTOCOL_NAMED("SharingDelegate") |
|
1029 |
@protocol FBSDKSharingDelegate |
|
1030 |
/// Sent to the delegate when sharing completes without error or cancellation. |
|
1031 |
/// @param sharer The sharer that completed. |
|
1032 |
/// @param results The results from the sharer. This may be nil or empty. |
|
1033 |
- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results; |
|
1034 |
/// Sent to the delegate when the sharer encounters an error. |
|
1035 |
/// @param sharer The sharer that completed. |
|
1036 |
/// @param error The error. |
|
1037 |
- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didFailWithError:(NSError * _Nonnull)error; |
|
1038 |
/// Sent to the delegate when the sharer is cancelled. |
|
1039 |
/// @param sharer The sharer that completed. |
|
1040 |
- (void)sharerDidCancel:(id <FBSDKSharing> _Nonnull)sharer; |
|
1041 |
@end |
|
1042 |
|
|
1043 |
|
|
1044 |
|
|
1045 |
|
|
1046 |
#endif |
2e29a3
|
1047 |
#if __has_attribute(external_source_symbol) |
L |
1048 |
# pragma clang attribute pop |
97fc0a
|
1049 |
#endif |
L |
1050 |
#if defined(__cplusplus) |
2e29a3
|
1051 |
#endif |
L |
1052 |
#pragma clang diagnostic pop |
|
1053 |
#endif |
|
1054 |
|
|
1055 |
#elif defined(__x86_64__) && __x86_64__ |
97fc0a
|
1056 |
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) |
2e29a3
|
1057 |
#ifndef FBSDKSHAREKIT_SWIFT_H |
L |
1058 |
#define FBSDKSHAREKIT_SWIFT_H |
|
1059 |
#pragma clang diagnostic push |
|
1060 |
#pragma clang diagnostic ignored "-Wgcc-compat" |
|
1061 |
|
|
1062 |
#if !defined(__has_include) |
|
1063 |
# define __has_include(x) 0 |
|
1064 |
#endif |
|
1065 |
#if !defined(__has_attribute) |
|
1066 |
# define __has_attribute(x) 0 |
|
1067 |
#endif |
|
1068 |
#if !defined(__has_feature) |
|
1069 |
# define __has_feature(x) 0 |
|
1070 |
#endif |
|
1071 |
#if !defined(__has_warning) |
|
1072 |
# define __has_warning(x) 0 |
|
1073 |
#endif |
|
1074 |
|
|
1075 |
#if __has_include(<swift/objc-prologue.h>) |
|
1076 |
# include <swift/objc-prologue.h> |
|
1077 |
#endif |
|
1078 |
|
|
1079 |
#pragma clang diagnostic ignored "-Wauto-import" |
e0ec42
|
1080 |
#if defined(__OBJC__) |
2e29a3
|
1081 |
#include <Foundation/Foundation.h> |
e0ec42
|
1082 |
#endif |
L |
1083 |
#if defined(__cplusplus) |
|
1084 |
#include <cstdint> |
|
1085 |
#include <cstddef> |
|
1086 |
#include <cstdbool> |
97fc0a
|
1087 |
#include <cstring> |
L |
1088 |
#include <stdlib.h> |
|
1089 |
#include <new> |
|
1090 |
#include <type_traits> |
e0ec42
|
1091 |
#else |
2e29a3
|
1092 |
#include <stdint.h> |
L |
1093 |
#include <stddef.h> |
|
1094 |
#include <stdbool.h> |
97fc0a
|
1095 |
#include <string.h> |
L |
1096 |
#endif |
|
1097 |
#if defined(__cplusplus) |
|
1098 |
#if defined(__arm64e__) && __has_include(<ptrauth.h>) |
|
1099 |
# include <ptrauth.h> |
|
1100 |
#else |
|
1101 |
#pragma clang diagnostic push |
|
1102 |
#pragma clang diagnostic ignored "-Wreserved-macro-identifier" |
|
1103 |
# ifndef __ptrauth_swift_value_witness_function_pointer |
|
1104 |
# define __ptrauth_swift_value_witness_function_pointer(x) |
|
1105 |
# endif |
|
1106 |
# ifndef __ptrauth_swift_class_method_pointer |
|
1107 |
# define __ptrauth_swift_class_method_pointer(x) |
|
1108 |
# endif |
|
1109 |
#pragma clang diagnostic pop |
|
1110 |
#endif |
e0ec42
|
1111 |
#endif |
2e29a3
|
1112 |
|
L |
1113 |
#if !defined(SWIFT_TYPEDEFS) |
|
1114 |
# define SWIFT_TYPEDEFS 1 |
|
1115 |
# if __has_include(<uchar.h>) |
|
1116 |
# include <uchar.h> |
|
1117 |
# elif !defined(__cplusplus) |
|
1118 |
typedef uint_least16_t char16_t; |
|
1119 |
typedef uint_least32_t char32_t; |
|
1120 |
# endif |
|
1121 |
typedef float swift_float2 __attribute__((__ext_vector_type__(2))); |
|
1122 |
typedef float swift_float3 __attribute__((__ext_vector_type__(3))); |
|
1123 |
typedef float swift_float4 __attribute__((__ext_vector_type__(4))); |
|
1124 |
typedef double swift_double2 __attribute__((__ext_vector_type__(2))); |
|
1125 |
typedef double swift_double3 __attribute__((__ext_vector_type__(3))); |
|
1126 |
typedef double swift_double4 __attribute__((__ext_vector_type__(4))); |
|
1127 |
typedef int swift_int2 __attribute__((__ext_vector_type__(2))); |
|
1128 |
typedef int swift_int3 __attribute__((__ext_vector_type__(3))); |
|
1129 |
typedef int swift_int4 __attribute__((__ext_vector_type__(4))); |
|
1130 |
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); |
|
1131 |
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); |
|
1132 |
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); |
|
1133 |
#endif |
|
1134 |
|
|
1135 |
#if !defined(SWIFT_PASTE) |
|
1136 |
# define SWIFT_PASTE_HELPER(x, y) x##y |
|
1137 |
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) |
|
1138 |
#endif |
|
1139 |
#if !defined(SWIFT_METATYPE) |
|
1140 |
# define SWIFT_METATYPE(X) Class |
|
1141 |
#endif |
|
1142 |
#if !defined(SWIFT_CLASS_PROPERTY) |
|
1143 |
# if __has_feature(objc_class_property) |
|
1144 |
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ |
|
1145 |
# else |
97fc0a
|
1146 |
# define SWIFT_CLASS_PROPERTY(...) |
2e29a3
|
1147 |
# endif |
L |
1148 |
#endif |
97fc0a
|
1149 |
#if !defined(SWIFT_RUNTIME_NAME) |
L |
1150 |
# if __has_attribute(objc_runtime_name) |
|
1151 |
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) |
|
1152 |
# else |
|
1153 |
# define SWIFT_RUNTIME_NAME(X) |
|
1154 |
# endif |
2e29a3
|
1155 |
#endif |
97fc0a
|
1156 |
#if !defined(SWIFT_COMPILE_NAME) |
L |
1157 |
# if __has_attribute(swift_name) |
|
1158 |
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) |
|
1159 |
# else |
|
1160 |
# define SWIFT_COMPILE_NAME(X) |
|
1161 |
# endif |
2e29a3
|
1162 |
#endif |
97fc0a
|
1163 |
#if !defined(SWIFT_METHOD_FAMILY) |
L |
1164 |
# if __has_attribute(objc_method_family) |
|
1165 |
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) |
|
1166 |
# else |
|
1167 |
# define SWIFT_METHOD_FAMILY(X) |
|
1168 |
# endif |
2e29a3
|
1169 |
#endif |
97fc0a
|
1170 |
#if !defined(SWIFT_NOESCAPE) |
L |
1171 |
# if __has_attribute(noescape) |
|
1172 |
# define SWIFT_NOESCAPE __attribute__((noescape)) |
|
1173 |
# else |
|
1174 |
# define SWIFT_NOESCAPE |
|
1175 |
# endif |
2e29a3
|
1176 |
#endif |
97fc0a
|
1177 |
#if !defined(SWIFT_RELEASES_ARGUMENT) |
L |
1178 |
# if __has_attribute(ns_consumed) |
|
1179 |
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) |
|
1180 |
# else |
|
1181 |
# define SWIFT_RELEASES_ARGUMENT |
|
1182 |
# endif |
2e29a3
|
1183 |
#endif |
97fc0a
|
1184 |
#if !defined(SWIFT_WARN_UNUSED_RESULT) |
L |
1185 |
# if __has_attribute(warn_unused_result) |
|
1186 |
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
|
1187 |
# else |
|
1188 |
# define SWIFT_WARN_UNUSED_RESULT |
|
1189 |
# endif |
2e29a3
|
1190 |
#endif |
97fc0a
|
1191 |
#if !defined(SWIFT_NORETURN) |
L |
1192 |
# if __has_attribute(noreturn) |
|
1193 |
# define SWIFT_NORETURN __attribute__((noreturn)) |
|
1194 |
# else |
|
1195 |
# define SWIFT_NORETURN |
|
1196 |
# endif |
2e29a3
|
1197 |
#endif |
L |
1198 |
#if !defined(SWIFT_CLASS_EXTRA) |
97fc0a
|
1199 |
# define SWIFT_CLASS_EXTRA |
2e29a3
|
1200 |
#endif |
L |
1201 |
#if !defined(SWIFT_PROTOCOL_EXTRA) |
97fc0a
|
1202 |
# define SWIFT_PROTOCOL_EXTRA |
2e29a3
|
1203 |
#endif |
L |
1204 |
#if !defined(SWIFT_ENUM_EXTRA) |
97fc0a
|
1205 |
# define SWIFT_ENUM_EXTRA |
2e29a3
|
1206 |
#endif |
L |
1207 |
#if !defined(SWIFT_CLASS) |
|
1208 |
# if __has_attribute(objc_subclassing_restricted) |
|
1209 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA |
|
1210 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1211 |
# else |
|
1212 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1213 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1214 |
# endif |
|
1215 |
#endif |
|
1216 |
#if !defined(SWIFT_RESILIENT_CLASS) |
|
1217 |
# if __has_attribute(objc_class_stub) |
|
1218 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) |
|
1219 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
1220 |
# else |
|
1221 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) |
|
1222 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
1223 |
# endif |
|
1224 |
#endif |
|
1225 |
#if !defined(SWIFT_PROTOCOL) |
|
1226 |
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
1227 |
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
1228 |
#endif |
|
1229 |
#if !defined(SWIFT_EXTENSION) |
|
1230 |
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) |
|
1231 |
#endif |
|
1232 |
#if !defined(OBJC_DESIGNATED_INITIALIZER) |
|
1233 |
# if __has_attribute(objc_designated_initializer) |
|
1234 |
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) |
|
1235 |
# else |
97fc0a
|
1236 |
# define OBJC_DESIGNATED_INITIALIZER |
2e29a3
|
1237 |
# endif |
L |
1238 |
#endif |
|
1239 |
#if !defined(SWIFT_ENUM_ATTR) |
97fc0a
|
1240 |
# if __has_attribute(enum_extensibility) |
2e29a3
|
1241 |
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) |
L |
1242 |
# else |
97fc0a
|
1243 |
# define SWIFT_ENUM_ATTR(_extensibility) |
2e29a3
|
1244 |
# endif |
L |
1245 |
#endif |
|
1246 |
#if !defined(SWIFT_ENUM) |
|
1247 |
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
1248 |
# if __has_feature(generalized_swift_name) |
|
1249 |
# 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 |
|
1250 |
# else |
|
1251 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) |
|
1252 |
# endif |
|
1253 |
#endif |
|
1254 |
#if !defined(SWIFT_UNAVAILABLE) |
|
1255 |
# define SWIFT_UNAVAILABLE __attribute__((unavailable)) |
|
1256 |
#endif |
|
1257 |
#if !defined(SWIFT_UNAVAILABLE_MSG) |
|
1258 |
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) |
|
1259 |
#endif |
|
1260 |
#if !defined(SWIFT_AVAILABILITY) |
|
1261 |
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) |
|
1262 |
#endif |
|
1263 |
#if !defined(SWIFT_WEAK_IMPORT) |
|
1264 |
# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) |
|
1265 |
#endif |
|
1266 |
#if !defined(SWIFT_DEPRECATED) |
|
1267 |
# define SWIFT_DEPRECATED __attribute__((deprecated)) |
|
1268 |
#endif |
|
1269 |
#if !defined(SWIFT_DEPRECATED_MSG) |
|
1270 |
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) |
|
1271 |
#endif |
97fc0a
|
1272 |
#if !defined(SWIFT_DEPRECATED_OBJC) |
L |
1273 |
# if __has_feature(attribute_diagnose_if_objc) |
|
1274 |
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) |
|
1275 |
# else |
|
1276 |
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) |
|
1277 |
# endif |
2e29a3
|
1278 |
#endif |
e0ec42
|
1279 |
#if defined(__OBJC__) |
2e29a3
|
1280 |
#if !defined(IBSegueAction) |
97fc0a
|
1281 |
# define IBSegueAction |
2e29a3
|
1282 |
#endif |
e0ec42
|
1283 |
#endif |
L |
1284 |
#if !defined(SWIFT_EXTERN) |
|
1285 |
# if defined(__cplusplus) |
|
1286 |
# define SWIFT_EXTERN extern "C" |
|
1287 |
# else |
|
1288 |
# define SWIFT_EXTERN extern |
|
1289 |
# endif |
|
1290 |
#endif |
|
1291 |
#if !defined(SWIFT_CALL) |
|
1292 |
# define SWIFT_CALL __attribute__((swiftcall)) |
|
1293 |
#endif |
97fc0a
|
1294 |
#if !defined(SWIFT_INDIRECT_RESULT) |
L |
1295 |
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) |
e0ec42
|
1296 |
#endif |
97fc0a
|
1297 |
#if !defined(SWIFT_CONTEXT) |
L |
1298 |
# define SWIFT_CONTEXT __attribute__((swift_context)) |
|
1299 |
#endif |
|
1300 |
#if !defined(SWIFT_ERROR_RESULT) |
|
1301 |
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) |
|
1302 |
#endif |
|
1303 |
#if defined(__cplusplus) |
|
1304 |
# define SWIFT_NOEXCEPT noexcept |
e0ec42
|
1305 |
#else |
L |
1306 |
# define SWIFT_NOEXCEPT |
|
1307 |
#endif |
97fc0a
|
1308 |
#if !defined(SWIFT_C_INLINE_THUNK) |
L |
1309 |
# if __has_attribute(always_inline) |
|
1310 |
# if __has_attribute(nodebug) |
|
1311 |
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug)) |
|
1312 |
# else |
|
1313 |
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) |
|
1314 |
# endif |
|
1315 |
# else |
|
1316 |
# define SWIFT_C_INLINE_THUNK inline |
|
1317 |
# endif |
e0ec42
|
1318 |
#endif |
97fc0a
|
1319 |
#if defined(_WIN32) |
L |
1320 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
1321 |
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) |
|
1322 |
#endif |
|
1323 |
#else |
|
1324 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
1325 |
# define SWIFT_IMPORT_STDLIB_SYMBOL |
e0ec42
|
1326 |
#endif |
L |
1327 |
#endif |
|
1328 |
#if defined(__OBJC__) |
97fc0a
|
1329 |
#if __has_feature(objc_modules) |
2e29a3
|
1330 |
#if __has_warning("-Watimport-in-framework-header") |
L |
1331 |
#pragma clang diagnostic ignored "-Watimport-in-framework-header" |
|
1332 |
#endif |
e0ec42
|
1333 |
@import CoreFoundation; |
L |
1334 |
@import FBSDKCoreKit; |
|
1335 |
@import Foundation; |
|
1336 |
@import ObjectiveC; |
2e29a3
|
1337 |
#endif |
L |
1338 |
|
e0ec42
|
1339 |
#import <FBSDKShareKit/FBSDKShareKit.h> |
L |
1340 |
|
|
1341 |
#endif |
2e29a3
|
1342 |
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" |
L |
1343 |
#pragma clang diagnostic ignored "-Wduplicate-method-arg" |
|
1344 |
#if __has_warning("-Wpragma-clang-attribute") |
|
1345 |
# pragma clang diagnostic ignored "-Wpragma-clang-attribute" |
|
1346 |
#endif |
|
1347 |
#pragma clang diagnostic ignored "-Wunknown-pragmas" |
|
1348 |
#pragma clang diagnostic ignored "-Wnullability" |
e0ec42
|
1349 |
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
2e29a3
|
1350 |
|
L |
1351 |
#if __has_attribute(external_source_symbol) |
|
1352 |
# pragma push_macro("any") |
|
1353 |
# undef any |
|
1354 |
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FBSDKShareKit",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) |
|
1355 |
# pragma pop_macro("any") |
|
1356 |
#endif |
|
1357 |
|
e0ec42
|
1358 |
#if defined(__OBJC__) |
L |
1359 |
|
|
1360 |
@class NSURL; |
|
1361 |
@class NSString; |
|
1362 |
enum FBSDKAppInviteDestination : NSInteger; |
|
1363 |
|
|
1364 |
/// A model for app invite |
|
1365 |
SWIFT_CLASS_NAMED("AppInviteContent") |
|
1366 |
@interface FBSDKAppInviteContent : NSObject |
|
1367 |
/// A URL to a preview image that will be displayed with the app invite |
|
1368 |
/// This is optional. If you don’t include it a fallback image will be used. |
|
1369 |
@property (nonatomic, copy) NSURL * _Nullable appInvitePreviewImageURL; |
|
1370 |
/// An app link target that will be used as a target when the user accept the invite. |
|
1371 |
@property (nonatomic, copy) NSURL * _Nonnull appLinkURL; |
|
1372 |
/// Promotional code to be displayed while sending and receiving the invite. |
|
1373 |
/// This is optional. This can be between 0 and 10 characters long and can contain |
|
1374 |
/// alphanumeric characters only. To set a promo code, you need to set promo text. |
|
1375 |
@property (nonatomic, copy) NSString * _Nullable promotionCode; |
|
1376 |
/// Promotional text to be displayed while sending and receiving the invite. |
|
1377 |
/// This is optional. This can be between 0 and 80 characters long and can contain |
|
1378 |
/// alphanumeric and spaces only. |
|
1379 |
@property (nonatomic, copy) NSString * _Nullable promotionText; |
|
1380 |
/// Destination for the app invite. The default value is <code>.facebook</code>. |
|
1381 |
@property (nonatomic) enum FBSDKAppInviteDestination destination; |
|
1382 |
- (nonnull instancetype)initWithAppLinkURL:(NSURL * _Nonnull)appLinkURL OBJC_DESIGNATED_INITIALIZER; |
|
1383 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1384 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1385 |
@end |
|
1386 |
|
|
1387 |
/// Specifies the privacy of a group. |
|
1388 |
typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKAppInviteDestination, "Destination", open) { |
|
1389 |
/// Deliver to Facebook |
|
1390 |
FBSDKAppInviteDestinationFacebook = 0, |
|
1391 |
FBSDKAppInviteDestinationMessenger = 1, |
|
1392 |
}; |
|
1393 |
|
|
1394 |
|
|
1395 |
/// An interface for validatable content and media. |
|
1396 |
SWIFT_PROTOCOL_NAMED("SharingValidatable") |
|
1397 |
@protocol FBSDKSharingValidatable |
|
1398 |
/// Validate that this content or media contains valid values. |
|
1399 |
/// \param options The share bridge options to use for validation. |
|
1400 |
/// |
|
1401 |
/// |
|
1402 |
/// throws: |
|
1403 |
/// If the values are not valid. |
|
1404 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)options error:(NSError * _Nullable * _Nullable)error; |
|
1405 |
@end |
|
1406 |
|
|
1407 |
|
|
1408 |
@interface FBSDKAppInviteContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
1409 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
1410 |
@end |
|
1411 |
|
|
1412 |
|
|
1413 |
|
|
1414 |
/// A container of arguments for a camera effect. |
|
1415 |
/// An argument is a <code>String</code> or <code>[String]</code> identified by a <code>String</code> key. |
|
1416 |
SWIFT_CLASS_NAMED("CameraEffectArguments") |
|
1417 |
@interface FBSDKCameraEffectArguments : NSObject |
|
1418 |
/// Sets a string argument in the container. |
|
1419 |
/// @param string The argument |
|
1420 |
/// @param key The key for the argument |
|
1421 |
- (void)setString:(NSString * _Nullable)string forKey:(NSString * _Nonnull)key; |
|
1422 |
/// Gets a string argument from the container. |
|
1423 |
/// @param key The key for the argument |
|
1424 |
/// @return The string value or nil |
|
1425 |
- (NSString * _Nullable)stringForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
1426 |
/// Sets a string array argument in the container. |
|
1427 |
/// @param array The array argument |
|
1428 |
/// @param key The key for the argument |
|
1429 |
- (void)setArray:(NSArray<NSString *> * _Nullable)array forKey:(NSString * _Nonnull)key; |
|
1430 |
/// Gets an array argument from the container. |
|
1431 |
/// @param key The key for the argument |
|
1432 |
/// @return The array argument |
|
1433 |
- (NSArray<NSString *> * _Nullable)arrayForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
1434 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1435 |
@end |
|
1436 |
|
|
1437 |
@class UIImage; |
|
1438 |
|
|
1439 |
/// A container of textures for a camera effect. |
|
1440 |
/// A texture for a camera effect is an UIImages identified by a NSString key. |
|
1441 |
SWIFT_CLASS_NAMED("CameraEffectTextures") |
|
1442 |
@interface FBSDKCameraEffectTextures : NSObject |
|
1443 |
/// Sets the image for a texture key. |
|
1444 |
/// @param image The <code>UIImage</code> for the texture |
|
1445 |
/// @param key The key for the texture |
|
1446 |
- (void)setImage:(UIImage * _Nullable)image forKey:(NSString * _Nonnull)key; |
|
1447 |
/// Gets the image for a texture key. |
|
1448 |
/// @param key The key for the texture |
|
1449 |
/// @return The texture <code>UIImage</code> or nil |
|
1450 |
- (UIImage * _Nullable)imageForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
1451 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1452 |
@end |
|
1453 |
|
|
1454 |
@protocol FBSDKSharingContent; |
|
1455 |
|
|
1456 |
/// The common interface for sharing buttons. |
|
1457 |
/// See FBSendButton and FBShareButton |
|
1458 |
SWIFT_PROTOCOL_NAMED("SharingButton") |
|
1459 |
@protocol FBSDKSharingButton |
|
1460 |
/// The content to be shared. |
|
1461 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
1462 |
@end |
|
1463 |
|
|
1464 |
@class FBSDKMessageDialog; |
|
1465 |
@class NSCoder; |
|
1466 |
|
|
1467 |
/// A button to send content through Messenger. |
|
1468 |
/// Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot |
|
1469 |
/// be shown, the button will be disable. |
|
1470 |
SWIFT_CLASS_NAMED("FBSendButton") |
|
1471 |
@interface FBSDKSendButton : FBSDKButton <FBSDKButtonImpressionLogging, FBSDKSharingButton> |
|
1472 |
@property (nonatomic, strong) FBSDKMessageDialog * _Nullable dialog; |
|
1473 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
1474 |
@property (nonatomic, readonly, copy) NSDictionary<FBSDKAppEventParameterName, id> * _Nullable analyticsParameters; |
|
1475 |
@property (nonatomic, readonly) FBSDKAppEventName _Nonnull impressionTrackingEventName; |
|
1476 |
@property (nonatomic, readonly, copy) NSString * _Nonnull impressionTrackingIdentifier; |
|
1477 |
@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; |
|
1478 |
- (void)configureButton; |
|
1479 |
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; |
|
1480 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; |
|
1481 |
@end |
|
1482 |
|
|
1483 |
|
|
1484 |
|
|
1485 |
/// A button to share content. |
|
1486 |
/// Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot |
|
1487 |
/// be shown, the button will be disabled. |
|
1488 |
SWIFT_CLASS_NAMED("FBShareButton") |
|
1489 |
@interface FBSDKShareButton : FBSDKButton <FBSDKSharingButton> |
|
1490 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
1491 |
@property (nonatomic, readonly, copy) NSDictionary<FBSDKAppEventParameterName, id> * _Nullable analyticsParameters; |
|
1492 |
@property (nonatomic, readonly) FBSDKAppEventName _Nonnull impressionTrackingEventName; |
|
1493 |
@property (nonatomic, readonly, copy) NSString * _Nonnull impressionTrackingIdentifier; |
|
1494 |
@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; |
|
1495 |
- (void)configureButton; |
|
1496 |
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; |
|
1497 |
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; |
|
1498 |
@end |
|
1499 |
|
|
1500 |
|
|
1501 |
|
|
1502 |
/// Represents a single hashtag that can be used with the share dialog. |
|
1503 |
SWIFT_CLASS_NAMED("Hashtag") |
|
1504 |
@interface FBSDKHashtag : NSObject |
|
1505 |
/// The hashtag string. |
|
1506 |
/// You are responsible for making sure that <code>stringRepresentation</code> is a valid hashtag (a single ‘#’ followed by one or more |
|
1507 |
/// word characters). Invalid hashtags are ignored when sharing content. You can check validity with the<code>valid</code> property. |
|
1508 |
/// @return The hashtag string |
|
1509 |
@property (nonatomic, copy) NSString * _Nonnull stringRepresentation; |
|
1510 |
- (nonnull instancetype)initWithString:(NSString * _Nonnull)string OBJC_DESIGNATED_INITIALIZER; |
|
1511 |
@property (nonatomic, readonly, copy) NSString * _Nonnull description; |
|
1512 |
/// Tests if a hashtag is valid. |
|
1513 |
/// A valid hashtag matches the regular expression “#\w+”: A single ‘#’ followed by one or more word characters. |
|
1514 |
/// @return true if the hashtag is valid, false otherwise. |
|
1515 |
@property (nonatomic, readonly) BOOL isValid; |
|
1516 |
@property (nonatomic, readonly) NSUInteger hash; |
|
1517 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1518 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1519 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1520 |
@end |
|
1521 |
|
|
1522 |
|
|
1523 |
@protocol FBSDKSharingDelegate; |
|
1524 |
|
|
1525 |
/// The common interface for components that initiate sharing. |
|
1526 |
/// See ShareDialog, MessageDialog |
|
1527 |
SWIFT_PROTOCOL_NAMED("Sharing") |
|
1528 |
@protocol FBSDKSharing |
|
1529 |
/// The receiver’s delegate or nil if it doesn’t have a delegate. |
|
1530 |
@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; |
|
1531 |
/// The content to be shared. |
|
1532 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
1533 |
/// A boolean value that indicates whether the receiver should fail if it finds an error with the share content. |
|
1534 |
/// If <code>false</code>, the sharer will still be displayed without the data that was misconfigured. For example, an |
|
1535 |
/// invalid <code>placeID</code> specified on the <code>shareContent</code> would produce a data error. |
|
1536 |
@property (nonatomic) BOOL shouldFailOnDataError; |
|
1537 |
/// Validates the content on the receiver. |
|
1538 |
/// @throws An error if the content is invalid |
|
1539 |
- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; |
|
1540 |
@end |
|
1541 |
|
|
1542 |
|
|
1543 |
/// The common interface for dialogs that initiate sharing. |
|
1544 |
SWIFT_PROTOCOL_NAMED("SharingDialog") |
|
1545 |
@protocol FBSDKSharingDialog <FBSDKSharing> |
|
1546 |
/// A boolean value that indicates whether the receiver can initiate a share. |
|
1547 |
/// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is |
|
1548 |
/// required but not available. This method does not validate the content on the receiver, so this can be checked before |
|
1549 |
/// building up the content. |
|
1550 |
/// See <code>Sharing.validate(error:)</code> |
|
1551 |
/// @return <code>true</code> if the receiver can share, otherwise <code>false</code>. |
|
1552 |
@property (nonatomic, readonly) BOOL canShow; |
|
1553 |
/// Shows the dialog. |
|
1554 |
/// @return <code>true</code> if the receiver was able to begin sharing, otherwise <code>false</code>. |
|
1555 |
- (BOOL)show; |
|
1556 |
@end |
|
1557 |
|
|
1558 |
|
|
1559 |
/// A dialog for sharing content through Messenger. |
|
1560 |
/// SUPPORTED SHARE TYPES |
|
1561 |
/// <ul> |
|
1562 |
/// <li> |
|
1563 |
/// FBSDKShareLinkContent |
|
1564 |
/// </li> |
|
1565 |
/// </ul> |
|
1566 |
/// UNSUPPORTED SHARE TYPES (DEPRECATED AUGUST 2018) |
|
1567 |
/// <ul> |
|
1568 |
/// <li> |
|
1569 |
/// FBSDKShareOpenGraphContent |
|
1570 |
/// </li> |
|
1571 |
/// <li> |
|
1572 |
/// FBSDKSharePhotoContent |
|
1573 |
/// </li> |
|
1574 |
/// <li> |
|
1575 |
/// FBSDKShareVideoContent |
|
1576 |
/// </li> |
|
1577 |
/// <li> |
|
1578 |
/// FBSDKShareMessengerOpenGraphMusicTemplateContent |
|
1579 |
/// </li> |
|
1580 |
/// <li> |
|
1581 |
/// FBSDKShareMessengerMediaTemplateContent |
|
1582 |
/// </li> |
|
1583 |
/// <li> |
|
1584 |
/// FBSDKShareMessengerGenericTemplateContent |
|
1585 |
/// </li> |
|
1586 |
/// <li> |
|
1587 |
/// Any other types that are not one of the four supported types listed above |
|
1588 |
/// </li> |
|
1589 |
/// </ul> |
|
1590 |
SWIFT_CLASS_NAMED("MessageDialog") |
|
1591 |
@interface FBSDKMessageDialog : NSObject <FBSDKSharingDialog> |
|
1592 |
/// The receiver’s delegate or nil if it doesn’t have a delegate. |
|
1593 |
@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; |
|
1594 |
/// The content to be shared. |
|
1595 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
1596 |
/// A Boolean value that indicates whether the receiver should fail if it finds an error with the share content. |
|
1597 |
/// If <code>false</code>, the sharer will still be displayed without the data that was mis-configured. For example, an |
|
1598 |
/// invalid placeID specified on the shareContent would produce a data error. |
|
1599 |
@property (nonatomic) BOOL shouldFailOnDataError; |
|
1600 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1601 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1602 |
/// Convenience initializer to return a Message Share Dialog with content and a delegate. |
|
1603 |
/// @param content The content to be shared. |
|
1604 |
/// @param delegate The receiver’s delegate. |
|
1605 |
- (nonnull instancetype)initWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate; |
|
1606 |
/// Convenience method to return a Message Share Dialog with content and a delegate. |
|
1607 |
/// @param content The content to be shared. |
|
1608 |
/// @param delegate The receiver’s delegate. |
|
1609 |
+ (FBSDKMessageDialog * _Nonnull)dialogWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; |
|
1610 |
/// Convenience method to show a Message Share Dialog with content and a delegate. |
|
1611 |
/// @param content The content to be shared. |
|
1612 |
/// @param delegate The receiver’s delegate. |
|
1613 |
+ (FBSDKMessageDialog * _Nonnull)showWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; |
|
1614 |
/// A Boolean value that indicates whether the receiver can initiate a share. |
|
1615 |
/// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is |
|
1616 |
/// required but not available. This method does not validate the content on the receiver, so this can be checked before |
|
1617 |
/// building up the content. |
|
1618 |
/// See <code>Sharing.validate()</code> |
|
1619 |
/// @return <code>true</code> if the receiver can share, otherwise <code>false</code>. |
|
1620 |
@property (nonatomic, readonly) BOOL canShow; |
|
1621 |
/// Shows the dialog. |
|
1622 |
/// @return <code>true</code> if the receiver was able to begin sharing, otherwise <code>false</code>. |
|
1623 |
- (BOOL)show; |
|
1624 |
/// Validates the content on the receiver. |
|
1625 |
/// @return <code>true</code> if the content is valid, otherwise <code>false</code>. |
|
1626 |
- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; |
|
1627 |
@end |
|
1628 |
|
|
1629 |
|
|
1630 |
|
|
1631 |
|
|
1632 |
/// A model for content to share with a Facebook camera effect. |
|
1633 |
SWIFT_CLASS_NAMED("ShareCameraEffectContent") |
|
1634 |
@interface FBSDKShareCameraEffectContent : NSObject |
|
1635 |
/// ID of the camera effect to use. |
|
1636 |
@property (nonatomic, copy) NSString * _Nonnull effectID; |
|
1637 |
/// Arguments for the effect. |
|
1638 |
@property (nonatomic, strong) FBSDKCameraEffectArguments * _Nonnull effectArguments; |
|
1639 |
/// Textures for the effect. |
|
1640 |
@property (nonatomic, strong) FBSDKCameraEffectTextures * _Nonnull effectTextures; |
|
1641 |
/// URL for the content being shared. |
|
1642 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
1643 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
1644 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
1645 |
/// Hashtag for the content being shared. |
|
1646 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
1647 |
/// List of IDs for taggable people to tag with this content. |
|
1648 |
/// See documentation for Taggable Friends |
|
1649 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
1650 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
1651 |
/// The ID for a place to tag with this content. |
|
1652 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
1653 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
1654 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
1655 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
1656 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
1657 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
1658 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
1659 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1660 |
@end |
|
1661 |
|
|
1662 |
|
|
1663 |
/// A base interface for content to be shared. |
|
1664 |
SWIFT_PROTOCOL_NAMED("SharingContent") |
|
1665 |
@protocol FBSDKSharingContent <FBSDKSharingValidatable, NSObject> |
|
1666 |
/// URL for the content being shared. |
|
1667 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. |
|
1668 |
/// See documentation for App Links (https://developers.facebook.com/docs/applinks/) |
|
1669 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
1670 |
/// Hashtag for the content being shared. |
|
1671 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
1672 |
/// List of IDs for taggable people to tag with this content. |
|
1673 |
/// See documentation for Taggable Friends |
|
1674 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
1675 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
1676 |
/// The ID for a place to tag with this content. |
|
1677 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
1678 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
1679 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
1680 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
1681 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
1682 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
1683 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
1684 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
1685 |
/// updated dictionary |
|
1686 |
/// @param existingParameters An immutable dictionary of existing values |
|
1687 |
/// @param bridgeOptions The options for bridging |
|
1688 |
/// @return A new dictionary with the modified contents |
|
1689 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
1690 |
@end |
|
1691 |
|
|
1692 |
|
|
1693 |
@interface FBSDKShareCameraEffectContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
1694 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
1695 |
/// updated dictionary |
|
1696 |
/// @param existingParameters An immutable dictionary of existing values |
|
1697 |
/// @param bridgeOptions The options for bridging |
|
1698 |
/// @return A new dictionary with the modified contents |
|
1699 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
1700 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
1701 |
@end |
|
1702 |
|
|
1703 |
|
|
1704 |
@class UIViewController; |
|
1705 |
enum FBSDKShareDialogMode : NSUInteger; |
|
1706 |
|
|
1707 |
/// A dialog for sharing content on Facebook. |
|
1708 |
SWIFT_CLASS_NAMED("ShareDialog") |
|
1709 |
@interface FBSDKShareDialog : NSObject <FBSDKSharingDialog> |
|
1710 |
/// A UIViewController from which to present the dialog. |
|
1711 |
/// If not specified, the topmost view controller will be automatically determined as best as possible. |
|
1712 |
@property (nonatomic, weak) UIViewController * _Nullable fromViewController; |
|
1713 |
/// The mode with which to display the dialog. |
|
1714 |
/// Defaults to <code>.automatic</code>, which will automatically choose the best available mode. |
|
1715 |
@property (nonatomic) enum FBSDKShareDialogMode mode; |
|
1716 |
/// The receiver’s delegate or nil if it doesn’t have a delegate. |
|
1717 |
@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; |
|
1718 |
/// The content to be shared. |
|
1719 |
@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; |
|
1720 |
/// A Boolean value that indicates whether the receiver should fail if it finds an error with the share content. |
|
1721 |
/// If <code>false</code>, the sharer will still be displayed without the data that was misconfigured. For example, an |
|
1722 |
/// invalid <code>placeID</code> specified on the <code>shareContent</code> would produce a data error. |
|
1723 |
@property (nonatomic) BOOL shouldFailOnDataError; |
|
1724 |
/// Convenience initializer to initialize a <code>ShareDialog</code> with a view controller, content and delegate. |
|
1725 |
/// @param viewController A view controller from which to present the dialog, if appropriate. |
|
1726 |
/// @param content The content to be shared. |
|
1727 |
/// @param delegate The dialog’s delegate. |
|
1728 |
- (nonnull instancetype)initWithViewController:(UIViewController * _Nullable)viewController content:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER; |
|
1729 |
/// Convenience method to create a <code>ShareDialog</code> with a view controller, content and delegate. |
|
1730 |
/// @param viewController A view controller from which to present the dialog, if appropriate. |
|
1731 |
/// @param content The content to be shared. |
|
1732 |
/// @param delegate The dialog’s delegate. |
|
1733 |
+ (FBSDKShareDialog * _Nonnull)dialogWithViewController:(UIViewController * _Nullable)viewController withContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; |
|
1734 |
/// Convenience method to show a <code>ShareDialog</code> with a view controller, content and delegate. |
|
1735 |
/// @param viewController A view controller from which to present the dialog, if appropriate. |
|
1736 |
/// @param content The content to be shared. |
|
1737 |
/// @param delegate The dialog’s delegate. |
|
1738 |
+ (FBSDKShareDialog * _Nonnull)showFromViewController:(UIViewController * _Nullable)viewController withContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate; |
|
1739 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1740 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1741 |
@end |
|
1742 |
|
|
1743 |
|
|
1744 |
@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) |
|
1745 |
@end |
|
1746 |
|
|
1747 |
/// Modes for the FBSDKShareDialog. |
|
1748 |
/// The automatic mode will progressively check the availability of different modes and open the most |
|
1749 |
/// appropriate mode for the dialog that is available. |
|
1750 |
typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKShareDialogMode, "Mode", open) { |
|
1751 |
/// Acts with the most appropriate mode that is available. |
|
1752 |
FBSDKShareDialogModeAutomatic = 0, |
|
1753 |
/// Displays the dialog in the main native Facebook app. |
|
1754 |
FBSDKShareDialogModeNative = 1, |
|
1755 |
/// Displays the dialog in the iOS integrated share sheet. |
|
1756 |
FBSDKShareDialogModeShareSheet = 2, |
|
1757 |
/// Displays the dialog in Safari. |
|
1758 |
FBSDKShareDialogModeBrowser = 3, |
|
1759 |
/// Displays the dialog in a WKWebView within the app. |
|
1760 |
FBSDKShareDialogModeWeb = 4, |
|
1761 |
/// Displays the feed dialog in Safari. |
|
1762 |
FBSDKShareDialogModeFeedBrowser = 5, |
|
1763 |
/// Displays the feed dialog in a WKWebView within the app. |
|
1764 |
FBSDKShareDialogModeFeedWeb = 6, |
|
1765 |
}; |
|
1766 |
|
|
1767 |
@class FBSDKWebDialog; |
|
1768 |
|
|
1769 |
@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKWebDialogDelegate> |
|
1770 |
- (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results; |
|
1771 |
- (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didFailWithError:(NSError * _Nonnull)error; |
|
1772 |
- (void)webDialogDidCancel:(FBSDKWebDialog * _Nonnull)webDialog; |
|
1773 |
@end |
|
1774 |
|
|
1775 |
|
|
1776 |
|
|
1777 |
@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) |
|
1778 |
@property (nonatomic, readonly) BOOL canShow; |
|
1779 |
- (BOOL)show; |
|
1780 |
- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; |
|
1781 |
@end |
|
1782 |
|
|
1783 |
/// ShareError |
|
1784 |
/// Error codes for ShareErrorDomain. |
|
1785 |
typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKShareError, "ShareError", open) { |
|
1786 |
/// Reserved |
|
1787 |
FBSDKShareErrorReserved = 200, |
|
1788 |
/// The error code for errors from uploading open graph objects. |
|
1789 |
FBSDKShareErrorOpenGraph = 201, |
|
1790 |
/// The error code for when a sharing dialog is not available. |
|
1791 |
/// Use the canShare methods to check for this case before calling show. |
|
1792 |
FBSDKShareErrorDialogNotAvailable = 202, |
|
1793 |
/// The error code for unknown errors. |
|
1794 |
FBSDKShareErrorUnknown = 203, |
|
1795 |
}; |
|
1796 |
|
|
1797 |
|
|
1798 |
/// A model for status and link content to be shared. |
|
1799 |
SWIFT_CLASS_NAMED("ShareLinkContent") |
|
1800 |
@interface FBSDKShareLinkContent : NSObject |
|
1801 |
/// Some quote text of the link. |
|
1802 |
/// If specified, the quote text will render with custom styling on top of the link. |
|
1803 |
@property (nonatomic, copy) NSString * _Nullable quote; |
|
1804 |
/// URL for the content being shared. |
|
1805 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
1806 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
1807 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
1808 |
/// Hashtag for the content being shared. |
|
1809 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
1810 |
/// List of IDs for taggable people to tag with this content. |
|
1811 |
/// See documentation for Taggable Friends |
|
1812 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
1813 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
1814 |
/// The ID for a place to tag with this content. |
|
1815 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
1816 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
1817 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
1818 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
1819 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
1820 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
1821 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
1822 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1823 |
@end |
|
1824 |
|
|
1825 |
|
|
1826 |
@interface FBSDKShareLinkContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
1827 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
1828 |
/// updated dictionary |
|
1829 |
/// @param existingParameters An immutable dictionary of existing values |
|
1830 |
/// @param bridgeOptions The options for bridging |
|
1831 |
/// @return A new dictionary with the modified contents |
|
1832 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
1833 |
@end |
|
1834 |
|
|
1835 |
|
|
1836 |
@interface FBSDKShareLinkContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
1837 |
/// Asks the receiver to validate that its content or media values are valid. |
|
1838 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
1839 |
@end |
|
1840 |
|
|
1841 |
|
|
1842 |
/// A protocol for media content (photo or video) to be shared. |
|
1843 |
SWIFT_PROTOCOL_NAMED("ShareMedia") |
|
1844 |
@protocol FBSDKShareMedia |
|
1845 |
@end |
|
1846 |
|
|
1847 |
|
|
1848 |
/// A model for media content (photo or video) to be shared. |
|
1849 |
SWIFT_CLASS_NAMED("ShareMediaContent") |
|
1850 |
@interface FBSDKShareMediaContent : NSObject |
|
1851 |
/// Media to be shared: an array of <code>SharePhoto</code> or <code>ShareVideo</code> |
|
1852 |
@property (nonatomic, copy) NSArray<id <FBSDKShareMedia>> * _Nonnull media; |
|
1853 |
/// URL for the content being shared. |
|
1854 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
1855 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
1856 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
1857 |
/// Hashtag for the content being shared. |
|
1858 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
1859 |
/// List of IDs for taggable people to tag with this content. |
|
1860 |
/// See documentation for Taggable Friends |
|
1861 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
1862 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
1863 |
/// The ID for a place to tag with this content. |
|
1864 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
1865 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
1866 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
1867 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
1868 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
1869 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
1870 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
1871 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1872 |
@end |
|
1873 |
|
|
1874 |
|
|
1875 |
@interface FBSDKShareMediaContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
1876 |
/// Asks the receiver to validate that its content or media values are valid. |
|
1877 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
1878 |
@end |
|
1879 |
|
|
1880 |
|
|
1881 |
@interface FBSDKShareMediaContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
1882 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
1883 |
/// updated dictionary |
|
1884 |
/// @param existingParameters An immutable dictionary of existing values |
|
1885 |
/// @param bridgeOptions The options for bridging |
|
1886 |
/// @return A new dictionary with the modified contents |
|
1887 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
1888 |
@end |
|
1889 |
|
|
1890 |
@class PHAsset; |
|
1891 |
|
|
1892 |
/// A photo for sharing. |
|
1893 |
SWIFT_CLASS_NAMED("SharePhoto") |
|
1894 |
@interface FBSDKSharePhoto : NSObject <FBSDKShareMedia> |
|
1895 |
/// If the photo is resident in memory, this method supplies the data. |
|
1896 |
@property (nonatomic, strong) UIImage * _Nullable image; |
|
1897 |
/// URL that points to a network location or the location of the photo on disk |
|
1898 |
@property (nonatomic, copy) NSURL * _Nullable imageURL; |
|
1899 |
/// The representation of the photo in the Photos library. |
|
1900 |
@property (nonatomic, strong) PHAsset * _Nullable photoAsset; |
|
1901 |
/// Specifies whether the photo represented by the receiver was generated by the user (<code>true</code>) |
|
1902 |
/// or by the application (<code>false</code>). |
|
1903 |
@property (nonatomic) BOOL isUserGenerated; |
|
1904 |
/// The user-generated caption for the photo. Note that the ‘caption’ must come from |
|
1905 |
/// the user, as pre-filled content is forbidden by the Platform Policies (2.3). |
|
1906 |
@property (nonatomic, copy) NSString * _Nullable caption; |
|
1907 |
/// Convenience method to build a new photo object with an image. |
|
1908 |
/// \param image If the photo is resident in memory, this method supplies the data |
|
1909 |
/// |
|
1910 |
/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by the |
|
1911 |
/// application |
|
1912 |
/// |
|
1913 |
- (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image isUserGenerated:(BOOL)isUserGenerated; |
|
1914 |
/// Convenience method to build a new photo object with an imageURL. |
|
1915 |
/// This method should only be used when adding photo content to open graph stories. |
|
1916 |
/// For example, if you’re trying to share a photo from the web by itself, download the image and use |
|
1917 |
/// <code>init(image:isUserGenerated:)</code> instead. |
|
1918 |
/// \param imageURL The URL to the photo |
|
1919 |
/// |
|
1920 |
/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by the |
|
1921 |
/// application |
|
1922 |
/// |
|
1923 |
- (nonnull instancetype)initWithImageURL:(NSURL * _Nonnull)imageURL isUserGenerated:(BOOL)isUserGenerated; |
|
1924 |
/// Convenience method to build a new photo object with a PHAsset. |
|
1925 |
/// \param photoAsset The PHAsset that represents the photo in the Photos library. |
|
1926 |
/// |
|
1927 |
/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by |
|
1928 |
/// the application |
|
1929 |
/// |
|
1930 |
- (nonnull instancetype)initWithPhotoAsset:(PHAsset * _Nonnull)photoAsset isUserGenerated:(BOOL)isUserGenerated; |
|
1931 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1932 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1933 |
@end |
|
1934 |
|
|
1935 |
|
|
1936 |
|
|
1937 |
@interface FBSDKSharePhoto (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
1938 |
/// Asks the receiver to validate that its content or media values are valid. |
|
1939 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
1940 |
@end |
|
1941 |
|
|
1942 |
|
|
1943 |
|
|
1944 |
/// A model for photo content to be shared. |
|
1945 |
SWIFT_CLASS_NAMED("SharePhotoContent") |
|
1946 |
@interface FBSDKSharePhotoContent : NSObject |
|
1947 |
/// Photos to be shared. |
|
1948 |
@property (nonatomic, copy) NSArray<FBSDKSharePhoto *> * _Nonnull photos; |
|
1949 |
/// URL for the content being shared. |
|
1950 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
1951 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
1952 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
1953 |
/// Hashtag for the content being shared. |
|
1954 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
1955 |
/// List of IDs for taggable people to tag with this content. |
|
1956 |
/// See documentation for Taggable Friends |
|
1957 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
1958 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
1959 |
/// The ID for a place to tag with this content. |
|
1960 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
1961 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
1962 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
1963 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
1964 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
1965 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
1966 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
1967 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1968 |
@end |
|
1969 |
|
|
1970 |
|
|
1971 |
@interface FBSDKSharePhotoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
1972 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
1973 |
/// updated dictionary |
|
1974 |
/// @param existingParameters An immutable dictionary of existing values |
|
1975 |
/// @param bridgeOptions The options for bridging |
|
1976 |
/// @return A new dictionary with the modified contents |
|
1977 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
1978 |
@end |
|
1979 |
|
|
1980 |
|
|
1981 |
@interface FBSDKSharePhotoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
1982 |
/// Validate that this content contains valid values |
|
1983 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
1984 |
@end |
|
1985 |
|
|
1986 |
|
|
1987 |
@class NSData; |
|
1988 |
|
|
1989 |
/// A video for sharing. |
|
1990 |
SWIFT_CLASS_NAMED("ShareVideo") |
|
1991 |
@interface FBSDKShareVideo : NSObject <FBSDKShareMedia> |
|
1992 |
/// The raw video data. |
|
1993 |
@property (nonatomic, copy) NSData * _Nullable data; |
|
1994 |
/// The representation of the video in the Photos library. |
|
1995 |
@property (nonatomic, strong) PHAsset * _Nullable videoAsset; |
|
1996 |
/// The file URL to the video. |
|
1997 |
@property (nonatomic, copy) NSURL * _Nullable videoURL; |
|
1998 |
/// The photo that represents the video. |
|
1999 |
@property (nonatomic, strong) FBSDKSharePhoto * _Nullable previewPhoto; |
|
2000 |
/// Convenience method to build a new video object from raw data and an optional preview photo. |
|
2001 |
/// \param data The Data object that holds the raw video data. |
|
2002 |
/// |
|
2003 |
/// \param previewPhoto The photo that represents the video. |
|
2004 |
/// |
|
2005 |
- (nonnull instancetype)initWithData:(NSData * _Nonnull)data previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; |
|
2006 |
/// Convenience method to build a new video object from a PHAsset and an optional preview photo. |
|
2007 |
/// \param videoAsset The PHAsset that represents the video in the Photos library. |
|
2008 |
/// |
|
2009 |
/// \param previewPhoto The photo that represents the video. |
|
2010 |
/// |
|
2011 |
- (nonnull instancetype)initWithVideoAsset:(PHAsset * _Nonnull)videoAsset previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; |
|
2012 |
/// Convenience method to build a new video object from a URL and an optional preview photo. |
|
2013 |
/// \param videoURL The URL to the video. |
|
2014 |
/// |
|
2015 |
/// \param previewPhoto The photo that represents the video. |
|
2016 |
/// |
|
2017 |
- (nonnull instancetype)initWithVideoURL:(NSURL * _Nonnull)videoURL previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; |
|
2018 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2019 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2020 |
@end |
|
2021 |
|
|
2022 |
|
|
2023 |
|
|
2024 |
@interface FBSDKShareVideo (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
2025 |
/// Asks the receiver to validate that its content or media values are valid. |
|
2026 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
2027 |
@end |
|
2028 |
|
|
2029 |
|
|
2030 |
|
|
2031 |
/// A model for video content to be shared. |
|
2032 |
SWIFT_CLASS_NAMED("ShareVideoContent") |
|
2033 |
@interface FBSDKShareVideoContent : NSObject |
|
2034 |
/// The video to be shared |
|
2035 |
@property (nonatomic, strong) FBSDKShareVideo * _Nonnull video; |
|
2036 |
/// URL for the content being shared. |
|
2037 |
/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation |
|
2038 |
/// for App Links (https://developers.facebook.com/docs/applinks/) |
|
2039 |
@property (nonatomic, copy) NSURL * _Nullable contentURL; |
|
2040 |
/// Hashtag for the content being shared. |
|
2041 |
@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; |
|
2042 |
/// List of IDs for taggable people to tag with this content. |
|
2043 |
/// See documentation for Taggable Friends |
|
2044 |
/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) |
|
2045 |
@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; |
|
2046 |
/// The ID for a place to tag with this content. |
|
2047 |
@property (nonatomic, copy) NSString * _Nullable placeID; |
|
2048 |
/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. |
|
2049 |
@property (nonatomic, copy) NSString * _Nullable ref; |
|
2050 |
/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. |
|
2051 |
@property (nonatomic, copy) NSString * _Nullable pageID; |
|
2052 |
/// A unique identifier for a share involving this content, useful for tracking purposes. |
|
2053 |
@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; |
|
2054 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
2055 |
@end |
|
2056 |
|
|
2057 |
|
|
2058 |
@interface FBSDKShareVideoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> |
|
2059 |
/// Adds content to an existing dictionary as key/value pairs and returns the |
|
2060 |
/// updated dictionary |
|
2061 |
/// @param existingParameters An immutable dictionary of existing values |
|
2062 |
/// @param bridgeOptions The options for bridging |
|
2063 |
/// @return A new dictionary with the modified contents |
|
2064 |
- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; |
|
2065 |
@end |
|
2066 |
|
|
2067 |
|
|
2068 |
@interface FBSDKShareVideoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> |
|
2069 |
- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; |
|
2070 |
@end |
|
2071 |
|
|
2072 |
|
|
2073 |
|
|
2074 |
|
|
2075 |
|
|
2076 |
|
|
2077 |
/// A delegate for types conforming to the <code>Sharing</code> protocol. |
|
2078 |
/// The delegate is notified with the results of the sharer as long as the application has permissions to |
|
2079 |
/// receive the information. For example, if the person is not signed into the containing app, the sharer may not be able |
|
2080 |
/// to distinguish between completion of a share and cancellation. |
|
2081 |
SWIFT_PROTOCOL_NAMED("SharingDelegate") |
|
2082 |
@protocol FBSDKSharingDelegate |
|
2083 |
/// Sent to the delegate when sharing completes without error or cancellation. |
|
2084 |
/// @param sharer The sharer that completed. |
|
2085 |
/// @param results The results from the sharer. This may be nil or empty. |
|
2086 |
- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results; |
|
2087 |
/// Sent to the delegate when the sharer encounters an error. |
|
2088 |
/// @param sharer The sharer that completed. |
|
2089 |
/// @param error The error. |
|
2090 |
- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didFailWithError:(NSError * _Nonnull)error; |
|
2091 |
/// Sent to the delegate when the sharer is cancelled. |
|
2092 |
/// @param sharer The sharer that completed. |
|
2093 |
- (void)sharerDidCancel:(id <FBSDKSharing> _Nonnull)sharer; |
|
2094 |
@end |
|
2095 |
|
|
2096 |
|
|
2097 |
|
|
2098 |
|
|
2099 |
#endif |
2e29a3
|
2100 |
#if __has_attribute(external_source_symbol) |
L |
2101 |
# pragma clang attribute pop |
|
2102 |
#endif |
97fc0a
|
2103 |
#if defined(__cplusplus) |
L |
2104 |
#endif |
2e29a3
|
2105 |
#pragma clang diagnostic pop |
L |
2106 |
#endif |
|
2107 |
|
e0ec42
|
2108 |
#else |
L |
2109 |
#error unsupported Swift architecture |
2e29a3
|
2110 |
#endif |