Skip to content

Commit

Permalink
[snapshot] fix compiler error on SnapshotHelper.swift (#20689)
Browse files Browse the repository at this point in the history
* SnapshotHelper.swift has Swift Compiler Error #18792

* Updated snapshot helper version

Co-authored-by: Josh Holtz <me@joshholtz.com>
  • Loading branch information
amcalgates and joshdholtz committed Nov 12, 2022
1 parent 62fc877 commit e59bb1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snapshot/lib/assets/SnapshotHelper.swift
Expand Up @@ -181,7 +181,7 @@ open class Snapshot: NSObject {

let path = screenshotsDir.appendingPathComponent("\(simulator)-\(name).png")
#if swift(<5.0)
UIImagePNGRepresentation(image)?.write(to: path, options: .atomic)
try UIImagePNGRepresentation(image)?.write(to: path, options: .atomic)
#else
try image.pngData()?.write(to: path, options: .atomic)
#endif
Expand Down Expand Up @@ -306,4 +306,4 @@ private extension CGFloat {

// Please don't remove the lines below
// They are used to detect outdated configuration files
// SnapshotHelperVersion [1.28]
// SnapshotHelperVersion [1.29]

0 comments on commit e59bb1c

Please sign in to comment.