Installation procedure for pre-build actions to automatically populate Xcode Info.plist with dynamic data.
Edit Xcode Scheme and add a pre-action script.
Copy the contents of preaction.sh into the pre-action script box.
| import UIKit | |
| #if canImport(SwiftUI) && DEBUG | |
| import SwiftUI | |
| struct UIViewControllerPreview<ViewController: UIViewController>: UIViewControllerRepresentable { | |
| let viewController: ViewController | |
| init(_ builder: @escaping () -> ViewController) { | |
| viewController = builder() | |
| } |
| extension UITapGestureRecognizer { | |
| func didTapAttributedTextInLabel(label: UILabel, inRange targetRange: NSRange) -> Bool { | |
| // Create instances of NSLayoutManager, NSTextContainer and NSTextStorage | |
| let layoutManager = NSLayoutManager() | |
| let textContainer = NSTextContainer(size: CGSize.zero) | |
| let textStorage = NSTextStorage(attributedString: label.attributedText!) | |
| // Configure layoutManager and textStorage | |
| layoutManager.addTextContainer(textContainer) |
Installation procedure for pre-build actions to automatically populate Xcode Info.plist with dynamic data.
Edit Xcode Scheme and add a pre-action script.
Copy the contents of preaction.sh into the pre-action script box.
| /** | |
| * Copyright 2019 Google LLC. | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| function getEnvironment() { | |
| var environment = { | |
| spreadsheetID: "<REPLACE WITH YOUR SPREADSHEET ID>", | |
| firebaseUrl: "<REPLACE WITH YOUR REALTIME DB URL>" | |
| }; |
| class Pipeline: | |
| def __init__(self, value): | |
| self.value = value | |
| self.pipes = [] | |
| def through(self, pipe): | |
| self.pipes.append(pipe) | |
| def now(self): | |
| for pipe in self.pipes: |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk | |
| index 18f8b0bbfc..4ef3e230e4 100644 | |
| --- a/builddefs/common_features.mk | |
| +++ b/builddefs/common_features.mk | |
| @@ -878,6 +878,10 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes) | |
| endif | |
| endif | |
| +ifeq ($(strip $(APPLE_FN_ENABLE)), yes) | |
| + OPT_DEFS += -DAPPLE_FN_ENABLE |
| -- [[ Cheatsheet for LUA from http://www.newthinktank.com/2015/06/learn-lua-one-video/]] | |
| -- Prints to the screen (Can end with semicolon) | |
| print("Hello World") | |
| --[[ | |
| Multiline comment | |
| ]] | |
| -- Variable names can't start with a number, but can contain letters, numbers |
| import Foundation | |
| extension DateFormatter { | |
| static let iso8601Full: DateFormatter = { | |
| let formatter = DateFormatter() | |
| formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" | |
| formatter.calendar = Calendar(identifier: .iso8601) | |
| formatter.timeZone = TimeZone(secondsFromGMT: 0) | |
| formatter.locale = Locale(identifier: "en_US_POSIX") | |
| return formatter |