Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replay options not visible from Objective-C #4543

Open
bruno-garcia opened this issue Nov 15, 2024 · 3 comments
Open

Replay options not visible from Objective-C #4543

bruno-garcia opened this issue Nov 15, 2024 · 3 comments

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Nov 15, 2024

Platform

iOS

Environment

Production

Installed

CocoaPods

Version

Latest React Native one

Xcode Version

not sure

Did it work on previous versions?

No response

Steps to Reproduce

A customer on React Native, tried to enable replay through the native layer directly (they are initializign Sentry native directly).
But they said they couldn't call options.experimental from Objective-C

Are you willing to submit a PR?

No response

@brustolin
Copy link
Contributor

brustolin commented Nov 18, 2024

From native objc code, you need to use @import Sentry; and not #import <Sentry/Sentry.h> to be able to use session replay.

Can you check whether this works for the customer?

@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Nov 18, 2024
@brustolin brustolin moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Nov 18, 2024
@barisyild
Copy link

From native objc code, you need to use @import Sentry; and not #import <Sentry/Sentry.h> to be able to use session replay.

Can you check whether this works for the customer?

Unfortunately my project is incompatible with the “-fmodules” and “-fcxx-modules” parameters.

Defining these parameters causes the following error in a header file in my project.

import of C++ module 'std_stdint_h' appears within extern "C" language linkage specification [-Wmodule-import-in-extern-c]

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 26, 2024
@brustolin
Copy link
Contributor

Hello @barisyild
In this case, you will need to create a objc wrapper class to start Sentry and enable “-fmodules” and “-fcxx-modules” only for that file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Needs Investigation
Development

No branches or pull requests

3 participants