FrakConfig
Ce contenu n’est pas encore disponible dans votre langue.
struct FrakConfigEverything the SDK needs to start, supplied once to Frak.initialize(_:).
Conforms to Swift.Equatable, Swift.Hashable, Swift.Sendable
Defined in: Sources/FrakSDK/Core/FrakConfig.swift:62
Initializers
Section titled “Initializers”init(merchantId:bundleId:metadata:env:deepLink:trackingEnabled:logLevel:logSink:)
Section titled “init(merchantId:bundleId:metadata:env:deepLink:trackingEnabled:logLevel:logSink:)”init( merchantId: String? = nil, bundleId: String? = nil, metadata: FrakMetadata = FrakMetadata(), env: FrakEnvironment = .production, deepLink: DeepLinkHandling = .manual, trackingEnabled: Bool = true, logLevel: FrakLogLevel = .none, logSink: (any FrakLogSink)? = nil)Properties
Section titled “Properties”bundleId
Section titled “bundleId”let bundleId: String?deepLink
Section titled “deepLink”let deepLink: DeepLinkHandlinglet env: FrakEnvironmentlogLevel
Section titled “logLevel”let logLevel: FrakLogLevellogSink
Section titled “logSink”let logSink: (any FrakLogSink)?merchantId
Section titled “merchantId”let merchantId: String?metadata
Section titled “metadata”let metadata: FrakMetadatatrackingEnabled
Section titled “trackingEnabled”let trackingEnabled: BoolWhether tracking may run. false means no anonymous id is ever minted and no tracking
request is issued; it is a hard floor that FrakClient.setTrackingEnabled(_:) cannot lift
at runtime.
Not a whole-SDK off switch: merchant config and reward resolution still run, since they carry no identifier for the user. Sharing does stop, since a share link is the anonymous id.
Leave it true and drive consent through FrakClient.setTrackingEnabled(_:) instead
unless you want a build that can never track.
Methods
Section titled “Methods”hash(into:)
Section titled “hash(into:)”func hash(into hasher: inout Hasher)Hashes the essential components of this value by feeding them into the given hasher.
Implement this method to conform to the Hashable protocol. The
components used for hashing must be the same as the components compared
in your type’s == operator implementation. Call hasher.combine(_:)
with each of these components.
-
Important: In your implementation of
hash(into:), don’t callfinalize()on thehasherinstance provided, or replace it with a different instance. Doing so may become a compile-time error in the future. -
Parameter hasher: The hasher to use when combining the components of this instance.
Operators
Section titled “Operators”!=(::)
static func != (lhs: Self, rhs: Self) -> BoolReturns a Boolean value indicating whether two values are not equal.
Inequality is the inverse of equality. For any values a and b, a != b
implies that a == b is false.
This is the default implementation of the not-equal-to operator (!=)
for any type that conforms to Equatable.
- Parameters:
- lhs: A value to compare.
- rhs: Another value to compare.
==(::)
Section titled “==(::)”static func == (lhs: FrakConfig, rhs: FrakConfig) -> BoolReturns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values a and b,
a == b implies that a != b is false.
- Parameters:
- lhs: A value to compare.
- rhs: Another value to compare.