---
title: "Migrate from 6.x to 7.x"
description: "Learn about migrating from Sentry Cocoa SDK 6.x to 7.x."
url: https://docs.sentry.io/platforms/apple/guides/tvos/migration/v6-to-v7/
---

# Migrate from 6.x to 7.x | Sentry for tvOS

##### Important

We recommend updating to at least [7.5.3](https://github.com/getsentry/sentry-cocoa/releases/tag/7.5.3), because the HTTP instrumentation can lead to crashes. Alternatively, you can also [disable the feature](https://docs.sentry.io/platforms/apple/guides/tvos/tracing/instrumentation/automatic-instrumentation.md#network-tracking).

Migrating to 7.x from 6.x includes a few breaking changes. We provide this guide to help you to update your SDK.

## [Configuration Changes](https://docs.sentry.io/platforms/apple/guides/tvos/migration/v6-to-v7.md#configuration-changes)

This version includes the following configuration changes:

* Change the default maximum number of cached envelopes from 100 to 30. You can now configure this number with `SentryOptions.maxCacheItems`.
* When setting a value `SentryOptions.sampleRate` that is not >= 0.0 and <= 1.0 the SDK sets it to the default of 1.0 instead of keeping the set value.

## [Breaking Changes](https://docs.sentry.io/platforms/apple/guides/tvos/migration/v6-to-v7.md#breaking-changes)

### [Issue Grouping](https://docs.sentry.io/platforms/apple/guides/tvos/migration/v6-to-v7.md#issue-grouping)

This version introduces a change to the grouping of issues. The SDK now sets the `inApp` flag for frames originating from only the main executable using [CFBundleExecutable](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleexecutable). In previous versions, all frames originating from the application bundle were marked as `inApp`. This had the downside of marking frames of private frameworks inside the bundle as `inApp`. This problem is fixed now. Applications using static frameworks shouldn't be affected by this change. For more information read [mark in-app frames](https://docs.sentry.io/concepts/data-management/event-grouping/stack-trace-rules.md#mark-in-app-frames).

### [Cleanup Public Classes](https://docs.sentry.io/platforms/apple/guides/tvos/migration/v6-to-v7.md#cleanup-public-classes)

We cleaned up our public classes by removing a few functions and properties, that shouldn't be public, to make the API cleaner. In case we removed something you need, please [open an issue](https://github.com/getsentry/sentry-cocoa/issues/new/choose) on GitHub.

* Remove `SentrySDK.currentHub` and `SentrySDK.setCurrentHub`.
* Remove `SentryClient.storeEnvelope`, which is reserved for Hybrid SDKs.
* Make `closeCachedSessionWithTimestamp` private, which is reserved for internal use.
* Remove deprecated `SentryHub.getScope`. Use `SentryHub.scope` instead.
* Replace `SentryException.thread` with `SentryException.threadId` and `SentryException.stacktrace` to align with the [unified API](https://develop.sentry.dev/sdk/miscellaneous/unified-api/).
* Replace dict `SentryMechanism.meta` with new class `SentryMechanismMeta` and move `SenryNSError` to `SentryMechanismMeta` to align with the [unified API](https://develop.sentry.dev/sdk/miscellaneous/unified-api/).
* Change `SentryEvent.timestamp` to `nullable`.

## [SentryLogLevel](https://docs.sentry.io/platforms/apple/guides/tvos/migration/v6-to-v7.md#sentryloglevel)

We replaced the `SentryLogLevel` with `SentryLevel`, renamed `logLevel` to `diagnosticLevel` on `SentryOptions` to align with other Sentry SDKs, and set the default `diagnosticLevel` to `SentryLevel.debug`. Furthermore, we removed setting the `logLevel` statically on the `SentrySDK`. Please use the `SentryOptions` to set the `diagnosticLevel` instead.

6.x

```swift
SentrySDK.start { options in
  options.logLevel = SentryLogLevel.verbose
}

// Or

SentrySDK.logLevel = SentryLogLevel.verbose
```

7.x

```swift
SentrySDK.start { options in
  options.diagnosticLevel = SentryLevel.debug
}
```
