File tree Expand file tree Collapse file tree
example/src/components/Utility Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,15 +29,20 @@ export const Utility = () => {
2929 } } >
3030 < Text style = { styles . buttonText } > Iterable.getAttributionInfo()</ Text >
3131 </ TouchableOpacity >
32- < TouchableOpacity style = { styles . button } onPress = { ( ) => {
33- Iterable . setAttributionInfo ( {
34- campaignId : 123 ,
35- templateId : 456 ,
36- messageId : '789' ,
37- } ) ;
38- } } >
39- < Text style = { styles . buttonText } > Iterable.setAttributionInfo()</ Text >
40- </ TouchableOpacity >
32+ < TouchableOpacity style = { styles . button } onPress = { ( ) => {
33+ Iterable . setAttributionInfo ( {
34+ campaignId : 123 ,
35+ templateId : 456 ,
36+ messageId : '789' ,
37+ } ) ;
38+ } } >
39+ < Text style = { styles . buttonText } > Iterable.setAttributionInfo()</ Text >
40+ </ TouchableOpacity >
41+ < TouchableOpacity style = { styles . button } onPress = { ( ) => {
42+ Iterable . disableDeviceForCurrentUser ( ) ;
43+ } } >
44+ < Text style = { styles . buttonText } > Iterable.disableDeviceForCurrentUser()</ Text >
45+ </ TouchableOpacity >
4146 </ View >
4247 ) ;
4348} ;
Original file line number Diff line number Diff line change @@ -245,6 +245,11 @@ - (void)setAttributionInfo:(NSDictionary *)attributionInfo
245245 [_swiftAPI setAttributionInfo: attributionInfo];
246246}
247247
248+ - (void )disableDeviceForCurrentUser
249+ {
250+ NSLog (@" ReactNativeSdk disableDeviceForCurrentUser" );
251+ [_swiftAPI disableDeviceForCurrentUser ];
252+ }
248253
249254@end
250255
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ open class ReactIterableAPI: RCTEventEmitter {
153153 }
154154
155155 @objc ( disableDeviceForCurrentUser)
156- func disableDeviceForCurrentUser( ) {
156+ public func disableDeviceForCurrentUser( ) {
157157 ITBInfo ( )
158158 IterableAPI . disableDeviceForCurrentUser ( )
159159 }
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ export interface Spec extends TurboModule {
102102 dict : { [ key : string ] : string | number | boolean } | null
103103 ) : void ;
104104
105- // // Device management
106- // disableDeviceForCurrentUser(): void;
105+ // Device management
106+ disableDeviceForCurrentUser ( ) : void ;
107107 // getLastPushPayload(): Promise<{
108108 // [key: string]: string | number | boolean;
109109 // } | null>;
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ export class Iterable {
281281 static disableDeviceForCurrentUser ( ) {
282282 Iterable ?. logger ?. log ( 'disableDeviceForCurrentUser' ) ;
283283
284- RNIterableAPI . disableDeviceForCurrentUser ( ) ;
284+ api . disableDeviceForCurrentUser ( ) ;
285285 }
286286
287287 /**
You can’t perform that action at this time.
0 commit comments