Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Sentry/SentrySessionReplayIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,16 @@
NSURL *dir = [self replayDirectory];
NSDictionary<NSString *, id> *jsonObject = [self lastReplayInfo];

if (jsonObject == nil) {
if (jsonObject == nil || jsonObject[@"path"] == nil) {
SENTRY_LOG_DEBUG(
@"[Session Replay] No last replay info found, not resuming previous session replay");
return;
}

SentryId *replayId = jsonObject[@"replayId"]
? [[SentryId alloc] initWithUUIDString:jsonObject[@"replayId"]]

Check warning on line 212 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'id _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Wnullable-to-nonnull-conversion]
: [[SentryId alloc] init];
NSURL *lastReplayURL = [dir URLByAppendingPathComponent:jsonObject[@"path"]];

Check warning on line 214 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'id _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Wnullable-to-nonnull-conversion]

SentryCrashReplay crashInfo = { 0 };
bool hasCrashInfo = sentrySessionReplaySync_readInfo(&crashInfo,
Expand All @@ -235,7 +235,7 @@
}

SentryOnDemandReplay *resumeReplayMaker =
[[SentryOnDemandReplay alloc] initWithContentFrom:lastReplayURL.path

Check warning on line 238 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Wnullable-to-nonnull-conversion]
processingQueue:_replayProcessingQueue
assetWorkerQueue:_replayAssetWorkerQueue];
resumeReplayMaker.bitRate = _replayOptions.replayBitRate;
Expand Down Expand Up @@ -381,7 +381,7 @@
NSString *currentSession = [NSUUID UUID].UUIDString;
docs = [docs URLByAppendingPathComponent:currentSession];

if (![NSFileManager.defaultManager fileExistsAtPath:docs.path]) {

Check warning on line 384 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Wnullable-to-nonnull-conversion]
SENTRY_LOG_DEBUG(@"[Session Replay] Creating directory at path: %@", docs.path);
[NSFileManager.defaultManager createDirectoryAtURL:docs
withIntermediateDirectories:YES
Expand All @@ -390,7 +390,7 @@
}

SentryOnDemandReplay *replayMaker =
[[SentryOnDemandReplay alloc] initWithOutputPath:docs.path

Check warning on line 393 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Wnullable-to-nonnull-conversion]
processingQueue:_replayProcessingQueue
assetWorkerQueue:_replayAssetWorkerQueue];
replayMaker.bitRate = replayOptions.replayBitRate;
Expand Down Expand Up @@ -418,7 +418,7 @@
environmentChecker:_environmentChecker];

[self.sessionReplay
startWithRootView:[SentryDependencyContainer.sharedInstance.application getWindows]

Check warning on line 421 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'UIWindow * _Nullable' to non-nullable pointer type 'UIView * _Nonnull' [-Wnullable-to-nonnull-conversion]
.firstObject
fullSession:shouldReplayFullSession];

Expand All @@ -432,8 +432,8 @@
name:UIApplicationDidBecomeActiveNotification
object:nil];

[self saveCurrentSessionInfo:self.sessionReplay.sessionReplayId

Check warning on line 435 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'SentryId * _Nullable' to non-nullable pointer type 'SentryId * _Nonnull' [-Wnullable-to-nonnull-conversion]
path:docs.path

Check warning on line 436 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Wnullable-to-nonnull-conversion]
options:replayOptions];
}

Expand Down Expand Up @@ -483,7 +483,7 @@
NSURL *last = [path URLByAppendingPathComponent:SENTRY_LAST_REPLAY];

NSError *error;
if ([fileManager fileExistsAtPath:last.path]) {

Check warning on line 486 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Wnullable-to-nonnull-conversion]
SENTRY_LOG_DEBUG(@"[Session Replay] Removing last replay file at path: %@", last);
if ([NSFileManager.defaultManager removeItemAtURL:last error:&error] == NO) {
SENTRY_LOG_ERROR(
Expand All @@ -495,7 +495,7 @@
SENTRY_LOG_DEBUG(@"[Session Replay] No last replay file to remove at path: %@", last);
}

if ([fileManager fileExistsAtPath:current.path]) {

Check warning on line 498 in Sources/Sentry/SentrySessionReplayIntegration.m

View workflow job for this annotation

GitHub Actions / Unit iOS 17 SentrySwiftUI

implicit conversion from nullable pointer 'NSString * _Nullable' to non-nullable pointer type 'NSString * _Nonnull' [-Wnullable-to-nonnull-conversion]
SENTRY_LOG_DEBUG(
@"[Session Replay] Moving current replay file at path: %@ to: %@", current, last);
if ([fileManager moveItemAtURL:current toURL:last error:&error] == NO) {
Expand Down
Loading