-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2069 from LoopKit/xcode-15-main
Backport cyclic dependency fixes from dev for building on Xcode 15
- Loading branch information
Showing
10 changed files
with
110 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// | ||
// BuildDetails.swift | ||
// Loop | ||
// | ||
// Created by Pete Schwamb on 6/13/23. | ||
// Copyright © 2023 LoopKit Authors. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class BuildDetails { | ||
|
||
static var `default` = BuildDetails() | ||
|
||
let dict: [String: Any] | ||
|
||
init() { | ||
guard let url = Bundle.main.url(forResource: "BuildDetails", withExtension: ".plist"), | ||
let data = try? Data(contentsOf: url), | ||
let parsed = try? PropertyListSerialization.propertyList(from: data, format: nil) as? [String: Any] else | ||
{ | ||
dict = [:] | ||
return | ||
} | ||
dict = parsed | ||
} | ||
|
||
var buildDateString: String? { | ||
return dict["com-loopkit-Loop-build-date"] as? String | ||
} | ||
|
||
var xcodeVersion: String? { | ||
return dict["com-loopkit-Loop-xcode-version"] as? String | ||
} | ||
|
||
var gitRevision: String? { | ||
return dict["com-loopkit-Loop-git-revision"] as? String | ||
} | ||
|
||
var gitBranch: String? { | ||
return dict["com-loopkit-Loop-git-branch"] as? String | ||
} | ||
|
||
var sourceRoot: String? { | ||
return dict["com-loopkit-Loop-srcroot"] as? String | ||
} | ||
|
||
var profileExpiration: Date? { | ||
return dict["com-loopkit-Loop-profile-expiration"] as? Date | ||
} | ||
|
||
var profileExpirationString: String { | ||
if let profileExpiration = profileExpiration { | ||
return "\(profileExpiration)" | ||
} else { | ||
return "N/A" | ||
} | ||
} | ||
|
||
// These strings are only configured if it is a workspace build | ||
var workspaceGitRevision: String? { | ||
return dict["com-loopkit-LoopWorkspace-git-revision"] as? String | ||
} | ||
|
||
var workspaceGitBranch: String? { | ||
return dict["com-loopkit-LoopWorkspace-git-branch"] as? String | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<!-- | ||
BuildDetails.plist | ||
Loop | ||
Created by Pete Schwamb on 6/13/23. | ||
Copyright (c) 2023 LoopKit Authors. All rights reserved. | ||
--> | ||
<plist version="1.0"> | ||
<dict/> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters