Skip to content

Commit aade0e6

Browse files
krystofwoldrichKarl Heinz Strugglkahestvivianyentran
authored
feat: Add SwiftDescriptor error fix to troubleshooting for RN and Apple (#10087)
* feat: Add SwiftDescriptor error fix to troubleshooting for RN and Apple * Apply suggestions from code review Co-authored-by: vivianyentran <[email protected]> * small update to cover different error message --------- Co-authored-by: Karl Heinz Struggl <[email protected]> Co-authored-by: Karl Heinz Struggl <[email protected]> Co-authored-by: vivianyentran <[email protected]>
1 parent ad051c9 commit aade0e6

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

docs/platforms/apple/common/troubleshooting/index.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ Check your app for any procedure that cleans the cache of your app during runtim
5050

5151
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/).
5252

53+
## Unknown receiver '\<SomeReceiver\>', Use of undeclared identifier '\<SomeIdentifier\>'
54+
55+
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`.
56+
57+
```ruby {filename:ios/Podfile}
58+
post_install do |installer|
59+
installer.pods_project.targets.each do |target|
60+
target.build_configurations.each do |config|
61+
if target.name == 'Sentry'
62+
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'YES'
63+
else
64+
# configuration for other targets
65+
end
66+
end
67+
end
68+
end
69+
```
70+
5371
## Crash in `SentrySubClassFinder.actOnSubclassesOfViewControllerInImage`
5472

5573
Suppose your app crashes in `SentrySubClassFinder actOnSubclassesOfViewControllerInImage` with a stacktrace similar to the one below:

docs/platforms/react-native/troubleshooting/index.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,30 @@ The Xcode integration reads `dist` from `CFBundleVersion` but Xcode Cloud builds
185185
export SENTRY_DIST=$CI_BUILD_NUMBER
186186
```
187187

188+
## Unknown receiver '\<SomeReceiver\>', Use of undeclared identifier '\<SomeIdentifier\>'
189+
190+
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`.```
191+
192+
```ruby {filename:ios/Podfile}
193+
post_install do |installer|
194+
react_native_post_install(
195+
installer,
196+
config[:reactNativePath],
197+
:mac_catalyst_enabled => false,
198+
)
199+
200+
installer.pods_project.targets.each do |target|
201+
target.build_configurations.each do |config|
202+
if target.name == 'Sentry'
203+
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'YES'
204+
else
205+
# configuration for other targets
206+
end
207+
end
208+
end
209+
end
210+
```
211+
188212
## Using Gradle `configureondemand`
189213

190214
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.

0 commit comments

Comments
 (0)