# Set up InboxUI with Swift Package Manager

<Aside type="caution" title="Legacy module">
Pushwoosh InboxUI is kept for backward compatibility. For new projects, use [Pushwoosh InboxKit](/developer/pushwoosh-sdk/ios-sdk/setting-up-pushwoosh-inboxkit-ios/) — the modern UIKit replacement.
</Aside>

1\. Open your project in Xcode and Navigate to the project's settings -> Package Dependencies, then press '+' button.

<img src="/setting-up-pushwoosh-inboxui-ios-set-up-inboxui-with-swift-package-manager-1.webp" alt="Package Dependencies"/>

2\. Enter the following Package URL:

```bash
https://github.com/Pushwoosh/PushwooshInboxUI-XCFramework
```

3\. Set up the 'Dependency Rule' to **Branch** and **main**. Then, click '**Add Package**' button.

<img src="/setting-up-pushwoosh-inboxui-ios-set-up-inboxui-with-swift-package-manager-2.webp" alt=""/>

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

<img src="/setting-up-pushwoosh-inboxui-ios-set-up-inboxui-with-swift-package-manager-3.webp" alt=""/>

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

<img src="/setting-up-pushwoosh-inboxui-ios-set-up-inboxui-with-swift-package-manager-4.webp" alt=""/>

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:

<Tabs syncKey="code-example">
<TabItem label="Swift">
```swift
self.navigationController?.pushViewController(PWIInboxUI.createInboxController(with: PWIInboxStyle.default()), animated: true)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
[self.navigationController pushViewController:[PWIInboxUI createInboxControllerWithStyle:[PWIInboxStyle  defaultStyle]] animated:YES];
```
</TabItem>
</Tabs>

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

<Tabs syncKey="code-example">
<TabItem label="Swift">
```swift
//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)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
//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];
```
</TabItem>
</Tabs>

## Customization

To customize Inbox UI style, please refer to:

<LinkCard 
  title="PWIInboxStyle.h" 
  href="https://github.com/Pushwoosh/pushwoosh-ios-sdk/blob/master/iOS_SDK/PushwooshInboxUI/PushwooshInboxUI/Public/PWIInboxStyle.h"
/>

<LinkCard 
  title="PWIInboxUI.h" 
  href="https://github.com/Pushwoosh/pushwoosh-ios-sdk/blob/master/iOS_SDK/PushwooshInboxUI/PushwooshInboxUI/Public/PWIInboxUI.h"
/>


For more details, take a look at [Inbox Sample](https://github.com/Pushwoosh/pushwoosh-quickstart-ios/tree/main/inbox).