diff --git a/Sources/Sentry/Public/SentrySDK.h b/Sources/Sentry/Public/SentrySDK.h index d11431f707..b93a824334 100644 --- a/Sources/Sentry/Public/SentrySDK.h +++ b/Sources/Sentry/Public/SentrySDK.h @@ -6,11 +6,18 @@ @protocol SentrySpan; -@class SentryOptions, SentryEvent, SentryBreadcrumb, SentryScope, SentryUser, SentryId, - SentryUserFeedback, SentryTransactionContext; +@class SentryBreadcrumb; +@class SentryEvent; +@class SentryFeedback; +@class SentryId; @class SentryMetricsAPI; -@class UIView; +@class SentryOptions; @class SentryReplayApi; +@class SentryScope; +@class SentryTransactionContext; +@class SentryUser; +@class SentryUserFeedback; +@class UIView; NS_ASSUME_NONNULL_BEGIN @@ -246,28 +253,10 @@ SENTRY_NO_INIT /** * Captures user feedback that was manually gathered and sends it to Sentry. * @param userFeedback The user feedback to send to Sentry. - * @note If you'd prefer not to have to build the UI required to gather the feedback from the user, - * consider using `showUserFeedbackForm`, which delivers a prepackaged user feedback experience. See - * @c SentryOptions.configureUserFeedback to customize a fully managed integration. See - * https://docs.sentry.io/platforms/apple/user-feedback/#user-feedback-api and (TODO: add link to - * new docs) for more information on each approach. */ + (void)captureUserFeedback:(SentryUserFeedback *)userFeedback NS_SWIFT_NAME(capture(userFeedback:)); -/** - * Display a form to gather information from an end user in the app to send to Sentry as a user - * feedback event. - * @see @c SentryOptions.enableUserFeedbackIntegration and @c SentryOptions.configureUserFeedback to - * enable the functionality and customize the experience. - * @note If @c SentryOptions.enableUserFeedbackIntegration is @c NO, this method is a no-op. - * @note This is a fully managed user feedback flow; there will be no need to call - * @c SentrySDK.captureUserFeedback . See - * https://docs.sentry.io/platforms/apple/user-feedback/#user-feedback-api and (TODO: add link to - * new docs) for more information on each approach. - */ -+ (void)showUserFeedbackForm; - /** * Adds a Breadcrumb to the current Scope of the current Hub. If the total number of breadcrumbs * exceeds the @c SentryOptions.maxBreadcrumbs the SDK removes the oldest breadcrumb. diff --git a/Sources/Sentry/include/SentrySDK+Private.h b/Sources/Sentry/include/SentrySDK+Private.h index c4e486e89c..374b8d0c10 100644 --- a/Sources/Sentry/include/SentrySDK+Private.h +++ b/Sources/Sentry/include/SentrySDK+Private.h @@ -50,6 +50,28 @@ NS_ASSUME_NONNULL_BEGIN * Needed by hybrid SDKs as react-native to synchronously capture an envelope. */ + (void)captureEnvelope:(SentryEnvelope *)envelope; +/** + * Captures user feedback that was manually gathered and sends it to Sentry. + * @param feedback The feedback to send to Sentry. + * @note If you'd prefer not to have to build the UI required to gather the feedback from the user, + * consider using `showUserFeedbackForm`, which delivers a prepackaged user feedback experience. See + * @c SentryOptions.configureUserFeedback to customize a fully managed integration. See + * https://docs.sentry.io/platforms/apple/user-feedback/ for more information. + */ ++ (void)captureFeedback:(SentryFeedback *)feedback NS_SWIFT_NAME(capture(feedback:)); + +#if TARGET_OS_IOS && SENTRY_HAS_UIKIT +/** + * Display a form to gather information from an end user in the app to send to Sentry as a user + * feedback event. + * @see @c SentryOptions.configureUserFeedback to customize the experience, currently only on iOS. + * @warning This is an experimental feature and may still have bugs. + * @note This is a fully managed user feedback flow; there will be no need to call + * @c SentrySDK.captureUserFeedback . See + * https://docs.sentry.io/platforms/apple/user-feedback/ for more information. + */ ++ (void)showUserFeedbackForm; +#endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT @end