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

feat: Add SwiftDescriptor error fix to troubleshooting for RN and Apple #10087

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/platforms/apple/common/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 '\<SomeReceiver\>', Use of undeclared identifier '\<SomeIdentifier\>'

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:
Expand Down
24 changes: 24 additions & 0 deletions docs/platforms/react-native/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,30 @@ The Xcode integration reads `dist` from `CFBundleVersion` but Xcode Cloud builds
export SENTRY_DIST=$CI_BUILD_NUMBER
```

## Unknown receiver '\<SomeReceiver\>', Use of undeclared identifier '\<SomeIdentifier\>'

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.
Expand Down
Loading