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:
Configure the project
- Open the project in Xcode.
- Add
https://github.com/Pushwoosh/Pushwoosh-XCFramework
as Swift Package Dependency. - Set the bundle identifier for the main target (
PushwooshSampleApp
) to match your Pushwoosh project (e.g.,com.pushwoosh.PushwooshSampleApp
). - Use the same bundle identifier for the
NotificationService
target, appending.NotificationService
(e.g.,com.pushwoosh.PushwooshSampleApp.NotificationService
). - In
Info.plist
, set thePushwoosh_APPID
key to the Pushwoosh Application Code.
Run the project
- Build and run the project.
- The app will have two tabs: “Actions” and “Settings”. Navigate to the Settings tab.
- Tap the Register for Pushes button.
- Grant permission for push notifications. The device will be registered with Pushwoosh.
You should see a log entry like this:
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