Prerequisites
- SDK integration completed
enableAppInboxconfig set totrueduring SDK initialization.
Pod Install
Starting from Castled iOS version4.0.2, AppInbox functionality is separated as a new module CastledInbox. Add the module pod as dependency in the app pod file.
Displaying App Inbox content
To facilitate the effortless display of App Inbox content, the SDK provides a default view controller:CastledInboxViewController.
This controller is designed to showcase inbox cards and can be integrated within your app in two primary ways:
Using Navigation Controller
EmbedCastledInboxViewController within your existing navigation flow for a consistent user experience.
Using a Modal
Present the App Inbox cards in a modal view, suitable for focused interactions.Handling Inbox Item Selection
To effectively capture and act upon interactions with App Inbox items, SDK offers theCastledInboxViewControllerDelegate protocol.
By adopting this protocol, you can tap into the callback provided when a user selects an item from the inbox.
swift
Integration Steps:
- Ensure your view controller conforms to the
CastledInboxViewControllerDelegateprotocol. - Implement the
didSelectedInboxWith((\_:buttonAction:, inboxItem:)delegate method.