Set up InboxUI with Swift Package Manager
Pushwoosh Inbox UI iOS setup with Swift Package Manager
1. Open your project in Xcode and Navigate to the project's settings -> Package Dependencies, then press '+' button.

Package Dependencies
2. Enter the following Package URL:
3. Set up the 'Dependency Rule' to Branch and main. Then, click 'Add Package' button.

4. On the next screen to choose your Package, select the Pushwoosh Package and Add Package to your main app Target.

5. Open your Main App Target and under "Frameworks, Libraries, and Embedded Content" ensure that the PushwooshInboxUI has been added.

6. That's it! You've just integrated Pushwoosh InboxUI SDK to your project.
To show Inbox UI in your app, add Inbox view controller:
Swift
Objective-C
self.navigationController?.pushViewController(PWIInboxUI.createInboxController(with: PWIInboxStyle.default()), animated: true)
[self.navigationController pushViewController:[PWIInboxUI createInboxControllerWithStyle:[PWIInboxStyle defaultStyle]] animated:YES];
To make the Inbox match your app's appearance, change the parameters of
PWIInboxStyle
. You can customize such parameters as font, background color, etc.Swift
Objective-C
//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)
//creating a new Inbox style
PWIInboxStyle *inboxStyle = [PWIInboxStyle customStyleWithDefaultImageIcon:[UIImage imageNamed:@"custom_image"]
textColor:UIColor.darkTextColor
accentColor:UIColor.blueColor
font:[UIFont systemFontOfSize:17]];
inboxStyle.backgroundColor = [UIColor colorWithWhite:1 alpha:1];
inboxStyle.listErrorMessage = NSLocalizedString(@"Custom error message", @"Custom error message");
inboxStyle.listEmptyMessage = NSLocalizedString(@"Custom empty message", @"Custom empty message");
[PWIInboxStyle setupDefaultStyle:inboxStyle];
To customize Inbox UI style, please refer to:
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 modified 1yr ago