Skip to main content


Ensure you have completed the Prerequisites section before continuing.


The minimum supported version for iOS is 12.0. To set the Minimum SDK target,

  1. Open your iOS project in XCode
  2. Select your Target > General > Deployment Info > Ensure that the version is set to 12.0+

Using Cocoapods

  1. Update your Podfile:
platform :ios, '12.0' # must be 12 or higher
# ...
target 'YOUR_TARGET_NAME' do
# ...
pod 'DashX'
# ...
  1. Open Terminal in your project's root directory and run:
pod install

Using Carthage

Specify the dependency in your Cartfile:

github "dashxhq/dashx-ios"

Run the following command:

carthage update

Using Swift Package Manager

  1. In your Xcode project, go to File > Add Packages
  2. Paste the following URL in "Search or Enter Package URL":


DashX needs to be initialized as early as possible in your application's lifecycle, which can be done in the AppDelegate class within the application(_:didFinishLaunchingWithOptions:) method:

import DashX

// ...

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
withPublicKey: "...", // required
baseURI: "...", // optional
targetEnvironment: "..." // optional

// ...

return true

Your Public Key is not sensitive, and can be stored in code or within Info.plist. If you're using multiple Environments, we recommend creating separate targets for each Environment, and then creating *.xcconfig files for each combination of Target & Configuration.


dashx-ios SDK offers the following methods to request permissions

// Permission to receive Notification Permissions

Additionally we track network information information about the current network connection, containing bluetooth, carrier, cellular, and wifi.


As an optional step, you can set the log level for debugging your integration:

DashXLog.setLogLevel(to: .debug)

By default, the log level is set to .error. You can set it to one of: .debug (most logs), .info, .error or .off (no logs).


User Management

do {
try DashX.identify(withOptions: [
"uid": "123",
"firstName": "John",
"lastName": "Doe"
} catch {
// Error Handling

Learn more


DashX.track("Button Clicked", withData: [
"label": "Click here",
"placement": "top"

Learn more


// Manage user contact for Push Notification



// Manage User Preferences

DashX.fetchStoredPreferences { _preference_ in
// ...
} failureCallback: { _ in
// ...

DashX.saveStoredPreferences { _preference_ in
// ...
} failureCallback: { _ in
// ...