@@ -412,26 +412,70 @@ NS_ASSUME_NONNULL_BEGIN
412412
413413#pragma mark - Crash Reporting
414414
415+ /* *
416+ * Records an non-fatal exception.
417+ * @discussion A convenience method for @c recordException:isFatal:stackTrace:segmentation:
418+ * with isFatal passed as @c NO, stack trace and segmentation are passed as @c nil.
419+ * @param exception Exception to be recorded
420+ */
421+ - (void )recordException : (NSException *)exception ;
422+
423+ /* *
424+ * Records an exception with fatality information.
425+ * @discussion A convenience method for @c recordException:isFatal:stackTrace:segmentation:
426+ * with stack trace and segmentation are passed as @c nil.
427+ * @param isFatal Whether the exception is fatal or not
428+ */
429+ - (void )recordException : (NSException *)exception isFatal : (BOOL )isFatal ;
430+
431+ /* *
432+ * Records an exception with fatality information, given stack trace and segmentation.
433+ * @discussion For manually recording all exceptions, fatal or not, with an ability to pass custom stack trace and segmentation data.
434+ * @param exception Exception to be recorded
435+ * @param isFatal Whether the exception is fatal or not
436+ * @param stackTrace Stack trace to be recorded
437+ * @param segmentation Crash segmentation to override @c crashSegmentation set on initial configuration
438+ */
439+ - (void )recordException : (NSException *)exception isFatal : (BOOL )isFatal stackTrace : (NSArray * _Nullable)stackTrace segmentation : (NSDictionary <NSString *, NSString *> * _Nullable)segmentation ;
440+
441+ /* *
442+ * Records a Swift error with given stack trace.
443+ * @discussion For manually recording Swift errors with an ability to pass custom stack trace.
444+ * @param errorName A name describing the error to be recorded, a non-zero length valid string
445+ * @param stackTrace Stack trace to be recorded
446+ */
447+ - (void )recordError : (NSString *)errorName stackTrace : (NSArray * _Nullable)stackTrace ;
448+
449+ /* *
450+ * Records a Swift error with fatality information, given stack trace and segmentation.
451+ * @discussion For manually recording Swift errors with an ability to pass custom stack trace and segmentation data.
452+ * @param errorName A name describing the error to be recorded, a non-zero length valid string
453+ * @param isFatal Whether the error is fatal or not
454+ * @param stackTrace Stack trace to be recorded
455+ * @param segmentation Crash segmentation to override @c crashSegmentation set on initial configuration
456+ */
457+ - (void )recordError : (NSString *)errorName isFatal : (BOOL )isFatal stackTrace : (NSArray * _Nullable)stackTrace segmentation : (NSDictionary <NSString *, NSString *> * _Nullable)segmentation ;
458+
415459/* *
416460 * Records a handled exception manually.
417461 * @param exception Exception to be recorded
418462 */
419- - (void )recordHandledException : (NSException *)exception ;
463+ - (void )recordHandledException : (NSException *)exception DEPRECATED_MSG_ATTRIBUTE( " Use 'recordException:' method instead! " ) ;
420464
421465/* *
422466 * Records a handled exception and given stack trace manually.
423467 * @param exception Exception to be recorded
424468 * @param stackTrace Stack trace to be recorded
425469 */
426- - (void )recordHandledException : (NSException *)exception withStackTrace : (NSArray * _Nullable)stackTrace ;
470+ - (void )recordHandledException : (NSException *)exception withStackTrace : (NSArray * _Nullable)stackTrace DEPRECATED_MSG_ATTRIBUTE( " Use 'recordException:isFatal:stackTrace:segmentation:' method instead! (passing isFatal:NO, segmentation:nil) " ) ;
427471
428472/* *
429473 * Records an unhandled exception and given stack trace manually.
430474 * @discussion For recording non-native level fatal exceptions, where the app keeps running at native level and can recover.
431475 * @param exception Exception to be recorded
432476 * @param stackTrace Stack trace to be recorded
433477 */
434- - (void )recordUnhandledException : (NSException *)exception withStackTrace : (NSArray * _Nullable)stackTrace ;
478+ - (void )recordUnhandledException : (NSException *)exception withStackTrace : (NSArray * _Nullable)stackTrace DEPRECATED_MSG_ATTRIBUTE( " Use 'recordException:isFatal:stackTrace:segmentation:' method instead! (passing isFatal:YES, segmentation:nil) " ) ;
435479
436480/* *
437481 * Records custom logs to be delivered with crash report.
@@ -505,20 +549,6 @@ NS_ASSUME_NONNULL_BEGIN
505549 */
506550+ (CountlyUserDetails *)user ;
507551
508- /* *
509- * Handles switching from device ID to custom user ID for logged in users
510- * @discussion When a user logs in, this user can be tracked with custom user ID instead of device ID.
511- * @discussion This is just a convenience method that handles setting user ID as new device ID and merging existing data on Countly Server.
512- * @param userID Custom user ID uniquely defining the logged in user
513- */
514- - (void )userLoggedIn : (NSString *)userID DEPRECATED_MSG_ATTRIBUTE(" Use 'setNewDeviceID:onServer:' method instead!" );
515-
516- /* *
517- * Handles switching from custom user ID to device ID for logged out users
518- * @discussion When a user logs out, all the data can be tracked with default device ID henceforth.
519- * @discussion This is just a convenience method that handles resetting device ID to default one and starting a new session.
520- */
521- - (void )userLoggedOut DEPRECATED_MSG_ATTRIBUTE(" Use 'setNewDeviceID:onServer:' method instead!" );
522552
523553
524554
0 commit comments