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
static let userAgent: String = { | |
let info = Bundle.main.infoDictionary | |
let executable = (info?[kCFBundleExecutableKey as String] as? String) ?? | |
(ProcessInfo.processInfo.arguments.first?.split(separator: "/").last.map(String.init)) ?? | |
"Unknown" | |
let bundle = info?[kCFBundleIdentifierKey as String] as? String ?? "Unknown" | |
let appVersion = info?["CFBundleShortVersionString"] as? String ?? "Unknown" | |
let appBuild = info?[kCFBundleVersionKey as String] as? String ?? "Unknown" | |
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
// iosFrameworkVersions.swift | |
// | |
// Created by Andrew Benson (@DrewsterBenson) on 1/11/2021. | |
// Copyright (C) 2021 Andrew Benson. | |
// License: MIT (https://opensource.org/licenses/MIT) | |
// | |
// Stick in AppDelegate to dump all your (non-Apple) framework versions, like this: | |
// | |
// Framework versions: | |
// Alamofire -- 4.9.0(1) |
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
{ | |
// Move views when keyboard appears/disappears | |
// Snipped from ViewController.swift | |
// This constraint should be tied to the top superview or safe area in Storybaord | |
@IBOutlet weak var closeButtonTopConstraint: NSLayoutConstraint! | |
private var topConstraintOriginalConstant: CGFloat? | |
private var topConstraintScrolledConstant: CGFloat = 0 | |