Skip to content

Commit 8490159

Browse files
feat(apple): Troubleshooting for subclass error (#13509)
Explain how to resolve a compilation error when subclassing specific classes in the troubleshooting guide.
1 parent 995a4b1 commit 8490159

File tree

1 file changed

+23
-0
lines changed
  • docs/platforms/apple/common/troubleshooting

1 file changed

+23
-0
lines changed

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

+23
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,26 @@ rsync error: some files could not be transferred (code 23) at /AppleInternal/Lib
180180
```
181181

182182
While it seems to be related to Sentry, it is actually caused by the user script sandbox feature introduced in [Xcode 14](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes), which is enabled by default. In order to fix this, you need to head to the target settings of your project and set the "Enable User Script Sandbox" option to `NO`.
183+
184+
## 'required' initializer 'init(from:)' must be provided by subclass
185+
186+
Since Cocoa SDK version [8.45.0](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8450) and above,
187+
you might see a compilation error `'required' initializer 'init(from:)' must be provided by subclass ...`, when you subclass any of the following classes:
188+
189+
* `SentryBreadcrumb`
190+
* `SentryDebugMeta`
191+
* `SentryEvent`
192+
* `SentryException`
193+
* `SentryFrame`
194+
* `SentryGeo`
195+
* `SentryId`
196+
* `SentryMechanism`
197+
* `SentryMechanismMeta`
198+
* `SentryMessage`
199+
* `SentryNSError`
200+
* `SentryRequest`
201+
* `SentryStacktrace`
202+
* `SentryThread`
203+
* `SentryUser`
204+
205+
You can fix this by not subclassing the affected classes. Strictly speaking, this is a breaking change, but these classes are not intended to be subclassed. If you have a strong reason to subclass them, please open a [GitHub issue](https://github.com/getsentry/sentry-cocoa/issues/new/choose).

0 commit comments

Comments
 (0)