diff --git a/CHANGELOG.md b/CHANGELOG.md index 29b5c2f80..703972dcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixes + +- Fix compatibility issues with Cocoa SDK 9.0.0 ([#1149](https://github.com/getsentry/sentry-unreal/pull/1149)) + ### Dependencies - Bump Native SDK from v0.12.0 to v0.12.1 ([#1136](https://github.com/getsentry/sentry-unreal/pull/1136)) diff --git a/plugin-dev/Source/Sentry/Private/Apple/AppleSentryLog.cpp b/plugin-dev/Source/Sentry/Private/Apple/AppleSentryLog.cpp index a68d7c6fc..bcb2f1069 100644 --- a/plugin-dev/Source/Sentry/Private/Apple/AppleSentryLog.cpp +++ b/plugin-dev/Source/Sentry/Private/Apple/AppleSentryLog.cpp @@ -15,7 +15,7 @@ FAppleSentryLog::FAppleSentryLog() LogApple.traceId = [[SENTRY_APPLE_CLASS(SentryId) alloc] init]; LogApple.body = @""; LogApple.attributes = @{}; - LogApple.level = SentryStructuredLogLevelDebug; + LogApple.level = SentryLogLevelDebug; } FAppleSentryLog::FAppleSentryLog(SentryLog* log) @@ -56,10 +56,10 @@ FString FAppleSentryLog::GetBody() const void FAppleSentryLog::SetLevel(ESentryLevel level) { - LogApple.level = FAppleSentryConverters::SentryStructuredLogLevelToNative(level); + LogApple.level = FAppleSentryConverters::SentryLogLevelToNative(level); } ESentryLevel FAppleSentryLog::GetLevel() const { - return FAppleSentryConverters::SentryStructuredLogLevelToUnreal(LogApple.level); + return FAppleSentryConverters::SentryLogLevelToUnreal(LogApple.level); } \ No newline at end of file diff --git a/plugin-dev/Source/Sentry/Private/Apple/AppleSentrySubsystem.cpp b/plugin-dev/Source/Sentry/Private/Apple/AppleSentrySubsystem.cpp index 1cabebd1f..fdc1cb446 100644 --- a/plugin-dev/Source/Sentry/Private/Apple/AppleSentrySubsystem.cpp +++ b/plugin-dev/Source/Sentry/Private/Apple/AppleSentrySubsystem.cpp @@ -64,7 +64,7 @@ void FAppleSentrySubsystem::InitWithSettings(const USentrySettings* settings, US options.maxBreadcrumbs = settings->MaxBreadcrumbs; options.sendDefaultPii = settings->SendDefaultPii; options.maxAttachmentSize = settings->MaxAttachmentSize; - options.experimental.enableLogs = settings->EnableStructuredLogging; + options.enableLogs = settings->EnableStructuredLogging; #if SENTRY_UIKIT_AVAILABLE options.attachScreenshot = settings->AttachScreenshot; #endif @@ -86,10 +86,6 @@ void FAppleSentrySubsystem::InitWithSettings(const USentrySettings* settings, US { [options addInAppInclude:it->GetNSString()]; } - for (auto it = settings->InAppExclude.CreateConstIterator(); it; ++it) - { - [options addInAppExclude:it->GetNSString()]; - } options.enableAppHangTracking = settings->EnableAppNotRespondingTracking; if (settings->EnableTracing && settings->SamplingType == ESentryTracesSamplingType::UniformSampleRate) { diff --git a/plugin-dev/Source/Sentry/Private/Apple/Infrastructure/AppleSentryConverters.cpp b/plugin-dev/Source/Sentry/Private/Apple/Infrastructure/AppleSentryConverters.cpp index b8a32d527..17f2f42ed 100644 --- a/plugin-dev/Source/Sentry/Private/Apple/Infrastructure/AppleSentryConverters.cpp +++ b/plugin-dev/Source/Sentry/Private/Apple/Infrastructure/AppleSentryConverters.cpp @@ -35,26 +35,26 @@ SentryLevel FAppleSentryConverters::SentryLevelToNative(ESentryLevel level) return nativeLevel; } -SentryStructuredLogLevel FAppleSentryConverters::SentryStructuredLogLevelToNative(ESentryLevel level) +SentryLogLevel FAppleSentryConverters::SentryLogLevelToNative(ESentryLevel level) { - SentryStructuredLogLevel nativeLevel = SentryStructuredLogLevelDebug; + SentryLogLevel nativeLevel = SentryLogLevelDebug; switch (level) { case ESentryLevel::Debug: - nativeLevel = SentryStructuredLogLevelDebug; + nativeLevel = SentryLogLevelDebug; break; case ESentryLevel::Info: - nativeLevel = SentryStructuredLogLevelInfo; + nativeLevel = SentryLogLevelInfo; break; case ESentryLevel::Warning: - nativeLevel = SentryStructuredLogLevelWarn; + nativeLevel = SentryLogLevelWarn; break; case ESentryLevel::Error: - nativeLevel = SentryStructuredLogLevelError; + nativeLevel = SentryLogLevelError; break; case ESentryLevel::Fatal: - nativeLevel = SentryStructuredLogLevelFatal; + nativeLevel = SentryLogLevelFatal; break; default: UE_LOG(LogSentrySdk, Warning, TEXT("Unknown Sentry level value used. Debug will be returned.")); @@ -183,26 +183,26 @@ ESentryLevel FAppleSentryConverters::SentryLevelToUnreal(SentryLevel level) return unrealLevel; } -ESentryLevel FAppleSentryConverters::SentryStructuredLogLevelToUnreal(SentryStructuredLogLevel level) +ESentryLevel FAppleSentryConverters::SentryLogLevelToUnreal(SentryLogLevel level) { ESentryLevel unrealLevel = ESentryLevel::Debug; switch (level) { - case SentryStructuredLogLevelTrace: - case SentryStructuredLogLevelDebug: + case SentryLogLevelTrace: + case SentryLogLevelDebug: unrealLevel = ESentryLevel::Debug; break; - case SentryStructuredLogLevelInfo: + case SentryLogLevelInfo: unrealLevel = ESentryLevel::Info; break; - case SentryStructuredLogLevelWarn: + case SentryLogLevelWarn: unrealLevel = ESentryLevel::Warning; break; - case SentryStructuredLogLevelError: + case SentryLogLevelError: unrealLevel = ESentryLevel::Error; break; - case SentryStructuredLogLevelFatal: + case SentryLogLevelFatal: unrealLevel = ESentryLevel::Fatal; break; default: diff --git a/plugin-dev/Source/Sentry/Private/Apple/Infrastructure/AppleSentryConverters.h b/plugin-dev/Source/Sentry/Private/Apple/Infrastructure/AppleSentryConverters.h index 655dee14e..fdfccb030 100644 --- a/plugin-dev/Source/Sentry/Private/Apple/Infrastructure/AppleSentryConverters.h +++ b/plugin-dev/Source/Sentry/Private/Apple/Infrastructure/AppleSentryConverters.h @@ -16,7 +16,7 @@ class FAppleSentryConverters public: /** Conversions to native Mac/iOS types */ static SentryLevel SentryLevelToNative(ESentryLevel level); - static SentryStructuredLogLevel SentryStructuredLogLevelToNative(ESentryLevel level); + static SentryLogLevel SentryLogLevelToNative(ESentryLevel level); static NSDictionary* StringMapToNative(const TMap& map); static NSArray* StringArrayToNative(const TArray& array); static NSData* ByteDataToNative(const TArray& array); @@ -27,7 +27,7 @@ class FAppleSentryConverters /** Conversions from native Mac/iOS types */ static ESentryLevel SentryLevelToUnreal(SentryLevel level); - static ESentryLevel SentryStructuredLogLevelToUnreal(SentryStructuredLogLevel level); + static ESentryLevel SentryLogLevelToUnreal(SentryLogLevel level); static TMap StringMapToUnreal(NSDictionary* dict); static TArray StringArrayToUnreal(NSArray* array); static TArray ByteDataToUnreal(NSData* data); diff --git a/plugin-dev/Source/Sentry/Public/SentrySettings.h b/plugin-dev/Source/Sentry/Public/SentrySettings.h index e03328725..38675e077 100644 --- a/plugin-dev/Source/Sentry/Public/SentrySettings.h +++ b/plugin-dev/Source/Sentry/Public/SentrySettings.h @@ -339,7 +339,7 @@ class SENTRY_API USentrySettings : public UObject TArray InAppInclude; UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "General|Mobile", - Meta = (DisplayName = "In-app excludes (for Android/Apple only)", Tooltip = "A list of string prefixes of module names that don't belong to the app.")) + Meta = (DisplayName = "In-app excludes (for Android only)", Tooltip = "A list of string prefixes of module names that don't belong to the app.")) TArray InAppExclude; UPROPERTY(Config, EditAnywhere, BlueprintReadWrite, Category = "General|Mobile",