This is the most common way to get the path to the selected instance:
xcrun xcode-select --print-path| import SwiftUI | |
| import Charts | |
| struct FacilityResponse: Codable { | |
| let id: String | |
| let name: String | |
| let timeZone: String | |
| let hasConsumption: Bool | |
| let hasProduction: Bool | |
| let measurements: Measurements |
| import SwiftUI | |
| import Charts | |
| struct EnergyReading { | |
| let timestamp: Date | |
| let kWh: Double | |
| } | |
| struct EnergyBarChartView: View { | |
| @State private var energyData: [EnergyReading] = { |
| import Foundation | |
| enum AppDefault { | |
| case APIServer, runMode, homeDirectory, reactHost | |
| var stringValue: String? { | |
| get { | |
| return NSUserDefaults.standardUserDefaults().stringForKey(String(self)) | |
| } | |
SSH (Secure Shell) to a host existing in an internal network through a reverse-tunneled SSH connection to an externally accessible VPS (Virtual Private Server). This setup is described where the internal host is a Raspberry Pi, but can be generalized for any host on the internal network that runs an OpenSSH server.
internal network Internet home network
|| ||
------------------ || ------------------ || ------------------
| | reverse SSH tunnel (VPS $tunnel_port to Pi port 22) | | || | |
| Raspberry Pi ==================================================> VPS ===================
| 1. Open Terminal | |
| 2. cd to your Xcode project | |
| 3. Execute the following when inside your target project: | |
| find . -name "*.swift" -print0 | xargs -0 wc -l |
| import PlaygroundSupport | |
| import Foundation | |
| import Combine | |
| // MARK: - Network Controller | |
| protocol NetworkControllerProtocol: class { | |
| typealias Headers = [String: Any] | |
| func get<T>(type: T.Type, | |
| url: URL, |
| # A Best in Class Checklist | |
| A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10. | |
| > To use this, create a Github Issue in your own repo, and simply copy and paste this text. | |
| ## iOS Core Technology | |
| _Things any iOS app can benefit from_ | |
| - [ ] iCloud Sync | |
| - [ ] [Core Spotlight integration](https://github.com/DreamingInBinary/Spend-Stack/issues/120) |