Quickstart guide

Requirements

  • Xcode 16.0 or later (latest stable version available on the App Store).
  • Swift 5.9 or later.
  • The minimum deployment target should be 15.0.
  • Recommended: An SSH key configured locally and registered with GitHub.

Integration

The DevRev SDK can be integrated using either Swift Package Manager (SPM) or CocoaPods.

We recommend integrating the DevRev SDK using Swift Package Manager and SSH. CocoaPods is in maintenance mode since August 2024 and will be deprecated in the future.

Swift Package Manager

To integrate the DevRev SDK into your project using SPM:

  1. Open your project in Xcode and go to the Add Package Dependency.
  2. Enter the DevRev SDK URL under Enter Package URL:
  3. In the Build Phases section of your app target, locate the Link Binary With Libraries phase and confirm that DevRevSDK is linked. If not, add it by clicking + and selecting DevRevSDK from the list.

Now you should be able to import and use the DevRev SDK in your project.

CocoaPods

To integrate the DevRev SDK using CocoaPods:

  1. Add the following to your Podfile:
    1pod 'DevRevSDK', '~> <VERSION>'
  2. Run pod install in your project directory.

This will install the DevRev SDK in your project, making it ready for use.

Set up the DevRev SDK

  1. Open the DevRev web app at https://app.devrev.ai and go to the Settings page.
  2. Under PLuG settings copy the value under Your unique App ID.
  3. Configure the DevRev SDK in your app using the obtained credentials.

The DevRev SDK must be configured before you can use any of its features.

The SDK becomes ready for use once the following configuration method is executed.

1DevRev.configure(appID:)

For example:

1DevRev.configure(appID: "abcdefg12345")
  • UIKit apps

Configure the SDK in the AppDelegate.application(_:didFinishLaunchingWithOptions:) method.

  • SwiftUI apps

Depending on your app’s architecture, configure the SDK at the app’s entry point or initial view.

Sample app

A sample app with use cases for both UIKit and SwiftUI has been provided as part of our public repository.

Before you start using the sample app you will need to configure it to be used with your Apple Developer team and your DevRev credentials. For your convenience the code has been marked with compiler error directives (#error) at the places that need attention.

  1. Add your credentials to the relevant AppDelegate.swift of the SwiftUI or UIKit sample.
    • After you have added the credentials, delete or comment out the compiler error lines in the respective files.
  2. Configure the code signing for the sample target:
    • Open the project settings (1),
    • Select the appropriate target (2),
    • Go to the Signing & Capabilities section (3), and
    • Select your development team under Team (4).