# Set up InboxUI with CocoaPods

<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\. 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:

```ruby
# 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
```

<Aside type="note">
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'
```
</Aside>

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 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).