- Open below directory in Finder with Cmnd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
-
Open
IDETextKeyBindingSet.plist
with a text editor (not Xcode's plist editor). -
Add this in:
# 1. Create 'ci_scripts' folder in your main project directory | |
# 2. Create 'ci_post_xcodebuild.sh' inside of it | |
# 3. Make it an executable by running 'chmod +x $ci_post_xcodebuild.sh' | |
set -e # fails build if any command fails | |
if [ ${CI_XCODEBUILD_EXIT_CODE} != 0 ] | |
then | |
exit 1 | |
fi |
//The following file has 20 arrays, allSymbols[] has the title of every SFSymbol, and the remaining 19 arrays have the following categories: | |
//communication, weather, objectsAndTools, devices, connectivity, transportation, human, nature, editing, textFormatting, media, keyboard, commerce, time, health, shapes, arrows, indicies, math | |
private var allSymbols = ["0.circle", "00.circle", "0.circle.fill", "00.circle.fill", "0.square", "00.square", "0.square.fill", "00.square.fill", "1.circle", "01.circle", "1.circle.fill", "01.circle.fill", "1.magnifyingglass", "1.square", "01.square", "1.square.fill", "01.square.fill", "2.circle", "02.circle", "2.circle.fill", "02.circle.fill", "2.square", "02.square", "2.square.fill", "02.square.fill", "3.circle", "03.circle", "3.circle.fill", "03.circle.fill", "3.square", "03.square", "3.square.fill", "03.square.fill", "4.alt.circle", "4.alt.circle.fill", "4.alt.square", "4.alt.square.fill", "4.circle", "04.circle", "4.circle.fill", "04.circle.fill", "4.square", "04.square", "4 |
#! /usr/bin/swift | |
// Douglas Hill, March 2020 | |
/* | |
Extracts the most common translations from Apple’s glossary files. | |
This script helped with localisation for KeyboardKit (https://github.com/douglashill/KeyboardKit) by leveraging Apple’s existing translations. | |
More detail in the article at https://douglashill.co/localisation-using-apples-glossaries/ |
#! /usr/bin/swift | |
// Douglas Hill, March 2020 | |
// Prints out translations from Apple’s glossary files matching text in a supplied English .strings file. | |
// More detail in the article at https://douglashill.co/localisation-using-apples-glossaries/ | |
import Foundation | |
let stringsSource = URL(fileURLWithPath: "PUT THE PATH TO YOUR ENGLISH .strings FILE HERE") |
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
Open IDETextKeyBindingSet.plist
with a text editor (not Xcode's plist editor).
Add this in:
import CoreData | |
/// Manages Core Data Persistent History. | |
/// | |
/// When using Core Data in multiple targets, e.g. an app as well as a file provider, it is crucial to merge changes from one | |
/// target into another because otherwise you would end up with inconsistent state. To that end, this Apple introduced | |
/// persistent history, which is a linear stream of changes that can be merged into the current context. This service takes | |
/// advantage of this feature by providing a simple interface for merging and deleting history. The latter is needed to free up | |
/// space after the history has been consumed by all targets. It uses history transactions' timestamps in order to determine | |
/// what to delete. |
/// Additional colors accessibility metrics utilities | |
import Cocoa | |
import simd | |
extension NSColor { | |
/// Returns in an ordered array the following components from this color, in the sRGB color space: | |
/// - red | |
/// - green |
// | |
// Created by Dariusz Rybicki on 17/04/16. | |
// Copyright © 2016 Darrarski. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
/** | |
Returns number of seconds since system became idle | |
/// Decodes a dynamically-generated Uniform Type Identifier for inspection purposes. (**NOT FOR PRODUCTION USE!**) | |
/// Many, many thanks to http://alastairs-place.net/blog/2012/06/06/utis-are-better-than-you-think-and-heres-why/ | |
/// | |
/// <https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-BCGCDHIJ> | |
func decodeDynUTI(_ uti: String) -> String? | |
{ | |
let vec = Array("abcdefghkmnpqrstuvwxyz0123456789") | |
let encoded = Array(uti).suffix(from: 5) | |
var result: [UInt8] = [] |