One file for each domain, both www.example.com and example.com need separate files:
{
"applinks": {
"apps": [],
"details": {
"9JA89QQLNQ.com.apple.wwdc": {
import UIKit | |
import CoreText | |
import XCPlayground | |
let font = UIFont(name: "HelveticaNeue", size: 46)! // Choose font | |
var allPathes = [CGPath]() | |
var unichars = [UniChar]("i".utf16) //Insert text | |
var glyphs = [CGGlyph](repeating: 0, count: unichars.count) | |
let gotGlyphs = CTFontGetGlyphsForCharacters(font, &unichars, &glyphs, unichars.count) |
import Foundation | |
public extension Date { | |
// MARK: - Convert from String | |
/* | |
Creates a new Date based on a string of a specified format. Supports optional timezone and locale. | |
*/ | |
init?(fromString string: String, format: DateFormatType, timeZone: TimeZoneType = .local, locale: Locale = Foundation.Locale.current, isLenient: Bool = true) { |
import UIKit | |
extension UIColor { | |
/// Creates image from color | |
/// - Parameter size: size of returned image | |
/// - Returns: UIImage | |
func image(_ size: CGSize = CGSize(width: 1, height: 1)) -> UIImage { | |
return UIGraphicsImageRenderer(size: size).image { rendererContext in | |
self.setFill() |
import RealmSwift | |
internal struct RealmService { | |
private static var realm: Realm? { | |
do { | |
return try Realm() | |
} catch let error as NSError { | |
print(error) | |
return nil |
import RealmSwift | |
extension Results { | |
func toArray() -> [T] { | |
return self.map{ $0 } | |
} | |
} |
import LocalAuthentication | |
class BiometricAuth { | |
var context = LAContext() | |
var error: NSError? | |
func auth(_ completion: @escaping (_ success: Bool) -> ()) { | |
// Get the supported biometry |
One file for each domain, both www.example.com and example.com need separate files:
{
"applinks": {
"apps": [],
"details": {
"9JA89QQLNQ.com.apple.wwdc": {
indirect enum LinkedListNode { | |
case head(value: Int, node: LinkedListNode) | |
case node(value: Int, next: LinkedListNode) | |
case tail(value: Int) | |
} | |
let linkedList = LinkedListNode | |
.head(value: 0, node: | |
.node(value: 1, next: | |
.node(value: 2, next: |