diff --git a/README.md b/README.md index 79799a451..3c2ccf766 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,11 @@ Share Dialog: share_feedWeb: true, // iOS only } -For iOS, the default dialog mode is [`FBSDKShareDialogModeAutomatic`](https://developers.facebook.com/docs/reference/ios/current/constants/FBSDKShareDialogMode/). You can share that by adding a specific dialog mode parameter. The available share dialog modes are: `share_sheet`, `share_feedBrowser`, `share_native` and `share_feedWeb`. [Read more about share dialog modes](https://developers.facebook.com/docs/reference/ios/current/constants/FBSDKShareDialogMode/) +#### iOS + +The default dialog mode is [`FBSDKShareDialogModeAutomatic`](https://developers.facebook.com/docs/reference/ios/current/constants/FBSDKShareDialogMode/). You can share that by adding a specific dialog mode parameter. The available share dialog modes are: `share_sheet`, `share_feedBrowser`, `share_native` and `share_feedWeb`. [Read more about share dialog modes](https://developers.facebook.com/docs/reference/ios/current/constants/FBSDKShareDialogMode/) + +`caption`, `description` and `picture` were deprecated in Facebok API [v2.9](https://developers.facebook.com/docs/graph-api/changelog/version2.9#gapi-deprecate) and therefore not supported anymore on iOS Game request: diff --git a/src/ios/Bolts.framework/Bolts b/src/ios/Bolts.framework/Bolts index c28123b97..3cbbf9d4c 100644 Binary files a/src/ios/Bolts.framework/Bolts and b/src/ios/Bolts.framework/Bolts differ diff --git a/src/ios/Bolts.framework/Info.plist b/src/ios/Bolts.framework/Info.plist index a7855f932..a1909ad6d 100644 Binary files a/src/ios/Bolts.framework/Info.plist and b/src/ios/Bolts.framework/Info.plist differ diff --git a/src/ios/FBSDKCoreKit.framework/FBSDKCoreKit b/src/ios/FBSDKCoreKit.framework/FBSDKCoreKit index 4fee4f4b2..4894afdbf 100644 Binary files a/src/ios/FBSDKCoreKit.framework/FBSDKCoreKit and b/src/ios/FBSDKCoreKit.framework/FBSDKCoreKit differ diff --git a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKAppEvents.h b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKAppEvents.h index c35a52615..71260ca8c 100644 --- a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKAppEvents.h +++ b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKAppEvents.h @@ -97,6 +97,14 @@ FBSDK_EXTERN NSString *const FBSDKAppEventNameViewedContent; of methods on `FBSDKAppEvents`. Common event names are provided in the `FBAppEventName*` constants. */ + /** + * Parameter key used to specify data for the one or more pieces of content being logged about. + * Data should be a JSON encoded string. + * Example: + * "[{\"id\": \"1234\", \"quantity\": 2, \"item_price\": 5.99}, {\"id\": \"5678\", \"quantity\": 1, \"item_price\": 9.99}]" + */ +FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameContent; + /** Parameter key used to specify an ID for the specific piece of content being logged about. Could be an EAN, article identifier, etc., depending on the nature of the app. */ FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameContentID; diff --git a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKApplicationDelegate.h b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKApplicationDelegate.h index 95d14534f..ebaef4d38 100644 --- a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKApplicationDelegate.h +++ b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKApplicationDelegate.h @@ -50,13 +50,13 @@ - Parameter annotation: The annotation as passed to [UIApplicationDelegate application:openURL:sourceApplication:annotation:]. - Returns: YES if the url was intended for the Facebook SDK, NO if not. - */ + */ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation; -#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_3 +#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_9_0 /** Call this method from the [UIApplicationDelegate application:openURL:options:] method of the AppDelegate for your app. It should be invoked for the proper processing of responses during interaction diff --git a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKConstants.h b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKConstants.h index 5834bf444..98cfd73c3 100644 --- a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKConstants.h +++ b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKConstants.h @@ -148,7 +148,7 @@ FBSDK_EXTERN NSString *const FBSDKErrorArgumentCollectionKey; FBSDK_EXTERN NSString *const FBSDKErrorArgumentNameKey; /** - The userInfo key for the invalid argument value for errors with FBSDKInvalidArgumentErrorCode. + The userInfo key for the invalid argument value for errors with FBSDKInvalidArgumentErrorCode. */ FBSDK_EXTERN NSString *const FBSDKErrorArgumentValueKey; diff --git a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKCoreKit.h b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKCoreKit.h index 84294bdc1..b245a6dc3 100644 --- a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKCoreKit.h +++ b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKCoreKit.h @@ -44,5 +44,5 @@ #import #endif -#define FBSDK_VERSION_STRING @"4.22.1" -#define FBSDK_TARGET_PLATFORM_VERSION @"v2.9" +#define FBSDK_VERSION_STRING @"4.31.1" +#define FBSDK_TARGET_PLATFORM_VERSION @"v2.11" diff --git a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKUtility.h b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKUtility.h index 1a240c8f0..abd0efa9d 100644 --- a/src/ios/FBSDKCoreKit.framework/Headers/FBSDKUtility.h +++ b/src/ios/FBSDKCoreKit.framework/Headers/FBSDKUtility.h @@ -52,4 +52,18 @@ */ + (NSString *)URLEncode:(NSString *)value; +/** + Creates a timer using Grand Central Dispatch. + - Parameter interval: The interval to fire the timer, in seconds. + - Parameter block: The code block to execute when timer is fired. + - Returns: The dispatch handle. + */ ++ (dispatch_source_t)startGCDTimerWithInterval:(double)interval block:(dispatch_block_t)block; + +/** + Stop a timer that was started by startGCDTimerWithInterval. + - Parameter timer: The dispatch handle received from startGCDTimerWithInterval. + */ ++ (void)stopGCDTimer:(dispatch_source_t)timer; + @end diff --git a/src/ios/FBSDKCoreKit.framework/Info.plist b/src/ios/FBSDKCoreKit.framework/Info.plist index ac1d9f861..72eff4051 100644 Binary files a/src/ios/FBSDKCoreKit.framework/Info.plist and b/src/ios/FBSDKCoreKit.framework/Info.plist differ diff --git a/src/ios/FBSDKLoginKit.framework/FBSDKLoginKit b/src/ios/FBSDKLoginKit.framework/FBSDKLoginKit index 0e3605415..d19dcec3d 100644 Binary files a/src/ios/FBSDKLoginKit.framework/FBSDKLoginKit and b/src/ios/FBSDKLoginKit.framework/FBSDKLoginKit differ diff --git a/src/ios/FBSDKLoginKit.framework/Headers/FBSDKLoginButton.h b/src/ios/FBSDKLoginKit.framework/Headers/FBSDKLoginButton.h index ff2f3f326..adc7b9b09 100644 --- a/src/ios/FBSDKLoginKit.framework/Headers/FBSDKLoginButton.h +++ b/src/ios/FBSDKLoginKit.framework/Headers/FBSDKLoginButton.h @@ -110,7 +110,7 @@ typedef NS_ENUM(NSUInteger, FBSDKLoginButtonTooltipBehavior) - Parameter result: The results of the login - Parameter error: The error (if any) from the login */ -- (void) loginButton:(FBSDKLoginButton *)loginButton +- (void)loginButton:(FBSDKLoginButton *)loginButton didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result error:(NSError *)error; diff --git a/src/ios/FBSDKLoginKit.framework/Info.plist b/src/ios/FBSDKLoginKit.framework/Info.plist index d0c6df860..48de3f772 100644 Binary files a/src/ios/FBSDKLoginKit.framework/Info.plist and b/src/ios/FBSDKLoginKit.framework/Info.plist differ diff --git a/src/ios/FBSDKMessengerShareKit.framework/FBSDKMessengerShareKit b/src/ios/FBSDKMessengerShareKit.framework/FBSDKMessengerShareKit index 0c0fc2850..7edb32311 100644 Binary files a/src/ios/FBSDKMessengerShareKit.framework/FBSDKMessengerShareKit and b/src/ios/FBSDKMessengerShareKit.framework/FBSDKMessengerShareKit differ diff --git a/src/ios/FBSDKMessengerShareKit.framework/Info.plist b/src/ios/FBSDKMessengerShareKit.framework/Info.plist index 230a492ce..5190bf7ff 100644 Binary files a/src/ios/FBSDKMessengerShareKit.framework/Info.plist and b/src/ios/FBSDKMessengerShareKit.framework/Info.plist differ diff --git a/src/ios/FBSDKShareKit.framework/FBSDKShareKit b/src/ios/FBSDKShareKit.framework/FBSDKShareKit index be6f12685..84f4dc8a0 100644 Binary files a/src/ios/FBSDKShareKit.framework/FBSDKShareKit and b/src/ios/FBSDKShareKit.framework/FBSDKShareKit differ diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKAppInviteDialog.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKAppInviteDialog.h index 3b114d5e6..9994ff92c 100644 --- a/src/ios/FBSDKShareKit.framework/Headers/FBSDKAppInviteDialog.h +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKAppInviteDialog.h @@ -24,65 +24,67 @@ @protocol FBSDKAppInviteDialogDelegate; /** - A dialog for sending App Invites. + A dialog for sending App Invites. */ @interface FBSDKAppInviteDialog : NSObject /** - Convenience method to show a FBSDKAppInviteDialog + Convenience method to show a FBSDKAppInviteDialog - Parameter viewController: A UIViewController to present the dialog from. - Parameter content: The content for the app invite. - Parameter delegate: The receiver's delegate. -*/ + - Warning: This method is deprecated. + */ + (instancetype)showFromViewController:(UIViewController *)viewController withContent:(FBSDKAppInviteContent *)content - delegate:(id)delegate; + delegate:(id)delegate +__attribute__ ((deprecated("App Invites no longer supported"))); /** -- Warning:use showFromViewController:withContent:delegate: instead + - Warning:use showFromViewController:withContent:delegate: instead */ + (instancetype)showWithContent:(FBSDKAppInviteContent *)content delegate:(id)delegate __attribute__ ((deprecated("use showFromViewController:withContent:delegate: instead"))); /** - A UIViewController to present the dialog from. + A UIViewController to present the dialog from. If not specified, the top most view controller will be automatically determined as best as possible. */ @property (nonatomic, weak) UIViewController *fromViewController; /** - The receiver's delegate or nil if it doesn't have a delegate. + The receiver's delegate or nil if it doesn't have a delegate. */ @property (nonatomic, weak) id delegate; /** - The content for app invite. + The content for app invite. */ @property (nonatomic, copy) FBSDKAppInviteContent *content; /** - A Boolean value that indicates whether the receiver can initiate an app invite. + A Boolean value that indicates whether the receiver can initiate an app invite. May return NO 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:validateWithError: + - See:validateWithError: - Returns: YES if the receiver can show the dialog, otherwise NO. */ - (BOOL)canShow; /** - Begins the app invite from the receiver. + Begins the app invite from the receiver. - Returns: YES if the receiver was able to show the dialog, otherwise NO. */ - (BOOL)show; /** - Validates the content on the receiver. + Validates the content on the receiver. - Parameter errorRef: If an error occurs, upon return contains an NSError object that describes the problem. - Returns: YES if the content is valid, otherwise NO. */ @@ -91,7 +93,7 @@ __attribute__ ((deprecated("use showFromViewController:withContent:delegate: ins @end /** - A delegate for FBSDKAppInviteDialog. + A delegate for FBSDKAppInviteDialog. The delegate is notified with the results of the app invite as long as the application has permissions to receive the information. For example, if the person is not signed into the containing app, the shower may not be able @@ -100,14 +102,14 @@ __attribute__ ((deprecated("use showFromViewController:withContent:delegate: ins @protocol FBSDKAppInviteDialogDelegate /** - Sent to the delegate when the app invite completes without error. + Sent to the delegate when the app invite completes without error. - Parameter appInviteDialog: The FBSDKAppInviteDialog that completed. - Parameter results: The results from the dialog. This may be nil or empty. */ - (void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didCompleteWithResults:(NSDictionary *)results; /** - Sent to the delegate when the app invite encounters an error. + Sent to the delegate when the app invite encounters an error. - Parameter appInviteDialog: The FBSDKAppInviteDialog that completed. - Parameter error: The error. */ diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKCameraEffectArguments.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKCameraEffectArguments.h new file mode 100644 index 000000000..6f67f0a54 --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKCameraEffectArguments.h @@ -0,0 +1,57 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import + +/** + * A container of arguments for a camera effect. + * An argument is a NSString identified by a NSString key. + */ +@interface FBSDKCameraEffectArguments : NSObject + +/** + Sets a string argument in the container. + - Parameter string: The argument + - Parameter key: The key for the argument + */ +- (void)setString:(NSString *)string forKey:(NSString *)key; + +/** + Gets a string argument from the container. + - Parameter key: The key for the argument + - Returns: The string value or nil + */ +- (NSString *)stringForKey:(NSString *)key; + +/** + Sets a string array argument in the container. + - Parameter array: The array argument + - Parameter key: The key for the argument + */ +- (void)setArray:(NSArray *)array forKey:(NSString *)key; + +/** + Gets an array argument from the container. + - Parameter key: The key for the argument + - Returns: The array argument + */ +- (NSArray *)arrayForKey:(NSString *)key; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKCameraEffectTextures.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKCameraEffectTextures.h new file mode 100644 index 000000000..37aeff37d --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKCameraEffectTextures.h @@ -0,0 +1,43 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import + +/** + * A container of textures for a camera effect. + * A texture for a camera effect is an UIImages identified by a NSString key. + */ +@interface FBSDKCameraEffectTextures : NSObject + +/** + Sets the image for a texture key. + - Parameter image: The UIImage for the texture + - Parameter name: The key for the texture + */ +- (void)setImage:(UIImage *)image forKey:(NSString *)key; + +/** + Gets the image for a texture key. + - Parameter name: The key for the texture + - Returns: The texture UIImage or nil + */ +- (UIImage *)imageForKey:(NSString *)key; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKLikeButton.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKLikeButton.h index 0e25c30fb..191c03365 100644 --- a/src/ios/FBSDKShareKit.framework/Headers/FBSDKLikeButton.h +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKLikeButton.h @@ -24,6 +24,7 @@ #import /** + Warning: This class is deprecated. A button to like an object. Tapping the receiver will invoke an API call to the Facebook app through a fast-app-switch that allows @@ -31,6 +32,7 @@ currentAccessToken has "publish_actions" permission and the object is an Open Graph object, then the like can happen seamlessly without the fast-app-switch. */ +__attribute__ ((deprecated)) @interface FBSDKLikeButton : FBSDKButton /** diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKLikeControl.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKLikeControl.h index 9350c581c..6ce351de2 100644 --- a/src/ios/FBSDKShareKit.framework/Headers/FBSDKLikeControl.h +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKLikeControl.h @@ -83,7 +83,7 @@ typedef NS_ENUM(NSUInteger, FBSDKLikeControlStyle) FBSDK_EXTERN NSString *NSStringFromFBSDKLikeControlStyle(FBSDKLikeControlStyle style); /** - + Warning: This class is deprecated. UI control to like an object in the Facebook graph. @@ -91,6 +91,7 @@ FBSDK_EXTERN NSString *NSStringFromFBSDKLikeControlStyle(FBSDKLikeControlStyle s fast-app-switch that allows the user to like the object. Upon return to the calling app, the view will update with the new state and send actions for the UIControlEventValueChanged event. */ +__attribute__ ((deprecated)) @interface FBSDKLikeControl : UIControl /** diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareCameraEffectContent.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareCameraEffectContent.h new file mode 100644 index 000000000..65e2f6bdc --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareCameraEffectContent.h @@ -0,0 +1,52 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import +#import +#import + +/** + A model for content to share with a Facebook camera effect. + */ +@interface FBSDKShareCameraEffectContent : NSObject + +/** + ID of the camera effect to use. + */ +@property (nonatomic, copy) NSString *effectID; + +/** + Arguments for the effect. + */ +@property (nonatomic, copy) FBSDKCameraEffectArguments *effectArguments; + +/** + Textures for the effect. + */ +@property (nonatomic, copy) FBSDKCameraEffectTextures *effectTextures; + +/** + Compares the receiver to another camera effect content. + - Parameter content: The other content + - Returns: YES if the receiver's values are equal to the other content's values; otherwise NO + */ +- (BOOL)isEqualToShareCameraEffectContent:(FBSDKShareCameraEffectContent *)content; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareKit.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareKit.h index 18813d476..30e36aa4c 100644 --- a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareKit.h +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareKit.h @@ -22,6 +22,13 @@ #import #import #import +#import +#import +#import +#import +#import +#import +#import #import #import #import @@ -45,9 +52,9 @@ #import #import #import +#import #import #import -#import #import #else #import diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareLinkContent.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareLinkContent.h index 5206728ba..b4290d16c 100644 --- a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareLinkContent.h +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareLinkContent.h @@ -35,7 +35,7 @@ @deprecated `contentDescription` is deprecated from Graph API 2.9. For more information, see https://developers.facebook.com/docs/apps/changelog#v2_9_deprecations. */ -@property (nonatomic, copy) NSString *contentDescription +@property (nonatomic, readonly) NSString *contentDescription DEPRECATED_MSG_ATTRIBUTE("`contentDescription` is deprecated from Graph API 2.9"); /** @@ -47,7 +47,7 @@ @deprecated `contentTitle` is deprecated from Graph API 2.9. For more information, see https://developers.facebook.com/docs/apps/changelog#v2_9_deprecations */ -@property (nonatomic, copy) NSString *contentTitle +@property (nonatomic, readonly) NSString *contentTitle DEPRECATED_MSG_ATTRIBUTE("`contentTitle` is deprecated from Graph API 2.9"); /** @@ -57,7 +57,7 @@ @deprecated `imageURL` is deprecated from Graph API 2.9. For more information, see https://developers.facebook.com/docs/apps/changelog#v2_9_deprecations */ -@property (nonatomic, copy) NSURL *imageURL +@property (nonatomic, readonly) NSURL *imageURL DEPRECATED_MSG_ATTRIBUTE("`imageURL` is deprecated from Graph API 2.9"); /** diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerActionButton.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerActionButton.h new file mode 100644 index 000000000..ad970f570 --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerActionButton.h @@ -0,0 +1,34 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import + +/** + A base interface for Messenger share action buttons. + */ +@protocol FBSDKShareMessengerActionButton + +/** + The title displayed to the user for the button. + - Returns: The title for the button. + */ +@property (nonatomic, copy) NSString *title; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerGenericTemplateContent.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerGenericTemplateContent.h new file mode 100644 index 000000000..ffc1b7f9f --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerGenericTemplateContent.h @@ -0,0 +1,55 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import + +@class FBSDKShareMessengerGenericTemplateElement; + +typedef NS_ENUM(NSUInteger, FBSDKShareMessengerGenericTemplateImageAspectRatio) { + FBSDKShareMessengerGenericTemplateImageAspectRatioHorizontal = 0, + FBSDKShareMessengerGenericTemplateImageAspectRatioSquare +}; + +/** + A model for sharing a generic template element to Messenger. This wrapper element allows + specifying whether or not the bubble is sharable and what aspect to render the images. + See https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic + for more details. + */ +@interface FBSDKShareMessengerGenericTemplateContent : NSObject + +/** + This specifies whether or not this generic template message can be shared again after the + initial share. Defaults to false. + */ +@property (nonatomic, assign) BOOL isSharable; + +/** + The aspect ratio for when the image is rendered in the generic template bubble after being + shared. Defaults to horizontal. + */ +@property (nonatomic, assign) FBSDKShareMessengerGenericTemplateImageAspectRatio imageAspectRatio; + +/** + A generic template element with a title, optional subtitle, optional image, etc. Required. + */ +@property (nonatomic, copy) FBSDKShareMessengerGenericTemplateElement *element; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerGenericTemplateElement.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerGenericTemplateElement.h new file mode 100644 index 000000000..d70dd9631 --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerGenericTemplateElement.h @@ -0,0 +1,56 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import +#import + +/** + A model for sharing a generic template element to Messenger. This allows specifying title, subtitle, + image, default action, and any other buttons. Title is required. See + https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic for more details. + */ +@interface FBSDKShareMessengerGenericTemplateElement : NSObject + +/** + The rendered title for the shared generic template element. Required. + */ +@property (nonatomic, copy) NSString *title; + +/** + The rendered subtitle for the shared generic template element. Optional. + */ +@property (nonatomic, copy) NSString *subtitle; + +/** + The image url that will be downloaded and rendered at the top of the generic template. Optional. + */ +@property (nonatomic, copy) NSURL *imageURL; + +/** + The default action executed when this shared generic tempate is tapped. Title for this button is ignored. Optional. + */ +@property (nonatomic, copy) id defaultAction; + +/** + This specifies what action button to show below the generic template. Optional. + */ +@property (nonatomic, copy) id button; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerMediaTemplateContent.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerMediaTemplateContent.h new file mode 100644 index 000000000..142702d06 --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerMediaTemplateContent.h @@ -0,0 +1,69 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import +#import + +typedef NS_ENUM(NSUInteger, FBSDKShareMessengerMediaTemplateMediaType) { + FBSDKShareMessengerMediaTemplateMediaTypeImage = 0, + FBSDKShareMessengerMediaTemplateMediaTypeVideo +}; + +/** + A model for sharing media template content. See + https://developers.facebook.com/docs/messenger-platform/send-messages/template/media for details. + */ +@interface FBSDKShareMessengerMediaTemplateContent : NSObject + +/** + The media type (image or video) for this content. This must match the media type specified in the + attachmentID/mediaURL to avoid an error when sharing. Defaults to image. + */ +@property (nonatomic, assign) FBSDKShareMessengerMediaTemplateMediaType mediaType; + +/** + The attachmentID of the item to share. Optional, but either attachmentID or mediaURL must be specified. + */ +@property (nonatomic, copy, readonly) NSString *attachmentID; + +/** + The Facebook url for this piece of media. External urls will not work; this must be a Facebook url. + See https://developers.facebook.com/docs/messenger-platform/send-messages/template/media for details. + Optional, but either attachmentID or mediaURL must be specified. + */ +@property (nonatomic, copy, readonly) NSURL *mediaURL; + +/** + This specifies what action button to show below the media. Optional. + */ +@property (nonatomic, copy) id button; + +/** + Custom initializer to create media template share with attachment id. + */ +- (instancetype)initWithAttachmentID:(NSString *)attachmentID; + +/** + Custom initializer to create media template share with media url. This must be a Facebook url + and cannot be an external url. + */ +- (instancetype)initWithMediaURL:(NSURL *)mediaURL; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerOpenGraphMusicTemplateContent.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerOpenGraphMusicTemplateContent.h new file mode 100644 index 000000000..f68f51c4d --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerOpenGraphMusicTemplateContent.h @@ -0,0 +1,41 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import +#import + +/** + This share content allows sharing a bubble that plays songs with Open Graph music. + See https://developers.facebook.com/docs/messenger-platform/send-messages/template/open-graph + for details. Passing property pageID is required for this type of share. + */ +@interface FBSDKShareMessengerOpenGraphMusicTemplateContent : NSObject + +/** + This must be an Open Graph music url. Required. + */ +@property (nonatomic, copy) NSURL *url; + +/** + This specifies what action button to show below the open graph music bubble. Optional. + */ +@property (nonatomic, copy) id button; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerURLActionButton.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerURLActionButton.h new file mode 100644 index 000000000..79feadd16 --- /dev/null +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKShareMessengerURLActionButton.h @@ -0,0 +1,62 @@ +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// +// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, +// copy, modify, and distribute this software in source code or binary form for use +// in connection with the web services and APIs provided by Facebook. +// +// As with any software that integrates with the Facebook platform, your use of +// this software is subject to the Facebook Developer Principles and Policies +// [http://developers.facebook.com/policy/]. This copyright notice shall be +// included in all copies or substantial portions of the software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import + +#import + +typedef NS_ENUM(NSUInteger, FBSDKShareMessengerURLActionButtonWebviewHeightRatio) { + FBSDKShareMessengerURLActionButtonWebviewHeightRatioFull = 0, + FBSDKShareMessengerURLActionButtonWebviewHeightRatioTall, + FBSDKShareMessengerURLActionButtonWebviewHeightRatioCompact +}; + +/** + A model for a Messenger share URL action button. + */ +@interface FBSDKShareMessengerURLActionButton : NSObject + +/** + The url that this button should open when tapped. Required. + */ +@property (nonatomic, copy) NSURL *url; + +/** + This controls the display height of the webview when shown in the Messenger app. Defaults to Full. + */ +@property (nonatomic, assign) FBSDKShareMessengerURLActionButtonWebviewHeightRatio webviewHeightRatio; + +/** + This must be true if the url is a Messenger Extensions url. Defaults to NO. + */ +@property (nonatomic, assign) BOOL isMessengerExtensionURL; + +/** + This is a fallback url for a Messenger Extensions enabled button. It is used on clients that do not support + Messenger Extensions. If this is not defined, the url will be used as a fallback. Optional, but ignored + unless isMessengerExtensionURL == YES. + */ +@property (nonatomic, copy) NSURL *fallbackURL; + +/** + This controls whether we want to hide the share button in the webview or not. It is useful to hide the share + button when the webview is user-specific and contains sensitive information. Defaults to NO. + */ +@property (nonatomic, assign) BOOL shouldHideWebviewShareButton; + +@end diff --git a/src/ios/FBSDKShareKit.framework/Headers/FBSDKSharingContent.h b/src/ios/FBSDKShareKit.framework/Headers/FBSDKSharingContent.h index 0c5c20a5f..0e0e06d25 100644 --- a/src/ios/FBSDKShareKit.framework/Headers/FBSDKSharingContent.h +++ b/src/ios/FBSDKShareKit.framework/Headers/FBSDKSharingContent.h @@ -62,4 +62,16 @@ */ @property (nonatomic, copy) NSString *ref; +/** + For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share. + - Returns: The ID of the Facebok page this share is associated with. + */ +@property (nonatomic, copy) NSString *pageID; + +/** + A unique identifier for a share involving this content, useful for tracking purposes. + - Returns: A unique string identifying this share data. + */ +@property (nonatomic, copy, readonly) NSString *shareUUID; + @end diff --git a/src/ios/FBSDKShareKit.framework/Info.plist b/src/ios/FBSDKShareKit.framework/Info.plist index 86a72960e..db5e356e6 100644 Binary files a/src/ios/FBSDKShareKit.framework/Info.plist and b/src/ios/FBSDKShareKit.framework/Info.plist differ diff --git a/src/ios/FacebookConnectPlugin.m b/src/ios/FacebookConnectPlugin.m index 1dba49a13..c21b6ec44 100644 --- a/src/ios/FacebookConnectPlugin.m +++ b/src/ios/FacebookConnectPlugin.m @@ -272,9 +272,6 @@ - (void) showDialog:(CDVInvokedUrlCommand*)command // Create native params FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init]; content.contentURL = [NSURL URLWithString:[params objectForKey:@"link"]]; - content.contentTitle = [params objectForKey:@"caption"]; - content.imageURL = [NSURL URLWithString:[params objectForKey:@"picture"]]; - content.contentDescription = [params objectForKey:@"description"]; self.dialogCallbackId = command.callbackId; [FBSDKMessageDialog showWithContent:content delegate:self]; @@ -284,9 +281,6 @@ - (void) showDialog:(CDVInvokedUrlCommand*)command // Create native params FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init]; content.contentURL = [NSURL URLWithString:params[@"href"]]; - content.contentTitle = params[@"caption"]; - content.imageURL = [NSURL URLWithString:params[@"picture"]]; - content.contentDescription = params[@"description"]; content.hashtag = [FBSDKHashtag hashtagWithString:[params objectForKey:@"hashtag"]]; content.quote = params[@"quote"];