diff --git a/docs/platforms/apple/common/troubleshooting/index.mdx b/docs/platforms/apple/common/troubleshooting/index.mdx index bc1ecd700f72a..8ebda862398de 100644 --- a/docs/platforms/apple/common/troubleshooting/index.mdx +++ b/docs/platforms/apple/common/troubleshooting/index.mdx @@ -50,6 +50,24 @@ Check your app for any procedure that cleans the cache of your app during runtim Since Xcode 14 App Store Connect doesn't make debug symbols available for download anymore, see [Xcode Release Notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes#Deprecations). Please use a different way of uploading the debug symbols by following the [documentation](/platforms/apple/dsym/). +## Unknown receiver '\', Use of undeclared identifier '\' + +If you see an error like `Unknown receiver 'SwiftDescriptor'` or `Use of undeclared identifier 'SentryLog'` during the application build process, there's a conflict stemming from `APPLICATION_EXTENSION_API_ONLY`. By default, the Sentry Cocoapod is configured with `APPLICATION_EXTENSION_API_ONLY=YES`, but some `post_install` script likely changed it. To fix this error, add the following to the `Podfile`. + +```ruby {filename:ios/Podfile} +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + if target.name == 'Sentry' + config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'YES' + else + # configuration for other targets + end + end + end +end +``` + ## Crash in `SentrySubClassFinder.actOnSubclassesOfViewControllerInImage` Suppose your app crashes in `SentrySubClassFinder actOnSubclassesOfViewControllerInImage` with a stacktrace similar to the one below: diff --git a/docs/platforms/react-native/troubleshooting/index.mdx b/docs/platforms/react-native/troubleshooting/index.mdx index 11ab0b0d78465..10d0e70cdc474 100644 --- a/docs/platforms/react-native/troubleshooting/index.mdx +++ b/docs/platforms/react-native/troubleshooting/index.mdx @@ -185,6 +185,30 @@ The Xcode integration reads `dist` from `CFBundleVersion` but Xcode Cloud builds export SENTRY_DIST=$CI_BUILD_NUMBER ``` +## Unknown receiver '\', Use of undeclared identifier '\' + +If you see an error like `Unknown receiver 'SwiftDescriptor'` or `Use of undeclared identifier 'SentryLog'` during the application build process, there's a conflict stemming from `APPLICATION_EXTENSION_API_ONLY`. By default, the Sentry Cocoapod is configured with `APPLICATION_EXTENSION_API_ONLY=YES`, but some `post_install` script likely changed it. To fix this error, add the following to the `Podfile`.``` + +```ruby {filename:ios/Podfile} +post_install do |installer| + react_native_post_install( + installer, + config[:reactNativePath], + :mac_catalyst_enabled => false, + ) + + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + if target.name == 'Sentry' + config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'YES' + else + # configuration for other targets + end + end + end +end +``` + ## Using Gradle `configureondemand` If you have enabled Gradle's `org.gradle.configureondemand` feature, you'll need a clean build, or you'll need to disable this feature to upload the source map on every build.