FBSDKGamingServicesKit-Swift.h 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
  1. #if 0
  2. #elif defined(__arm64__) && __arm64__
  3. // Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
  4. #ifndef FBSDKGAMINGSERVICESKIT_SWIFT_H
  5. #define FBSDKGAMINGSERVICESKIT_SWIFT_H
  6. #pragma clang diagnostic push
  7. #pragma clang diagnostic ignored "-Wgcc-compat"
  8. #if !defined(__has_include)
  9. # define __has_include(x) 0
  10. #endif
  11. #if !defined(__has_attribute)
  12. # define __has_attribute(x) 0
  13. #endif
  14. #if !defined(__has_feature)
  15. # define __has_feature(x) 0
  16. #endif
  17. #if !defined(__has_warning)
  18. # define __has_warning(x) 0
  19. #endif
  20. #if __has_include(<swift/objc-prologue.h>)
  21. # include <swift/objc-prologue.h>
  22. #endif
  23. #pragma clang diagnostic ignored "-Wauto-import"
  24. #if defined(__OBJC__)
  25. #include <Foundation/Foundation.h>
  26. #endif
  27. #if defined(__cplusplus)
  28. #include <cstdint>
  29. #include <cstddef>
  30. #include <cstdbool>
  31. #include <cstring>
  32. #include <stdlib.h>
  33. #include <new>
  34. #include <type_traits>
  35. #else
  36. #include <stdint.h>
  37. #include <stddef.h>
  38. #include <stdbool.h>
  39. #include <string.h>
  40. #endif
  41. #if defined(__cplusplus)
  42. #if defined(__arm64e__) && __has_include(<ptrauth.h>)
  43. # include <ptrauth.h>
  44. #else
  45. #pragma clang diagnostic push
  46. #pragma clang diagnostic ignored "-Wreserved-macro-identifier"
  47. # ifndef __ptrauth_swift_value_witness_function_pointer
  48. # define __ptrauth_swift_value_witness_function_pointer(x)
  49. # endif
  50. # ifndef __ptrauth_swift_class_method_pointer
  51. # define __ptrauth_swift_class_method_pointer(x)
  52. # endif
  53. #pragma clang diagnostic pop
  54. #endif
  55. #endif
  56. #if !defined(SWIFT_TYPEDEFS)
  57. # define SWIFT_TYPEDEFS 1
  58. # if __has_include(<uchar.h>)
  59. # include <uchar.h>
  60. # elif !defined(__cplusplus)
  61. typedef uint_least16_t char16_t;
  62. typedef uint_least32_t char32_t;
  63. # endif
  64. typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
  65. typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
  66. typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
  67. typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
  68. typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
  69. typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
  70. typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
  71. typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
  72. typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
  73. typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
  74. typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
  75. typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
  76. #endif
  77. #if !defined(SWIFT_PASTE)
  78. # define SWIFT_PASTE_HELPER(x, y) x##y
  79. # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
  80. #endif
  81. #if !defined(SWIFT_METATYPE)
  82. # define SWIFT_METATYPE(X) Class
  83. #endif
  84. #if !defined(SWIFT_CLASS_PROPERTY)
  85. # if __has_feature(objc_class_property)
  86. # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
  87. # else
  88. # define SWIFT_CLASS_PROPERTY(...)
  89. # endif
  90. #endif
  91. #if !defined(SWIFT_RUNTIME_NAME)
  92. # if __has_attribute(objc_runtime_name)
  93. # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
  94. # else
  95. # define SWIFT_RUNTIME_NAME(X)
  96. # endif
  97. #endif
  98. #if !defined(SWIFT_COMPILE_NAME)
  99. # if __has_attribute(swift_name)
  100. # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
  101. # else
  102. # define SWIFT_COMPILE_NAME(X)
  103. # endif
  104. #endif
  105. #if !defined(SWIFT_METHOD_FAMILY)
  106. # if __has_attribute(objc_method_family)
  107. # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
  108. # else
  109. # define SWIFT_METHOD_FAMILY(X)
  110. # endif
  111. #endif
  112. #if !defined(SWIFT_NOESCAPE)
  113. # if __has_attribute(noescape)
  114. # define SWIFT_NOESCAPE __attribute__((noescape))
  115. # else
  116. # define SWIFT_NOESCAPE
  117. # endif
  118. #endif
  119. #if !defined(SWIFT_RELEASES_ARGUMENT)
  120. # if __has_attribute(ns_consumed)
  121. # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
  122. # else
  123. # define SWIFT_RELEASES_ARGUMENT
  124. # endif
  125. #endif
  126. #if !defined(SWIFT_WARN_UNUSED_RESULT)
  127. # if __has_attribute(warn_unused_result)
  128. # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
  129. # else
  130. # define SWIFT_WARN_UNUSED_RESULT
  131. # endif
  132. #endif
  133. #if !defined(SWIFT_NORETURN)
  134. # if __has_attribute(noreturn)
  135. # define SWIFT_NORETURN __attribute__((noreturn))
  136. # else
  137. # define SWIFT_NORETURN
  138. # endif
  139. #endif
  140. #if !defined(SWIFT_CLASS_EXTRA)
  141. # define SWIFT_CLASS_EXTRA
  142. #endif
  143. #if !defined(SWIFT_PROTOCOL_EXTRA)
  144. # define SWIFT_PROTOCOL_EXTRA
  145. #endif
  146. #if !defined(SWIFT_ENUM_EXTRA)
  147. # define SWIFT_ENUM_EXTRA
  148. #endif
  149. #if !defined(SWIFT_CLASS)
  150. # if __has_attribute(objc_subclassing_restricted)
  151. # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
  152. # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  153. # else
  154. # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  155. # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  156. # endif
  157. #endif
  158. #if !defined(SWIFT_RESILIENT_CLASS)
  159. # if __has_attribute(objc_class_stub)
  160. # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
  161. # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
  162. # else
  163. # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
  164. # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
  165. # endif
  166. #endif
  167. #if !defined(SWIFT_PROTOCOL)
  168. # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
  169. # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
  170. #endif
  171. #if !defined(SWIFT_EXTENSION)
  172. # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
  173. #endif
  174. #if !defined(OBJC_DESIGNATED_INITIALIZER)
  175. # if __has_attribute(objc_designated_initializer)
  176. # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
  177. # else
  178. # define OBJC_DESIGNATED_INITIALIZER
  179. # endif
  180. #endif
  181. #if !defined(SWIFT_ENUM_ATTR)
  182. # if __has_attribute(enum_extensibility)
  183. # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
  184. # else
  185. # define SWIFT_ENUM_ATTR(_extensibility)
  186. # endif
  187. #endif
  188. #if !defined(SWIFT_ENUM)
  189. # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
  190. # if __has_feature(generalized_swift_name)
  191. # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
  192. # else
  193. # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
  194. # endif
  195. #endif
  196. #if !defined(SWIFT_UNAVAILABLE)
  197. # define SWIFT_UNAVAILABLE __attribute__((unavailable))
  198. #endif
  199. #if !defined(SWIFT_UNAVAILABLE_MSG)
  200. # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
  201. #endif
  202. #if !defined(SWIFT_AVAILABILITY)
  203. # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
  204. #endif
  205. #if !defined(SWIFT_WEAK_IMPORT)
  206. # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
  207. #endif
  208. #if !defined(SWIFT_DEPRECATED)
  209. # define SWIFT_DEPRECATED __attribute__((deprecated))
  210. #endif
  211. #if !defined(SWIFT_DEPRECATED_MSG)
  212. # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
  213. #endif
  214. #if !defined(SWIFT_DEPRECATED_OBJC)
  215. # if __has_feature(attribute_diagnose_if_objc)
  216. # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
  217. # else
  218. # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
  219. # endif
  220. #endif
  221. #if defined(__OBJC__)
  222. #if !defined(IBSegueAction)
  223. # define IBSegueAction
  224. #endif
  225. #endif
  226. #if !defined(SWIFT_EXTERN)
  227. # if defined(__cplusplus)
  228. # define SWIFT_EXTERN extern "C"
  229. # else
  230. # define SWIFT_EXTERN extern
  231. # endif
  232. #endif
  233. #if !defined(SWIFT_CALL)
  234. # define SWIFT_CALL __attribute__((swiftcall))
  235. #endif
  236. #if !defined(SWIFT_INDIRECT_RESULT)
  237. # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
  238. #endif
  239. #if !defined(SWIFT_CONTEXT)
  240. # define SWIFT_CONTEXT __attribute__((swift_context))
  241. #endif
  242. #if !defined(SWIFT_ERROR_RESULT)
  243. # define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
  244. #endif
  245. #if defined(__cplusplus)
  246. # define SWIFT_NOEXCEPT noexcept
  247. #else
  248. # define SWIFT_NOEXCEPT
  249. #endif
  250. #if !defined(SWIFT_C_INLINE_THUNK)
  251. # if __has_attribute(always_inline)
  252. # if __has_attribute(nodebug)
  253. # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
  254. # else
  255. # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
  256. # endif
  257. # else
  258. # define SWIFT_C_INLINE_THUNK inline
  259. # endif
  260. #endif
  261. #if defined(_WIN32)
  262. #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
  263. # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
  264. #endif
  265. #else
  266. #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
  267. # define SWIFT_IMPORT_STDLIB_SYMBOL
  268. #endif
  269. #endif
  270. #if defined(__OBJC__)
  271. #if __has_feature(objc_modules)
  272. #if __has_warning("-Watimport-in-framework-header")
  273. #pragma clang diagnostic ignored "-Watimport-in-framework-header"
  274. #endif
  275. @import CoreFoundation;
  276. @import FBSDKCoreKit;
  277. @import FBSDKShareKit;
  278. @import Foundation;
  279. @import ObjectiveC;
  280. #endif
  281. #endif
  282. #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
  283. #pragma clang diagnostic ignored "-Wduplicate-method-arg"
  284. #if __has_warning("-Wpragma-clang-attribute")
  285. # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
  286. #endif
  287. #pragma clang diagnostic ignored "-Wunknown-pragmas"
  288. #pragma clang diagnostic ignored "-Wnullability"
  289. #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
  290. #if __has_attribute(external_source_symbol)
  291. # pragma push_macro("any")
  292. # undef any
  293. # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FBSDKGamingServicesKit",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
  294. # pragma pop_macro("any")
  295. #endif
  296. #if defined(__OBJC__)
  297. /// A protocol that a content object must conform to be used in a Gaming Services dialog
  298. SWIFT_PROTOCOL_NAMED("ValidatableProtocol")
  299. @protocol FBSDKValidatable
  300. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  301. @end
  302. enum FBSDKChooseContextFilter : NSInteger;
  303. @class NSString;
  304. /// A model for an instant games choose context app switch dialog
  305. SWIFT_CLASS_NAMED("ChooseContextContent")
  306. @interface FBSDKChooseContextContent : NSObject <FBSDKValidatable>
  307. /// This sets the filter which determines which context will show when the user is app switched to the choose context dialog.
  308. @property (nonatomic) enum FBSDKChooseContextFilter filter;
  309. /// This sets the maximum number of participants that the suggested context(s) shown in the dialog should have.
  310. @property (nonatomic) NSInteger maxParticipants;
  311. /// This sets the minimum number of participants that the suggested context(s) shown in the dialog should have.
  312. @property (nonatomic) NSInteger minParticipants;
  313. + (NSString * _Nonnull)filtersNameForFilters:(enum FBSDKChooseContextFilter)filter SWIFT_WARN_UNUSED_RESULT;
  314. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  315. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  316. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  317. @end
  318. @protocol FBSDKContextDialogDelegate;
  319. /// The protocol sdk dialogs must conform to and implement all the following methods.
  320. SWIFT_PROTOCOL_NAMED("DialogProtocol")
  321. @protocol FBSDKDialog
  322. /// The receiver’s delegate or nil if it doesn’t have a delegate.
  323. @property (nonatomic, weak) id <FBSDKContextDialogDelegate> _Nullable delegate;
  324. /// The content object used to create the specific dialog
  325. @property (nonatomic, strong) id <FBSDKValidatable> _Nullable dialogContent;
  326. /// Begins to show the specfic dialog
  327. /// @return true if the receiver was able to show the dialog, otherwise false.
  328. - (BOOL)show SWIFT_WARN_UNUSED_RESULT;
  329. /// Validates the content for the dialog
  330. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  331. @end
  332. @class FBSDKWebDialog;
  333. @protocol _FBSDKWindowFinding;
  334. /// A super class type for the context dialogs classes that show an in-app webview to display content.
  335. SWIFT_CLASS_NAMED("ContextWebDialog")
  336. @interface FBSDKContextWebDialog : NSObject <FBSDKWebDialogDelegate, FBSDKDialog>
  337. @property (nonatomic, strong) id <FBSDKContextDialogDelegate> _Nullable delegate;
  338. @property (nonatomic, strong) id <FBSDKValidatable> _Nullable dialogContent;
  339. @property (nonatomic, strong) FBSDKWebDialog * _Nullable currentWebDialog;
  340. - (BOOL)show SWIFT_WARN_UNUSED_RESULT;
  341. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  342. - (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results;
  343. - (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didFailWithError:(NSError * _Nonnull)error;
  344. - (void)webDialogDidCancel:(FBSDKWebDialog * _Nonnull)webDialog;
  345. /// Depending on the content size within the browser, this method allows for the resizing of web dialog
  346. - (CGRect)createWebDialogFrameWithWidth:(CGFloat)width height:(CGFloat)height windowFinder:(id <_FBSDKWindowFinding> _Nonnull)windowFinder SWIFT_WARN_UNUSED_RESULT;
  347. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  348. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  349. @end
  350. @class UIApplication;
  351. @class NSURL;
  352. /// A dialog for the choose context through app switch
  353. SWIFT_CLASS_NAMED("ChooseContextDialog")
  354. @interface FBSDKChooseContextDialog : FBSDKContextWebDialog <FBSDKURLOpening>
  355. /// Convenience method to build up a choose context app switch with content and a delegate.
  356. /// @param content The content for the choose context dialog
  357. /// @param delegate The receiver’s delegate.
  358. - (nonnull instancetype)initWithContent:(FBSDKChooseContextContent * _Nonnull)content delegate:(id <FBSDKContextDialogDelegate> _Nonnull)delegate;
  359. - (BOOL)show SWIFT_WARN_UNUSED_RESULT;
  360. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  361. - (BOOL)application:(UIApplication * _Nullable)application openURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT;
  362. - (BOOL)canOpenURL:(NSURL * _Nonnull)url forApplication:(UIApplication * _Nullable)application sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT;
  363. - (void)applicationDidBecomeActive:(UIApplication * _Nonnull)application;
  364. - (BOOL)isAuthenticationURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT;
  365. @end
  366. SWIFT_PROTOCOL_NAMED("Showable")
  367. @protocol FBSDKShowable
  368. - (BOOL)show SWIFT_WARN_UNUSED_RESULT;
  369. @end
  370. @interface FBSDKChooseContextDialog (SWIFT_EXTENSION(FBSDKGamingServicesKit)) <FBSDKShowable>
  371. @end
  372. typedef SWIFT_ENUM_NAMED(NSInteger, FBSDKChooseContextFilter, "ChooseContextFilter", open) {
  373. FBSDKChooseContextFilterNone = 0,
  374. FBSDKChooseContextFilterExistingChallenges = 1,
  375. FBSDKChooseContextFilterNewPlayersOnly = 2,
  376. FBSDKChooseContextFilterNewContextOnly = 3,
  377. };
  378. /// A delegate for context dialogs to communicate with the dialog handler.
  379. /// The delegate is notified with the results of the cross play request as long as the application has permissions to
  380. /// receive the information. For example, if the person is not signed into the containing app, the shower may not be able
  381. /// to distinguish between completion of a cross play request and cancellation.
  382. SWIFT_PROTOCOL_NAMED("ContextDialogDelegate")
  383. @protocol FBSDKContextDialogDelegate
  384. /// Sent to the delegate when the context dialog completes without error.
  385. /// @param contextDialog The FBSDKContextDialog that completed.
  386. - (void)contextDialogDidComplete:(FBSDKContextWebDialog * _Nonnull)contextDialog;
  387. /// Sent to the delegate when the context dialog encounters an error.
  388. /// @param contextDialog The FBSDKContextDialog that completed.
  389. /// @param error The error.
  390. - (void)contextDialog:(FBSDKContextWebDialog * _Nonnull)contextDialog didFailWithError:(NSError * _Nonnull)error;
  391. /// Sent to the delegate when the cross play request dialog is cancelled.
  392. /// @param contextDialog The FBSDKContextDialog that completed.
  393. - (void)contextDialogDidCancel:(FBSDKContextWebDialog * _Nonnull)contextDialog;
  394. @end
  395. @class FBSDKCreateContextContent;
  396. @class FBSDKSwitchContextContent;
  397. /// A dialog presenter responsible for creating and showing all the dialogs that create, switch,
  398. /// choose and otherwise manipulate the gaming context.
  399. SWIFT_CLASS_NAMED("ContextDialogPresenter")
  400. @interface FBSDKContextDialogPresenter : NSObject
  401. - (nonnull instancetype)init;
  402. /// Convenience method to build up and show an instant games create context dialog with content and delegate.
  403. /// \param content The content for the create context dialog
  404. ///
  405. /// \param delegate The receiver’s delegate.
  406. ///
  407. - (BOOL)makeAndShowCreateContextDialogWithContent:(FBSDKCreateContextContent * _Nonnull)content delegate:(id <FBSDKContextDialogDelegate> _Nonnull)delegate error:(NSError * _Nullable * _Nullable)error;
  408. /// Convenience method to build up and show an instant games switch context dialog with the giving content and delegate.
  409. /// \param content The content for the switch context dialog
  410. ///
  411. /// \param delegate The receiver’s delegate.
  412. ///
  413. - (BOOL)makeAndShowSwitchContextDialogWithContent:(FBSDKSwitchContextContent * _Nonnull)content delegate:(id <FBSDKContextDialogDelegate> _Nonnull)delegate error:(NSError * _Nullable * _Nullable)error;
  414. /// Convenience method to build up and show an instant games choose context dialog with content and a delegate.
  415. /// \param content The content for the choose context dialog
  416. ///
  417. /// \param delegate The receiver’s delegate.
  418. ///
  419. - (void)makeAndShowChooseContextDialogWithContent:(FBSDKChooseContextContent * _Nonnull)content delegate:(id <FBSDKContextDialogDelegate> _Nonnull)delegate;
  420. @end
  421. /// A model for an instant games createAsync cross play request.
  422. SWIFT_CLASS_NAMED("CreateContextContent")
  423. @interface FBSDKCreateContextContent : NSObject <FBSDKValidatable>
  424. /// The ID of the player that is being challenged.
  425. /// @return The ID for the player being challenged
  426. @property (nonatomic, copy) NSString * _Nonnull playerID;
  427. /// Builds a content object that will be use to display a create context dialog
  428. /// @param playerID The player ID of the user being challenged which will be used to create a game context
  429. - (nonnull instancetype)initDialogContentWithPlayerID:(NSString * _Nonnull)playerID OBJC_DESIGNATED_INITIALIZER;
  430. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  431. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  432. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  433. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  434. @end
  435. /// A dialog to create a context through a web view
  436. SWIFT_CLASS_NAMED("CreateContextDialog")
  437. @interface FBSDKCreateContextDialog : FBSDKContextWebDialog
  438. /// Builds a context creation web dialog with content and a delegate.
  439. /// @param content The content for the create context dialog
  440. /// @param windowFinder The application window finder that provides the window to display the dialog
  441. /// @param delegate The receiver’s delegate used to let the receiver know a context was created or failure
  442. - (nonnull instancetype)initWithContent:(FBSDKCreateContextContent * _Nonnull)content windowFinder:(id <_FBSDKWindowFinding> _Nonnull)windowFinder delegate:(id <FBSDKContextDialogDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER;
  443. - (BOOL)show;
  444. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  445. @end
  446. @interface FBSDKCreateContextDialog (SWIFT_EXTENSION(FBSDKGamingServicesKit)) <FBSDKShowable>
  447. @end
  448. SWIFT_CLASS_NAMED("FriendFinderDialog")
  449. @interface FBSDKFriendFinderDialog : NSObject
  450. - (nonnull instancetype)init;
  451. + (void)launchFriendFinderDialogWithCompletionHandler:(void (^ _Nonnull)(BOOL, NSError * _Nullable))completionHandler;
  452. @end
  453. /// Additional context about the nature of the game request.
  454. typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKGameRequestActionType, "GameRequestActionType", open) {
  455. /// No action type
  456. FBSDKGameRequestActionTypeNone = 0,
  457. /// Send action type: The user is sending an object to the friends.
  458. FBSDKGameRequestActionTypeSend = 1,
  459. /// Ask For action type: The user is asking for an object from friends.
  460. FBSDKGameRequestActionTypeAskFor = 2,
  461. /// Turn action type: It is the turn of the friends to play against the user in a match.
  462. FBSDKGameRequestActionTypeTurn = 3,
  463. /// Invite action type: The user is inviting a friend.
  464. FBSDKGameRequestActionTypeInvite = 4,
  465. };
  466. enum FBSDKGameRequestFilter : NSUInteger;
  467. @class NSCoder;
  468. /// A model for a game request.
  469. SWIFT_CLASS_NAMED("GameRequestContent")
  470. @interface FBSDKGameRequestContent : NSObject <FBSDKSharingValidatable, NSSecureCoding>
  471. /// Used when defining additional context about the nature of the request.
  472. /// The parameter ‘objectID’ is required if the action type is either
  473. /// ‘.send’ or ‘.askFor’.
  474. /// seealso:
  475. /// objectID
  476. @property (nonatomic) enum FBSDKGameRequestActionType actionType;
  477. /// Additional freeform data you may pass for tracking. This will be stored as part of
  478. /// the request objects created. The maximum length is 255 characters.
  479. @property (nonatomic, copy) NSString * _Nullable data;
  480. /// This controls the set of friends someone sees if a multi-friend selector is shown.
  481. /// It is <code>.none</code> by default, meaning that all friends can be shown.
  482. /// If specify as <code>.appUsers</code>, only friends who use the app will be shown.
  483. /// On the other hands, use <code>.appNonUsers</code> to filter only friends who do not use the app.
  484. /// The parameter name is preserved to be consistent with the counter part on desktop.
  485. @property (nonatomic) enum FBSDKGameRequestFilter filters;
  486. /// A plain-text message to be sent as part of the request. This text will surface in the App Center view
  487. /// of the request, but not on the notification jewel. Required parameter.
  488. @property (nonatomic, copy) NSString * _Nonnull message;
  489. /// The Open Graph object ID of the object being sent.
  490. /// seealso:
  491. /// actionType
  492. @property (nonatomic, copy) NSString * _Nonnull objectID;
  493. /// An array of user IDs, usernames or invite tokens (NSString) of people to send request.
  494. /// These may or may not be a friend of the sender. If this is specified by the app,
  495. /// the sender will not have a choice of recipients. If not, the sender will see a multi-friend selector
  496. /// This is equivalent to the “to” parameter when using the web game request dialog.
  497. @property (nonatomic, copy) NSArray<NSString *> * _Nonnull recipients;
  498. /// An array of user IDs that will be included in the dialog as the first suggested friends.
  499. /// Cannot be used together with filters.
  500. /// This is equivalent to the <code>suggestions</code> parameter when using the web game request dialog.
  501. @property (nonatomic, copy) NSArray<NSString *> * _Nonnull recipientSuggestions;
  502. /// The title for the dialog.
  503. @property (nonatomic, copy) NSString * _Nonnull title;
  504. /// The call to action for the dialog.
  505. @property (nonatomic, copy) NSString * _Nonnull cta;
  506. - (BOOL)validateWithOptions:(FBSDKShareBridgeOptions)options error:(NSError * _Nullable * _Nullable)error;
  507. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  508. /// Compares the receiver to another game request content.
  509. /// @param content The other content
  510. /// @return <code>true</code> if the receiver’s values are equal to the other content’s values; otherwise <code>false</code>
  511. - (BOOL)isEqualToGameRequestContent:(FBSDKGameRequestContent * _Nonnull)content SWIFT_WARN_UNUSED_RESULT;
  512. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) BOOL supportsSecureCoding;)
  513. + (BOOL)supportsSecureCoding SWIFT_WARN_UNUSED_RESULT;
  514. - (nonnull instancetype)initWithCoder:(NSCoder * _Nonnull)decoder;
  515. - (void)encodeWithCoder:(NSCoder * _Nonnull)encoder;
  516. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  517. @end
  518. @protocol FBSDKGameRequestDialogDelegate;
  519. /// A dialog for sending game requests.
  520. SWIFT_CLASS_NAMED("GameRequestDialog")
  521. @interface FBSDKGameRequestDialog : NSObject
  522. /// The receiver’s delegate or nil if it doesn’t have a delegate.
  523. @property (nonatomic, weak) id <FBSDKGameRequestDialogDelegate> _Nullable delegate;
  524. /// The content for game request.
  525. @property (nonatomic, strong) FBSDKGameRequestContent * _Nonnull content;
  526. /// Specifies whether frictionless requests are enabled.
  527. @property (nonatomic) BOOL isFrictionlessRequestsEnabled;
  528. /// A Boolean value that indicates whether the receiver can initiate a game request.
  529. /// May return <code>false</code> if the appropriate Facebook app is not installed and is required or an access token is
  530. /// required but not available. This method does not validate the content on the receiver, so this can be checked before
  531. /// building up the content.
  532. /// See <code>validate()</code>
  533. /// @return <code>true</code> if the receiver can share, otherwise <code>false</code>.
  534. @property (nonatomic, readonly) BOOL canShow;
  535. - (nonnull instancetype)initWithContent:(FBSDKGameRequestContent * _Nonnull)content delegate:(id <FBSDKGameRequestDialogDelegate> _Nullable)delegate OBJC_DESIGNATED_INITIALIZER;
  536. /// Convenience method to build up a game request with content and a delegate.
  537. /// @param content The content for the game request.
  538. /// @param delegate The receiver’s delegate.
  539. + (FBSDKGameRequestDialog * _Nonnull)dialogWithContent:(FBSDKGameRequestContent * _Nonnull)content delegate:(id <FBSDKGameRequestDialogDelegate> _Nullable)delegate SWIFT_WARN_UNUSED_RESULT;
  540. /// Convenience method to build up and show a game request with content and a delegate.
  541. /// @param content The content for the game request.
  542. /// @param delegate The receiver’s delegate.
  543. + (FBSDKGameRequestDialog * _Nonnull)showWithContent:(FBSDKGameRequestContent * _Nonnull)content delegate:(id <FBSDKGameRequestDialogDelegate> _Nullable)delegate;
  544. /// Begins the game request from the receiver.
  545. /// @return <code>true</code> if the receiver was able to show the dialog, otherwise <code>false</code>.
  546. - (BOOL)show;
  547. /// Validates the content on the receiver.
  548. - (BOOL)validateWithError:(NSError * _Nullable * _Nullable)error;
  549. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  550. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  551. @end
  552. @interface FBSDKGameRequestDialog (SWIFT_EXTENSION(FBSDKGamingServicesKit)) <FBSDKWebDialogDelegate>
  553. - (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results;
  554. - (void)webDialog:(FBSDKWebDialog * _Nonnull)webDialog didFailWithError:(NSError * _Nonnull)error;
  555. - (void)webDialogDidCancel:(FBSDKWebDialog * _Nonnull)webDialog;
  556. @end
  557. @interface FBSDKGameRequestDialog (SWIFT_EXTENSION(FBSDKGamingServicesKit)) <FBSDKURLOpening>
  558. - (BOOL)application:(UIApplication * _Nullable)application openURL:(NSURL * _Nullable)potentialURL sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT;
  559. - (BOOL)canOpenURL:(NSURL * _Nonnull)url forApplication:(UIApplication * _Nullable)application sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT;
  560. - (void)applicationDidBecomeActive:(UIApplication * _Nonnull)application;
  561. - (BOOL)isAuthenticationURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT;
  562. @end
  563. /// A delegate for <code>GameRequestDialog</code>.
  564. /// The delegate is notified with the results of the game request as long as the application has permissions to
  565. /// receive the information. For example, if the person is not signed into the containing app, the shower may not be able
  566. /// to distinguish between completion of a game request and cancellation.
  567. SWIFT_PROTOCOL_NAMED("GameRequestDialogDelegate")
  568. @protocol FBSDKGameRequestDialogDelegate
  569. /// Sent to the delegate when the game request completes without error.
  570. /// @param gameRequestDialog The <code>GameRequestDialog</code> that completed.
  571. /// @param results The results from the dialog. This may be nil or empty.
  572. - (void)gameRequestDialog:(FBSDKGameRequestDialog * _Nonnull)gameRequestDialog didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results;
  573. /// Sent to the delegate when the game request encounters an error.
  574. /// @param gameRequestDialog The <code>GameRequestDialog</code> that completed.
  575. /// @param error The error.
  576. - (void)gameRequestDialog:(FBSDKGameRequestDialog * _Nonnull)gameRequestDialog didFailWithError:(NSError * _Nonnull)error;
  577. /// Sent to the delegate when the game request dialog is cancelled.
  578. /// @param gameRequestDialog The <code>GameRequestDialog</code> that completed.
  579. - (void)gameRequestDialogDidCancel:(FBSDKGameRequestDialog * _Nonnull)gameRequestDialog;
  580. @end
  581. /// Filter for who can be displayed in the multi-friend selector.
  582. typedef SWIFT_ENUM_NAMED(NSUInteger, FBSDKGameRequestFilter, "GameRequestFilter", open) {
  583. /// No filter, all friends can be displayed.
  584. FBSDKGameRequestFilterNone = 0,
  585. /// Friends using the app can be displayed.
  586. FBSDKGameRequestFilterAppUsers = 1,
  587. /// Friends not using the app can be displayed.
  588. FBSDKGameRequestFilterAppNonUsers = 2,
  589. /// All friends can be displayed if FB app is installed.
  590. FBSDKGameRequestFilterEverybody = 3,
  591. };
  592. SWIFT_CLASS_NAMED("GameRequestURLProvider")
  593. @interface FBSDKGameRequestURLProvider : NSObject
  594. + (NSURL * _Nullable)createDeepLinkURLWithQueryDictionary:(NSDictionary<NSString *, id> * _Nonnull)queryDictionary SWIFT_WARN_UNUSED_RESULT;
  595. + (NSString * _Nullable)filtersNameForFilters:(enum FBSDKGameRequestFilter)filters SWIFT_WARN_UNUSED_RESULT;
  596. + (NSString * _Nullable)actionTypeNameForActionType:(enum FBSDKGameRequestActionType)actionType SWIFT_WARN_UNUSED_RESULT;
  597. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  598. @end
  599. SWIFT_CLASS_NAMED("GamingContext")
  600. @interface FBSDKGamingContext : NSObject
  601. /// A shared object that holds data about the current user’s game instance which could be solo game or multiplayer game with other users.
  602. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) FBSDKGamingContext * _Nullable currentContext;)
  603. + (FBSDKGamingContext * _Nullable)currentContext SWIFT_WARN_UNUSED_RESULT;
  604. + (void)setCurrentContext:(FBSDKGamingContext * _Nullable)value;
  605. /// A unique identifier for the current game context. This represents a specific game instance that the user is playing in.
  606. @property (nonatomic, readonly, copy) NSString * _Nonnull identifier;
  607. /// The number of players in the current user’s game instance
  608. @property (nonatomic, readonly) NSInteger size;
  609. - (nullable instancetype)initWithIdentifier:(NSString * _Nonnull)identifier size:(NSInteger)size OBJC_DESIGNATED_INITIALIZER;
  610. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  611. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  612. @end
  613. SWIFT_CLASS_NAMED("GamingGroupIntegration")
  614. @interface FBSDKGamingGroupIntegration : NSObject
  615. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  616. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  617. + (void)openGroupPageWithCompletionHandler:(void (^ _Nonnull)(BOOL, NSError * _Nullable))completionHandler;
  618. @end
  619. @class FBSDKGamingImageUploaderConfiguration;
  620. SWIFT_CLASS_NAMED("GamingImageUploader")
  621. @interface FBSDKGamingImageUploader : NSObject
  622. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  623. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  624. /// Runs an upload to a users Gaming Media Library with the given configuration
  625. /// @param configuration model object contain the content that will be uploaded
  626. /// @param completion a callback that is fired dependent on the configuration.
  627. /// Fired when the upload completes or when the users returns to the caller app
  628. /// after the media dialog is shown.
  629. + (void)uploadImageWithConfiguration:(FBSDKGamingImageUploaderConfiguration * _Nonnull)configuration andResultCompletion:(void (^ _Nonnull)(BOOL, NSDictionary<NSString *, id> * _Nullable, NSError * _Nullable))completion;
  630. /// Runs an upload to a users Gaming Media Library with the given configuration
  631. /// @param configuration model object contain the content that will be uploaded
  632. /// @param completion a callback that is fired dependent on the configuration.
  633. /// Fired when the upload completes or when the users returns to the caller app
  634. /// after the media dialog is shown.
  635. /// @param progressHandler an optional callback that is fired multiple times as
  636. /// bytes are transferred to Facebook.
  637. + (void)uploadImageWithConfiguration:(FBSDKGamingImageUploaderConfiguration * _Nonnull)configuration completion:(void (^ _Nonnull)(BOOL, NSDictionary<NSString *, id> * _Nullable, NSError * _Nullable))completion andProgressHandler:(void (^ _Nullable)(int64_t, int64_t, int64_t))progressHandler;
  638. @end
  639. @protocol FBSDKGraphRequestConnecting;
  640. @interface FBSDKGamingImageUploader (SWIFT_EXTENSION(FBSDKGamingServicesKit)) <FBSDKGraphRequestConnectionDelegate>
  641. - (void)requestConnection:(id <FBSDKGraphRequestConnecting> _Nonnull)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
  642. @end
  643. @class UIImage;
  644. SWIFT_CLASS_NAMED("GamingImageUploaderConfiguration")
  645. @interface FBSDKGamingImageUploaderConfiguration : NSObject
  646. @property (nonatomic, readonly, strong) UIImage * _Nonnull image;
  647. @property (nonatomic, readonly, copy) NSString * _Nullable caption;
  648. @property (nonatomic, readonly) BOOL shouldLaunchMediaDialog;
  649. /// A model for Gaming image upload content to be shared.
  650. /// @param image the image that will be shared.
  651. /// @param caption and optional caption that will appear along side the image on Facebook.
  652. /// @param shouldLaunchMediaDialog whether or not to open the media dialog on Facebook when the upload completes.
  653. - (nonnull instancetype)initWithImage:(UIImage * _Nonnull)image caption:(NSString * _Nullable)caption shouldLaunchMediaDialog:(BOOL)shouldLaunchMediaDialog OBJC_DESIGNATED_INITIALIZER;
  654. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  655. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  656. @end
  657. @class FBSDKURL;
  658. SWIFT_CLASS_NAMED("GamingPayload")
  659. @interface FBSDKGamingPayload : NSObject
  660. @property (nonatomic, strong) FBSDKURL * _Nonnull URL;
  661. @property (nonatomic, copy) NSString * _Nonnull payload;
  662. - (nonnull instancetype)initWithURL:(FBSDKURL * _Nonnull)URL OBJC_DESIGNATED_INITIALIZER;
  663. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  664. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  665. @end
  666. SWIFT_PROTOCOL_NAMED("GamingPayloadDelegate")
  667. @protocol FBSDKGamingPayloadDelegate <NSObject>
  668. @optional
  669. /// Delegate method will be triggered when a <code>GamingPayloadObserver</code> parses a url with a payload and game request ID
  670. /// @param payload The payload recieved in the url
  671. /// @param gameRequestID The game request ID recieved in the url
  672. - (void)parsedGameRequestURLContaining:(FBSDKGamingPayload * _Nonnull)payload gameRequestID:(NSString * _Nonnull)gameRequestID;
  673. /// Delegate method will be triggered when a <code>GamingPayloadObserver</code> parses a gaming context url with a payload and game context token ID. The current gaming context will be update with the context ID.
  674. /// @param payload The payload recieved in the url
  675. - (void)parsedGamingContextURLContaining:(FBSDKGamingPayload * _Nonnull)payload;
  676. /// Delegate method will be triggered when a <code>GamingPayloadObserver</code> parses a url with a payload and tournament ID
  677. /// @param payload The payload associated with the tournament
  678. /// @param tournamentID The tournament ID the player wants to enter
  679. - (void)parsedTournamentURLContaining:(FBSDKGamingPayload * _Nonnull)payload tournamentID:(NSString * _Nonnull)tournamentID;
  680. @end
  681. SWIFT_CLASS_NAMED("GamingPayloadObserver")
  682. @interface FBSDKGamingPayloadObserver : NSObject
  683. @property (nonatomic, weak) id <FBSDKGamingPayloadDelegate> _Nullable delegate;
  684. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  685. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  686. - (nonnull instancetype)initWithDelegate:(id <FBSDKGamingPayloadDelegate> _Nullable)delegate;
  687. @end
  688. @interface FBSDKGamingPayloadObserver (SWIFT_EXTENSION(FBSDKGamingServicesKit)) <FBSDKApplicationObserving>
  689. - (BOOL)application:(UIApplication * _Nonnull)application openURL:(NSURL * _Nonnull)url sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT;
  690. @end
  691. @class FBSDKGamingVideoUploaderConfiguration;
  692. SWIFT_CLASS_NAMED("GamingVideoUploader")
  693. @interface FBSDKGamingVideoUploader : NSObject
  694. /// Runs an upload to a users Gaming Media Library with the given configuration
  695. /// @param configuration model object contain the content that will be uploaded
  696. /// @param completion a callback that is fired when the upload completes.
  697. + (void)uploadVideoWithConfiguration:(FBSDKGamingVideoUploaderConfiguration * _Nonnull)configuration andResultCompletion:(void (^ _Nonnull)(BOOL, NSDictionary<NSString *, id> * _Nullable, NSError * _Nullable))completion;
  698. /// Runs an upload to a users Gaming Media Library with the given configuration
  699. /// @param configuration model object contain the content that will be uploaded
  700. /// @param completion a callback that is fired when the upload completes.
  701. /// @param progressHandler an optional callback that is fired multiple times as bytes are transferred to Facebook.
  702. + (void)uploadVideoWithConfiguration:(FBSDKGamingVideoUploaderConfiguration * _Nonnull)configuration completion:(void (^ _Nonnull)(BOOL, NSDictionary<NSString *, id> * _Nullable, NSError * _Nullable))completion andProgressHandler:(void (^ _Nullable)(int64_t, int64_t, int64_t))progressHandler;
  703. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  704. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  705. @end
  706. SWIFT_CLASS_NAMED("GamingVideoUploaderConfiguration")
  707. @interface FBSDKGamingVideoUploaderConfiguration : NSObject
  708. @property (nonatomic, readonly, copy) NSURL * _Nonnull videoURL;
  709. @property (nonatomic, readonly, copy) NSString * _Nullable caption;
  710. /// A model for Gaming video upload content to be shared.
  711. /// @param videoURL a url to the videos location on local disk.
  712. /// @param caption and optional caption that will appear along side the video on Facebook.
  713. - (nonnull instancetype)initWithVideoURL:(NSURL * _Nonnull)videoURL caption:(NSString * _Nullable)caption OBJC_DESIGNATED_INITIALIZER;
  714. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  715. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  716. @end
  717. SWIFT_CLASS("_TtC22FBSDKGamingServicesKit21ShareTournamentDialog")
  718. @interface ShareTournamentDialog : NSObject <FBSDKURLOpening>
  719. - (BOOL)isAuthenticationURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT;
  720. - (BOOL)application:(UIApplication * _Nullable)application openURL:(NSURL * _Nullable)url sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT;
  721. - (BOOL)canOpenURL:(NSURL * _Nonnull)url forApplication:(UIApplication * _Nullable)application sourceApplication:(NSString * _Nullable)sourceApplication annotation:(id _Nullable)annotation SWIFT_WARN_UNUSED_RESULT;
  722. - (void)applicationDidBecomeActive:(UIApplication * _Nonnull)application;
  723. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  724. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  725. @end
  726. /// A model for an instant games switchAsync cross play request.
  727. SWIFT_CLASS_NAMED("SwitchContextContent")
  728. @interface FBSDKSwitchContextContent : NSObject <FBSDKValidatable>
  729. - (nonnull instancetype)initDialogContentWithContextID:(NSString * _Nonnull)contextID OBJC_DESIGNATED_INITIALIZER;
  730. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  731. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  732. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  733. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  734. @end
  735. /// A dialog to switch the current gaming context through a web view
  736. SWIFT_CLASS_NAMED("SwitchContextDialog")
  737. @interface FBSDKSwitchContextDialog : FBSDKContextWebDialog <FBSDKShowable>
  738. /// Creates a switch context web dialog with content and a delegate.
  739. /// \param content The content for the switch context dialog
  740. ///
  741. /// \param windowFinder The application window finder that provides the window to display the dialog
  742. ///
  743. /// \param delegate The receiver’s delegate used to let the receiver know a context switch was successful or failed
  744. ///
  745. - (nonnull instancetype)initWithContent:(FBSDKSwitchContextContent * _Nonnull)content windowFinder:(id <_FBSDKWindowFinding> _Nonnull)windowFinder delegate:(id <FBSDKContextDialogDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER;
  746. - (BOOL)show SWIFT_WARN_UNUSED_RESULT;
  747. - (BOOL)validateAndReturnError:(NSError * _Nullable * _Nullable)error;
  748. @end
  749. #endif
  750. #if __has_attribute(external_source_symbol)
  751. # pragma clang attribute pop
  752. #endif
  753. #if defined(__cplusplus)
  754. #endif
  755. #pragma clang diagnostic pop
  756. #endif
  757. #else
  758. #error unsupported Swift architecture
  759. #endif