Skip to content

Quick start

Get started with the Pushwoosh iOS SDK using this quick and simple example

Prerequisites

To integrate the Pushwoosh iOS SDK into your app, you will need the following:

Download the example project

Clone the example project from GitHub:

Terminal window
git clone https://github.com/Pushwoosh/pushwoosh-ios-sample.git

Configure the project

  1. Open the project in Xcode.
  2. Add https://github.com/Pushwoosh/Pushwoosh-XCFramework as Swift Package Dependency.
  3. Set the bundle identifier for the main target (PushwooshSampleApp) to match your Pushwoosh project (e.g., com.pushwoosh.PushwooshSampleApp).
  4. Use the same bundle identifier for the NotificationService target, appending .NotificationService (e.g., com.pushwoosh.PushwooshSampleApp.NotificationService).
  5. In Info.plist, set the Pushwoosh_APPID key to the Pushwoosh Application Code.

Run the project

  1. Build and run the project.
  2. The app will have two tabs: “Actions” and “Settings”. Navigate to the Settings tab.
  3. Tap the Register for Pushes button.
  4. Grant permission for push notifications. The device will be registered with Pushwoosh.

You should see a log entry like this:

Terminal window
[PW] [I] -[PWPushNotificationsManagerCommon] Registered for push notifications: __YOUR_DEVICE_TOKEN__

Your device is now registered with Pushwoosh.

Send a push notification

Go back to the Pushwoosh Control Panel and send a push notification to your registered device.

What’s next

To learn more, please refer to the basic integration guide