ConnectIdentity
The identity signal logging interface for the Connect iOS SDK. Access via ConnectSDK.shared.identity.
Platform: iOS 15.1+
Declared in: ConnectSDK
Note:
ConnectIdentityis always available — no push configuration or additional setup is required.
Getting the identity interface
let identity = ConnectSDK.shared.identityLogging an identity signal
log(identifierName:identifierValue:signalType:additionalParameters:)
Logs an identity signal associating a named identifier with a value.
@discardableResult
public func log(
identifierName: String,
identifierValue: String,
signalType: String,
additionalParameters: [String: String] = [:]
) -> BoolReturns true if the signal was accepted, false if either identifierName or identifierValue is empty after trimming.
Signals are queued internally and dispatched when the Connect SDK is enabled and the session is ready. It is safe to call this method before ConnectSDK.shared.enable() returns.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
identifierName | String | Required | The audience attribute name this identifier maps to. Must match exactly — case sensitive. Must not be empty after trimming. |
identifierValue | String | Required | The value of the identifier. Must not be empty after trimming. |
signalType | String | Required | The signal type associated with this identity event. |
additionalParameters | [String: String] | [:] | Optional key-value pairs to include with the signal. |
Examples
Log a customer identifier on sign-in:
ConnectSDK.shared.identity.log(
identifierName: "Customer ID",
identifierValue: user.id,
signalType: "login"
)Log an identifier with a custom signal type and additional parameters:
ConnectSDK.shared.identity.log(
identifierName: "email",
identifierValue: user.email,
signalType: "login",
additionalParameters: ["plan": "premium", "region": "us-east"]
)Updated about 2 hours ago
