Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
2147F3E42B502AA9005546F3 /* ShopifyCheckoutSheetKit in Frameworks */ = {isa = PBXBuildFile; productRef = 2147F3E32B502AA9005546F3 /* ShopifyCheckoutSheetKit */; };
2147F3E62B502AFD005546F3 /* checkout-sheet-kit-swift in Resources */ = {isa = PBXBuildFile; fileRef = 2147F3E52B502AFD005546F3 /* checkout-sheet-kit-swift */; };
273247322E1BEC9000A9B14E /* ChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 273247312E1BEC9000A9B14E /* ChatView.swift */; };
4EA7F9B62A9D2B9D003276A1 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EA7F9B42A9D2B9D003276A1 /* SettingsView.swift */; };
4EBBA76B2A5F0CE200193E19 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EBBA76A2A5F0CE200193E19 /* AppDelegate.swift */; };
4EBBA76D2A5F0CE200193E19 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EBBA76C2A5F0CE200193E19 /* SceneDelegate.swift */; };
Expand Down Expand Up @@ -42,6 +43,7 @@

/* Begin PBXFileReference section */
2147F3E52B502AFD005546F3 /* checkout-sheet-kit-swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "checkout-sheet-kit-swift"; path = ../..; sourceTree = "<group>"; };
273247312E1BEC9000A9B14E /* ChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatView.swift; sourceTree = "<group>"; };
4EA7F9B42A9D2B9D003276A1 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
4EBBA7672A5F0CE200193E19 /* MobileBuyIntegration.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MobileBuyIntegration.app; sourceTree = BUILT_PRODUCTS_DIR; };
4EBBA76A2A5F0CE200193E19 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -195,6 +197,7 @@
CB05E6C72D4B81B200466376 /* Views */ = {
isa = PBXGroup;
children = (
273247312E1BEC9000A9B14E /* ChatView.swift */,
6A2E77BF2CE6186F0067062D /* CartView.swift */,
6A2E77BD2CE606400067062D /* ProductGridView.swift */,
6A3467322B600E64007314A8 /* LogsView.swift */,
Expand Down Expand Up @@ -354,6 +357,7 @@
CB05E6BD2D493B8F00466376 /* ApplePayHandler.swift in Sources */,
4EBBA76D2A5F0CE200193E19 /* SceneDelegate.swift in Sources */,
CB05E6C12D4954A600466376 /* PaymentCodable.swift in Sources */,
273247322E1BEC9000A9B14E /* ChatView.swift in Sources */,
6A2E77C02CE618720067062D /* CartView.swift in Sources */,
6A3393652CEF9E8100E89FAA /* Theme.swift in Sources */,
6A774DD12B58023400C8EF7E /* CountryCode+inferRegion.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_: UIApplication, willFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
ShopifyCheckoutSheetKit.configure {
/// Checkout color scheme setting
$0.colorScheme = .web
$0.colorScheme = .automatic

/// Customize progress bar color
$0.tintColor = ColorPalette.primaryColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CartManager: ObservableObject {
) {
$0.cartLinesAdd(cartId: cartId, lines: lines) {
$0.cart { $0.cartManagerFragment() }
.userErrors { $0.code().message() }
.userErrors { $0.code().message() }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
},
"✓" : {

},
"🛍️ Complete Your Purchase" : {

},
"Add to Cart" : {

Expand All @@ -24,9 +27,18 @@
},
"By default, the app will only handle the selections above and route everything else to Safari. Enabling the \"Handle all Universal Links\" setting will route all Universal Links to this app." : {

},
"Chat Support" : {

},
"Checkout" : {

},
"Checkout Complete" : {

},
"Checkout Error" : {

},
"Checkout Sheet Kit version" : {

Expand Down Expand Up @@ -54,6 +66,9 @@
},
"Handle Product URLs" : {

},
"Loading checkout..." : {

},
"Loading products..." : {

Expand Down Expand Up @@ -108,6 +123,9 @@
},
"Theme" : {

},
"Type a message..." : {

},
"Universal Links" : {

Expand All @@ -117,6 +135,9 @@
},
"Web pixel events" : {

},
"You can complete your checkout right here:" : {

},
"Your cart is empty." : {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum Screen: Int, CaseIterable {
case catalog
case products
case cart
case chat
case settings
}

Expand All @@ -41,7 +42,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
let cartController = UIHostingController(rootView: CartView())
let productGridController = UIHostingController(rootView: ProductGridView())
let productGalleryController = UIHostingController(rootView: ProductGalleryView())
let settingsController = UIHostingController(rootView: SettingsView())
let chatController = UIHostingController(rootView: ChatView())
let settingsController = UIHostingController(rootView: AnyView(SettingsView().environmentObject(CartManager.shared)))

func scene(_ scene: UIScene, willConnectTo _: UISceneSession, options _: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
Expand All @@ -63,6 +65,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
/// Cart screen
viewControllers[Screen.cart.rawValue] = UINavigationController(rootViewController: cartController)

/// Chat screen
viewControllers[Screen.chat.rawValue] = UINavigationController(rootViewController: chatController)

/// Settings screen
viewControllers[Screen.settings.rawValue] = UINavigationController(rootViewController: settingsController)

Expand Down Expand Up @@ -108,6 +113,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
cartController.tabBarItem.title = "Cart"
cartController.navigationItem.title = "Cart"

/// Chat
chatController.tabBarItem.image = UIImage(systemName: "message.circle")
chatController.tabBarItem.title = "Chat"
chatController.navigationItem.title = "Chat Support"

/// Settings
settingsController.tabBarItem.image = UIImage(systemName: "gearshape.2")
settingsController.tabBarItem.title = "Settings"
Expand Down
Loading
Loading