Getting Started

Learn how to add the OpenWeb SDK to your iOS app.

The OpenWeb iOS SDK empowers you to create an in-app user experience that fuels quality interactions with community and content, enabling users to make engaging and valuable contributions.

Specifically, the iOS SDK offers the following benefits:

  • Simple, straightforward API with the flexibility to use UIViews over just UIViewControllers
  • Comprehensive error states, report reasons, and a clarity mode for reliable app development
  • Robust, stable SDK foundation, supported by performance enhancements like background threading
  • New design preset options to seamlessly integrate the user experience with your brand's aesthetic
  • Stunning shimmering skeletons while loading data


Prerequisites

  • iOS 12.0 or later
  • OpenWeb account
  • Xcode


Add the iOS SDK

To add a Conversation to your app, you must import the OpenWeb iOS SDK and then configure your project.

You can add the iOS SDK using either Cocoapods or Swift Package Manager.


Using Cocoapods

Follow these steps to add the iOS SDK:

  1. In a text editor, open Podfile.

  2. Add pod 'OpenWebSDK', '<<iOSVersion>>.

    target 'OpenWeb-SDK-iOS-Demo' do
      use_frameworks!
    
      # Pod for OpenWeb-SDK
      pod 'OpenWebSDK', '<<iOSVersion>>'
    end
    
  3. In Terminal, at the terminal prompt of your project directory, execute pod install to install the dependencies added to Podfile.

  4. Open the .xcworkspace file for your project to launch Xcode.

  5. In the Pods project, expand Pods > OpenWebSDK > Resources. The Vendor-Frameworks directory appears.

  6. Right-click on the Vendor-Frameworks directory. The context menu appears.

  7. Click Show in Finder. A new Finder window opens.

  8. Drag the Vendor-Frameworks directory from the Finder window to your project file in Xcode. A popup window appears.

  9. Click Copy items if needed.

  10. Click Finish. The Vendor-Frameworks directory will appear within your project in Xcode.



Using Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the Swift compiler.

Follow these steps to add the iOS SDK:

  1. Add openweb-ios-sdk-pod.git as a dependency of your Package.swift.

    dependencies: [
        .package(url: "https://github.com/SpotIM/openweb-ios-sdk-pod.git", .upToNextMajor(from: "<<iOSVersion>>"))
    ]
    
  2. Open the .xcworkspace file for your project to launch Xcode.

  3. Under Package Dependencies, expand OpenWebSDK. The Vendor-Frameworks directory appears.

  4. Right-click on the Vendor-Frameworks directory. The context menu appears.

  5. Click Show in Finder. A new Finder window opens.

  6. Drag the Vendor-Frameworks directory from the Finder window to your project file in Xcode. A popup window appears.

  7. Click Copy items if needed.

  8. Click Finish. The Vendor-Frameworks directory will appear within your project in Xcode.



Import the OpenWebSDK

Follow the step to import the library:

  1. In any .swift file using the OpenWeb SDK, import the SDK.
    import OpenWebSDK
    


Next Step