File tree Expand file tree Collapse file tree 2 files changed +33
-5
lines changed Expand file tree Collapse file tree 2 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 201201
202202/* !
203203 @property
204-
204+
205205 @abstract
206206 If set, determines the background color of mini notifications.
207207
208208 @discussion
209- If this isn't set, we default to either the color of the UINavigationBar of the top
210- UINavigationController that is showing when the notification is presented, the
209+ If this isn't set, we default to either the color of the UINavigationBar of the top
210+ UINavigationController that is showing when the notification is presented, the
211211 UINavigationBar default color for the app or the UITabBar default color.
212212 */
213213@property (atomic ) UIColor* miniNotificationBackgroundColor;
214214
215+ /* !
216+ @property
217+
218+ The minimum session duration (ms) that is tracked in automatic events.
219+ */
220+ @property (atomic ) UInt64 minimumSessionDuration;
221+
222+ /* !
223+ @property
224+
225+ The maximum session duration (ms) that is tracked in automatic events.
226+ */
227+ @property (atomic ) UInt64 maximumSessionDuration;
228+
215229/* !
216230 @property
217231
556570
557571/* !
558572 @method
559-
573+
560574 @abstract
561575 Calls flush, then optionally archives and calls a handler when finished.
562-
576+
563577 @discussion
564578 When calling <code>flush</code> manually, it is sometimes important to verify
565579 that the flush has finished before further action is taken. This is
Original file line number Diff line number Diff line change @@ -46,6 +46,20 @@ -(Mixpanel*) getInstance: (NSString *)name {
4646 }
4747}
4848
49+ // setAppSessionProperties iOS
50+ RCT_EXPORT_METHOD (setAppSessionPropertiesIOS:(NSDictionary *)properties) {
51+ if ([properties objectForKey: @" minimumSessionDuration" ]) {
52+ NSNumber *minimumSessionDuration = properties[@" minimumSessionDuration" ];
53+ long long int intValue = [minimumSessionDuration longLongValue ];
54+ mixpanel.minimumSessionDuration = intValue;
55+ }
56+
57+ if ([properties objectForKey: @" maximumSessionDuration" ]) {
58+ NSNumber *maximumSessionDuration = properties[@" maximumSessionDuration" ];
59+ long long int intValue = [maximumSessionDuration longLongValue ];
60+ mixpanel.maximumSessionDuration = intValue;
61+ }
62+ }
4963
5064// get distinct id
5165RCT_EXPORT_METHOD (getDistinctId:(NSString *)apiToken
You can’t perform that action at this time.
0 commit comments