1. Open your project in Xcode and Navigate to the project's settings -> Package Dependencies, then press '+' button.
2. Enter the following Package URL:
https://github.com/Pushwoosh/PushwooshInboxUI-XCFramework
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.
Add Pushwoosh InboxUI code
To show Inbox UI in your app, add Inbox view controller:
Swift Objective-C
Copy self.navigationController?.pushViewController(PWIInboxUI.createInboxController(with: PWIInboxStyle.default()), animated: true)
Copy [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
Copy //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 )
Copy //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];
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
Swift Package Manager 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 .