WebView
Learn how to set up the Sentry Cocoa and Browser SDKs with WebView.
To monitor errors and performance in web views of iOS, iPadOS, and macOS applications, you need to set up Sentry SDKs in both the mobile application and the web projects running in the web views.
The Sentry Cocoa SDK doesn't interact with the mobile application's web views. To monitor errors and performance in the native part of the application follow the Sentry Cocoa SDK setup instructions.
To monitor errors and performance in web views choose the appropriate Sentry JavaScript SDK depending on the framework used in the web project.
- Sentry React SDK (if the web project uses React)
- Sentry Angular SDK (if the web project uses Angular)
- Other Sentry JavaScript SDKs
The JavaScript SDK should be initialized when the web view is created and will be closed when the web view is closed. To monitor all web views in the application, initialize the JavaScript SDK every time a web view is created.
If the web project is accessed remotely and not unique to the mobile application (for example the project also works as a standalone web application), we recommend using separate Sentry projects for the mobile application and the web project.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").