> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zixflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> SDK method reference for the Zixflow iOS integration.

### Zixflow Core

```swift theme={null}
// Initialize SDK
Zixflow.initialize(withConfig: SDKConfig)

// Identify user
Zixflow.shared.identify(userId: String, traits: [String: Any]?)

// Track event
Zixflow.shared.track(name: String, properties: [String: Any]?)

// Track screen
Zixflow.shared.screen(title: String, properties: [String: Any]?)

// Set profile attributes
Zixflow.shared.setProfileAttributes([String: Any])

// Set device attributes
Zixflow.shared.deviceAttributes = [String: Any]

// Clear user identification
Zixflow.shared.clearIdentify()

// Get device token
Zixflow.shared.registeredDeviceToken: String?
```

### SDKConfigBuilder

```swift theme={null}
SDKConfigBuilder(apiKey: String)
    
    .logLevel(ZixflowLogLevel)
    .autoTrackDeviceAttributes(Bool)
    .trackApplicationLifecycleEvents(Bool)
    .autoTrackUIKitScreenViews()
    .screenViewUse(screenView: ScreenView)
    .apiHost(String)
    .cdnHost(String)
    .flushAt(Int)
    .flushInterval(Double)
    .deepLinkCallback((URL) -> Bool)
    .addModule(Module)
    .build() -> SDKConfig
```

### MessagingPushAPN

```swift theme={null}
// Initialize
MessagingPushAPN.initialize(withConfig: MessagingPushConfig)

// Configuration
MessagingPushConfigBuilder()
    .autoFetchDeviceToken(Bool)
    .autoTrackPushEvents(Bool)
    .showPushAppInForeground(Bool)
    .appGroupId(String?)
    .build() -> MessagingPushConfig
```

### Location

```swift theme={null}
// Configuration
LocationModule(config: LocationConfig)
LocationConfig(mode: LocationMode)

enum LocationMode {
    case onAppStart  // Request location on app launch
    case onDemand    // Request location manually
}

// Manual location update
Zixflow.location.requestLocationUpdate()
Zixflow.location.setLastKnownLocation(CLLocation)
```
