Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APP Inbox messages are not shown ( Inbox Message count is 0) #274

Open
sarojraut opened this issue Jul 7, 2023 · 9 comments
Open

APP Inbox messages are not shown ( Inbox Message count is 0) #274

sarojraut opened this issue Jul 7, 2023 · 9 comments

Comments

@sarojraut
Copy link

As per the documentation describe here https://developer.clevertap.com/docs/app-inbox-ios , I have implemented APP inbox View and created the campaign but not able to receive any messages.
I have created campaign for push and inapp messages and received push and in app messages but while creating campaign for app inbox no any message received.

IMG_0326

Environment:

  • Xcode version: 14.2
  • CleverTap SDK Version: 5.1.0
  • Device: iPhone11 pro
  • OS: iOS 16.5.1
@akashvercetti
Copy link
Collaborator

@sarojraut Could you please your app inbox initialisation code?

@sarojraut
Copy link
Author

@sarojraut Could you please your app inbox initialisation code?

 private func registerAppInbox() {
        CleverTap.sharedInstance()?.registerInboxUpdatedBlock {
            let messageCount = CleverTap.sharedInstance()?.getInboxMessageCount()
            let unreadCount = CleverTap.sharedInstance()?.getInboxMessageUnreadCount()
            print("Inbox Message:\(String(describing: messageCount))/\(String(describing: unreadCount)) unread")
        }
    }

    private func setUpAppInbox() {
        // Initialize the CleverTap App Inbox
        CleverTap.sharedInstance()?.initializeInbox(callback: ({ _ in
            let messageCount = CleverTap.sharedInstance()?.getInboxMessageCount()
            let unreadCount = CleverTap.sharedInstance()?.getInboxMessageUnreadCount()
            print("Inbox Message:\(String(describing: messageCount))/\(String(describing: unreadCount)) unread")
        }))
        let appInboxButton = UIBarButtonItem(image: AppConstants.AppImages.Common.appInbox, style: .plain, target: self, action: #selector(openAppInbox))
        appInboxButton.tag = NavBarItems.appInbox.tag
        addLeftItemOnNavBar(true, item: appInboxButton)
    }

    @objc private func openAppInbox() {
        let style = CleverTapInboxStyleConfig()
        style.title = "Notifications"
        style.backgroundColor = .white
        style.navigationBarTintColor = AppConstants.Color.mportGreen
        style.navigationTintColor = .white
        style.tabUnSelectedTextColor = .white
        style.tabSelectedTextColor = .white
        style.tabSelectedBgColor = AppConstants.Color.BodyMappPrimaryBlue
        if let inboxController = CleverTap.sharedInstance()?.newInboxViewController(with: style, andDelegate: self) {
            let navigationController = UINavigationController(rootViewController: inboxController)
            present(navigationController, animated: true, completion: nil)
        }
    }

@akashvercetti
Copy link
Collaborator

@sarojraut Code looks fine. We gave it a try in our sample apps and we seem to be getting messages for both "live" and "past" behavior campaigns.
Could you please raise a ticket through the CleverTap dashboard? Our technical account managers can take a look at the issue closely.
Alternatively, you could also check/run our sample app and give it a try: https://github.com/CleverTap/clevertap-ios-sdk/tree/master/SwiftStarter

@thatduy
Copy link

thatduy commented Jul 14, 2023

I faced the same issue. It only works when I build my app from Xcode and It does not work when I use the production app

@litongde
Copy link
Contributor

@akashvercetti
I also encountered a similar problem, clevertap sdk version 5.1.1 still exists, app can not receive clevertap push notification. clevertap console prompt APNSBadDeviceToken, Unable to send a notification. If you roll back to version 4.2.0, everything is normal

@akashvercetti
Copy link
Collaborator

@sarojraut we have identified the source of this issue and are in middle of fixing/testing it. Please expect a release for this next week 👍

@akashvercetti
Copy link
Collaborator

@sarojraut We have released a fix for this in our latest release v5.1.2 https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/5.1.2

@litongde
Copy link
Contributor

litongde commented Jul 31, 2023

@sarojraut We have released a fix for this in our latest release v5.1.2 https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/5.1.2

Does version 5.1.2 just roll back to the inbox section after version 4.2.0? Because the inbox section after version 4.2.0 causes a problem with probabilistic thread jams. The current version 4.2.0 inbox is normal.

@bakoushin
Copy link

should the app inbox display newly published messages in the realtime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants