Skip to content

Commit

Permalink
feat: Add SwiftDescriptor error fix to troubleshooting for RN and App…
Browse files Browse the repository at this point in the history
…le (#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]>
  • Loading branch information
4 people committed Sep 18, 2024
1 parent ad051c9 commit aade0e6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
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

0 comments on commit aade0e6

Please sign in to comment.