Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Buy/Generated/Storefront.Schema.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@

extension Storefront {
enum Schema {
static let version = "2026-01"
static let version = "2026-04"
}
}
3 changes: 3 additions & 0 deletions Buy/Generated/Storefront/CartErrorCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ extension Storefront {
/// The quantity must be below the specified maximum for the item.
case maximumExceeded = "MAXIMUM_EXCEEDED"

/// An error occurred while processing cart transformations.
case merchandiseLineTransformersRunError = "MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"

/// Item cannot be purchased as configured.
case merchandiseNotApplicable = "MERCHANDISE_NOT_APPLICABLE"

Expand Down
96 changes: 96 additions & 0 deletions Buy/Generated/Storefront/Shop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ extension Storefront {
return self
}

/// The shop's contact information.
@discardableResult
open func contactInformation(alias: String? = nil, _ subfields: (ShopPolicyQuery) -> Void) -> ShopQuery {
let subquery = ShopPolicyQuery()
subfields(subquery)

addField(field: "contactInformation", aliasSuffix: alias, subfields: subquery)
return self
}

/// Translations for customer accounts.
@discardableResult
open func customerAccountTranslations(alias: String? = nil, _ subfields: (TranslationQuery) -> Void) -> ShopQuery {
Expand Down Expand Up @@ -90,6 +100,16 @@ extension Storefront {
return self
}

/// The shop's legal notice.
@discardableResult
open func legalNotice(alias: String? = nil, _ subfields: (ShopPolicyQuery) -> Void) -> ShopQuery {
let subquery = ShopPolicyQuery()
subfields(subquery)

addField(field: "legalNotice", aliasSuffix: alias, subfields: subquery)
return self
}

/// A [custom field](https://shopify.dev/docs/apps/build/custom-data),
/// including its `namespace` and `key`, that's associated with a Shopify
/// resource for the purposes of adding and storing additional information.
Expand Down Expand Up @@ -242,6 +262,16 @@ extension Storefront {
return self
}

/// The shop's terms of sale.
@discardableResult
open func termsOfSale(alias: String? = nil, _ subfields: (ShopPolicyQuery) -> Void) -> ShopQuery {
let subquery = ShopPolicyQuery()
subfields(subquery)

addField(field: "termsOfSale", aliasSuffix: alias, subfields: subquery)
return self
}

/// The shop’s terms of service.
@discardableResult
open func termsOfService(alias: String? = nil, _ subfields: (ShopPolicyQuery) -> Void) -> ShopQuery {
Expand Down Expand Up @@ -284,6 +314,13 @@ extension Storefront {
}
return try Brand(fields: value)

case "contactInformation":
if value is NSNull { return nil }
guard let value = value as? [String: Any] else {
throw SchemaViolationError(type: Shop.self, field: fieldName, value: fieldValue)
}
return try ShopPolicy(fields: value)

case "customerAccountTranslations":
if value is NSNull { return nil }
guard let value = value as? [[String: Any]] else {
Expand Down Expand Up @@ -311,6 +348,13 @@ extension Storefront {
}
return GraphQL.ID(rawValue: value)

case "legalNotice":
if value is NSNull { return nil }
guard let value = value as? [String: Any] else {
throw SchemaViolationError(type: Shop.self, field: fieldName, value: fieldValue)
}
return try ShopPolicy(fields: value)

case "metafield":
if value is NSNull { return nil }
guard let value = value as? [String: Any] else {
Expand Down Expand Up @@ -399,6 +443,13 @@ extension Storefront {
}
return try ShopPolicyWithDefault(fields: value)

case "termsOfSale":
if value is NSNull { return nil }
guard let value = value as? [String: Any] else {
throw SchemaViolationError(type: Shop.self, field: fieldName, value: fieldValue)
}
return try ShopPolicy(fields: value)

case "termsOfService":
if value is NSNull { return nil }
guard let value = value as? [String: Any] else {
Expand All @@ -420,6 +471,15 @@ extension Storefront {
return field(field: "brand", aliasSuffix: alias) as! Storefront.Brand?
}

/// The shop's contact information.
open var contactInformation: Storefront.ShopPolicy? {
return internalGetContactInformation()
}

func internalGetContactInformation(alias: String? = nil) -> Storefront.ShopPolicy? {
return field(field: "contactInformation", aliasSuffix: alias) as! Storefront.ShopPolicy?
}

/// Translations for customer accounts.
open var customerAccountTranslations: [Storefront.Translation]? {
return internalGetCustomerAccountTranslations()
Expand Down Expand Up @@ -457,6 +517,15 @@ extension Storefront {
return field(field: "id", aliasSuffix: alias) as! GraphQL.ID
}

/// The shop's legal notice.
open var legalNotice: Storefront.ShopPolicy? {
return internalGetLegalNotice()
}

func internalGetLegalNotice(alias: String? = nil) -> Storefront.ShopPolicy? {
return field(field: "legalNotice", aliasSuffix: alias) as! Storefront.ShopPolicy?
}

/// A [custom field](https://shopify.dev/docs/apps/build/custom-data),
/// including its `namespace` and `key`, that's associated with a Shopify
/// resource for the purposes of adding and storing additional information.
Expand Down Expand Up @@ -586,6 +655,15 @@ extension Storefront {
return field(field: "subscriptionPolicy", aliasSuffix: alias) as! Storefront.ShopPolicyWithDefault?
}

/// The shop's terms of sale.
open var termsOfSale: Storefront.ShopPolicy? {
return internalGetTermsOfSale()
}

func internalGetTermsOfSale(alias: String? = nil) -> Storefront.ShopPolicy? {
return field(field: "termsOfSale", aliasSuffix: alias) as! Storefront.ShopPolicy?
}

/// The shop’s terms of service.
open var termsOfService: Storefront.ShopPolicy? {
return internalGetTermsOfService()
Expand All @@ -605,6 +683,12 @@ extension Storefront {
response.append(contentsOf: value.childResponseObjectMap())
}

case "contactInformation":
if let value = internalGetContactInformation() {
response.append(value)
response.append(contentsOf: value.childResponseObjectMap())
}

case "customerAccountTranslations":
if let value = internalGetCustomerAccountTranslations() {
value.forEach {
Expand All @@ -613,6 +697,12 @@ extension Storefront {
}
}

case "legalNotice":
if let value = internalGetLegalNotice() {
response.append(value)
response.append(contentsOf: value.childResponseObjectMap())
}

case "metafield":
if let value = internalGetMetafield() {
response.append(value)
Expand Down Expand Up @@ -671,6 +761,12 @@ extension Storefront {
response.append(contentsOf: value.childResponseObjectMap())
}

case "termsOfSale":
if let value = internalGetTermsOfSale() {
response.append(value)
response.append(contentsOf: value.childResponseObjectMap())
}

case "termsOfService":
if let value = internalGetTermsOfService() {
response.append(value)
Expand Down
2 changes: 1 addition & 1 deletion Buy/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2026.1.0</string>
<string>2026.4.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion Buy/Utilities/SDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
import Foundation

internal enum SDK {
static let version = "2026.1.0"
static let version = "2026.4.0"
}
2 changes: 1 addition & 1 deletion BuyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2026.1.0</string>
<string>2026.4.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Mobile-Buy-SDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'Mobile-Buy-SDK'
s.version = '2026.1.0'
s.version = '2026.4.0'
s.summary = 'Create custom Shopify storefront on iOS.'
s.description = 'Shopify’s Mobile Buy SDK makes it simple to create custom storefronts in your mobile app. Utitlizing the power and flexibility of GraphQL you can build native storefront experiences using the Shopify platform.'
s.homepage = 'https://github.com/Shopify/mobile-buy-sdk-ios'
Expand Down
Loading