To display the current version of an iOS app in the settings
- Add an entry like this in
Settings.bundle/Root.plist
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
PSTitleValueSpecifier| // MARK: - SceneDelegate | |
| class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
| var window: UIWindow? | |
| func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
| let navigationController = UINavigationController(navigationBarClass: NavigationBar.self, toolbarClass: nil) | |
| (navigationController.navigationBar as! NavigationBar).preferredHeight = 88 | |
| navigationController.setViewControllers([ViewController()], animated: false) | |
| /* | |
| 16 November 2021 | |
| SwiftUI.TextField used with NumberFormatter() as a formatter does not set/update value on macOS 12 (Monterey). This is regression as it works ok on macOS 11 (BigSur) | |
| Please find attached Playground code and code screenshot with marked bug | |
| Related FB9180913. Reported June 15. | |
| */ |
| // Licence: Robert Koch-Institut (RKI), dl-de/by-2-0 | |
| class IncidenceWidget { | |
| constructor() { | |
| this.previousDaysToShow = 31; | |
| this.apiUrlDistricts = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=RS,GEN,cases7_bl_per_100k,cases7_per_100k,BL&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json` | |
| this.apiUrlDistrictsHistory = (districtId) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/ArcGIS/rest/services/Covid19_hubv/FeatureServer/0/query?where=IdLandkreis%20%3D%20%27${districtId}%27%20AND%20Meldedatum%20%3E%3D%20TIMESTAMP%20%27${this.getDateString(-this.previousDaysToShow)}%2000%3A00%3A00%27%20AND%20Meldedatum%20%3C%3D%20TIMESTAMP%20%27${this.getDateString(1)}%2000%3A00%3A00%27&outFields=Landkreis,Meldedatum,AnzahlFall&outSR=4326&f=json` | |
| this.stateToAbbr = { | |
| opendb () { | |
| [ ! -f .env ] && { echo "No .env file found."; exit 1; } | |
| DB_CONNECTION=$(grep DB_CONNECTION .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_HOST=$(grep DB_HOST .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_PORT=$(grep DB_PORT .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_DATABASE=$(grep DB_DATABASE .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_USERNAME=$(grep DB_USERNAME .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
| DB_PASSWORD=$(grep DB_PASSWORD .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) |
| import UIKit | |
| class CustomDisclosureIndicator: UIView { | |
| @IBInspectable | |
| public var color: UIColor = UIColor.darkGray { | |
| didSet { | |
| setNeedsDisplay() | |
| } | |
| } | |
| protocol LayoutGuideProvider { | |
| var leadingAnchor: NSLayoutXAxisAnchor { get } | |
| var trailingAnchor: NSLayoutXAxisAnchor { get } | |
| var leftAnchor: NSLayoutXAxisAnchor { get } | |
| var rightAnchor: NSLayoutXAxisAnchor { get } | |
| var topAnchor: NSLayoutYAxisAnchor { get } | |
| var bottomAnchor: NSLayoutYAxisAnchor { get } | |
| var widthAnchor: NSLayoutDimension { get } | |
| var heightAnchor: NSLayoutDimension { get } | |
| var centerXAnchor: NSLayoutXAxisAnchor { get } |
| // | |
| // swift | |
| // SwiftMIDI | |
| // | |
| // Created by Jacob Rhoda on 12/24/16. | |
| // Copyright © 2016 Jadar. All rights reserved. | |
| // | |
| import Foundation | |
| import CoreMIDI |
To display the current version of an iOS app in the settings
Settings.bundle/Root.plist<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
PSTitleValueSpecifier| /* | |
| * Copyright (c) 2017 Emil Davtyan | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining | |
| * a copy of this software and associated documentation files (the | |
| * "Software"), to deal in the Software without restriction, including | |
| * without limitation the rights to use, copy, modify, merge, publish, | |
| * distribute, sublicense, and/or sell copies of the Software, and to | |
| * permit persons to whom the Software is furnished to do so, subject to | |
| * the following conditions: |