This file contains hidden or 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
| extension DispatchQueue { | |
| private static let dispatch_get_current_queue = dlsym(dlopen(nil, RTLD_GLOBAL), "dispatch_get_current_queue") | |
| static var current: DispatchQueue { | |
| dispatch_get_current_queue.map { | |
| unsafeBitCast($0, to: (@convention(c) () -> Unmanaged<DispatchQueue>).self)().takeUnretainedValue() | |
| } ?? .global(qos: .background) | |
| } | |
| } |
This file contains hidden or 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
| #!/usr/bin/perl | |
| ## | |
| ## This script converts an IPS crash report (.ips) to the legacy crash report format. | |
| ## | |
| ## The .ips file (JSON) is read from STDIN and the legacy crash report is written to | |
| ## STDOUT. | |
| ## | |
| use strict; |
This file contains hidden or 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
| protocol ReferenceEncodable: Identifiable { | |
| static var referenceStorageKey: CodingUserInfoKey { get } | |
| } | |
| extension ReferenceEncodable { | |
| static var referenceStorageKey: CodingUserInfoKey { | |
| CodingUserInfoKey(rawValue: String(describing: Self.self) + "ReferenceStorage")! | |
| } | |
| } |
Documentation:
- https://developer.apple.com/documentation/security/keychain_services
- https://developer.apple.com/documentation/security/errsecduplicateitem
Examples:
class_attributes.swiftlists attributes by classes
This file contains hidden or 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
| #!/usr/bin/swift sh | |
| import MacroExpress // @Macro-swift | |
| // MARK: - Parse Commandline Arguments & Usage | |
| func usage() { | |
| let tool = path.basename(process.argv.first ?? "servedocc") | |
| print( | |
| """ |
This file contains hidden or 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
| // | |
| // CodableExtensions.swift | |
| // 7-Eleven | |
| // | |
| // Created by Raja Sekhar Chiderae on 1/14/19. | |
| // Copyright © 2019 self. All rights reserved. | |
| // | |
| import Foundation |
This file contains hidden or 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
| # A Best in Class Checklist | |
| A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10. | |
| > To use this, create a Github Issue in your own repo, and simply copy and paste this text. | |
| ## iOS Core Technology | |
| _Things any iOS app can benefit from_ | |
| - [ ] iCloud Sync | |
| - [ ] Focus Filter Support |
This file contains hidden or 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
| // | |
| // DSFKeyedArchiverCodable.swift | |
| // QR Generator | |
| // | |
| // Created by Darren Ford on 18/11/19. | |
| // Copyright © 2019 Darren Ford. All rights reserved. | |
| // | |
| import Foundation |
NewerOlder