File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,6 +172,13 @@ - (void)trackPushOpenWithCampaignId:(NSNumber *)campaignId
172172 [_swiftAPI trackPushOpenWithCampaignId: campaignId templateId: templateId messageId: messageId appAlreadyRunning: appAlreadyRunning dataFields: dataFields];
173173}
174174
175+ - (void )trackInAppOpen : (NSString *)messageId
176+ location : (NSNumber *)location
177+ {
178+ NSLog (@" ReactNativeSdk trackInAppOpen" );
179+ [_swiftAPI trackInAppOpen: messageId location: location];
180+ }
181+
175182@end
176183
177184
Original file line number Diff line number Diff line change @@ -189,12 +189,14 @@ open class ReactIterableAPI: RCTEventEmitter {
189189 dataFields: NSDictionary ?
190190 ) {
191191 ITBInfo ( )
192+ let swiftDict = dataFields as? [ AnyHashable : Any ]
193+
192194 IterableAPI . track (
193195 pushOpen: campaignId,
194196 templateId: templateId,
195197 messageId: messageId,
196198 appAlreadyRunning: appAlreadyRunning,
197- dataFields: dataFields )
199+ dataFields: swiftDict )
198200 }
199201
200202 @objc ( updateCart: )
@@ -317,9 +319,9 @@ open class ReactIterableAPI: RCTEventEmitter {
317319
318320 @objc ( trackEvent: dataFields: )
319321 public func trackEvent( name: String , dataFields: NSDictionary ? ) {
320-
321322 ITBInfo ( )
322- IterableAPI . track ( event: name, dataFields: dataFields)
323+
324+ IterableAPI . track ( event: name, dataFields: dataFields as? [ AnyHashable : Any ] )
323325 }
324326
325327 @objc ( updateUser: mergeNestedObjects: )
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export interface Spec extends TurboModule {
6565 appAlreadyRunning : boolean ,
6666 dataFields ?: { [ key : string ] : string | number | boolean }
6767 ) : void ;
68- // trackInAppOpen(messageId: string, location: number): void;
68+ trackInAppOpen ( messageId : string , location : number ) : void ;
6969 // trackInAppClick(
7070 // messageId: string,
7171 // location: number,
Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ export class Iterable {
527527 ) {
528528 Iterable ?. logger ?. log ( 'trackInAppOpen' ) ;
529529
530- RNIterableAPI . trackInAppOpen ( message . messageId , location ) ;
530+ api . trackInAppOpen ( message . messageId , location ) ;
531531 }
532532
533533 /**
You can’t perform that action at this time.
0 commit comments