Using Swift Package Manager

This article provides information on how to use the Swift Package Manager to set up Blueshift's iOS SDK.

Using our iOS SDK is easy. Complete the following steps to set it up in your app's Xcode project using Swift Package Manager, so that you can integrate our platform with your app.

📘

Note

This article provides information on how to set up our SDK in your iOS project using Swift Package Manager. If you want to use CocaPods or Carthage instead, see:

1. Add SDK as a dependency using the project's configuration

Swift Package Manager is a dependency manager that is bundled with iOS. We provide our SDK through the Swift Package Manager so that you can easily add the SDK in your app's code.

  1. Open Xcode.
  2. Select the project on the left navigation, and then click + under Swift Packages.
13021302
  1. In the Choose Package Repository window, specify the URL for the SDK's repository: https://github.com/blueshift-labs/Blueshift-iOS-SDK, and click Next.
14831483
  1. In the Choose Package Options window, specify the appropriate version and click Next. The Swift package manager is supported for SDK versions 2.1.14 and above.
14711471
  1. Select BlueShift_iOS_SDK for the main application target.
13261326

2. Optional: Add support for Blueshift's rich push notifications

  1. To support Blueshift's rich push notifications, select BlueShift_iOS_Extension_SDK and from the Add to Target options select your Notification Service Extension target. Click Add Package.
  2. Click Finish.
13201320

3. Optional: Add support for Blueshift's Carousel Push notifications

  1. To support Blueshift Carousel Push notifications, select your Notification Content Extension Target from your project and click on “+” icon from the Frameworks and Libraries.
21792179
  1. In the Choose frameworks and libraries to add window, select BlueShift_iOS_Extension_SDK from the list and click Add.
802802

4. Register your app with Blueshift

Once you set up the SDK in your Xcode project, register your app as a channel in the Blueshift web app.

Summary

  • The SDK is installed and is ready to configure
  • The Push notification adapters are set for sending push notifications.

That’s it. You can proceed to the next steps.


What’s Next

Now that you're done getting the SDK in your project, you can get started with it.

Did this page help you?