didomi / react-native

Didomi SDK for React Native
Other
9 stars 2 forks source link

Use [weak self] for ios events #108

Closed pmerlet-at-didomi closed 4 months ago

pmerlet-at-didomi commented 4 months ago

Use weak self for events closures in iOS native code.

This should fix an issue reported when debug app is reloaded in some environments:

0x180d1bb90 -[NSMutableDictionary(NSMutableDictionary) classForCoder] + 0
0x10091587c -[RCTEventEmitter sendEventWithName:body:] + 372
0x1010c741c RNDidomi.dispatchEvent(withName:body:) + 380
0x1010d9be4 closure #3 in RNDidomi.initEventListener() + 128