# FrakConfig

```swift
struct FrakConfig
```

Everything 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](https://github.com/frak-id/wallet/blob/35995d05c807efe1e0d6319fdede3ad363124d1e/sdk/ios/Sources/FrakSDK/Core/FrakConfig.swift#L62)

## Initializers

### init(merchantId:bundleId:metadata:env:deepLink:trackingEnabled:logLevel:logSink:)

```swift
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

### bundleId

```swift
let bundleId: String?
```

### deepLink

```swift
let deepLink: DeepLinkHandling
```

### env

```swift
let env: FrakEnvironment
```

### logLevel

```swift
let logLevel: FrakLogLevel
```

### logSink

```swift
let logSink: (any FrakLogSink)?
```

### merchantId

```swift
let merchantId: String?
```

### metadata

```swift
let metadata: FrakMetadata
```

### trackingEnabled

```swift
let trackingEnabled: Bool
```

Whether 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

### hash(into:)

```swift
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 call `finalize()` on the `hasher` instance 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

### !=(_:_:)

```swift
static func != (lhs: Self, rhs: Self) -> Bool
```

Returns 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.

### ==(_:_:)

```swift
static func == (lhs: FrakConfig, rhs: FrakConfig) -> Bool
```

Returns 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.