Skip to content

Commit

Permalink
Adds Connections soft linking interface (#828)
Browse files Browse the repository at this point in the history
* Adds connections sdk soft linking

* Fix version

* iOS12 availablility

* Add unit test

* localized strings fixes
  • Loading branch information
vardges-stripe authored Mar 4, 2022
1 parent ebcf442 commit a8d4384
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 6 deletions.
14 changes: 13 additions & 1 deletion Stripe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@
36F9A11F25F6A3D600591514 /* STPPaymentHandlerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36F9A11E25F6A3D600591514 /* STPPaymentHandlerTests.swift */; };
36F9A12525F6F21C00591514 /* STPCardFormView+SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36F9A12425F6F21C00591514 /* STPCardFormView+SwiftUI.swift */; };
36FB69D725267E6200F129CE /* STPPaymentHandlerActionParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 317ABD4525117C9400CC59EF /* STPPaymentHandlerActionParams.swift */; };
3CD1D3A127C8682E001575BB /* ConnectionsSDKAvailability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CD1D3A027C8682D001575BB /* ConnectionsSDKAvailability.swift */; };
448895AF245255D800F7D0C2 /* STPPaymentMethodPrzelewy24ParamsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 448895AE245255D800F7D0C2 /* STPPaymentMethodPrzelewy24ParamsTests.m */; };
44BDCFDF245A46CC007EE6D5 /* STPPaymentMethodBancontactParamsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 44BDCFDE245A46CC007EE6D5 /* STPPaymentMethodBancontactParamsTests.m */; };
6151C237271F4FD600BB7032 /* STPPaymentMethodKlarna.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6151C236271F4FD600BB7032 /* STPPaymentMethodKlarna.swift */; };
Expand Down Expand Up @@ -1448,6 +1449,7 @@
36F6120D254C88C0006656BD /* SheetNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SheetNavigationBar.swift; path = Stripe/SheetNavigationBar.swift; sourceTree = SOURCE_ROOT; };
36F9A11E25F6A3D600591514 /* STPPaymentHandlerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = STPPaymentHandlerTests.swift; sourceTree = "<group>"; };
36F9A12425F6F21C00591514 /* STPCardFormView+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "STPCardFormView+SwiftUI.swift"; sourceTree = "<group>"; };
3CD1D3A027C8682D001575BB /* ConnectionsSDKAvailability.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionsSDKAvailability.swift; sourceTree = "<group>"; };
448895AE245255D800F7D0C2 /* STPPaymentMethodPrzelewy24ParamsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = STPPaymentMethodPrzelewy24ParamsTests.m; sourceTree = "<group>"; };
44BDCFDE245A46CC007EE6D5 /* STPPaymentMethodBancontactParamsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = STPPaymentMethodBancontactParamsTests.m; sourceTree = "<group>"; };
4A0D74F918F6106100966D7B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -2710,6 +2712,14 @@
name = Link;
sourceTree = "<group>";
};
3CD1D39927C83548001575BB /* SDKAvailability */ = {
isa = PBXGroup;
children = (
3CD1D3A027C8682D001575BB /* ConnectionsSDKAvailability.swift */,
);
name = SDKAvailability;
sourceTree = "<group>";
};
8BD2133A1F0458B7007F6FD1 /* Source */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -3368,6 +3378,7 @@
F1DEB8941E2066FB0066B8E8 /* Source */ = {
isa = PBXGroup;
children = (
3CD1D39927C83548001575BB /* SDKAvailability */,
3144E124253E7D2200FE2605 /* API Bindings */,
3144E136253E826D00FE2605 /* Categories */,
3144E137253E828700FE2605 /* Helpers */,
Expand Down Expand Up @@ -3503,7 +3514,7 @@
};
04CDB4411A5F2E1800B854EE = {
CreatedOnToolsVersion = 6.1.1;
LastSwiftMigration = 1250;
LastSwiftMigration = 1320;
};
363BD03E27344436003F9FE4 = {
CreatedOnToolsVersion = 12.5;
Expand Down Expand Up @@ -4197,6 +4208,7 @@
31319EE125B11C8A00C89E30 /* PaymentSheet+SwiftUI.swift in Sources */,
B6E40EAA254253E400A5BABD /* PanModalPresentationController.swift in Sources */,
B672437925251CFA002E1AAF /* STPCard.swift in Sources */,
3CD1D3A127C8682E001575BB /* ConnectionsSDKAvailability.swift in Sources */,
B645199A2513EA3E006BF25E /* STPPaymentMethodCardParams.swift in Sources */,
3176C261251A8FDF00300ADE /* STPPushProvisioningDetailsParams.swift in Sources */,
36DFC222251BE3C2003AC264 /* STPConnectAccountAddress.swift in Sources */,
Expand Down
21 changes: 21 additions & 0 deletions Stripe/ConnectionsSDKAvailability.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// ConnectionsSDKAvailability.swift
// StripeiOS
//
// Created by Vardges Avetisyan on 2/24/22.
// Copyright © 2022 Stripe, Inc. All rights reserved.
//

import Foundation
@_spi(STP) import StripeCore

@available(iOS 12, *)
struct ConnectionsSDKAvailability {
static func connections() -> ConnectionsSDKInterface? {
guard let klass = NSClassFromString("StripeConnections.ConnectionsSDKImplementation") as? ConnectionsSDKInterface.Type else {
return nil
}

return klass.init()
}
}
2 changes: 1 addition & 1 deletion StripeConnections.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pod::Spec.new do |s|

# Do not update s.version directly.
# Instead, update the VERSION file and run ./ci_scripts/update_version.sh
s.version = '21.11.1'
s.version = '21.12.0'

s.summary = 'Securely connect financial accounts to Stripe\'s merchant account.'
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
16 changes: 16 additions & 0 deletions StripeConnections/StripeConnections.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
3C32286A279A009C00A3D4D4 /* LinkAccountSessionFetcherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C322869279A009C00A3D4D4 /* LinkAccountSessionFetcherTests.swift */; };
3C34E0E92798EB33002618E4 /* LinkAccountSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C34E0E82798EB33002618E4 /* LinkAccountSession.swift */; };
3C34E0EB2799C3FF002618E4 /* LinkedAccountSessionFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C34E0EA2799C3FF002618E4 /* LinkedAccountSessionFetcher.swift */; };
3C34F0C527D25F35003ADCBA /* SoftLinkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C34F0C427D25F35003ADCBA /* SoftLinkTests.swift */; };
3C37D6D4274C0DCA0041F1BE /* StripeUICore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C37D6D3274C0DCA0041F1BE /* StripeUICore.framework */; };
3C4D2010273AED0900BC6444 /* StripeConnections.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C4D2006273AED0800BC6444 /* StripeConnections.framework */; };
3C4D2015273AED0900BC6444 /* ConnectionsSheetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4D2014273AED0900BC6444 /* ConnectionsSheetTests.swift */; };
Expand Down Expand Up @@ -43,6 +44,7 @@
3CC4218B274C402600BBEDF4 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CC4218A274C402600BBEDF4 /* Image.swift */; };
3CC42197274C457A00BBEDF4 /* close@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3CC42195274C457A00BBEDF4 /* close@3x.png */; };
3CC42198274C457A00BBEDF4 /* back_arrow@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3CC42196274C457A00BBEDF4 /* back_arrow@3x.png */; };
3CD1D39827C82DC6001575BB /* ConnectionsSDKImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CD1D39727C82DC6001575BB /* ConnectionsSDKImplementation.swift */; };
3CE96D3427585BC6006B7059 /* ConnectionsAPIClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE96D3327585BC6006B7059 /* ConnectionsAPIClient.swift */; };
3CE96D3627585F01006B7059 /* LinkAccountSessionManifest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE96D3527585F01006B7059 /* LinkAccountSessionManifest.swift */; };
3CE96D3A27586387006B7059 /* LinkAccountSessionsGenerateHostedUrlBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE96D3927586387006B7059 /* LinkAccountSessionsGenerateHostedUrlBody.swift */; };
Expand All @@ -67,6 +69,7 @@
3C322869279A009C00A3D4D4 /* LinkAccountSessionFetcherTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkAccountSessionFetcherTests.swift; sourceTree = "<group>"; };
3C34E0E82798EB33002618E4 /* LinkAccountSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkAccountSession.swift; sourceTree = "<group>"; };
3C34E0EA2799C3FF002618E4 /* LinkedAccountSessionFetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkedAccountSessionFetcher.swift; sourceTree = "<group>"; };
3C34F0C427D25F35003ADCBA /* SoftLinkTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SoftLinkTests.swift; sourceTree = "<group>"; };
3C37D6D3274C0DCA0041F1BE /* StripeUICore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = StripeUICore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3C4D2006273AED0800BC6444 /* StripeConnections.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = StripeConnections.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3C4D2009273AED0800BC6444 /* StripeConnections.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StripeConnections.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -141,6 +144,7 @@
3CC4218A274C402600BBEDF4 /* Image.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Image.swift; sourceTree = "<group>"; };
3CC42195274C457A00BBEDF4 /* close@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "close@3x.png"; sourceTree = "<group>"; };
3CC42196274C457A00BBEDF4 /* back_arrow@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "back_arrow@3x.png"; sourceTree = "<group>"; };
3CD1D39727C82DC6001575BB /* ConnectionsSDKImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionsSDKImplementation.swift; sourceTree = "<group>"; };
3CE96D3327585BC6006B7059 /* ConnectionsAPIClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionsAPIClient.swift; sourceTree = "<group>"; };
3CE96D3527585F01006B7059 /* LinkAccountSessionManifest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinkAccountSessionManifest.swift; sourceTree = "<group>"; };
3CE96D3927586387006B7059 /* LinkAccountSessionsGenerateHostedUrlBody.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LinkAccountSessionsGenerateHostedUrlBody.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -203,6 +207,7 @@
3C4D2013273AED0900BC6444 /* StripeConnectionsTests */ = {
isa = PBXGroup;
children = (
3C34F0C427D25F35003ADCBA /* SoftLinkTests.swift */,
3C4D2014273AED0900BC6444 /* ConnectionsSheetTests.swift */,
3C4D2016273AED0900BC6444 /* Info.plist */,
3C19E0F12762E65400F3C4ED /* ConnectionsAnalyticsTest.swift */,
Expand Down Expand Up @@ -233,6 +238,7 @@
3C4D2043273AF44D00BC6444 /* Source */ = {
isa = PBXGroup;
children = (
3CD1D39627C82D8B001575BB /* ConnectionsSDK */,
3C9F0BD7276293C100E1FDFA /* Analytics */,
3C82F4A9275A8162008A7162 /* Host */,
3C5430C627457C0300B1E488 /* API Bindings */,
Expand Down Expand Up @@ -332,6 +338,14 @@
path = Images;
sourceTree = "<group>";
};
3CD1D39627C82D8B001575BB /* ConnectionsSDK */ = {
isa = PBXGroup;
children = (
3CD1D39727C82DC6001575BB /* ConnectionsSDKImplementation.swift */,
);
path = ConnectionsSDK;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -498,6 +512,7 @@
3C9F0BD9276293D300E1FDFA /* ConnectionsSheetAnalytics.swift in Sources */,
3C5430CF27457C8600B1E488 /* LinkedAccount.swift in Sources */,
3C5B2CD3273DB3B9005C5A05 /* STPLocalizedString.swift in Sources */,
3CD1D39827C82DC6001575BB /* ConnectionsSDKImplementation.swift in Sources */,
3C34E0EB2799C3FF002618E4 /* LinkedAccountSessionFetcher.swift in Sources */,
3C4D207B273C626A00BC6444 /* ConnectionsSheet.swift in Sources */,
3C5B2CD0273DB32F005C5A05 /* StripeConnectionsBundleLocator.swift in Sources */,
Expand All @@ -520,6 +535,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3C34F0C527D25F35003ADCBA /* SoftLinkTests.swift in Sources */,
3C4D9E89277E3D9E007C741B /* LinkedAccountFetcherTests.swift in Sources */,
3C19E0F22762E65400F3C4ED /* ConnectionsAnalyticsTest.swift in Sources */,
3C32286A279A009C00A3D4D4 /* LinkAccountSessionFetcherTests.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// ConnectionsSDKImplementation.swift
// StripeConnections
//
// Created by Vardges Avetisyan on 2/24/22.
//

import UIKit
@_spi(STP) import StripeCore

/**
NOTE: If you change the name of this class, make sure to also change it ConnectionsSDKAvailability file
*/
@available(iOS 12, *)
@_spi(STP) public class ConnectionsSDKImplementation: ConnectionsSDKInterface {

required public init() {}

public func presentConnectionsSheet(clientSecret: String,
from presentingViewController: UIViewController,
completion: @escaping (ConnectionsSDKResult) -> ()) {
let connectionsSheet = ConnectionsSheet(linkAccountSessionClientSecret: clientSecret)
connectionsSheet.present(
from: presentingViewController,
completion: { result in
switch result {
case .completed(session: _):
completion(.completed)
case .canceled:
completion(.cancelled)
case .failed(let error):
completion(.failed(error: error))
}
})
}

}
17 changes: 17 additions & 0 deletions StripeConnections/StripeConnectionsTests/SoftLinkTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// SoftLinkTests.swift
// StripeConnectionsTests
//
// Created by Vardges Avetisyan on 3/4/22.
//

import Foundation
@_spi(STP) import StripeCore
import XCTest

class SoftLinkTest: XCTestCase {
func testLoadingImplementationClass() {
let klass = NSClassFromString("StripeConnections.ConnectionsSDKImplementation") as? ConnectionsSDKInterface.Type
XCTAssertNotNil(klass)
}
}
18 changes: 17 additions & 1 deletion StripeCore/StripeCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
31E6D9642744451B00A89B6D /* NSCharacterSet+StripeCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31E6D9632744451B00A89B6D /* NSCharacterSet+StripeCore.swift */; };
31FDFF3226C5E37100E4B743 /* NSError+Stripe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31FDFF3126C5E37100E4B743 /* NSError+Stripe.swift */; };
363B92662743211C00BA52EC /* Enums+CustomStringConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 363B92652743211C00BA52EC /* Enums+CustomStringConvertible.swift */; };
3CD1D3A927C87191001575BB /* ConnectionsSDKInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CD1D3A827C87191001575BB /* ConnectionsSDKInterface.swift */; };
6142353626E12272004E4B37 /* AnalyticLoggableError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6142353526E12272004E4B37 /* AnalyticLoggableError.swift */; };
619E233526E9419700E06F1C /* NSError_AnalyticLoggableErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 619E233426E9419700E06F1C /* NSError_AnalyticLoggableErrorTest.swift */; };
61DF180C2707822300E5ED13 /* PluginDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61DF180B2707822300E5ED13 /* PluginDetector.swift */; };
Expand Down Expand Up @@ -148,6 +149,7 @@
36F4BC9526C1BD8F001518CD /* tk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tk; path = tk.lproj/Localizable.strings; sourceTree = "<group>"; };
36F4BC9D26C1BDE8001518CD /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/Localizable.strings; sourceTree = "<group>"; };
36F4BCA526C1BE8E001518CD /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Localizable.strings; sourceTree = "<group>"; };
3CD1D3A827C87191001575BB /* ConnectionsSDKInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionsSDKInterface.swift; sourceTree = "<group>"; };
6142353526E12272004E4B37 /* AnalyticLoggableError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticLoggableError.swift; sourceTree = "<group>"; };
619E233426E9419700E06F1C /* NSError_AnalyticLoggableErrorTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSError_AnalyticLoggableErrorTest.swift; sourceTree = "<group>"; };
61DF180B2707822300E5ED13 /* PluginDetector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginDetector.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -272,6 +274,14 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
3CD1D39127C82C18001575BB /* Connections Bindings */ = {
isa = PBXGroup;
children = (
3CD1D3A827C87191001575BB /* ConnectionsSDKInterface.swift */,
);
path = "Connections Bindings";
sourceTree = "<group>";
};
E614AC95268BE14B00C59B3D /* API Bindings */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -498,6 +508,7 @@
E6B0F53126866DDD00055EAF /* Source */ = {
isa = PBXGroup;
children = (
3CD1D39127C82C18001575BB /* Connections Bindings */,
E6AF1ED5269FD83E0091BE99 /* UI */,
E614AC97268BE14B00C59B3D /* Analytics */,
E614AC95268BE14B00C59B3D /* API Bindings */,
Expand Down Expand Up @@ -649,7 +660,7 @@
TargetAttributes = {
E69D63FA26855B250090B43D = {
CreatedOnToolsVersion = 12.5;
LastSwiftMigration = 1250;
LastSwiftMigration = 1320;
};
E69D640326855B260090B43D = {
CreatedOnToolsVersion = 12.5;
Expand Down Expand Up @@ -792,6 +803,7 @@
31A5269226C46D9600F8AB59 /* STPAppInfo.swift in Sources */,
E614ACA0268BE14B00C59B3D /* StripeAPIConfiguration.swift in Sources */,
363B92662743211C00BA52EC /* Enums+CustomStringConvertible.swift in Sources */,
3CD1D3A927C87191001575BB /* ConnectionsSDKInterface.swift in Sources */,
E61ADACB270E6146004ED998 /* NSArray+Stripe.swift in Sources */,
E65C44C0273B9DB500F753BC /* STPMultipartFormDataEncoder.swift in Sources */,
315BDBDF2788E2B4007BD11F /* STPDispatchFunctions.swift in Sources */,
Expand Down Expand Up @@ -949,7 +961,9 @@
isa = XCBuildConfiguration;
baseConfigurationReference = E69D641726855B9B0090B43D /* StripeiOS-Debug.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = StripeCore/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -968,7 +982,9 @@
isa = XCBuildConfiguration;
baseConfigurationReference = E69D641F26855B9B0090B43D /* StripeiOS-Release.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = StripeCore/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// ConnectionsSDKInterface.swift
// StripeCore
//
// Created by Vardges Avetisyan on 2/24/22.
//

import UIKit

@_spi(STP) public enum ConnectionsSDKResult {
case completed
case cancelled
case failed(error: Error)
}

@_spi(STP) public protocol ConnectionsSDKInterface {
init()
func presentConnectionsSheet(clientSecret: String,
from presentingViewController: UIViewController,
completion: @escaping (ConnectionsSDKResult) -> ())
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@
/* Button to attempt to re-scan identity document image */
"Try Again" = "Try Again";

/* Button to reload web view if we were unable to connect. */
"Try again" = "Try again";

/* Error message that displays when we're unable to connect to the server. */
"Unable to establish a connection." = "Unable to establish a connection.";

Expand Down

0 comments on commit a8d4384

Please sign in to comment.