Set up InboxUI with CocoaPods

How to implement Pushwoosh InboxUI into your iOS app with CocoaPods

1. Run 'pod init' command from the terminal in your project directory.

2. Open the newly created Podfile.

3. Add Pushwoosh dependency under your project name target:

# Uncomment the next line to define a global platform for your project 
# platform: ios, โ€˜9.0โ€™

target โ€˜MyAppโ€™ do 
   # Comment the next line if you donโ€™t want to use dynamic frameworks 
   use_frameworks!

   # Pods for MyApp
   pod 'PushwooshInboxUI'

end

If you want to use PushwooshInboxUI.xcframework, use pod 'PushwooshInboxUIXCFramework' in your Podfile.

Catalyst integration

Catalyst uses .xcframework, so you should use PushwooshXCFramework pod instead of Pushwoosh:

pod 'PushwooshXCFramework'

4. Run the following command in your terminal in your project directory:

pod install

5. Open the newly created <your_project_name>.xcworkspace file.

6. Well done! You've just integrated Pushwoosh InboxUI to your project.

Add Pushwoosh InboxUI code

To show Inbox UI in your app, add the Inbox view controller:

self.navigationController?.pushViewController(PWIInboxUI.createInboxController(with: PWIInboxStyle.default()), animated: true)

To make the Inbox match your app's appearance, change the parameters of PWIInboxStyle. You can customize such parameters as font, background color, etc.

//creating a new Inbox style
let inboxStyle = PWIInboxStyle.customStyle(withDefaultImageIcon: UIImage.init(named: "custom_image"), 
textColor: UIColor.darkText, 
accentColor: UIColor.blue, 
font: UIFont.systemFont(ofSize: 17))

inboxStyle?.backgroundColor = UIColor.init(white: 1, alpha: 1)
inboxStyle?.listErrorMessage = NSLocalizedString("Custom error message", comment: "Custom error message")
inboxStyle?.listEmptyMessage = NSLocalizedString("Custom empty message", comment: "Custom empty message")

PWIInboxStyle.setupDefaultStyle(inboxStyle)

Customization

To customize Inbox UI style, please refer to:

PWIInboxStyle.h

PWIInboxUI.h

For more details, take a look at Inbox Sample.

Change Log

Check this repository's release tags for a complete change log of every released version.

How to send push notifications

pageiOS SDK CocoaPods Setup

Share your feedback with us

Your feedback helps us create a better experience, so we would love to hear from you if you have any issues during the SDK integration process. If you face any difficulties, please do not hesitate to share your thoughts with us via this form.

Last updated