Closed owaiswarsi-aym closed 1 year ago
Hi @owaiswarsi-aym,
Are you still experiencing this issue? Can you provide more details around what Content Card Modal
you are referring to?
For a quicker response, please reach out to support@braze.com with the campaign you are testing with as well as steps to repro in your app.
Thanks!
I'm closing out this thread due to inactivity and possible staleness. Feel free to reach out to support@braze.com if you still have concerns - thanks!
I'm facing the same issue.
When I use Braze.launchContentCards()
, and input a deep link into the Deep Link Into App card
, it does direct me to the intended screen. However, the popup modal remains open and doesn't automatically close.
How can I fix this?
@hokstuff
"react-native-appboy-sdk": "^1.41.0"
Hi @owaiswarsi-aym,
Can you update to the latest version of the Braze React Native SDK and see if you are still experiencing that issue? Version 1.41.0 uses the legacy AppboyKit (ObjC) SDK, which contained some custom logic to determine where to present a new ViewController / popup modal. Versions 2.0.0+ use the Braze Swift SDK which removes custom logic like that.
For more catered support, please contact support@braze.com with the details above so that we can dive deeper into the issue on a separate thread instead of the current one.
Thanks!
Best, Daniel
Hi @hokstuff, is there a way without migrating to the new SDK, as it requires React Native version 0.68 or higher.
Hi @Yawanseh,
The legacy AppboyKit SDK is no longer in active development, so there isn't anything we could do on our end to address the issue while using that SDK. You can review your app's integration to make sure there aren't any bugs or choose to use a custom UI instead of the default ones. Outside of that, you can explore using a workaround like the one mentioned here which allowed them to build on React Native 0.67.5 - though this is not officially supported by Braze.
Thanks!
The same thing happens with me. Using "@braze/react-native-sdk": "^11.0.0"
.
https://github.com/user-attachments/assets/f4ee7772-f2f6-42d0-8d28-d7b736d5fbca
Hi @luisfelipeas5,
Please contact support@braze.com so we can look into and debug your issue more effectively. In your thread, also include verbose logs when you are able to reproduce this issue along with any other relevant information for your integration (e.g. custom UI code if you are using it, any relevant delegates, etc).
Thanks!
EDIT: no need to use this workaround, it's been fixed: https://github.com/braze-inc/braze-react-native-sdk/issues/261#issuecomment-2307293580
Hey guys, in case anyone ends up here and still has problems with this, you can create a React Native bridge for iOS native code and dismiss it. Not ideal, but if support takes too long and you're in a rush, it might work for a while -- just make sure it's a temporary workaround and replace it with a definitive solution later, because it might always end up breaking for one reason or another.
import Foundation
import UIKit
@objc(BrazeNativeBridge)
class BrazeNativeBridge: NSObject {
// MARK: - React Native Bridge
// This is being used to dismiss Content Cards feed from the UI
// MARK: Module Setup
@objc
static func requiresMainQueueSetup() -> Bool {
return true // using the main thread for `dismissContentCardsModal`
}
// MARK: Helper Properties
private let BRZFeedClass: AnyClass? = {
// This class isn't visible, since it's not being exposed by the Pod
let BRZFeedClassName = "BRZContentCardUIModalViewController"
return NSClassFromString(BRZFeedClassName)
}()
// MARK: Exposed Functions
@objc
func dismissContentCardsModal() {
DispatchQueue.main.async {
guard
let targetClass = self.BRZFeedClass,
// keyWindow is deprecated, but that's what braze-react-native-sdk uses
let keyWindow = UIApplication.shared.keyWindow,
let rootVC = keyWindow.rootViewController,
let presentedVC = rootVC.presentedViewController
else {
return
}
if presentedVC.isKind(of: targetClass) {
rootVC.dismiss(animated: true)
}
}
}
}
Can anyone help, Is there any way to close the Content Card Modal on the pressing Card.