Closed richardscheid closed 4 months ago
Hi @richardscheid,
Thanks for raising this and providing the context. There appears not to be any Braze code based on the stack trace you provided. Could this crash be related to other parts of your code?
Hey Daniel,
Yes, I've considered that, but as the issue only happens after the IAM is shown, I thought to come here first. Also, In-App Browser stops working after the IAM as well (stays inactive, no crashes). So, I have two different libraries facing issues. None of these issues happens with iOS 14 and above. Could it be a compatibility issue?
react-native-inappbrowser-reborn: 3.7.0 @expo/react-native-action-sheet: 4.0.0
Hi @richardscheid,
I see, it also appears that you are using a few other libraries that you mentioned which may also be related to this incompatibility:
react-native-inappbrowser-reborn: 3.7.0
@expo/react-native-action-sheet: 4.0.0
Can you contact support@braze.com with more info:
Thanks!
Hi @hokstuff,
Thanks, I'll contact the support team.
Does this behavior occur for all in-app message campaigns, or just specific ones?
It's happening to all campaigns.
If you are able to use the Braze SDK with a native implementation of the action sheet, that would indicate the issue is with the Braze SDK rather than the other possibilities
This was a great suggestion and the issue persists with the native implementation (ActionSheetIOS). Same stack trace.
Hi @richardscheid, just wanted to check in on this issue. Are you still experiencing this/were you able to get additional assistance from our support team?
Closing out this issue due to inactivity. If you are still facing this issue, please feel free to raise a support ticket with our team at support@braze.com. Thanks!
Which Platforms?
iOS
Which React Native Version?
0.71.14
Which @braze/react-native-sdk SDK version?
8.0.0
Repro Rate
100% of the time
Steps To Reproduce
If the IAM is not sent, the action sheet works as expected. Or, if I close the app and open it again, the action sheet works again.
Expected Behavior
As for iOS 14 and above, the user should be able to keep using the action sheet after receiving the IAM.
Actual Incorrect Behavior
After receiving IAM, the app crashes when attempting to open an action sheet.
Verbose Logs
Additional Information
import "AppDelegate.h"
import <React/RCTBundleURLProvider.h>
import <React/RCTLinkingManager.h>
import <UserNotifications/UserNotifications.h>
import
import
import "Firebase.h"
import "Orientation.h"
import "AppsFlyerLib/AppsFlyerLib.h"
import <BrazeKit/BrazeKit-Swift.h>
import "BrazeReactBridge.h"
@implementation AppDelegate
static NSString const brazeApiKey = @"..."; static NSString const brazeEndpoint = @"...";
(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions { [FIRApp configure];
self.moduleName = @"...";
self.initialProps = @{};
BRZConfiguration configuration = [[BRZConfiguration alloc] initWithApiKey:brazeApiKey endpoint:brazeEndpoint]; configuration.logger.level = BRZLoggerLevelInfo; Braze braze = [BrazeReactBridge initBraze:configuration]; AppDelegate.braze = braze;
[IntercomModule initialize:@"..." withAppId:@"..."];
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self;
if (@available(iOS 14, )) { UIDatePicker picker = [UIDatePicker appearance]; picker.preferredDatePickerStyle = UIDatePickerStyleWheels; }
return [super application:application didFinishLaunchingWithOptions:launchOptions]; }
pragma mark - AppDelegate.braze
static Braze *_braze = nil;
(Braze *)braze { return _braze; }
(void)setBraze:(Braze *)braze { _braze = braze; }
// Required to register for notifications
// Required for the register event.
// Required for the notification event. You must call the completion handler after handling the remote notification.
// Required for the registrationError event.
// IOS 10+ Required for localNotification event
(void)userNotificationCenter:(UNUserNotificationCenter )center didReceiveNotificationResponse:(UNNotificationResponse )response withCompletionHandler:(void (^)(void))completionHandler { [RNCPushNotificationIOS didReceiveNotificationResponse:response]; (void)[AppDelegate.braze.notifications handleUserNotificationWithResponse:response withCompletionHandler:completionHandler]; completionHandler(); } // IOS 4-10 Required for the localNotification event.
(void)application:(UIApplication )application didReceiveLocalNotification:(UILocalNotification )notification { [RNCPushNotificationIOS didReceiveLocalNotification:notification]; }
(UIInterfaceOrientationMask)application:(UIApplication )application supportedInterfaceOrientationsForWindow:(UIWindow )window { return [Orientation getOrientation]; }
//Called when a notification is delivered to a foreground app. -(void)userNotificationCenter:(UNUserNotificationCenter )center willPresentNotification:(UNNotification )notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler { completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge); }
if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
endif
}
if RCT_DEV
(BOOL)bridge:(RCTBridge )bridge didNotFindModule:(NSString )moduleName { return YES; }
endif
(BOOL)application:(UIApplication )app openURL:(NSURL )url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { return [RCTLinkingManager application:app openURL:url options:options]; }
(BOOL)concurrentRootEnabled { return true; } @end