# Configurar InboxUI con CocoaPods

<Aside type="caution" title="Módulo heredado">
Pushwoosh InboxUI se mantiene por retrocompatibilidad. Para proyectos nuevos, utilice [Pushwoosh InboxKit](/es/developer/pushwoosh-sdk/ios-sdk/setting-up-pushwoosh-inboxkit-ios/), el reemplazo moderno de UIKit.
</Aside>

1\. Ejecute el comando '**pod init**' desde la terminal en el directorio de su proyecto.

2\. Abra el Podfile recién creado.

3\. Agregue la dependencia de Pushwoosh bajo el target del nombre de su proyecto:

```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">
Si desea utilizar _PushwooshInboxUI.xcframework,_ utilice **pod 'PushwooshInboxUIXCFramework'** en su Podfile.



**Integración con Catalyst**

Catalyst utiliza .xcframework, por lo que debe utilizar el pod **PushwooshXCFramework** en lugar de **Pushwoosh**:

```
pod 'PushwooshXCFramework'
```
</Aside>

4\. Ejecute el siguiente comando en la terminal en el directorio de su proyecto:

```
pod install
```

5\. Abra el archivo \<_your_project_name_\>**.xcworkspace** recién creado.

6\. ¡Bien hecho! Acaba de integrar Pushwoosh InboxUI en su proyecto.

## Agregar código de Pushwoosh InboxUI

Para mostrar la UI de Inbox en su aplicación, agregue el controlador de vista de Inbox:

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

Para que el Inbox coincida con la apariencia de su aplicación, cambie los parámetros de `PWIInboxStyle`. Puede personalizar parámetros como la fuente, el color de fondo, 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>

## Personalización

Para personalizar el estilo de la UI de Inbox, consulte:

<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"
/>


Para más detalles, eche un vistazo a la [muestra de Inbox](https://github.com/Pushwoosh/pushwoosh-quickstart-ios/tree/main/inbox).