Skip to content

Commit

Permalink
Rename SharingValidation protocol to SharingValidatable
Browse files Browse the repository at this point in the history
Reviewed By: joesus

Differential Revision: D36945783

fbshipit-source-id: 8a7b25d8f94fec0aea5a5400e2e7894fddbef3b6
  • Loading branch information
samodom authored and facebook-github-bot committed Jun 7, 2022
1 parent 25eef8b commit 1739821
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Made `LoginManagerLoginResult.declinedPermissions` immutable.
- Made `AccessToken.currentAccessToken` use a Swift name of `current`.
- Made `AuthenticationToken.currentAuthenticationToken` use a Swift name of `current`.
- Renamed `SharingValidation` protocol to `SharingValidatable`.

[2022-06-03](https://github.com/facebook/facebook-ios-sdk/releases/tag/v14.0.0) |
[Full Changelog](https://github.com/facebook/facebook-ios-sdk/compare/v13.2.0...v14.0.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Foundation
/// A model for a game request.
@objcMembers
@objc(FBSDKGameRequestContent)
public final class GameRequestContent: NSObject, SharingValidation, NSSecureCoding {
public final class GameRequestContent: NSObject, SharingValidatable, NSSecureCoding {

/**
Used when defining additional context about the nature of the request.
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/Content/AppInviteContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ extension AppInviteContent: DependentAsType {

// MARK: - Validation

extension AppInviteContent: SharingValidation {
extension AppInviteContent: SharingValidatable {

public func validate(options bridgeOptions: ShareBridgeOptions) throws {
let validator = try Self.getDependencies().validator
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/Content/ShareLinkContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extension ShareLinkContent: SharingContent {
}
}

extension ShareLinkContent: SharingValidation {
extension ShareLinkContent: SharingValidatable {
/// Asks the receiver to validate that its content or media values are valid.
@objc(validateWithOptions:error:)
public func validate(options bridgeOptions: ShareBridgeOptions) throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extension ShareMediaContent: SharingContent {
}
}

extension ShareMediaContent: SharingValidation {
extension ShareMediaContent: SharingValidatable {
/// Asks the receiver to validate that its content or media values are valid.
@objc(validateWithOptions:error:)
public func validate(options bridgeOptions: ShareBridgeOptions) throws {
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/Content/SharePhoto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ extension SharePhoto: DependentAsType {

// MARK: - Validation

extension SharePhoto: SharingValidation {
extension SharePhoto: SharingValidatable {
/// Asks the receiver to validate that its content or media values are valid.
@objc(validateWithOptions:error:)
public func validate(options bridgeOptions: ShareBridgeOptions) throws {
Expand Down
4 changes: 2 additions & 2 deletions FBSDKShareKit/FBSDKShareKit/Content/SharePhotoContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ extension SharePhotoContent: SharingContent {
}
}

// MARK: - SharingValidation
// MARK: - SharingValidatable

extension SharePhotoContent: SharingValidation {
extension SharePhotoContent: SharingValidatable {
// The number of photos that can be shared at once is restricted
private static let photosCountRange = 1 ... 6

Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/Content/ShareVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ extension ShareVideo: DependentAsType {

// MARK: - Validation

extension ShareVideo: SharingValidation {
extension ShareVideo: SharingValidatable {
/// Asks the receiver to validate that its content or media values are valid.
@objc(validateWithOptions:error:)
public func validate(options bridgeOptions: ShareBridgeOptions) throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ extension ShareVideoContent: SharingContent {
}
}

extension ShareVideoContent: SharingValidation {
extension ShareVideoContent: SharingValidatable {
@objc(validateWithOptions:error:)
public func validate(options bridgeOptions: ShareBridgeOptions) throws {
let validator = try Self.getDependencies().validator
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/Content/SharingContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation

/// A base interface for content to be shared.
@objc(FBSDKSharingContent)
public protocol SharingContent: NSObjectProtocol, SharingValidation {
public protocol SharingContent: NSObjectProtocol, SharingValidatable {

/**
URL for the content being shared.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

import Foundation

/// A base interface for validation of content and media.
@objc(FBSDKSharingValidation)
public protocol SharingValidation {
/// An interface for validatable content and media.
@objc(FBSDKSharingValidatable)
public protocol SharingValidatable {
/**
Asks the receiver to validate that its content or media values are valid.
Validate that this content or media contains valid values.
- Parameter options: The share bridge options to use for validation.
- Throws: If the values are not valid.
*/
Expand Down

0 comments on commit 1739821

Please sign in to comment.