Skip to content

Instantly share code, notes, and snippets.


Cory D. Wiles kwylez

View GitHub Profile
kwylez / LinkedText.swift
Created Apr 7, 2021 — forked from mjm/LinkedText.swift
Tappable links in SwiftUI Text view
View LinkedText.swift
import SwiftUI
private let linkDetector = try! NSDataDetector(types:
struct LinkColoredText: View {
enum Component {
case text(String)
case link(String, URL)
View failed_swiftui_button.swift
/// works
struct QuickChatView: View {
var body: some View {
ZStack {
VStack {
HStack {
Button(action: {
View SOIntent.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View sample_iap_receipt.json
"status": 0,
"environment": "Sandbox",
"receipt": {
"receipt_type": "ProductionSandbox",
"adam_id": 0,
"app_item_id": 0,
"bundle_id": "",
"application_version": "1950",
"download_id": 0,
View fetch-cloudkit-share.swift
public func fetchShareURL(_ callback: @escaping ((_ url: URL?) -> Void)) -> Void {
if let localRecordZoneID: CKRecordZoneID = SOUser.localICloudConversationRecordID?.zoneID {
let predicate: NSPredicate = NSPredicate(format: "TRUEPREDICATE")
let query: CKQuery = CKQuery(recordType: CloudKitConverationRecordTypeName, predicate: predicate)
let cloudkitController: CloudKitController = CloudKitController(scope: .private)
cloudkitController.perform(query, inZoneWith: localRecordZoneID, completionHandler: {results, error in
kwylez / GHDark.dvtcolortheme
Created Mar 15, 2017
Xcode Sublime Text Theme
View GHDark.dvtcolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>0 0 0 1</string>
<string>Menlo-Bold - 11.0</string>
<string>0 0 0 1</string>
View ContextLabel.swift
// ContextLabel.swift
// ContextLabel
// Created by Cory D. Wiles
// Copyright (c) 2017 Cory D. Wiles. All rights reserved.
import Foundation
import UIKit
kwylez / EXIFImage-playground.swift
Created Feb 1, 2017
Modifying EXIF Data with Swift 3
View EXIFImage-playground.swift
//: Playground - noun: a place where people can play
import UIKit
import ImageIO
import MobileCoreServices
let TEST_IMAGE: String = "replace.jpg"
let beach: UIImage = UIImage(named: TEST_IMAGE)!
let imageData: Data = UIImageJPEGRepresentation(beach, 1)!
View double-stroke-animation.swift
//: Playground - noun: a place where people can play
import UIKit
import PlaygroundSupport
import XCPlayground
class AnimatedView: UIView {
let rightLayer: CAShapeLayer = CAShapeLayer()
kwylez / CloudKitController.swift
Created Sep 18, 2016
Example of showing how to use CKDatabaseScope
View CloudKitController.swift
import CloudKit
public enum CloudKitError: Error {
case general(String)
case emptyresult(String)
public enum CloudKitResult<T, ResultError: Error> {
case success(T)
case failure(ResultError)