File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,16 @@ + (void)load {
3939 [[MParticle sharedInstance ] logScreen: screenName eventInfo: attributes];
4040}
4141
42- RCT_EXPORT_METHOD (setATTStatus:(NSInteger )status withATTStatusTimestampMillis:(NSNumber *)timestamp)
42+ RCT_EXPORT_METHOD (setATTStatus:(NSInteger )status withATTStatusTimestampMillis:(nonnull NSNumber *)timestamp)
4343{
4444 [[MParticle sharedInstance ] setATTStatus: status withATTStatusTimestampMillis: timestamp];
4545}
4646
47+ RCT_EXPORT_METHOD (setATTStatus:(NSInteger )status)
48+ {
49+ [[MParticle sharedInstance ] setATTStatus: status withATTStatusTimestampMillis: nil ];
50+ }
51+
4752RCT_EXPORT_METHOD (setOptOut:(BOOL )optOut)
4853{
4954 [[MParticle sharedInstance ] setOptOut: optOut];
Original file line number Diff line number Diff line change @@ -101,7 +101,11 @@ const logScreenEvent = (screenName, attributes = null) => {
101101}
102102
103103// Use ATTAuthStatus constants for status
104- const setATTStatus = ( status , timestamp = null ) => {
104+ const setATTStatus = ( status ) => {
105+ NativeModules . MParticle . setATTStatus ( status )
106+ }
107+
108+ const setATTStatusWithCustomTimestamp = ( status , timestamp ) => {
105109 NativeModules . MParticle . setATTStatus ( status , timestamp )
106110}
107111
@@ -651,6 +655,7 @@ const MParticle = {
651655 logCommerceEvent,
652656 logScreenEvent,
653657 setATTStatus,
658+ setATTStatusWithCustomTimestamp,
654659 setOptOut,
655660 getOptOut,
656661 addGDPRConsentState,
You can’t perform that action at this time.
0 commit comments