Skip to content

Commit

Permalink
Fix screenshot device chrome issue with Xcode 15
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Isaac committed Dec 20, 2023
1 parent f5b4223 commit 2bd731e
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 2bd731e

Please sign in to comment.