Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix there is no image in xcsummary report by using Xcode 9. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions XCSummary/Templates/CMHTMLReportBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ - (void)_appendActivity:(CMActivitySummary *)activity indentation:(CGFloat)inden
if (activity.hasScreenshotData)
{
templateFormat = [self _decodeTemplateWithName:ActivityTemplateWithImage];
NSString *imageName = [NSString stringWithFormat:@"Screenshot_%@.png", activity.uuid.UUIDString];
NSString *imageName = [NSString stringWithFormat:@"Screenshot_%@.jpg", activity.uuid.UUIDString];
NSString *fullPath = [self.path stringByAppendingPathComponent:imageName];

[self.fileManager copyItemAtPath:fullPath toPath:[self.htmlResourcePath stringByAppendingPathComponent:imageName] error:nil];

NSString *localImageName = [NSString stringWithFormat:@"resources/Screenshot_%@.png", activity.uuid.UUIDString];
NSString *localImageName = [NSString stringWithFormat:@"resources/Screenshot_%@.jpg", activity.uuid.UUIDString];
composedString = [NSString stringWithFormat:templateFormat, indentation, @"px", activity.title, activity.finishTimeInterval - activity.startTimeInterval, localImageName];
}
else
Expand Down
Binary file modified build/xcsummary
Binary file not shown.