# InboxUI mit CocoaPods einrichten

<Aside type="caution" title="Veraltetes Modul">
Pushwoosh InboxUI wird aus Gründen der Abwärtskompatibilität beibehalten. Für neue Projekte verwenden Sie [Pushwoosh InboxKit](/de/developer/pushwoosh-sdk/ios-sdk/setting-up-pushwoosh-inboxkit-ios/) – den modernen UIKit-Ersatz.
</Aside>

1\. Führen Sie den Befehl '**pod init**' im Terminal in Ihrem Projektverzeichnis aus.

2\. Öffnen Sie die neu erstellte Podfile.

3\. Fügen Sie die Pushwoosh-Abhängigkeit unter dem Ziel Ihres Projektnamens hinzu:

```ruby
# Kommentieren Sie die nächste Zeile aus, um eine globale Plattform für Ihr Projekt zu definieren 
# platform: ios, ‘9.0’

target ‘MyApp’ do 
   # Kommentieren Sie die nächste Zeile aus, wenn Sie keine dynamischen Frameworks verwenden möchten 
   use_frameworks!

   # Pods für MyApp
   pod 'PushwooshInboxUI'

end
```

<Aside type="note">
Wenn Sie _PushwooshInboxUI.xcframework_ verwenden möchten, nutzen Sie **pod 'PushwooshInboxUIXCFramework'** in Ihrer Podfile.



**Catalyst-Integration**

Catalyst verwendet .xcframework, daher sollten Sie den Pod **PushwooshXCFramework** anstelle von **Pushwoosh** verwenden:

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

4\. Führen Sie den folgenden Befehl in Ihrem Terminal in Ihrem Projektverzeichnis aus:

```
pod install
```

5\. Öffnen Sie die neu erstellte Datei \<_your_project_name_\>**.xcworkspace**.

6\. Gut gemacht! Sie haben Pushwoosh InboxUI erfolgreich in Ihr Projekt integriert.

## Pushwoosh InboxUI-Code hinzufügen

Um die Inbox-Benutzeroberfläche in Ihrer App anzuzeigen, fügen Sie den Inbox-View-Controller hinzu:

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

Um die Inbox an das Erscheinungsbild Ihrer App anzupassen, ändern Sie die Parameter von `PWIInboxStyle`. Sie können Parameter wie Schriftart, Hintergrundfarbe usw. anpassen.

<Tabs syncKey="code-example">
<TabItem label="Swift">
```swift
// Erstellen eines neuen Inbox-Stils
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
// Erstellen eines neuen Inbox-Stils
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>

## Anpassung

Informationen zur Anpassung des Inbox-UI-Stils finden Sie unter:

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


Weitere Details finden Sie im [Inbox-Beispiel](https://github.com/Pushwoosh/pushwoosh-quickstart-ios/tree/main/inbox).