From 14dac3416fa64cec3ca6523835297bf7a4d7d9bd Mon Sep 17 00:00:00 2001 From: lpw Date: Mon, 24 Jun 2024 17:03:59 +0800 Subject: [PATCH] 提交4.0.0 --- frameworks/FBSDKShareKit.xcframework/ios-arm64_x86_64-maccatalyst/FBSDKShareKit.framework/Headers/FBSDKShareKit-Swift.h | 1864 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 1,772 insertions(+), 92 deletions(-) diff --git a/frameworks/FBSDKShareKit.xcframework/ios-arm64_x86_64-maccatalyst/FBSDKShareKit.framework/Headers/FBSDKShareKit-Swift.h b/frameworks/FBSDKShareKit.xcframework/ios-arm64_x86_64-maccatalyst/FBSDKShareKit.framework/Headers/FBSDKShareKit-Swift.h index 1905360..b5e070e 100644 --- a/frameworks/FBSDKShareKit.xcframework/ios-arm64_x86_64-maccatalyst/FBSDKShareKit.framework/Headers/FBSDKShareKit-Swift.h +++ b/frameworks/FBSDKShareKit.xcframework/ios-arm64_x86_64-maccatalyst/FBSDKShareKit.framework/Headers/FBSDKShareKit-Swift.h @@ -1,6 +1,6 @@ #if 0 #elif defined(__arm64__) && __arm64__ -// Generated by Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) +// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) #ifndef FBSDKSHAREKIT_SWIFT_H #define FBSDKSHAREKIT_SWIFT_H #pragma clang diagnostic push @@ -24,10 +24,38 @@ #endif #pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) #include <Foundation/Foundation.h> +#endif +#if defined(__cplusplus) +#include <cstdint> +#include <cstddef> +#include <cstdbool> +#include <cstring> +#include <stdlib.h> +#include <new> +#include <type_traits> +#else #include <stdint.h> #include <stddef.h> #include <stdbool.h> +#include <string.h> +#endif +#if defined(__cplusplus) +#if defined(__arm64e__) && __has_include(<ptrauth.h>) +# include <ptrauth.h> +#else +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-macro-identifier" +# ifndef __ptrauth_swift_value_witness_function_pointer +# define __ptrauth_swift_value_witness_function_pointer(x) +# endif +# ifndef __ptrauth_swift_class_method_pointer +# define __ptrauth_swift_class_method_pointer(x) +# endif +#pragma clang diagnostic pop +#endif +#endif #if !defined(SWIFT_TYPEDEFS) # define SWIFT_TYPEDEFS 1 @@ -62,53 +90,66 @@ # if __has_feature(objc_class_property) # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ # else -# define SWIFT_CLASS_PROPERTY(...) +# define SWIFT_CLASS_PROPERTY(...) # endif #endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) +#if !defined(SWIFT_RUNTIME_NAME) +# if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +# else +# define SWIFT_RUNTIME_NAME(X) +# endif #endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) +#if !defined(SWIFT_COMPILE_NAME) +# if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +# else +# define SWIFT_COMPILE_NAME(X) +# endif #endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) +#if !defined(SWIFT_METHOD_FAMILY) +# if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +# else +# define SWIFT_METHOD_FAMILY(X) +# endif #endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE +#if !defined(SWIFT_NOESCAPE) +# if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +# else +# define SWIFT_NOESCAPE +# endif #endif -#if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) -#else -# define SWIFT_RELEASES_ARGUMENT +#if !defined(SWIFT_RELEASES_ARGUMENT) +# if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +# else +# define SWIFT_RELEASES_ARGUMENT +# endif #endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT +#if !defined(SWIFT_WARN_UNUSED_RESULT) +# if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +# else +# define SWIFT_WARN_UNUSED_RESULT +# endif #endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN +#if !defined(SWIFT_NORETURN) +# if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +# else +# define SWIFT_NORETURN +# endif #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +# define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) # if __has_attribute(objc_subclassing_restricted) @@ -128,28 +169,25 @@ # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) # endif #endif - #if !defined(SWIFT_PROTOCOL) # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif - #if !defined(SWIFT_EXTENSION) # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif - #if !defined(OBJC_DESIGNATED_INITIALIZER) # if __has_attribute(objc_designated_initializer) # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) # else -# define OBJC_DESIGNATED_INITIALIZER +# define OBJC_DESIGNATED_INITIALIZER # endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# if __has_attribute(enum_extensibility) # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) # else -# define SWIFT_ENUM_ATTR(_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) # endif #endif #if !defined(SWIFT_ENUM) @@ -178,20 +216,76 @@ #if !defined(SWIFT_DEPRECATED_MSG) # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#if !defined(SWIFT_DEPRECATED_OBJC) +# if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +# else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +# endif #endif +#if defined(__OBJC__) #if !defined(IBSegueAction) -# define IBSegueAction +# define IBSegueAction #endif -#if __has_feature(modules) +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if !defined(SWIFT_INDIRECT_RESULT) +# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) +#endif +#if !defined(SWIFT_CONTEXT) +# define SWIFT_CONTEXT __attribute__((swift_context)) +#endif +#if !defined(SWIFT_ERROR_RESULT) +# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) +#endif +#if defined(__cplusplus) +# define SWIFT_NOEXCEPT noexcept +#else +# define SWIFT_NOEXCEPT +#endif +#if !defined(SWIFT_C_INLINE_THUNK) +# if __has_attribute(always_inline) +# if __has_attribute(nodebug) +# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug)) +# else +# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) +# endif +# else +# define SWIFT_C_INLINE_THUNK inline +# endif +#endif +#if defined(_WIN32) +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) +#endif +#else +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(objc_modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" #endif +@import CoreFoundation; +@import FBSDKCoreKit; +@import Foundation; +@import ObjectiveC; #endif +#import <FBSDKShareKit/FBSDKShareKit.h> + +#endif #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") @@ -199,6 +293,7 @@ #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" #if __has_attribute(external_source_symbol) # pragma push_macro("any") @@ -207,14 +302,758 @@ # pragma pop_macro("any") #endif +#if defined(__OBJC__) + +@class NSURL; +@class NSString; +enum FBSDKAppInviteDestination : NSInteger; + +/// A model for app invite +SWIFT_CLASS_NAMED("AppInviteContent") +@interface FBSDKAppInviteContent : NSObject +/// A URL to a preview image that will be displayed with the app invite +/// This is optional. If you don’t include it a fallback image will be used. +@property (nonatomic, copy) NSURL * _Nullable appInvitePreviewImageURL; +/// An app link target that will be used as a target when the user accept the invite. +@property (nonatomic, copy) NSURL * _Nonnull appLinkURL; +/// Promotional code to be displayed while sending and receiving the invite. +/// This is optional. This can be between 0 and 10 characters long and can contain +/// alphanumeric characters only. To set a promo code, you need to set promo text. +@property (nonatomic, copy) NSString * _Nullable promotionCode; +/// Promotional text to be displayed while sending and receiving the invite. +/// This is optional. This can be between 0 and 80 characters long and can contain +/// alphanumeric and spaces only. +@property (nonatomic, copy) NSString * _Nullable promotionText; +/// Destination for the app invite. The default value is <code>.facebook</code>. +@property (nonatomic) enum FBSDKAppInviteDestination destination; +- (nonnull instancetype)initWithAppLinkURL:(NSURL * _Nonnull)appLinkURL OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +/// Specifies the privacy of a group. +typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKAppInviteDestination, "Destination", open) { +/// Deliver to Facebook + FBSDKAppInviteDestinationFacebook = 0, + FBSDKAppInviteDestinationMessenger = 1, +}; + + +/// An interface for validatable content and media. +SWIFT_PROTOCOL_NAMED("SharingValidatable") +@protocol FBSDKSharingValidatable +/// Validate that this content or media contains valid values. +/// \param options The share bridge options to use for validation. +/// +/// +/// throws: +/// If the values are not valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)options error:(NSError * _Nullable * _Nullable)error; +@end + + +@interface FBSDKAppInviteContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + + +/// A container of arguments for a camera effect. +/// An argument is a <code>String</code> or <code>[String]</code> identified by a <code>String</code> key. +SWIFT_CLASS_NAMED("CameraEffectArguments") +@interface FBSDKCameraEffectArguments : NSObject +/// Sets a string argument in the container. +/// @param string The argument +/// @param key The key for the argument +- (void)setString:(NSString * _Nullable)string forKey:(NSString * _Nonnull)key; +/// Gets a string argument from the container. +/// @param key The key for the argument +/// @return The string value or nil +- (NSString * _Nullable)stringForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; +/// Sets a string array argument in the container. +/// @param array The array argument +/// @param key The key for the argument +- (void)setArray:(NSArray<NSString *> * _Nullable)array forKey:(NSString * _Nonnull)key; +/// Gets an array argument from the container. +/// @param key The key for the argument +/// @return The array argument +- (NSArray<NSString *> * _Nullable)arrayForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class UIImage; + +/// A container of textures for a camera effect. +/// A texture for a camera effect is an UIImages identified by a NSString key. +SWIFT_CLASS_NAMED("CameraEffectTextures") +@interface FBSDKCameraEffectTextures : NSObject +/// Sets the image for a texture key. +/// @param image The <code>UIImage</code> for the texture +/// @param key The key for the texture +- (void)setImage:(UIImage * _Nullable)image forKey:(NSString * _Nonnull)key; +/// Gets the image for a texture key. +/// @param key The key for the texture +/// @return The texture <code>UIImage</code> or nil +- (UIImage * _Nullable)imageForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@protocol FBSDKSharingContent; + +/// The common interface for sharing buttons. +/// See FBSendButton and FBShareButton +SWIFT_PROTOCOL_NAMED("SharingButton") +@protocol FBSDKSharingButton +/// The content to be shared. +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +@end + +@class FBSDKMessageDialog; +@class NSCoder; + +/// A button to send content through Messenger. +/// Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot +/// be shown, the button will be disable. +SWIFT_CLASS_NAMED("FBSendButton") +@interface FBSDKSendButton : FBSDKButton <FBSDKButtonImpressionLogging, FBSDKSharingButton> +@property (nonatomic, strong) FBSDKMessageDialog * _Nullable dialog; +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +@property (nonatomic, readonly, copy) NSDictionary<FBSDKAppEventParameterName, id> * _Nullable analyticsParameters; +@property (nonatomic, readonly) FBSDKAppEventName _Nonnull impressionTrackingEventName; +@property (nonatomic, readonly, copy) NSString * _Nonnull impressionTrackingIdentifier; +@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; +- (void)configureButton; +- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +@end + + + +/// A button to share content. +/// Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot +/// be shown, the button will be disabled. +SWIFT_CLASS_NAMED("FBShareButton") +@interface FBSDKShareButton : FBSDKButton <FBSDKSharingButton> +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +@property (nonatomic, readonly, copy) NSDictionary<FBSDKAppEventParameterName, id> * _Nullable analyticsParameters; +@property (nonatomic, readonly) FBSDKAppEventName _Nonnull impressionTrackingEventName; +@property (nonatomic, readonly, copy) NSString * _Nonnull impressionTrackingIdentifier; +@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; +- (void)configureButton; +- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +@end + + + +/// Represents a single hashtag that can be used with the share dialog. +SWIFT_CLASS_NAMED("Hashtag") +@interface FBSDKHashtag : NSObject +/// The hashtag string. +/// You are responsible for making sure that <code>stringRepresentation</code> is a valid hashtag (a single ‘#’ followed by one or more +/// word characters). Invalid hashtags are ignored when sharing content. You can check validity with the<code>valid</code> property. +/// @return The hashtag string +@property (nonatomic, copy) NSString * _Nonnull stringRepresentation; +- (nonnull instancetype)initWithString:(NSString * _Nonnull)string OBJC_DESIGNATED_INITIALIZER; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +/// Tests if a hashtag is valid. +/// A valid hashtag matches the regular expression “#\w+”: A single ‘#’ followed by one or more word characters. +/// @return true if the hashtag is valid, false otherwise. +@property (nonatomic, readonly) BOOL isValid; +@property (nonatomic, readonly) NSUInteger hash; +- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +@protocol FBSDKSharingDelegate; + +/// The common interface for components that initiate sharing. +/// See ShareDialog, MessageDialog +SWIFT_PROTOCOL_NAMED("Sharing") +@protocol FBSDKSharing +/// The receiver’s delegate or nil if it doesn’t have a delegate. +@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; +/// The content to be shared. +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +/// A boolean value that indicates whether the receiver should fail if it finds an error with the share content. +/// If <code>false</code>, the sharer will still be displayed without the data that was misconfigured. For example, an +/// invalid <code>placeID</code> specified on the <code>shareContent</code> would produce a data error. +@property (nonatomic) BOOL shouldFailOnDataError; +/// Validates the content on the receiver. +/// @throws An error if the content is invalid +- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; +@end + + +/// The common interface for dialogs that initiate sharing. +SWIFT_PROTOCOL_NAMED("SharingDialog") +@protocol FBSDKSharingDialog <FBSDKSharing> +/// A boolean value that indicates whether the receiver can initiate a share. +/// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is +/// required but not available. This method does not validate the content on the receiver, so this can be checked before +/// building up the content. +/// See <code>Sharing.validate(error:)</code> +/// @return <code>true</code> if the receiver can share, otherwise <code>false</code>. +@property (nonatomic, readonly) BOOL canShow; +/// Shows the dialog. +/// @return <code>true</code> if the receiver was able to begin sharing, otherwise <code>false</code>. +- (BOOL)show; +@end + + +/// A dialog for sharing content through Messenger. +/// SUPPORTED SHARE TYPES +/// <ul> +/// <li> +/// FBSDKShareLinkContent +/// </li> +/// </ul> +/// UNSUPPORTED SHARE TYPES (DEPRECATED AUGUST 2018) +/// <ul> +/// <li> +/// FBSDKShareOpenGraphContent +/// </li> +/// <li> +/// FBSDKSharePhotoContent +/// </li> +/// <li> +/// FBSDKShareVideoContent +/// </li> +/// <li> +/// FBSDKShareMessengerOpenGraphMusicTemplateContent +/// </li> +/// <li> +/// FBSDKShareMessengerMediaTemplateContent +/// </li> +/// <li> +/// FBSDKShareMessengerGenericTemplateContent +/// </li> +/// <li> +/// Any other types that are not one of the four supported types listed above +/// </li> +/// </ul> +SWIFT_CLASS_NAMED("MessageDialog") +@interface FBSDKMessageDialog : NSObject <FBSDKSharingDialog> +/// The receiver’s delegate or nil if it doesn’t have a delegate. +@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; +/// The content to be shared. +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +/// A Boolean value that indicates whether the receiver should fail if it finds an error with the share content. +/// If <code>false</code>, the sharer will still be displayed without the data that was mis-configured. For example, an +/// invalid placeID specified on the shareContent would produce a data error. +@property (nonatomic) BOOL shouldFailOnDataError; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +/// Convenience initializer to return a Message Share Dialog with content and a delegate. +/// @param content The content to be shared. +/// @param delegate The receiver’s delegate. +- (nonnull instancetype)initWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate; +/// Convenience method to return a Message Share Dialog with content and a delegate. +/// @param content The content to be shared. +/// @param delegate The receiver’s delegate. ++ (FBSDKMessageDialog * _Nonnull)dialogWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; +/// Convenience method to show a Message Share Dialog with content and a delegate. +/// @param content The content to be shared. +/// @param delegate The receiver’s delegate. ++ (FBSDKMessageDialog * _Nonnull)showWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; +/// A Boolean value that indicates whether the receiver can initiate a share. +/// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is +/// required but not available. This method does not validate the content on the receiver, so this can be checked before +/// building up the content. +/// See <code>Sharing.validate()</code> +/// @return <code>true</code> if the receiver can share, otherwise <code>false</code>. +@property (nonatomic, readonly) BOOL canShow; +/// Shows the dialog. +/// @return <code>true</code> if the receiver was able to begin sharing, otherwise <code>false</code>. +- (BOOL)show; +/// Validates the content on the receiver. +/// @return <code>true</code> if the content is valid, otherwise <code>false</code>. +- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; +@end + + + + +/// A model for content to share with a Facebook camera effect. +SWIFT_CLASS_NAMED("ShareCameraEffectContent") +@interface FBSDKShareCameraEffectContent : NSObject +/// ID of the camera effect to use. +@property (nonatomic, copy) NSString * _Nonnull effectID; +/// Arguments for the effect. +@property (nonatomic, strong) FBSDKCameraEffectArguments * _Nonnull effectArguments; +/// Textures for the effect. +@property (nonatomic, strong) FBSDKCameraEffectTextures * _Nonnull effectTextures; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +/// A base interface for content to be shared. +SWIFT_PROTOCOL_NAMED("SharingContent") +@protocol FBSDKSharingContent <FBSDKSharingValidatable, NSObject> +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. +/// See documentation for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + + +@interface FBSDKShareCameraEffectContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + +@class UIViewController; +enum FBSDKShareDialogMode : NSUInteger; + +/// A dialog for sharing content on Facebook. +SWIFT_CLASS_NAMED("ShareDialog") +@interface FBSDKShareDialog : NSObject <FBSDKSharingDialog> +/// A UIViewController from which to present the dialog. +/// If not specified, the topmost view controller will be automatically determined as best as possible. +@property (nonatomic, weak) UIViewController * _Nullable fromViewController; +/// The mode with which to display the dialog. +/// Defaults to <code>.automatic</code>, which will automatically choose the best available mode. +@property (nonatomic) enum FBSDKShareDialogMode mode; +/// The receiver’s delegate or nil if it doesn’t have a delegate. +@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; +/// The content to be shared. +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +/// A Boolean value that indicates whether the receiver should fail if it finds an error with the share content. +/// If <code>false</code>, the sharer will still be displayed without the data that was misconfigured. For example, an +/// invalid <code>placeID</code> specified on the <code>shareContent</code> would produce a data error. +@property (nonatomic) BOOL shouldFailOnDataError; +/// Convenience initializer to initialize a <code>ShareDialog</code> with a view controller, content and delegate. +/// @param viewController A view controller from which to present the dialog, if appropriate. +/// @param content The content to be shared. +/// @param delegate The dialog’s delegate. +- (nonnull instancetype)initWithViewController:(UIViewController * _Nullable)viewController content:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER; +/// Convenience method to create a <code>ShareDialog</code> with a view controller, content and delegate. +/// @param viewController A view controller from which to present the dialog, if appropriate. +/// @param content The content to be shared. +/// @param delegate The dialog’s delegate. ++ (FBSDKShareDialog * _Nonnull)dialogWithViewController:(UIViewController * _Nullable)viewController withContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; +/// Convenience method to show a <code>ShareDialog</code> with a view controller, content and delegate. +/// @param viewController A view controller from which to present the dialog, if appropriate. +/// @param content The content to be shared. +/// @param delegate The dialog’s delegate. ++ (FBSDKShareDialog * _Nonnull)showFromViewController:(UIViewController * _Nullable)viewController withContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) +@end + +/// Modes for the FBSDKShareDialog. +/// The automatic mode will progressively check the availability of different modes and open the most +/// appropriate mode for the dialog that is available. +typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKShareDialogMode, "Mode", open) { +/// Acts with the most appropriate mode that is available. + FBSDKShareDialogModeAutomatic = 0, +/// Displays the dialog in the main native Facebook app. + FBSDKShareDialogModeNative = 1, +/// Displays the dialog in the iOS integrated share sheet. + FBSDKShareDialogModeShareSheet = 2, +/// Displays the dialog in Safari. + FBSDKShareDialogModeBrowser = 3, +/// Displays the dialog in a WKWebView within the app. + FBSDKShareDialogModeWeb = 4, +/// Displays the feed dialog in Safari. + FBSDKShareDialogModeFeedBrowser = 5, +/// Displays the feed dialog in a WKWebView within the app. + FBSDKShareDialogModeFeedWeb = 6, +}; + +@class FBSDKWebDialog; + +@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKWebDialogDelegate> +- (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results; +- (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didFailWithError:(NSError * _Nonnull)error; +- (void)webDialogDidCancel:(FBSDKWebDialog * _Nonnull)webDialog; +@end + + + +@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) +@property (nonatomic, readonly) BOOL canShow; +- (BOOL)show; +- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; +@end + +/// ShareError +/// Error codes for ShareErrorDomain. +typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKShareError, "ShareError", open) { +/// Reserved + FBSDKShareErrorReserved = 200, +/// The error code for errors from uploading open graph objects. + FBSDKShareErrorOpenGraph = 201, +/// The error code for when a sharing dialog is not available. +/// Use the canShare methods to check for this case before calling show. + FBSDKShareErrorDialogNotAvailable = 202, +/// The error code for unknown errors. + FBSDKShareErrorUnknown = 203, +}; + + +/// A model for status and link content to be shared. +SWIFT_CLASS_NAMED("ShareLinkContent") +@interface FBSDKShareLinkContent : NSObject +/// Some quote text of the link. +/// If specified, the quote text will render with custom styling on top of the link. +@property (nonatomic, copy) NSString * _Nullable quote; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +@interface FBSDKShareLinkContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + + +@interface FBSDKShareLinkContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Asks the receiver to validate that its content or media values are valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + +/// A protocol for media content (photo or video) to be shared. +SWIFT_PROTOCOL_NAMED("ShareMedia") +@protocol FBSDKShareMedia +@end + + +/// A model for media content (photo or video) to be shared. +SWIFT_CLASS_NAMED("ShareMediaContent") +@interface FBSDKShareMediaContent : NSObject +/// Media to be shared: an array of <code>SharePhoto</code> or <code>ShareVideo</code> +@property (nonatomic, copy) NSArray<id <FBSDKShareMedia>> * _Nonnull media; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +@interface FBSDKShareMediaContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Asks the receiver to validate that its content or media values are valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + +@interface FBSDKShareMediaContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + +@class PHAsset; + +/// A photo for sharing. +SWIFT_CLASS_NAMED("SharePhoto") +@interface FBSDKSharePhoto : NSObject <FBSDKShareMedia> +/// If the photo is resident in memory, this method supplies the data. +@property (nonatomic, strong) UIImage * _Nullable image; +/// URL that points to a network location or the location of the photo on disk +@property (nonatomic, copy) NSURL * _Nullable imageURL; +/// The representation of the photo in the Photos library. +@property (nonatomic, strong) PHAsset * _Nullable photoAsset; +/// Specifies whether the photo represented by the receiver was generated by the user (<code>true</code>) +/// or by the application (<code>false</code>). +@property (nonatomic) BOOL isUserGenerated; +/// The user-generated caption for the photo. Note that the ‘caption’ must come from +/// the user, as pre-filled content is forbidden by the Platform Policies (2.3). +@property (nonatomic, copy) NSString * _Nullable caption; +/// Convenience method to build a new photo object with an image. +/// \param image If the photo is resident in memory, this method supplies the data +/// +/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by the +/// application +/// +- (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image isUserGenerated:(BOOL)isUserGenerated; +/// Convenience method to build a new photo object with an imageURL. +/// This method should only be used when adding photo content to open graph stories. +/// For example, if you’re trying to share a photo from the web by itself, download the image and use +/// <code>init(image:isUserGenerated:)</code> instead. +/// \param imageURL The URL to the photo +/// +/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by the +/// application +/// +- (nonnull instancetype)initWithImageURL:(NSURL * _Nonnull)imageURL isUserGenerated:(BOOL)isUserGenerated; +/// Convenience method to build a new photo object with a PHAsset. +/// \param photoAsset The PHAsset that represents the photo in the Photos library. +/// +/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by +/// the application +/// +- (nonnull instancetype)initWithPhotoAsset:(PHAsset * _Nonnull)photoAsset isUserGenerated:(BOOL)isUserGenerated; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + +@interface FBSDKSharePhoto (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Asks the receiver to validate that its content or media values are valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + + +/// A model for photo content to be shared. +SWIFT_CLASS_NAMED("SharePhotoContent") +@interface FBSDKSharePhotoContent : NSObject +/// Photos to be shared. +@property (nonatomic, copy) NSArray<FBSDKSharePhoto *> * _Nonnull photos; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +@interface FBSDKSharePhotoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + + +@interface FBSDKSharePhotoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Validate that this content contains valid values +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + +@class NSData; + +/// A video for sharing. +SWIFT_CLASS_NAMED("ShareVideo") +@interface FBSDKShareVideo : NSObject <FBSDKShareMedia> +/// The raw video data. +@property (nonatomic, copy) NSData * _Nullable data; +/// The representation of the video in the Photos library. +@property (nonatomic, strong) PHAsset * _Nullable videoAsset; +/// The file URL to the video. +@property (nonatomic, copy) NSURL * _Nullable videoURL; +/// The photo that represents the video. +@property (nonatomic, strong) FBSDKSharePhoto * _Nullable previewPhoto; +/// Convenience method to build a new video object from raw data and an optional preview photo. +/// \param data The Data object that holds the raw video data. +/// +/// \param previewPhoto The photo that represents the video. +/// +- (nonnull instancetype)initWithData:(NSData * _Nonnull)data previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; +/// Convenience method to build a new video object from a PHAsset and an optional preview photo. +/// \param videoAsset The PHAsset that represents the video in the Photos library. +/// +/// \param previewPhoto The photo that represents the video. +/// +- (nonnull instancetype)initWithVideoAsset:(PHAsset * _Nonnull)videoAsset previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; +/// Convenience method to build a new video object from a URL and an optional preview photo. +/// \param videoURL The URL to the video. +/// +/// \param previewPhoto The photo that represents the video. +/// +- (nonnull instancetype)initWithVideoURL:(NSURL * _Nonnull)videoURL previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + +@interface FBSDKShareVideo (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Asks the receiver to validate that its content or media values are valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + + +/// A model for video content to be shared. +SWIFT_CLASS_NAMED("ShareVideoContent") +@interface FBSDKShareVideoContent : NSObject +/// The video to be shared +@property (nonatomic, strong) FBSDKShareVideo * _Nonnull video; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +@interface FBSDKShareVideoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + + +@interface FBSDKShareVideoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + + + + + +/// A delegate for types conforming to the <code>Sharing</code> protocol. +/// The delegate is notified with the results of the sharer as long as the application has permissions to +/// receive the information. For example, if the person is not signed into the containing app, the sharer may not be able +/// to distinguish between completion of a share and cancellation. +SWIFT_PROTOCOL_NAMED("SharingDelegate") +@protocol FBSDKSharingDelegate +/// Sent to the delegate when sharing completes without error or cancellation. +/// @param sharer The sharer that completed. +/// @param results The results from the sharer. This may be nil or empty. +- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results; +/// Sent to the delegate when the sharer encounters an error. +/// @param sharer The sharer that completed. +/// @param error The error. +- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didFailWithError:(NSError * _Nonnull)error; +/// Sent to the delegate when the sharer is cancelled. +/// @param sharer The sharer that completed. +- (void)sharerDidCancel:(id <FBSDKSharing> _Nonnull)sharer; +@end + + + + +#endif #if __has_attribute(external_source_symbol) # pragma clang attribute pop +#endif +#if defined(__cplusplus) #endif #pragma clang diagnostic pop #endif #elif defined(__x86_64__) && __x86_64__ -// Generated by Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) +// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) #ifndef FBSDKSHAREKIT_SWIFT_H #define FBSDKSHAREKIT_SWIFT_H #pragma clang diagnostic push @@ -238,10 +1077,38 @@ #endif #pragma clang diagnostic ignored "-Wauto-import" +#if defined(__OBJC__) #include <Foundation/Foundation.h> +#endif +#if defined(__cplusplus) +#include <cstdint> +#include <cstddef> +#include <cstdbool> +#include <cstring> +#include <stdlib.h> +#include <new> +#include <type_traits> +#else #include <stdint.h> #include <stddef.h> #include <stdbool.h> +#include <string.h> +#endif +#if defined(__cplusplus) +#if defined(__arm64e__) && __has_include(<ptrauth.h>) +# include <ptrauth.h> +#else +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-macro-identifier" +# ifndef __ptrauth_swift_value_witness_function_pointer +# define __ptrauth_swift_value_witness_function_pointer(x) +# endif +# ifndef __ptrauth_swift_class_method_pointer +# define __ptrauth_swift_class_method_pointer(x) +# endif +#pragma clang diagnostic pop +#endif +#endif #if !defined(SWIFT_TYPEDEFS) # define SWIFT_TYPEDEFS 1 @@ -276,53 +1143,66 @@ # if __has_feature(objc_class_property) # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ # else -# define SWIFT_CLASS_PROPERTY(...) +# define SWIFT_CLASS_PROPERTY(...) # endif #endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) +#if !defined(SWIFT_RUNTIME_NAME) +# if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +# else +# define SWIFT_RUNTIME_NAME(X) +# endif #endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) +#if !defined(SWIFT_COMPILE_NAME) +# if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +# else +# define SWIFT_COMPILE_NAME(X) +# endif #endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) +#if !defined(SWIFT_METHOD_FAMILY) +# if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +# else +# define SWIFT_METHOD_FAMILY(X) +# endif #endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE +#if !defined(SWIFT_NOESCAPE) +# if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +# else +# define SWIFT_NOESCAPE +# endif #endif -#if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) -#else -# define SWIFT_RELEASES_ARGUMENT +#if !defined(SWIFT_RELEASES_ARGUMENT) +# if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +# else +# define SWIFT_RELEASES_ARGUMENT +# endif #endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT +#if !defined(SWIFT_WARN_UNUSED_RESULT) +# if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +# else +# define SWIFT_WARN_UNUSED_RESULT +# endif #endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN +#if !defined(SWIFT_NORETURN) +# if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +# else +# define SWIFT_NORETURN +# endif #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +# define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) # if __has_attribute(objc_subclassing_restricted) @@ -342,28 +1222,25 @@ # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) # endif #endif - #if !defined(SWIFT_PROTOCOL) # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif - #if !defined(SWIFT_EXTENSION) # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif - #if !defined(OBJC_DESIGNATED_INITIALIZER) # if __has_attribute(objc_designated_initializer) # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) # else -# define OBJC_DESIGNATED_INITIALIZER +# define OBJC_DESIGNATED_INITIALIZER # endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# if __has_attribute(enum_extensibility) # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) # else -# define SWIFT_ENUM_ATTR(_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) # endif #endif #if !defined(SWIFT_ENUM) @@ -392,20 +1269,76 @@ #if !defined(SWIFT_DEPRECATED_MSG) # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#if !defined(SWIFT_DEPRECATED_OBJC) +# if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +# else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +# endif #endif +#if defined(__OBJC__) #if !defined(IBSegueAction) -# define IBSegueAction +# define IBSegueAction #endif -#if __has_feature(modules) +#endif +#if !defined(SWIFT_EXTERN) +# if defined(__cplusplus) +# define SWIFT_EXTERN extern "C" +# else +# define SWIFT_EXTERN extern +# endif +#endif +#if !defined(SWIFT_CALL) +# define SWIFT_CALL __attribute__((swiftcall)) +#endif +#if !defined(SWIFT_INDIRECT_RESULT) +# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) +#endif +#if !defined(SWIFT_CONTEXT) +# define SWIFT_CONTEXT __attribute__((swift_context)) +#endif +#if !defined(SWIFT_ERROR_RESULT) +# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) +#endif +#if defined(__cplusplus) +# define SWIFT_NOEXCEPT noexcept +#else +# define SWIFT_NOEXCEPT +#endif +#if !defined(SWIFT_C_INLINE_THUNK) +# if __has_attribute(always_inline) +# if __has_attribute(nodebug) +# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug)) +# else +# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) +# endif +# else +# define SWIFT_C_INLINE_THUNK inline +# endif +#endif +#if defined(_WIN32) +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) +#endif +#else +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL +#endif +#endif +#if defined(__OBJC__) +#if __has_feature(objc_modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" #endif +@import CoreFoundation; +@import FBSDKCoreKit; +@import Foundation; +@import ObjectiveC; #endif +#import <FBSDKShareKit/FBSDKShareKit.h> + +#endif #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") @@ -413,6 +1346,7 @@ #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" +#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" #if __has_attribute(external_source_symbol) # pragma push_macro("any") @@ -421,10 +1355,756 @@ # pragma pop_macro("any") #endif +#if defined(__OBJC__) + +@class NSURL; +@class NSString; +enum FBSDKAppInviteDestination : NSInteger; + +/// A model for app invite +SWIFT_CLASS_NAMED("AppInviteContent") +@interface FBSDKAppInviteContent : NSObject +/// A URL to a preview image that will be displayed with the app invite +/// This is optional. If you don’t include it a fallback image will be used. +@property (nonatomic, copy) NSURL * _Nullable appInvitePreviewImageURL; +/// An app link target that will be used as a target when the user accept the invite. +@property (nonatomic, copy) NSURL * _Nonnull appLinkURL; +/// Promotional code to be displayed while sending and receiving the invite. +/// This is optional. This can be between 0 and 10 characters long and can contain +/// alphanumeric characters only. To set a promo code, you need to set promo text. +@property (nonatomic, copy) NSString * _Nullable promotionCode; +/// Promotional text to be displayed while sending and receiving the invite. +/// This is optional. This can be between 0 and 80 characters long and can contain +/// alphanumeric and spaces only. +@property (nonatomic, copy) NSString * _Nullable promotionText; +/// Destination for the app invite. The default value is <code>.facebook</code>. +@property (nonatomic) enum FBSDKAppInviteDestination destination; +- (nonnull instancetype)initWithAppLinkURL:(NSURL * _Nonnull)appLinkURL OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +/// Specifies the privacy of a group. +typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKAppInviteDestination, "Destination", open) { +/// Deliver to Facebook + FBSDKAppInviteDestinationFacebook = 0, + FBSDKAppInviteDestinationMessenger = 1, +}; + + +/// An interface for validatable content and media. +SWIFT_PROTOCOL_NAMED("SharingValidatable") +@protocol FBSDKSharingValidatable +/// Validate that this content or media contains valid values. +/// \param options The share bridge options to use for validation. +/// +/// +/// throws: +/// If the values are not valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)options error:(NSError * _Nullable * _Nullable)error; +@end + + +@interface FBSDKAppInviteContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + + +/// A container of arguments for a camera effect. +/// An argument is a <code>String</code> or <code>[String]</code> identified by a <code>String</code> key. +SWIFT_CLASS_NAMED("CameraEffectArguments") +@interface FBSDKCameraEffectArguments : NSObject +/// Sets a string argument in the container. +/// @param string The argument +/// @param key The key for the argument +- (void)setString:(NSString * _Nullable)string forKey:(NSString * _Nonnull)key; +/// Gets a string argument from the container. +/// @param key The key for the argument +/// @return The string value or nil +- (NSString * _Nullable)stringForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; +/// Sets a string array argument in the container. +/// @param array The array argument +/// @param key The key for the argument +- (void)setArray:(NSArray<NSString *> * _Nullable)array forKey:(NSString * _Nonnull)key; +/// Gets an array argument from the container. +/// @param key The key for the argument +/// @return The array argument +- (NSArray<NSString *> * _Nullable)arrayForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class UIImage; + +/// A container of textures for a camera effect. +/// A texture for a camera effect is an UIImages identified by a NSString key. +SWIFT_CLASS_NAMED("CameraEffectTextures") +@interface FBSDKCameraEffectTextures : NSObject +/// Sets the image for a texture key. +/// @param image The <code>UIImage</code> for the texture +/// @param key The key for the texture +- (void)setImage:(UIImage * _Nullable)image forKey:(NSString * _Nonnull)key; +/// Gets the image for a texture key. +/// @param key The key for the texture +/// @return The texture <code>UIImage</code> or nil +- (UIImage * _Nullable)imageForKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@protocol FBSDKSharingContent; + +/// The common interface for sharing buttons. +/// See FBSendButton and FBShareButton +SWIFT_PROTOCOL_NAMED("SharingButton") +@protocol FBSDKSharingButton +/// The content to be shared. +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +@end + +@class FBSDKMessageDialog; +@class NSCoder; + +/// A button to send content through Messenger. +/// Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot +/// be shown, the button will be disable. +SWIFT_CLASS_NAMED("FBSendButton") +@interface FBSDKSendButton : FBSDKButton <FBSDKButtonImpressionLogging, FBSDKSharingButton> +@property (nonatomic, strong) FBSDKMessageDialog * _Nullable dialog; +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +@property (nonatomic, readonly, copy) NSDictionary<FBSDKAppEventParameterName, id> * _Nullable analyticsParameters; +@property (nonatomic, readonly) FBSDKAppEventName _Nonnull impressionTrackingEventName; +@property (nonatomic, readonly, copy) NSString * _Nonnull impressionTrackingIdentifier; +@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; +- (void)configureButton; +- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +@end + + + +/// A button to share content. +/// Tapping the receiver will invoke the FBSDKShareDialog with the attached shareContent. If the dialog cannot +/// be shown, the button will be disabled. +SWIFT_CLASS_NAMED("FBShareButton") +@interface FBSDKShareButton : FBSDKButton <FBSDKSharingButton> +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +@property (nonatomic, readonly, copy) NSDictionary<FBSDKAppEventParameterName, id> * _Nullable analyticsParameters; +@property (nonatomic, readonly) FBSDKAppEventName _Nonnull impressionTrackingEventName; +@property (nonatomic, readonly, copy) NSString * _Nonnull impressionTrackingIdentifier; +@property (nonatomic, readonly, getter=isImplicitlyDisabled) BOOL implicitlyDisabled; +- (void)configureButton; +- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; +@end + + + +/// Represents a single hashtag that can be used with the share dialog. +SWIFT_CLASS_NAMED("Hashtag") +@interface FBSDKHashtag : NSObject +/// The hashtag string. +/// You are responsible for making sure that <code>stringRepresentation</code> is a valid hashtag (a single ‘#’ followed by one or more +/// word characters). Invalid hashtags are ignored when sharing content. You can check validity with the<code>valid</code> property. +/// @return The hashtag string +@property (nonatomic, copy) NSString * _Nonnull stringRepresentation; +- (nonnull instancetype)initWithString:(NSString * _Nonnull)string OBJC_DESIGNATED_INITIALIZER; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +/// Tests if a hashtag is valid. +/// A valid hashtag matches the regular expression “#\w+”: A single ‘#’ followed by one or more word characters. +/// @return true if the hashtag is valid, false otherwise. +@property (nonatomic, readonly) BOOL isValid; +@property (nonatomic, readonly) NSUInteger hash; +- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +@protocol FBSDKSharingDelegate; + +/// The common interface for components that initiate sharing. +/// See ShareDialog, MessageDialog +SWIFT_PROTOCOL_NAMED("Sharing") +@protocol FBSDKSharing +/// The receiver’s delegate or nil if it doesn’t have a delegate. +@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; +/// The content to be shared. +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +/// A boolean value that indicates whether the receiver should fail if it finds an error with the share content. +/// If <code>false</code>, the sharer will still be displayed without the data that was misconfigured. For example, an +/// invalid <code>placeID</code> specified on the <code>shareContent</code> would produce a data error. +@property (nonatomic) BOOL shouldFailOnDataError; +/// Validates the content on the receiver. +/// @throws An error if the content is invalid +- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; +@end + + +/// The common interface for dialogs that initiate sharing. +SWIFT_PROTOCOL_NAMED("SharingDialog") +@protocol FBSDKSharingDialog <FBSDKSharing> +/// A boolean value that indicates whether the receiver can initiate a share. +/// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is +/// required but not available. This method does not validate the content on the receiver, so this can be checked before +/// building up the content. +/// See <code>Sharing.validate(error:)</code> +/// @return <code>true</code> if the receiver can share, otherwise <code>false</code>. +@property (nonatomic, readonly) BOOL canShow; +/// Shows the dialog. +/// @return <code>true</code> if the receiver was able to begin sharing, otherwise <code>false</code>. +- (BOOL)show; +@end + + +/// A dialog for sharing content through Messenger. +/// SUPPORTED SHARE TYPES +/// <ul> +/// <li> +/// FBSDKShareLinkContent +/// </li> +/// </ul> +/// UNSUPPORTED SHARE TYPES (DEPRECATED AUGUST 2018) +/// <ul> +/// <li> +/// FBSDKShareOpenGraphContent +/// </li> +/// <li> +/// FBSDKSharePhotoContent +/// </li> +/// <li> +/// FBSDKShareVideoContent +/// </li> +/// <li> +/// FBSDKShareMessengerOpenGraphMusicTemplateContent +/// </li> +/// <li> +/// FBSDKShareMessengerMediaTemplateContent +/// </li> +/// <li> +/// FBSDKShareMessengerGenericTemplateContent +/// </li> +/// <li> +/// Any other types that are not one of the four supported types listed above +/// </li> +/// </ul> +SWIFT_CLASS_NAMED("MessageDialog") +@interface FBSDKMessageDialog : NSObject <FBSDKSharingDialog> +/// The receiver’s delegate or nil if it doesn’t have a delegate. +@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; +/// The content to be shared. +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +/// A Boolean value that indicates whether the receiver should fail if it finds an error with the share content. +/// If <code>false</code>, the sharer will still be displayed without the data that was mis-configured. For example, an +/// invalid placeID specified on the shareContent would produce a data error. +@property (nonatomic) BOOL shouldFailOnDataError; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +/// Convenience initializer to return a Message Share Dialog with content and a delegate. +/// @param content The content to be shared. +/// @param delegate The receiver’s delegate. +- (nonnull instancetype)initWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate; +/// Convenience method to return a Message Share Dialog with content and a delegate. +/// @param content The content to be shared. +/// @param delegate The receiver’s delegate. ++ (FBSDKMessageDialog * _Nonnull)dialogWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; +/// Convenience method to show a Message Share Dialog with content and a delegate. +/// @param content The content to be shared. +/// @param delegate The receiver’s delegate. ++ (FBSDKMessageDialog * _Nonnull)showWithContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; +/// A Boolean value that indicates whether the receiver can initiate a share. +/// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is +/// required but not available. This method does not validate the content on the receiver, so this can be checked before +/// building up the content. +/// See <code>Sharing.validate()</code> +/// @return <code>true</code> if the receiver can share, otherwise <code>false</code>. +@property (nonatomic, readonly) BOOL canShow; +/// Shows the dialog. +/// @return <code>true</code> if the receiver was able to begin sharing, otherwise <code>false</code>. +- (BOOL)show; +/// Validates the content on the receiver. +/// @return <code>true</code> if the content is valid, otherwise <code>false</code>. +- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; +@end + + + + +/// A model for content to share with a Facebook camera effect. +SWIFT_CLASS_NAMED("ShareCameraEffectContent") +@interface FBSDKShareCameraEffectContent : NSObject +/// ID of the camera effect to use. +@property (nonatomic, copy) NSString * _Nonnull effectID; +/// Arguments for the effect. +@property (nonatomic, strong) FBSDKCameraEffectArguments * _Nonnull effectArguments; +/// Textures for the effect. +@property (nonatomic, strong) FBSDKCameraEffectTextures * _Nonnull effectTextures; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +/// A base interface for content to be shared. +SWIFT_PROTOCOL_NAMED("SharingContent") +@protocol FBSDKSharingContent <FBSDKSharingValidatable, NSObject> +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. +/// See documentation for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + + +@interface FBSDKShareCameraEffectContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + +@class UIViewController; +enum FBSDKShareDialogMode : NSUInteger; + +/// A dialog for sharing content on Facebook. +SWIFT_CLASS_NAMED("ShareDialog") +@interface FBSDKShareDialog : NSObject <FBSDKSharingDialog> +/// A UIViewController from which to present the dialog. +/// If not specified, the topmost view controller will be automatically determined as best as possible. +@property (nonatomic, weak) UIViewController * _Nullable fromViewController; +/// The mode with which to display the dialog. +/// Defaults to <code>.automatic</code>, which will automatically choose the best available mode. +@property (nonatomic) enum FBSDKShareDialogMode mode; +/// The receiver’s delegate or nil if it doesn’t have a delegate. +@property (nonatomic, weak) id <FBSDKSharingDelegate> _Nullable delegate; +/// The content to be shared. +@property (nonatomic, strong) id <FBSDKSharingContent> _Nullable shareContent; +/// A Boolean value that indicates whether the receiver should fail if it finds an error with the share content. +/// If <code>false</code>, the sharer will still be displayed without the data that was misconfigured. For example, an +/// invalid <code>placeID</code> specified on the <code>shareContent</code> would produce a data error. +@property (nonatomic) BOOL shouldFailOnDataError; +/// Convenience initializer to initialize a <code>ShareDialog</code> with a view controller, content and delegate. +/// @param viewController A view controller from which to present the dialog, if appropriate. +/// @param content The content to be shared. +/// @param delegate The dialog’s delegate. +- (nonnull instancetype)initWithViewController:(UIViewController * _Nullable)viewController content:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER; +/// Convenience method to create a <code>ShareDialog</code> with a view controller, content and delegate. +/// @param viewController A view controller from which to present the dialog, if appropriate. +/// @param content The content to be shared. +/// @param delegate The dialog’s delegate. ++ (FBSDKShareDialog * _Nonnull)dialogWithViewController:(UIViewController * _Nullable)viewController withContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT; +/// Convenience method to show a <code>ShareDialog</code> with a view controller, content and delegate. +/// @param viewController A view controller from which to present the dialog, if appropriate. +/// @param content The content to be shared. +/// @param delegate The dialog’s delegate. ++ (FBSDKShareDialog * _Nonnull)showFromViewController:(UIViewController * _Nullable)viewController withContent:(id <FBSDKSharingContent> _Nullable)content delegate:(id <FBSDKSharingDelegate> _Nullable)delegate; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) +@end + +/// Modes for the FBSDKShareDialog. +/// The automatic mode will progressively check the availability of different modes and open the most +/// appropriate mode for the dialog that is available. +typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKShareDialogMode, "Mode", open) { +/// Acts with the most appropriate mode that is available. + FBSDKShareDialogModeAutomatic = 0, +/// Displays the dialog in the main native Facebook app. + FBSDKShareDialogModeNative = 1, +/// Displays the dialog in the iOS integrated share sheet. + FBSDKShareDialogModeShareSheet = 2, +/// Displays the dialog in Safari. + FBSDKShareDialogModeBrowser = 3, +/// Displays the dialog in a WKWebView within the app. + FBSDKShareDialogModeWeb = 4, +/// Displays the feed dialog in Safari. + FBSDKShareDialogModeFeedBrowser = 5, +/// Displays the feed dialog in a WKWebView within the app. + FBSDKShareDialogModeFeedWeb = 6, +}; + +@class FBSDKWebDialog; + +@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKWebDialogDelegate> +- (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results; +- (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didFailWithError:(NSError * _Nonnull)error; +- (void)webDialogDidCancel:(FBSDKWebDialog * _Nonnull)webDialog; +@end + + + +@interface FBSDKShareDialog (SWIFT_EXTENSION(FBSDKShareKit)) +@property (nonatomic, readonly) BOOL canShow; +- (BOOL)show; +- (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error; +@end + +/// ShareError +/// Error codes for ShareErrorDomain. +typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKShareError, "ShareError", open) { +/// Reserved + FBSDKShareErrorReserved = 200, +/// The error code for errors from uploading open graph objects. + FBSDKShareErrorOpenGraph = 201, +/// The error code for when a sharing dialog is not available. +/// Use the canShare methods to check for this case before calling show. + FBSDKShareErrorDialogNotAvailable = 202, +/// The error code for unknown errors. + FBSDKShareErrorUnknown = 203, +}; + + +/// A model for status and link content to be shared. +SWIFT_CLASS_NAMED("ShareLinkContent") +@interface FBSDKShareLinkContent : NSObject +/// Some quote text of the link. +/// If specified, the quote text will render with custom styling on top of the link. +@property (nonatomic, copy) NSString * _Nullable quote; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +@interface FBSDKShareLinkContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + + +@interface FBSDKShareLinkContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Asks the receiver to validate that its content or media values are valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + +/// A protocol for media content (photo or video) to be shared. +SWIFT_PROTOCOL_NAMED("ShareMedia") +@protocol FBSDKShareMedia +@end + + +/// A model for media content (photo or video) to be shared. +SWIFT_CLASS_NAMED("ShareMediaContent") +@interface FBSDKShareMediaContent : NSObject +/// Media to be shared: an array of <code>SharePhoto</code> or <code>ShareVideo</code> +@property (nonatomic, copy) NSArray<id <FBSDKShareMedia>> * _Nonnull media; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +@interface FBSDKShareMediaContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Asks the receiver to validate that its content or media values are valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + +@interface FBSDKShareMediaContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + +@class PHAsset; + +/// A photo for sharing. +SWIFT_CLASS_NAMED("SharePhoto") +@interface FBSDKSharePhoto : NSObject <FBSDKShareMedia> +/// If the photo is resident in memory, this method supplies the data. +@property (nonatomic, strong) UIImage * _Nullable image; +/// URL that points to a network location or the location of the photo on disk +@property (nonatomic, copy) NSURL * _Nullable imageURL; +/// The representation of the photo in the Photos library. +@property (nonatomic, strong) PHAsset * _Nullable photoAsset; +/// Specifies whether the photo represented by the receiver was generated by the user (<code>true</code>) +/// or by the application (<code>false</code>). +@property (nonatomic) BOOL isUserGenerated; +/// The user-generated caption for the photo. Note that the ‘caption’ must come from +/// the user, as pre-filled content is forbidden by the Platform Policies (2.3). +@property (nonatomic, copy) NSString * _Nullable caption; +/// Convenience method to build a new photo object with an image. +/// \param image If the photo is resident in memory, this method supplies the data +/// +/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by the +/// application +/// +- (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image isUserGenerated:(BOOL)isUserGenerated; +/// Convenience method to build a new photo object with an imageURL. +/// This method should only be used when adding photo content to open graph stories. +/// For example, if you’re trying to share a photo from the web by itself, download the image and use +/// <code>init(image:isUserGenerated:)</code> instead. +/// \param imageURL The URL to the photo +/// +/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by the +/// application +/// +- (nonnull instancetype)initWithImageURL:(NSURL * _Nonnull)imageURL isUserGenerated:(BOOL)isUserGenerated; +/// Convenience method to build a new photo object with a PHAsset. +/// \param photoAsset The PHAsset that represents the photo in the Photos library. +/// +/// \param isUserGenerated Specifies whether the photo represented by the receiver was generated by the user or by +/// the application +/// +- (nonnull instancetype)initWithPhotoAsset:(PHAsset * _Nonnull)photoAsset isUserGenerated:(BOOL)isUserGenerated; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + +@interface FBSDKSharePhoto (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Asks the receiver to validate that its content or media values are valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + + +/// A model for photo content to be shared. +SWIFT_CLASS_NAMED("SharePhotoContent") +@interface FBSDKSharePhotoContent : NSObject +/// Photos to be shared. +@property (nonatomic, copy) NSArray<FBSDKSharePhoto *> * _Nonnull photos; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +@interface FBSDKSharePhotoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + + +@interface FBSDKSharePhotoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Validate that this content contains valid values +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + +@class NSData; + +/// A video for sharing. +SWIFT_CLASS_NAMED("ShareVideo") +@interface FBSDKShareVideo : NSObject <FBSDKShareMedia> +/// The raw video data. +@property (nonatomic, copy) NSData * _Nullable data; +/// The representation of the video in the Photos library. +@property (nonatomic, strong) PHAsset * _Nullable videoAsset; +/// The file URL to the video. +@property (nonatomic, copy) NSURL * _Nullable videoURL; +/// The photo that represents the video. +@property (nonatomic, strong) FBSDKSharePhoto * _Nullable previewPhoto; +/// Convenience method to build a new video object from raw data and an optional preview photo. +/// \param data The Data object that holds the raw video data. +/// +/// \param previewPhoto The photo that represents the video. +/// +- (nonnull instancetype)initWithData:(NSData * _Nonnull)data previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; +/// Convenience method to build a new video object from a PHAsset and an optional preview photo. +/// \param videoAsset The PHAsset that represents the video in the Photos library. +/// +/// \param previewPhoto The photo that represents the video. +/// +- (nonnull instancetype)initWithVideoAsset:(PHAsset * _Nonnull)videoAsset previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; +/// Convenience method to build a new video object from a URL and an optional preview photo. +/// \param videoURL The URL to the video. +/// +/// \param previewPhoto The photo that represents the video. +/// +- (nonnull instancetype)initWithVideoURL:(NSURL * _Nonnull)videoURL previewPhoto:(FBSDKSharePhoto * _Nullable)previewPhoto; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + +@interface FBSDKShareVideo (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +/// Asks the receiver to validate that its content or media values are valid. +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + + +/// A model for video content to be shared. +SWIFT_CLASS_NAMED("ShareVideoContent") +@interface FBSDKShareVideoContent : NSObject +/// The video to be shared +@property (nonatomic, strong) FBSDKShareVideo * _Nonnull video; +/// URL for the content being shared. +/// This URL will be checked for all link meta tags for linking in platform specific ways. See documentation +/// for App Links (https://developers.facebook.com/docs/applinks/) +@property (nonatomic, copy) NSURL * _Nullable contentURL; +/// Hashtag for the content being shared. +@property (nonatomic, strong) FBSDKHashtag * _Nullable hashtag; +/// List of IDs for taggable people to tag with this content. +/// See documentation for Taggable Friends +/// (https://developers.facebook.com/docs/graph-api/reference/user/taggable_friends) +@property (nonatomic, copy) NSArray<NSString *> * _Nonnull peopleIDs; +/// The ID for a place to tag with this content. +@property (nonatomic, copy) NSString * _Nullable placeID; +/// A value to be added to the referrer URL when a person follows a link from this shared content on feed. +@property (nonatomic, copy) NSString * _Nullable ref; +/// For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. +@property (nonatomic, copy) NSString * _Nullable pageID; +/// A unique identifier for a share involving this content, useful for tracking purposes. +@property (nonatomic, readonly, copy) NSString * _Nullable shareUUID; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + + +@interface FBSDKShareVideoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingContent> +/// Adds content to an existing dictionary as key/value pairs and returns the +/// updated dictionary +/// @param existingParameters An immutable dictionary of existing values +/// @param bridgeOptions The options for bridging +/// @return A new dictionary with the modified contents +- (NSDictionary<NSString *, id> * _Nonnull)addParameters:(NSDictionary<NSString *, id> * _Nonnull)existingParameters bridgeOptions:(FBSDKShareBridgeOptions)bridgeOptions SWIFT_WARN_UNUSED_RESULT; +@end + + +@interface FBSDKShareVideoContent (SWIFT_EXTENSION(FBSDKShareKit)) <FBSDKSharingValidatable> +- (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)bridgeOptions error:(NSError * _Nullable * _Nullable)error; +@end + + + + + + +/// A delegate for types conforming to the <code>Sharing</code> protocol. +/// The delegate is notified with the results of the sharer as long as the application has permissions to +/// receive the information. For example, if the person is not signed into the containing app, the sharer may not be able +/// to distinguish between completion of a share and cancellation. +SWIFT_PROTOCOL_NAMED("SharingDelegate") +@protocol FBSDKSharingDelegate +/// Sent to the delegate when sharing completes without error or cancellation. +/// @param sharer The sharer that completed. +/// @param results The results from the sharer. This may be nil or empty. +- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results; +/// Sent to the delegate when the sharer encounters an error. +/// @param sharer The sharer that completed. +/// @param error The error. +- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didFailWithError:(NSError * _Nonnull)error; +/// Sent to the delegate when the sharer is cancelled. +/// @param sharer The sharer that completed. +- (void)sharerDidCancel:(id <FBSDKSharing> _Nonnull)sharer; +@end + + + + +#endif #if __has_attribute(external_source_symbol) # pragma clang attribute pop +#endif +#if defined(__cplusplus) #endif #pragma clang diagnostic pop #endif +#else +#error unsupported Swift architecture #endif -- Gitblit v1.8.0