File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 7
7
** Expo**
8
8
- Added support for Expo SDK 53.
9
9
10
+ ** Core**
11
+ - Fixed an issue where opting the SDK after been opted-out would unexpectedly reset default configurations, such as Do Not Disturb setting.
12
+
10
13
11
14
10.0.1
12
15
----
Original file line number Diff line number Diff line change @@ -117,10 +117,19 @@ - (NSDictionary*)getConstants {
117
117
RCT_EXPORT_METHOD (optIn:(RCTPromiseResolveBlock)resolve
118
118
reject:(RCTPromiseRejectBlock)reject)
119
119
{
120
- [BatchSDK optIn ];
121
- dispatch_async (dispatch_get_main_queue (), ^{
122
- [RNBatch start ];
123
- });
120
+ if (BatchSDK.isOptedOut ) {
121
+ // Opt-in SDK
122
+ [BatchSDK optIn ];
123
+
124
+ // Get API key and restart sdk
125
+ NSDictionary *info = [[NSBundle mainBundle ] infoDictionary ];
126
+ NSString *batchAPIKey = [info objectForKey: @" BatchAPIKey" ];
127
+ dispatch_async (dispatch_get_main_queue (), ^{
128
+ [BatchSDK startWithAPIKey: batchAPIKey];
129
+ });
130
+ } else {
131
+ NSLog (@" RNBatch: Batch SDK is already opted-in" );
132
+ }
124
133
resolve ([NSNull null ]);
125
134
}
126
135
You can’t perform that action at this time.
0 commit comments