Skip to content

Commit b2fd251

Browse files
committed
MOBILE-130: Move operationsDomain next to domain in MBConfiguration init
The new parameter now sits right after `domain` instead of at the end — they're conceptually paired (main host vs its anonymizer override). Source-compatible: callers that don't pass `operationsDomain` are unaffected; the few that do (tests, ios-app) already listed it adjacent to `domain` and only need a follow-up reorder of their own.
1 parent 9322ec9 commit b2fd251

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Mindbox/MBConfiguration.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,25 @@ public struct MBConfiguration: Codable {
2727
///
2828
/// - Parameter endpoint: Used for app identification
2929
/// - Parameter domain: Used for generating baseurl for REST
30+
/// - Parameter operationsDomain: Optional host for sending operations. Overridden by
31+
/// the value from the mobile JSON config when present. Default `nil` (use `domain`).
3032
/// - Parameter previousInstallationId: Used to create tracking continuity by uuid
3133
/// - Parameter previousDeviceUUID: Used instead of the generated value
3234
/// - Parameter subscribeCustomerIfCreated: Flag which determines subscription status of the user. Default value is `false`.
3335
/// - Parameter shouldCreateCustomer: Flag which determines create or not anonymous users. Usable only during first initialisation. Default value is `true`.
3436
/// - Parameter uuidDebugEnabled: Flag which determines if uuid debugging functionality is enabled. Default value is `true`.
35-
/// - Parameter operationsDomain: Optional host for sending operations. Overridden by
36-
/// the value from the mobile JSON config when present. Default `nil` (use `domain`).
3737
///
3838
/// - Throws:`MindboxError.internalError` for invalid initialization parameters
3939
public init(
4040
endpoint: String,
4141
domain: String,
42+
operationsDomain: String? = nil,
4243
previousInstallationId: String? = nil,
4344
previousDeviceUUID: String? = nil,
4445
subscribeCustomerIfCreated: Bool = false,
4546
shouldCreateCustomer: Bool = true,
4647
imageLoadingMaxTimeInSeconds: Double? = nil,
47-
uuidDebugEnabled: Bool = true,
48-
operationsDomain: String? = nil
48+
uuidDebugEnabled: Bool = true
4949
) throws {
5050
self.endpoint = endpoint
5151
self.domain = domain
@@ -183,12 +183,12 @@ public struct MBConfiguration: Codable {
183183
try self.init(
184184
endpoint: endpoint,
185185
domain: domain,
186+
operationsDomain: operationsDomain,
186187
previousInstallationId: previousInstallationId,
187188
previousDeviceUUID: previousDeviceUUID,
188189
subscribeCustomerIfCreated: subscribeCustomerIfCreated,
189190
shouldCreateCustomer: shouldCreateCustomer,
190-
uuidDebugEnabled: uuidDebugEnabled,
191-
operationsDomain: operationsDomain
191+
uuidDebugEnabled: uuidDebugEnabled
192192
)
193193
}
194194
}

0 commit comments

Comments
 (0)