# InboxUI mit Swift Package Manager einrichten

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

1\. Öffnen Sie Ihr Projekt in Xcode und navigieren Sie zu den Projekteinstellungen -> Package Dependencies und klicken Sie dann auf die Schaltfläche „+“.

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

2\. Geben Sie die folgende Paket-URL ein:

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

3\. Stellen Sie die „Dependency Rule“ auf **Branch** und **main** ein. Klicken Sie dann auf die Schaltfläche „**Add Package**“.

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

4\. Wählen Sie auf dem nächsten Bildschirm zur Auswahl Ihres Pakets das Pushwoosh-Paket aus und fügen Sie das **Paket** zu Ihrem Haupt-App-Ziel hinzu.

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

5\. Öffnen Sie Ihr Haupt-App-Ziel und stellen Sie unter „Frameworks, Libraries, and Embedded Content“ sicher, dass PushwooshInboxUI hinzugefügt wurde.

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

6\. Das war's! Sie haben gerade das Pushwoosh InboxUI SDK 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
//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>

## Anpassung

Informationen zur Anpassung des Stils der Inbox-Benutzeroberfläche 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).