Skip to content

Commit af17656

Browse files
authored
Merge pull request #366 from qonversion/fix/nocodesListenerIos
2 parents ff62d22 + 5a32515 commit af17656

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

example/ios/Podfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ PODS:
55
- FBLazyVector (0.77.0)
66
- fmt (11.0.2)
77
- glog (0.3.5)
8-
- NoCodes (0.1.2):
8+
- NoCodes (0.1.3):
99
- Qonversion (= 5.13.3)
1010
- Qonversion (5.13.3):
1111
- Qonversion/Main (= 5.13.3)
1212
- Qonversion/Main (5.13.3)
13-
- QonversionSandwich (6.0.6):
14-
- NoCodes (= 0.1.2)
13+
- QonversionSandwich (6.0.8):
14+
- NoCodes (= 0.1.3)
1515
- Qonversion (= 5.13.3)
1616
- RCT-Folly (2024.11.18.00):
1717
- boost
@@ -1188,8 +1188,8 @@ PODS:
11881188
- React-jsiexecutor
11891189
- React-RCTFBReactNativeSpec
11901190
- ReactCommon/turbomodule/core
1191-
- react-native-qonversion (8.2.3):
1192-
- QonversionSandwich (= 6.0.6)
1191+
- react-native-qonversion (9.0.1):
1192+
- QonversionSandwich (= 6.0.8)
11931193
- React
11941194
- React-nativeconfig (0.77.0)
11951195
- React-NativeModulesApple (0.77.0):
@@ -1681,9 +1681,9 @@ SPEC CHECKSUMS:
16811681
FBLazyVector: 2bc03a5cf64e29c611bbc5d7eb9d9f7431f37ee6
16821682
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
16831683
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
1684-
NoCodes: bd4c23f3cace02d750fe8485572a4e289dc095a9
1684+
NoCodes: 21b87d320a16758c6eb79167ff98010d81b4894e
16851685
Qonversion: 2b32ae8681de3ba02db5b5ed69c8f213ac4a28fa
1686-
QonversionSandwich: 3aff94b79bb6d9734508a7495a77f47d8dde33cd
1686+
QonversionSandwich: 8a8638ee1fbdf304f0629f064712d206c390fedf
16871687
RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809
16881688
RCTDeprecation: f5c19ebdb8804b53ed029123eb69914356192fc8
16891689
RCTRequired: 6ae6cebe470486e0e0ce89c1c0eabb998e7c51f4
@@ -1713,7 +1713,7 @@ SPEC CHECKSUMS:
17131713
React-logger: 9a0c4e1e41cd640ac49d69aacadab783f7e0096b
17141714
React-Mapbuffer: 6993c785c22a170c02489bc78ed207814cbd700f
17151715
React-microtasksnativemodule: e5b64ff00f213f89fb7306999405f5aec5effe2d
1716-
react-native-qonversion: cb25e3ddc7c3a1e77893562161323c75ad1fa54e
1716+
react-native-qonversion: 09da537e697c350f70d4b72de5d80f6ca4e5b692
17171717
React-nativeconfig: cd0fbb40987a9658c24dab5812c14e5522a64929
17181718
React-NativeModulesApple: 447544c38e64eabf151638695393f97f7a75e0dc
17191719
React-perflogger: 15a7bcb6c46eae8a981f7add8c9f4172e2372324

ios/RNNoCodes.m

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#import "RNNoCodes.h"
22

3-
static NSString *const kNoCodesEventName = @"NoCodesEvent";
4-
53
@interface RNNoCodes ()
64

75
@property (nonatomic, strong) NoCodesSandwich *noCodesSandwich;
@@ -21,7 +19,7 @@ - (instancetype)init {
2119
}
2220

2321
- (NSArray<NSString *> *)supportedEvents {
24-
return @[kNoCodesEventName];
22+
return [_noCodesSandwich getAvailableEvents];
2523
}
2624

2725
RCT_EXPORT_METHOD(initialize:(NSString *)projectKey
@@ -59,13 +57,7 @@ + (BOOL)requiresMainQueueSetup {
5957
}
6058

6159
- (void)noCodesDidTriggerWithEvent:(NSString * _Nonnull)event payload:(NSDictionary<NSString *,id> * _Nullable)payload {
62-
NSMutableDictionary *eventData = [NSMutableDictionary dictionary];
63-
eventData[@"event"] = event;
64-
if (payload) {
65-
eventData[@"payload"] = payload;
66-
}
67-
68-
[self sendEventWithName:kNoCodesEventName body:eventData];
60+
[self sendEventWithName:event body:payload];
6961
}
7062

7163
@end

0 commit comments

Comments
 (0)