Skip to content

Commit 726ad93

Browse files
github-actions[bot]web-flowtustanivskygetsentry-bot
authored
chore(deps): update Cocoa SDK (iOS and Mac) to v8.54.0 (#1032)
* chore: update modules/sentry-cocoa.properties to 8.54.0 * Update package snapshot * Remove legacy define * Update cocoa class loading for Mac * Format code --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: Ivan Tustanivskyi <[email protected]> Co-authored-by: Sentry Github Bot <[email protected]>
1 parent 603a39c commit 726ad93

File tree

10 files changed

+40
-38
lines changed

10 files changed

+40
-38
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
- Bump Java SDK (Android) from v8.17.0 to v8.18.0 ([#1031](https://github.com/getsentry/sentry-unreal/pull/1031))
88
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8180)
99
- [diff](https://github.com/getsentry/sentry-java/compare/8.17.0...8.18.0)
10+
- Bump Cocoa SDK (iOS and Mac) from v8.53.2 to v8.54.0 ([#1032](https://github.com/getsentry/sentry-unreal/pull/1032))
11+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8540)
12+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.53.2...8.54.0)
1013

1114
## 1.0.0-beta.7
1215

modules/sentry-cocoa.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version=8.53.2
1+
version=8.54.0
22
repo=https://github.com/getsentry/sentry-cocoa

plugin-dev/Source/Sentry/Private/Apple/AppleSentryId.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,12 @@
77

88
FAppleSentryId::FAppleSentryId()
99
{
10-
#if PLATFORM_MAC
11-
IdApple = [[SENTRY_APPLE_CLASS(_TtC6Sentry8SentryId) alloc] init];
12-
#elif PLATFORM_IOS
1310
IdApple = [[SENTRY_APPLE_CLASS(SentryId) alloc] init];
14-
#endif
1511
}
1612

1713
FAppleSentryId::FAppleSentryId(const FString& id)
1814
{
19-
#if PLATFORM_MAC
20-
IdApple = [[SENTRY_APPLE_CLASS(_TtC6Sentry8SentryId) alloc] initWithUUIDString:id.GetNSString()];
21-
#elif PLATFORM_IOS
2215
IdApple = [[SENTRY_APPLE_CLASS(SentryId) alloc] initWithUUIDString:id.GetNSString()];
23-
#endif
2416
}
2517

2618
FAppleSentryId::FAppleSentryId(SentryId* id)

plugin-dev/Source/Sentry/Private/Apple/AppleSentrySubsystem.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,7 @@ TSharedPtr<ISentryTransactionContext> FAppleSentrySubsystem::ContinueTrace(const
395395
sampleDecision = traceParts[2].Equals(TEXT("1")) ? kSentrySampleDecisionYes : kSentrySampleDecisionNo;
396396
}
397397

398-
#if PLATFORM_MAC
399-
SentryId* traceId = [[SENTRY_APPLE_CLASS(_TtC6Sentry8SentryId) alloc] initWithUUIDString:traceParts[0].GetNSString()];
400-
#elif PLATFORM_IOS
401398
SentryId* traceId = [[SENTRY_APPLE_CLASS(SentryId) alloc] initWithUUIDString:traceParts[0].GetNSString()];
402-
#endif
403399

404400
SentryTransactionContext* transactionContext = [[SENTRY_APPLE_CLASS(SentryTransactionContext) alloc] initWithName:@"<unlabeled transaction>" operation:@"default"
405401
traceId:traceId

plugin-dev/Source/Sentry/Private/Apple/AppleSentryUserFeedback.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,12 @@ FAppleSentryUserFeedback::FAppleSentryUserFeedback(TSharedPtr<ISentryId> eventId
1313
TSharedPtr<FAppleSentryId> idIOS = StaticCastSharedPtr<FAppleSentryId>(eventId);
1414
SentryId* id = idIOS->GetNativeObject();
1515

16-
#if PLATFORM_MAC
17-
UserFeedbackApple = [[SENTRY_APPLE_CLASS(_TtC6Sentry14SentryFeedback) alloc] initWithMessage:@""
18-
name:nil
19-
email:nil
20-
source:SentryFeedbackSourceCustom
21-
associatedEventId:id
22-
attachments:nil];
23-
#elif PLATFORM_IOS
2416
UserFeedbackApple = [[SENTRY_APPLE_CLASS(SentryFeedback) alloc] initWithMessage:@""
2517
name:nil
2618
email:nil
2719
source:SentryFeedbackSourceCustom
2820
associatedEventId:id
2921
attachments:nil];
30-
#endif
3122
}
3223

3324
FAppleSentryUserFeedback::~FAppleSentryUserFeedback()
@@ -80,19 +71,10 @@ SentryFeedback* FAppleSentryUserFeedback::CreateSentryFeedback(TSharedPtr<FApple
8071
TSharedPtr<FAppleSentryId> idIOS = StaticCastSharedPtr<FAppleSentryId>(feedback->EventId);
8172
SentryId* id = idIOS->GetNativeObject();
8273

83-
#if PLATFORM_MAC
84-
return [[SENTRY_APPLE_CLASS(_TtC6Sentry14SentryFeedback) alloc] initWithMessage:feedback->Comment.GetNSString()
85-
name:feedback->Name.GetNSString()
86-
email:feedback->Email.GetNSString()
87-
source:SentryFeedbackSourceCustom
88-
associatedEventId:id
89-
attachments:nil];
90-
#elif PLATFORM_IOS
9174
return [[SENTRY_APPLE_CLASS(SentryFeedback) alloc] initWithMessage:feedback->Comment.GetNSString()
9275
name:feedback->Name.GetNSString()
9376
email:feedback->Email.GetNSString()
9477
source:SentryFeedbackSourceCustom
9578
associatedEventId:id
9679
attachments:nil];
97-
#endif
9880
}

plugin-dev/Source/Sentry/Private/Apple/Convenience/AppleSentryMacro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#if PLATFORM_MAC
1010
#define SENTRY_APPLE_CLASS(Name) \
11-
(__bridge Class) dlsym(FSentryModule::Get().GetSentryLibHandle(), "OBJC_CLASS_$_" #Name)
11+
FSentryModule::Get().GetSentryCocoaClass(#Name)
1212
#elif PLATFORM_IOS
1313
#define SENTRY_APPLE_CLASS(Name) \
1414
Name

plugin-dev/Source/Sentry/Private/SentryModule.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,30 @@ bool FSentryModule::IsMarketplaceVersion()
128128
}
129129

130130
#if PLATFORM_MAC
131+
131132
void* FSentryModule::GetSentryLibHandle() const
132133
{
133134
return mDllHandleSentry;
134135
}
136+
137+
Class FSentryModule::GetSentryCocoaClass(const ANSICHAR* ClassName)
138+
{
139+
ANSICHAR ClassNamePattern[256];
140+
FCStringAnsi::Snprintf(ClassNamePattern, sizeof(ClassNamePattern), "OBJC_CLASS_$_%s", ClassName);
141+
Class FoundClass = (__bridge Class)dlsym(GetSentryLibHandle(), ClassNamePattern);
142+
143+
if (!FoundClass)
144+
{
145+
// Try to load with Swift mangled class name
146+
ANSICHAR MangledClassNamePattern[256];
147+
int32 ClassNameLen = FCStringAnsi::Strlen(ClassName);
148+
FCStringAnsi::Snprintf(MangledClassNamePattern, sizeof(MangledClassNamePattern), "OBJC_CLASS_$__TtC6Sentry%d%s", ClassNameLen, ClassName);
149+
FoundClass = (__bridge Class)dlsym(GetSentryLibHandle(), MangledClassNamePattern);
150+
}
151+
152+
return FoundClass;
153+
}
154+
135155
#endif
136156

137157
#undef LOCTEXT_NAMESPACE

plugin-dev/Source/Sentry/Public/SentryModule.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ class SENTRY_API FSentryModule : public IModuleInterface
4747
#if PLATFORM_MAC
4848
/** Gets handle to dynamically loaded sentry library. */
4949
void* GetSentryLibHandle() const;
50+
51+
/** Gets an Objective-C/Swift class from the dynamically loaded sentry library.
52+
*
53+
* @param ClassName The unqualified class name (e.g., "SentrySDK", "SentryId")
54+
* @return The Objective-C/Swift Class object if found, nil otherwise
55+
*
56+
* @note: First tries pattern OBJC_CLASS_$_{ClassName}
57+
* Then tries Swift mangled pattern OBJC_CLASS_$__TtC6Sentry{len}{ClassName} where:
58+
* `_Tt` is Swift type symbol prefix
59+
* `C6Sentry` is a class (`C`) in the Sentry module (`6Sentry` means the module name is 6 characters long)
60+
* {len} is the length of the class name as a decimal string
61+
*/
62+
Class GetSentryCocoaClass(const ANSICHAR* ClassName);
5063
#endif
5164

5265
static const FName ModuleName;

plugin-dev/Source/Sentry/Sentry.Build.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public Sentry(ReadOnlyTargetRules Target) : base(Target)
6161
PublicDefinitions.Add("SENTRY_NO_UIKIT=0");
6262
PublicDefinitions.Add("APPLICATION_EXTENSION_API_ONLY_NO=0");
6363
PublicDefinitions.Add("SDK_V9=0");
64-
PublicDefinitions.Add("SDK_v9=0");
6564
}
6665
else if (Target.Platform == UnrealTargetPlatform.Mac)
6766
{
@@ -76,7 +75,6 @@ public Sentry(ReadOnlyTargetRules Target) : base(Target)
7675
PublicDefinitions.Add("SENTRY_NO_UIKIT=1");
7776
PublicDefinitions.Add("APPLICATION_EXTENSION_API_ONLY_NO=0");
7877
PublicDefinitions.Add("SDK_V9=0");
79-
PublicDefinitions.Add("SDK_v9=0");
8078
}
8179
else if (Target.Platform == UnrealTargetPlatform.Android)
8280
{

scripts/packaging/package.snapshot

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ Source/ThirdParty/IOS/Sentry.framework/Headers/SentryRequest.h
269269
Source/ThirdParty/IOS/Sentry.framework/Headers/SentrySampleDecision.h
270270
Source/ThirdParty/IOS/Sentry.framework/Headers/SentrySamplingContext.h
271271
Source/ThirdParty/IOS/Sentry.framework/Headers/SentryScope.h
272-
Source/ThirdParty/IOS/Sentry.framework/Headers/SentrySDK.h
273272
Source/ThirdParty/IOS/Sentry.framework/Headers/SentrySerializable.h
274273
Source/ThirdParty/IOS/Sentry.framework/Headers/SentrySpanContext.h
275274
Source/ThirdParty/IOS/Sentry.framework/Headers/SentrySpanId.h
@@ -315,8 +314,8 @@ Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryInternalSerializable
315314
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryLogC.h
316315
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryNSDataUtils.h
317316
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryNSDictionarySanitize.h
318-
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryOptions+HybridSDKs.h
319317
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryOptions+Private.h
318+
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryOptionsInternal.h
320319
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryRequestOperation.h
321320
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentryScreenFrames.h
322321
Source/ThirdParty/IOS/Sentry.framework/PrivateHeaders/SentrySDK+Private.h
@@ -399,8 +398,8 @@ Source/ThirdParty/Mac/include/Sentry/SentryNSDataUtils.h
399398
Source/ThirdParty/Mac/include/Sentry/SentryNSDictionarySanitize.h
400399
Source/ThirdParty/Mac/include/Sentry/SentryNSError.h
401400
Source/ThirdParty/Mac/include/Sentry/SentryOptions.h
402-
Source/ThirdParty/Mac/include/Sentry/SentryOptions+HybridSDKs.h
403401
Source/ThirdParty/Mac/include/Sentry/SentryOptions+Private.h
402+
Source/ThirdParty/Mac/include/Sentry/SentryOptionsInternal.h
404403
Source/ThirdParty/Mac/include/Sentry/SentryProfilingConditionals.h
405404
Source/ThirdParty/Mac/include/Sentry/SentryReplayApi.h
406405
Source/ThirdParty/Mac/include/Sentry/SentryRequest.h
@@ -409,7 +408,6 @@ Source/ThirdParty/Mac/include/Sentry/SentrySampleDecision.h
409408
Source/ThirdParty/Mac/include/Sentry/SentrySamplingContext.h
410409
Source/ThirdParty/Mac/include/Sentry/SentryScope.h
411410
Source/ThirdParty/Mac/include/Sentry/SentryScreenFrames.h
412-
Source/ThirdParty/Mac/include/Sentry/SentrySDK.h
413411
Source/ThirdParty/Mac/include/Sentry/SentrySDK+Private.h
414412
Source/ThirdParty/Mac/include/Sentry/SentrySdkInfo.h
415413
Source/ThirdParty/Mac/include/Sentry/SentrySerializable.h

0 commit comments

Comments
 (0)