commit | author | age
|
e0ec42
|
1 |
#if 0 |
L |
2 |
#elif defined(__arm64__) && __arm64__ |
2a6e18
|
3 |
// Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4) |
e0ec42
|
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" |
|
27 |
#if defined(__OBJC__) |
|
28 |
#include <Foundation/Foundation.h> |
|
29 |
#endif |
|
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 |
L |
39 |
#include <stdint.h> |
|
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 |
L |
59 |
|
|
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(...) |
e0ec42
|
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 |
e0ec42
|
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 |
e0ec42
|
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 |
e0ec42
|
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 |
e0ec42
|
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 |
e0ec42
|
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 |
e0ec42
|
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 |
e0ec42
|
144 |
#endif |
L |
145 |
#if !defined(SWIFT_CLASS_EXTRA) |
97fc0a
|
146 |
# define SWIFT_CLASS_EXTRA |
e0ec42
|
147 |
#endif |
L |
148 |
#if !defined(SWIFT_PROTOCOL_EXTRA) |
97fc0a
|
149 |
# define SWIFT_PROTOCOL_EXTRA |
e0ec42
|
150 |
#endif |
L |
151 |
#if !defined(SWIFT_ENUM_EXTRA) |
97fc0a
|
152 |
# define SWIFT_ENUM_EXTRA |
e0ec42
|
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 |
e0ec42
|
184 |
# endif |
L |
185 |
#endif |
|
186 |
#if !defined(SWIFT_ENUM_ATTR) |
97fc0a
|
187 |
# if __has_attribute(enum_extensibility) |
e0ec42
|
188 |
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) |
L |
189 |
# else |
97fc0a
|
190 |
# define SWIFT_ENUM_ATTR(_extensibility) |
e0ec42
|
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 |
e0ec42
|
225 |
#endif |
L |
226 |
#if defined(__OBJC__) |
|
227 |
#if !defined(IBSegueAction) |
97fc0a
|
228 |
# define IBSegueAction |
e0ec42
|
229 |
#endif |
L |
230 |
#endif |
|
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) |
e0ec42
|
277 |
#if __has_warning("-Watimport-in-framework-header") |
L |
278 |
#pragma clang diagnostic ignored "-Watimport-in-framework-header" |
|
279 |
#endif |
|
280 |
@import CoreFoundation; |
|
281 |
@import FBSDKCoreKit; |
|
282 |
@import Foundation; |
|
283 |
@import ObjectiveC; |
|
284 |
#endif |
|
285 |
|
|
286 |
#import <FBSDKShareKit/FBSDKShareKit.h> |
|
287 |
|
|
288 |
#endif |
|
289 |
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" |
|
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" |
|
296 |
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
|
297 |
|
|
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 |
|
|
305 |
#if defined(__OBJC__) |
|
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 |
|
1047 |
#if __has_attribute(external_source_symbol) |
|
1048 |
# pragma clang attribute pop |
|
1049 |
#endif |
97fc0a
|
1050 |
#if defined(__cplusplus) |
L |
1051 |
#endif |
e0ec42
|
1052 |
#pragma clang diagnostic pop |
L |
1053 |
#endif |
|
1054 |
|
|
1055 |
#else |
|
1056 |
#error unsupported Swift architecture |
|
1057 |
#endif |