File tree Expand file tree Collapse file tree 4 files changed +23
-9
lines changed
plugin-dev/Source/Sentry/Private/Apple Expand file tree Collapse file tree 4 files changed +23
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Fixes
6
+
7
+ - Fix warnings caused by deprecated Cocoa SDK API usages ([ #868 ] ( https://github.com/getsentry/sentry-unreal/pull/868 ) )
8
+
5
9
### Dependencies
6
10
7
11
- Bump Java SDK (Android) from v8.6.0 to v8.7.0 ([ #863 ] ( https://github.com/getsentry/sentry-unreal/pull/863 ) )
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ void FAppleSentrySubsystem::CaptureUserFeedback(TSharedPtr<ISentryUserFeedback>
243
243
{
244
244
TSharedPtr<SentryUserFeedbackApple> userFeedbackIOS = StaticCastSharedPtr<SentryUserFeedbackApple>(userFeedback);
245
245
246
- [SENTRY_APPLE_CLASS (SentrySDK) captureUserFeedback :userFeedbackIOS->GetNativeObject ()];
246
+ [SENTRY_APPLE_CLASS (SentrySDK) captureFeedback :userFeedbackIOS->GetNativeObject ()];
247
247
}
248
248
249
249
void FAppleSentrySubsystem::SetUser (TSharedPtr<ISentryUser> user)
@@ -363,7 +363,9 @@ TSharedPtr<ISentryTransactionContext> FAppleSentrySubsystem::ContinueTrace(const
363
363
traceId:traceId
364
364
spanId:[[SENTRY_APPLE_CLASS (SentrySpanId) alloc] init]
365
365
parentSpanId:[[SENTRY_APPLE_CLASS (SentrySpanId) alloc] initWithValue:traceParts[1 ].GetNSString ()]
366
- parentSampled:sampleDecision];
366
+ parentSampled:sampleDecision
367
+ parentSampleRate:nil
368
+ parentSampleRand:nil];
367
369
368
370
// currently `sentry-cocoa` doesn't have API for `SentryTransactionContext` to set `baggageHeaders`
369
371
Original file line number Diff line number Diff line change @@ -11,15 +11,23 @@ SentryUserFeedbackApple::SentryUserFeedbackApple(TSharedPtr<ISentryId> eventId)
11
11
{
12
12
TSharedPtr<SentryIdApple> idIOS = StaticCastSharedPtr<SentryIdApple>(eventId);
13
13
SentryId* id = idIOS->GetNativeObject ();
14
- UserFeedbackApple = [[SENTRY_APPLE_CLASS (SentryUserFeedback) alloc] initWithEventId:id];
14
+
15
+ // `SentryFeedback` is defined in Swift so its name that can be recognized by UE should be taken from "Sentry-Swift.h" to successfully load class on Mac
16
+ #if PLATFORM_MAC
17
+ UserFeedbackApple = [[SENTRY_APPLE_CLASS (_TtC6Sentry14SentryFeedback) alloc] initWithMessage:@" "
18
+ name:nil email:nil source:SentryFeedbackSourceCustom associatedEventId:id attachments:nil];
19
+ #elif PLATFORM_IOS
20
+ UserFeedbackApple = [[SENTRY_APPLE_CLASS (SentryFeedback) alloc] initWithMessage:@" "
21
+ name:nil email:nil source:SentryFeedbackSourceCustom associatedEventId:id attachments:nil];
22
+ #endif
15
23
}
16
24
17
25
SentryUserFeedbackApple::~SentryUserFeedbackApple ()
18
26
{
19
27
// Put custom destructor logic here if needed
20
28
}
21
29
22
- SentryUserFeedback * SentryUserFeedbackApple::GetNativeObject ()
30
+ SentryFeedback * SentryUserFeedbackApple::GetNativeObject ()
23
31
{
24
32
return UserFeedbackApple;
25
33
}
@@ -46,10 +54,10 @@ FString SentryUserFeedbackApple::GetEmail() const
46
54
47
55
void SentryUserFeedbackApple::SetComment (const FString& comment)
48
56
{
49
- UserFeedbackApple.comments = comment.GetNSString ();
57
+ UserFeedbackApple.message = comment.GetNSString ();
50
58
}
51
59
52
60
FString SentryUserFeedbackApple::GetComment () const
53
61
{
54
- return FString (UserFeedbackApple.comments );
62
+ return FString (UserFeedbackApple.message );
55
63
}
Original file line number Diff line number Diff line change 6
6
7
7
class ISentryId;
8
8
9
- @class SentryUserFeedback ;
9
+ @class SentryFeedback ;
10
10
11
11
class SentryUserFeedbackApple : public ISentryUserFeedback
12
12
{
13
13
public:
14
14
SentryUserFeedbackApple (TSharedPtr<ISentryId> eventId);
15
15
virtual ~SentryUserFeedbackApple () override;
16
16
17
- SentryUserFeedback * GetNativeObject ();
17
+ SentryFeedback * GetNativeObject ();
18
18
19
19
virtual void SetName (const FString& name) override;
20
20
virtual FString GetName () const override;
@@ -24,5 +24,5 @@ class SentryUserFeedbackApple : public ISentryUserFeedback
24
24
virtual FString GetComment () const override;
25
25
26
26
private:
27
- SentryUserFeedback * UserFeedbackApple;
27
+ SentryFeedback * UserFeedbackApple;
28
28
};
You can’t perform that action at this time.
0 commit comments