In the preceding section, we discussed the configuration for utilizing the default notification center for displaying App Inbox messages.

For developers interested in implementing a custom View Controller for the App Inbox, the Castled SDK offers methods that facilitate the retrieval of messages for display. Additionally, the SDK provides essential methods for managing key lifecycle events.

// Fetching the unread message count directly

// Listening to unread message count changes using a callback
Castled.sharedInstance.observeUnreadCountChanges(listener: { unreadCount in
    print("Inbox unread count is \(unreadCount)")

// Retrieving all inbox items
Castled.sharedInstance.getInboxItems(completion: { result in
    print("Inbox items are \(result)")

// Logging read inbox items

// Deleting a specific inbox item

// Logging a click on an inbox item
Castled.sharedInstance.logInboxItemClicked(inboxItem, buttonTitle: "title")