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 1 commit
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 'SwiftDescriptor'

If you see an error like `Unknown receiver 'SwiftDescriptor'` during the application build process, it's due to a conflict of `APPLICATION_EXTENSION_API_ONLY`. The Sentry cocoapod is by default configured with `APPLICATION_EXTENSION_API_ONLY=YES`, but some `post_install` script changed it. To fix the error add the following to the `Podfile`.
kahest marked this conversation as resolved.
Show resolved Hide resolved

```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 @@ -186,6 +186,30 @@ The Xcode integration reads `dist` from `CFBundleVersion` but Xcode Cloud builds
export SENTRY_DIST=$CI_BUILD_NUMBER
```

## Unknown receiver 'SwiftDescriptor'

If you see an error like `Unknown receiver 'SwiftDescriptor'` during the application build process, it's due to a conflict of `APPLICATION_EXTENSION_API_ONLY`. The Sentry cocoapod is by default configured with `APPLICATION_EXTENSION_API_ONLY=YES`, but some `post_install` script changed it. To fix the error add the following to the `Podfile`.
kahest marked this conversation as resolved.
Show resolved Hide resolved

```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
```

## Set Up SDK v4 With React Native 0.69 or Higher

To install an older version of the `@sentry/react-native`, you'll need to specify it in the install command. Similarly, you'll need to use a compatible `@sentry/wizard`, as shown in the script below.
Expand Down
Loading