Appboy / appboy-ios-sdk

Public repo for the Braze iOS SDK
https://www.braze.com
Other
165 stars 142 forks source link

ABKContentCard.h logContentCardImpression runs on main thread #294

Closed bstillitano closed 3 years ago

bstillitano commented 3 years ago

Report

When using a custom view to render content cards, and subsequently using the card.logContentCardImpression() function, the app freezes up on the main thread.

Describe your environment.

Info Value

Platform Name iOS Platform Version 14.5 SDK Version 4.0.2 Integration Method Cocoapods Xcode Version Xcode 12.5 Computer Processor Intel Based Repro rate 100% of the time

What did you do?

//Get Cards for Slot
        let brazeCards: [ABKContentCard] = Appboy.sharedInstance()?.contentCards.filter({ (card) -> Bool in
            return card.extras?["slot"] as? String == slot.rawValue
        }) ?? []
        brazeCards.forEach { (card) in
                card.logContentCardImpression()
        }

What did you expect to happen?

I expect that logging should not block the main thread of my app.

What happened instead?

Logging blocked the main thread of my app

Steps to reproduce

See code above.

Code Snippet

See code above

Are you doing any feature customizations that may relate to the issue? Can you share the code snippet?

N/A

hokstuff commented 3 years ago

Hi @bstillitano,

Can you contact support@braze.com about this issue and include these details around your integration:

Thanks!

hokstuff commented 3 years ago

Closing out this thread since it is about a specific custom integration, and the most streamlined way to debug this issue is via the Support channels. Feel free to comment here if there are further concerns or contact our Support team - thanks!