Skip to content

Commit

Permalink
Merge pull request #183 from stuartisaac/main
Browse files Browse the repository at this point in the history
Fix screenshot device chrome issue with Xcode 15
  • Loading branch information
twostraws authored Dec 20, 2023
2 parents f5b4223 + 2bd731e commit 79ec837
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ControlRoom/Controllers/ChromeRendering/ChromeRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ class ChromeRenderer {
let mainIdentifier = device.chromeIdentifier.components(separatedBy: ".").last ?? "phone"

// Now use that last part to find the PDFs and placement JSON.
let chromePath = "\(basePath)/Chrome/\(mainIdentifier).simdevicechrome/Contents/Resources"
var chromePath = "\(basePath)/Chrome/\(mainIdentifier).devicechrome/Contents/Resources"
if !FileManager.default.fileExists(atPath: chromePath) {
// Before Xcode 15, the path used `simdevicechrome`, not `devicechrome`, so fall back to that
chromePath = "\(basePath)/Chrome/\(mainIdentifier).simdevicechrome/Contents/Resources"
}
baseURL = URL(filePath: chromePath)

let chromeURL = URL(filePath: "\(chromePath)/chrome.json")
Expand Down

0 comments on commit 79ec837

Please sign in to comment.