You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to enable the experimental Session Replay feature in my React Native app.
Since I initialized Sentry manually on the native side, I need to set the following parameters in the AppDelegate.mm file:
Session Replay should be initialized successfully on native side.
Below you can find Sentry SDK init snippet code
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
options.dsn = @"XXXXXX";
options.debug = false;
options.experimental.sessionReplay.onErrorSampleRate = 1.0;
options.experimental.sessionReplay.sessionSampleRate = 1.0;
// Load values from Info.plist as dictionary
NSDictionary* infoDict = [[NSBundle mainBundle] infoDictionary];
// Extract version and dist from dictonary
NSString* version = [infoDict objectForKey:@"CFBundleShortVersionString"];
NSString* dist = [infoDict objectForKey:@"CFBundleVersion"];
options.releaseName = [NSString stringWithFormat:@"%@%@", @"XXXXX@", version];
options.dist = dist;
options.environment = [infoDict objectForKey:@"logger_environment"];
}];
Actual Result
I'm getting the following error: Property 'sessionReplay' cannot be found in forward class object 'SentryExperimentalOptions'
I've checked the SDK, and the experimental parameter is of type SentryExperimentalOptions, which contains a public sessionReplay variable (under canImport(UIKit) condition.
Do you have any idea why I'm receiving this error?
Are you willing to submit a PR?
No response
The text was updated successfully, but these errors were encountered:
Hello @dusanristic, thanks for reaching out.
Instead of using #import <Sentry/Sentry.h> you should use @import Sentry;
The replay feature was created in Swift, therefore you need to import the module.
Platform
iOS
Environment
Develop
Installed
CocoaPods
Version
8.37.0
Xcode Version
15.2 & 16.0
Did it work on previous versions?
/
Steps to Reproduce
/
Expected Result
I want to enable the experimental Session Replay feature in my React Native app.
Since I initialized Sentry manually on the native side, I need to set the following parameters in the AppDelegate.mm file:
Session Replay should be initialized successfully on native side.
Below you can find Sentry SDK init snippet code
Actual Result
I'm getting the following error:
Property 'sessionReplay' cannot be found in forward class object 'SentryExperimentalOptions'
I've checked the SDK, and the experimental parameter is of type
SentryExperimentalOptions
, which contains a publicsessionReplay
variable (undercanImport(UIKit)
condition.Do you have any idea why I'm receiving this error?
Are you willing to submit a PR?
No response
The text was updated successfully, but these errors were encountered: