Skip to content

iOS code examples

With Pushwoosh samples for iOS, you can explore Pushwoosh functionality without integrating the SDK into your project, or review how the Pushwoosh SDK is implemented in our example projects

Prerequisites

Anchor link to

Before using the examples, ensure you have the following:

Pushwoosh sample application

Anchor link to

This project is a basic iOS application with the Pushwoosh SDK integrated, showcasing key features such as:

  • Receiving push notifications.
  • Tracking push notification delivery.
  • Managing user tags.
  • Sending events
  • User registration

Use the sample app as a learning tool or a foundation for your development.

1. Download the sample app

Anchor link to

Clone the repository:

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

2. Configure the project

Anchor link to
  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:

Important: Be sure to give the token access to the right app in your Pushwoosh Control Panel. Learn more

3. Run the project

Anchor link to
  1. Build and run the project.
  2. Navigate to the Settings tab in the app.
  3. Tap the Register for Pushes button.
  4. Grant permission for push notifications. The device will be registered with Pushwoosh.

Pushwoosh iOS examples

Anchor link to

Explore our pushwoosh-quickstart-ios repository for fully documented code examples covering various SDK features. These samples are ready to use as references or starting points for your own projects.