Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v7] Remove ObjC annotations from internal classes #1507

Open
wants to merge 3 commits into
base: v7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Sources/BraintreeCore/BTAPIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ import Foundation
/// HTTP response and `error` will be `nil`; on failure, `body` and `response` will be
/// `nil` and `error` will contain the error that occurred.
@_documentation(visibility: private)
@objc(POST:parameters:httpType:completion:)
public func post(
_ path: String,
parameters: [String: Any]? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Sources/BraintreeCore/BTAPIClientHTTPType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

/// :nodoc: This enum is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
@_documentation(visibility: private)
@objc public enum BTAPIClientHTTPService: Int {
public enum BTAPIClientHTTPService: Int {
/// Use the Gateway
case gateway

Expand Down
2 changes: 1 addition & 1 deletion Sources/BraintreeCore/BTAppContextSwitchClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

/// :nodoc: This protocol is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
@_documentation(visibility: private)
@objc public protocol BTAppContextSwitchClient: AnyObject {
public protocol BTAppContextSwitchClient: AnyObject {

/// Determine whether the return URL can be handled.
/// - Parameter url: the URL you receive in `scene(_:openURLContexts:)` (or `application(_:open:options:)` if not using SceneDelegate) when returning to your app
Expand Down
6 changes: 2 additions & 4 deletions Sources/BraintreeCore/BTAppContextSwitcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import UIKit
/// Handles return URLs when returning from app context switch and routes the return URL to the correct app context switch client class.
/// - Note: `returnURLScheme` must contain your app's registered URL Type that starts with the app's bundle ID.
/// When your app returns from app switch, the app delegate should call `handleOpenURL` (or `handleOpen` if not using SceneDelegate)
@objcMembers public class BTAppContextSwitcher: NSObject {
@_documentation(visibility: private)
public class BTAppContextSwitcher: NSObject {

// MARK: - Public Properties

Expand All @@ -19,15 +20,13 @@ import UIKit
/// Determine whether the return URL can be handled.
/// - Parameters: url the URL you receive in `scene:openURLContexts:` (or `application:openURL:options:` if not using SceneDelegate) when returning to your app
/// - Returns: `true` when the SDK can process the return URL
@objc(handleOpenURLContext:)
@discardableResult public func handleOpenURL(context: UIOpenURLContext) -> Bool {
handleOpen(context.url)
}

/// Complete payment flow after returning from app or browser switch.
/// - Parameter url: The URL you receive in `scene:openURLContexts:` (or `application:openURL:options:` if not using SceneDelegate)
/// - Returns: `true` when the SDK has handled the URL successfully
@objc(handleOpenURL:)
@discardableResult public func handleOpen(_ url: URL) -> Bool {
for appContextSwitchClient in appContextSwitchClients where appContextSwitchClient.canHandleReturnURL(url) {
appContextSwitchClient.handleReturnURL(url)
Expand All @@ -38,7 +37,6 @@ import UIKit

/// Registers a class `Type` that can handle a return from app context switch with a static method.
/// - Parameter client: A class `Type` that implements `BTAppContextSwitchClient`, the methods of which will be invoked statically on the class.
@objc(registerAppContextSwitchClient:)
public func register(_ client: BTAppContextSwitchClient.Type) {
appContextSwitchClients.append(client)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/BraintreeCore/BTClientMetadataIntegration.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// :nodoc: This enum is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
/// Integration Types
@_documentation(visibility: private)
@objc public enum BTClientMetadataIntegration: Int {
public enum BTClientMetadataIntegration: Int {
/// Custom
case custom

Expand Down
2 changes: 1 addition & 1 deletion Sources/BraintreeCore/BTClientMetadataSource.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// :nodoc: This enum is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
/// Source of the metadata
@_documentation(visibility: private)
@objc public enum BTClientMetadataSource: Int {
public enum BTClientMetadataSource: Int {

/// Unknown source
case unknown
Expand Down
2 changes: 1 addition & 1 deletion Sources/BraintreeCore/BTCoreConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

/// :nodoc: This class is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
@_documentation(visibility: private)
@objcMembers public class BTCoreConstants: NSObject {
public class BTCoreConstants: NSObject {

/// :nodoc: This property is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
public static var braintreeSDKVersion: String = "6.27.0"
Expand Down
2 changes: 1 addition & 1 deletion Sources/BraintreeCore/BTJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import Foundation
/// json["quux"] = NSSet() // json.isError => true, json.asJSON => throws NSError(domain: BTJSONErrorDomain, code: BTJSONErrorInvalidData)
/// ```
@_documentation(visibility: private)
@objcMembers public class BTJSON: NSObject {
public class BTJSON: NSObject {

var value: Any? = [:] as [AnyHashable?: Any]

Expand Down
5 changes: 1 addition & 4 deletions Sources/BraintreeCore/BTPaymentMethodNonce.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation
/// The payment method nonce is a public token that acts as a placeholder for sensitive payments data that
/// has been uploaded to Braintree for subsequent processing. The nonce is safe to access on the client and can be
/// used on your server to reference the data in Braintree operations, such as Transaction.sale.
@objcMembers open class BTPaymentMethodNonce: NSObject {
open class BTPaymentMethodNonce: NSObject {

/// The payment method nonce.
public var nonce: String
Expand All @@ -23,7 +23,6 @@ import Foundation
/// Initialize a new Payment Method Nonce.
/// - Parameter nonce: A transact-able payment method nonce.
/// - Returns: A Payment Method Nonce, or `nil` if nonce is nil.
@objc(initWithNonce:)
public init(nonce: String) {
self.nonce = nonce
self.type = "Unknown"
Expand All @@ -35,7 +34,6 @@ import Foundation
/// - nonce: A transact-able payment method nonce.
/// - type: A string identifying the type of the payment method.
/// - Returns: A Payment Method Nonce, or `nil` if nonce is nil.
@objc(initWithNonce:type:)
public init(nonce: String, type: String) {
self.nonce = nonce
self.type = type
Expand All @@ -48,7 +46,6 @@ import Foundation
/// - type: A string identifying the type of the payment method.
/// - isDefault: A boolean indicating whether this is a default payment method.
/// - Returns: A Payment Method Nonce, or `nil` if nonce is nil.
@objc(initWithNonce:type:isDefault:)
public init(nonce: String, type: String, isDefault: Bool) {
self.nonce = nonce
self.type = type
Expand Down
2 changes: 1 addition & 1 deletion Sources/BraintreeCore/BTURLUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
/// :nodoc: This class is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
/// A helper class for converting URL queries to and from dictionaries
@_documentation(visibility: private)
@objc public class BTURLUtils: NSObject {
public class BTURLUtils: NSObject {

/// :nodoc: This method is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
/// Converts a key/value dictionary to a valid query string
Expand Down
3 changes: 1 addition & 2 deletions Sources/BraintreeCore/Configuration/BTConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
/// :nodoc: This class is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
/// Contains information specific to a merchant's Braintree integration
@_documentation(visibility: private)
@objcMembers public class BTConfiguration: NSObject {
public class BTConfiguration: NSObject {

/// :nodoc: This property is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
/// The merchant account's configuration as a `BTJSON` object
Expand Down Expand Up @@ -40,7 +40,6 @@ import Foundation
/// :nodoc: This initalizer is exposed for internal Braintree use only. Do not use. It is not covered by Semantic Versioning and may change or be removed at any time.
/// Used to initialize a `BTConfiguration`
/// - Parameter json: The `BTJSON` to initialize with
@objc(initWithJSON:)
public init(json: BTJSON?) {
self.json = json
}
Expand Down
Loading