Skip to content

Commit bd4b798

Browse files
authored
Rename ShopifyCheckoutProtocol to EmbeddedCheckoutProtocol (#354)
* Rename ShopifyCheckoutProtocol to EmbeddedCheckoutProtocol * Dump swift API
1 parent 87bbef5 commit bd4b798

53 files changed

Lines changed: 11096 additions & 11096 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ cd platforms/swift && ./Scripts/lint fix
100100

101101
### Public API surface
102102

103-
The library's public API is tracked via committed baselines under `platforms/swift/api/`, one JSON file per module (`ShopifyCheckoutProtocol.json`, `ShopifyCheckoutKit.json`, `ShopifyAcceleratedCheckouts.json`). They are produced by `xcrun swift-api-digester -dump-sdk` against the built `.swiftmodule` files. The unified `Breaking Changes` CI workflow runs `dev swift api check` on every PR that touches Swift sources and fails if the digester output for any module diverges from its committed baseline.
103+
The library's public API is tracked via committed baselines under `platforms/swift/api/`, one JSON file per module (`EmbeddedCheckoutProtocol.json`, `ShopifyCheckoutKit.json`, `ShopifyAcceleratedCheckouts.json`). They are produced by `xcrun swift-api-digester -dump-sdk` against the built `.swiftmodule` files. The unified `Breaking Changes` CI workflow runs `dev swift api check` on every PR that touches Swift sources and fails if the digester output for any module diverges from its committed baseline.
104104

105105
If your change intentionally modifies the public API:
106106

.swiftlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ included:
1515
excluded:
1616
- platforms/swift/Samples
1717
- platforms/swift/Sources/ShopifyCheckoutKit/Models.swift
18-
- protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated
18+
- protocol/languages/swift/Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol/Generated
1919

2020
opt_in_rules:
2121
- array_init

Package.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ let package = Package(
1919
targets: ["ShopifyAcceleratedCheckouts"]
2020
),
2121
.library(
22-
name: "ShopifyCheckoutProtocol",
23-
targets: ["ShopifyCheckoutProtocol"]
22+
name: "EmbeddedCheckoutProtocol",
23+
targets: ["EmbeddedCheckoutProtocol"]
2424
)
2525
],
2626
dependencies: [
@@ -32,12 +32,12 @@ let package = Package(
3232
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
3333
// Targets can depend on other targets in this package, and on products in packages this package depends on.
3434
.target(
35-
name: "ShopifyCheckoutProtocol",
36-
path: "protocol/languages/swift/Sources/ShopifyCheckoutProtocol"
35+
name: "EmbeddedCheckoutProtocol",
36+
path: "protocol/languages/swift/Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol"
3737
),
3838
.target(
3939
name: "ShopifyCheckoutKit",
40-
dependencies: ["ShopifyCheckoutProtocol"],
40+
dependencies: ["EmbeddedCheckoutProtocol"],
4141
path: "platforms/swift/Sources/ShopifyCheckoutKit",
4242
resources: [.process("Assets.xcassets")]
4343
),
@@ -48,9 +48,9 @@ let package = Package(
4848
resources: [.process("Localizable.xcstrings"), .process("Media.xcassets")]
4949
),
5050
.testTarget(
51-
name: "ShopifyCheckoutProtocolTests",
52-
dependencies: ["ShopifyCheckoutProtocol"],
53-
path: "protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests",
51+
name: "EmbeddedCheckoutProtocolTests",
52+
dependencies: ["EmbeddedCheckoutProtocol"],
53+
path: "protocol/languages/swift/Tests/EmbeddedCheckoutProtocolTests",
5454
resources: [.copy("Fixtures")]
5555
),
5656
.testTarget(

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This repository contains the Checkout Kit implementations, samples, and protocol
3232
| `com.shopify:checkout-kit` | `4.0.0-alpha.1` | Maven Central | Alpha | Android checkout dialog SDK. | [Android](platforms/android/README.md) |
3333
| `@shopify/checkout-kit-react-native` | `4.0.0-alpha.2` | npm `next` dist-tag | Alpha | React Native wrapper for the iOS and Android native SDKs. | [React Native](platforms/react-native/README.md) |
3434
| `@shopify/checkout-kit` | `4.0.0-alpha.2` | npm `next` dist-tag | Alpha | Web component for opening Shopify checkout from a web page. | [Web](platforms/web/README.md) |
35-
| `ShopifyCheckoutProtocol` | Source package | Swift Package Manager | Internal/supporting | Swift client for Embedded Checkout Protocol messages. | [Protocol Swift](protocol/languages/swift/README.md) |
35+
| `EmbeddedCheckoutProtocol` | Source package | Swift Package Manager | Internal/supporting | Swift client for Embedded Checkout Protocol messages. | [Protocol Swift](protocol/languages/swift/README.md) |
3636

3737
Swift, Android, and React Native rows show the planned first Checkout Kit alpha releases. Web is already published as `4.0.0-alpha.2`.
3838

ShopifyCheckoutKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Pod::Spec.new do |s|
2727
s.subspec 'Core' do |core|
2828
core.source_files = [
2929
'platforms/swift/Sources/ShopifyCheckoutKit/**/*.swift',
30-
'protocol/languages/swift/Sources/ShopifyCheckoutProtocol/**/*.swift',
30+
'protocol/languages/swift/Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol/**/*.swift',
3131
]
3232
core.resource_bundles = {
3333
'ShopifyCheckoutKit' => ['platforms/swift/Sources/ShopifyCheckoutKit/Assets.xcassets']

dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ commands:
348348
cd platforms/swift
349349
# ShopifyCheckoutKit-Package is the SPM-wide scheme: it cleans all
350350
# library targets in Package.swift (ShopifyCheckoutKit,
351-
# ShopifyAcceleratedCheckouts, ShopifyCheckoutProtocol) in one pass.
351+
# ShopifyAcceleratedCheckouts, EmbeddedCheckoutProtocol) in one pass.
352352
./Scripts/xcode_run clean ShopifyCheckoutKit-Package
353353
cd Samples
354354
# Sample apps have a "Run Script" build phase that runs during clean

platforms/swift/.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
--swiftversion 5.7.1
1111
--extensionacl on-declarations
1212
--exclude Sources/ShopifyCheckoutKit/Models.swift
13-
--exclude Sources/ShopifyCheckoutProtocol/Generated
13+
--exclude Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol/Generated
1414
--exclude Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Generated
1515
--exclude Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated

platforms/swift/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Then add the products you need to your app target:
7171
name: "YourApp",
7272
dependencies: [
7373
"ShopifyCheckoutKit",
74-
"ShopifyCheckoutProtocol",
74+
"EmbeddedCheckoutProtocol",
7575
"ShopifyAcceleratedCheckouts" // Only needed for accelerated checkout buttons.
7676
]
7777
)
@@ -237,11 +237,11 @@ let configuration = ShopifyCheckoutKit.configuration
237237
- `checkoutDidCancel()` fires when the buyer closes the checkout sheet.
238238
- `checkoutDidFail(error:)` fires when checkout cannot continue.
239239

240-
Typed checkout state, including completion, flows through `ShopifyCheckoutProtocol`.
240+
Typed checkout state, including completion, flows through `EmbeddedCheckoutProtocol`.
241241

242242
```swift
243243
import ShopifyCheckoutKit
244-
import ShopifyCheckoutProtocol
244+
import EmbeddedCheckoutProtocol
245245

246246
let client = CheckoutProtocol.Client()
247247
.on(CheckoutProtocol.start) { checkout in

platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/CheckoutCoordinator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import EmbeddedCheckoutProtocol
12
import OSLog
23
import ShopifyCheckoutKit
3-
import ShopifyCheckoutProtocol
44
import UIKit
55

66
class CheckoutCoordinator: UIViewController {

platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/CheckoutProtocolClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import EmbeddedCheckoutProtocol
12
import SafariServices
23
import ShopifyCheckoutKit
3-
import ShopifyCheckoutProtocol
44
import UIKit
55

66
extension CheckoutProtocol.Client {

0 commit comments

Comments
 (0)