Skip to content

Instantly share code, notes, and snippets.

View russell-archer's full-sized avatar
🏠
Working from home

Russell Archer russell-archer

🏠
Working from home
View GitHub Profile
@russell-archer
russell-archer / AppDelegate.swift
Last active September 3, 2018 23:58
Demo of Siri shortcuts for iOS 12 using NSUserActivity
//
// AppDelegate.swift
// PicSearch
//
// Created by Russell Archer on 22/08/2018.
// Copyright © 2018 Russell Archer. All rights reserved.
//
import UIKit
@russell-archer
russell-archer / ViewController.swift
Last active August 31, 2018 18:05
Demo of Siri shortcuts for iOS 12 using NSUserActivity
//
// ViewController.swift
// PicSearch
//
// Created by Russell Archer on 22/08/2018.
// Copyright © 2018 Russell Archer. All rights reserved.
//
import UIKit
import Intents
@russell-archer
russell-archer / Info.plist
Created August 30, 2018 18:17
Demo of Siri shortcuts for iOS 12 using NSUserActivity
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
:
<key>NSUserActivityTypes</key>
<array>
<string>ShowPictureOfIntent</string>
<string>com.rarcher.PicSearch.showPic</string>
</array>
@russell-archer
russell-archer / PicSearch.entitlements
Created August 30, 2018 18:17
Demo of Siri shortcuts for iOS 12 using NSUserActivity
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.siri</key>
<true/>
</dict>
</plist>
@russell-archer
russell-archer / ShowRandomColorIntent.swift
Created October 8, 2018 14:40
ShowRandomColor. Code generated by Xcode from the Intents definition file
//
// ShowRandomColorIntent.swift
//
// This file was automatically generated and should not be edited.
// Comments removed for brevity.
//
import Foundation
import Intents
@russell-archer
russell-archer / ViewController.swift
Created October 8, 2018 14:58
ShowRandomColor. Create an outlet for the UIView in the ViewController
//
// ViewController.swift
// ShowRandomColor
//
// Created by Russell Archer on 05/10/2018.
// Copyright © 2018 Russell Archer. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var colorView: UIView!
@russell-archer
russell-archer / Generate.swift
Created October 8, 2018 15:56
ShowRandomColor. ColorGenerator framework
//
// Generate.swift
// ColorGenerator
//
// Created by Russell Archer on 05/10/2018.
// Copyright © 2018 Russell Archer. All rights reserved.
//
import Foundation
import UIKit
@russell-archer
russell-archer / ViewController.swift
Created October 8, 2018 23:13
ShowRandomColor. Use the ColorGenerator to set the UIView background color
//
// ViewController.swift
// ShowRandomColor
//
// Created by Russell Archer on 05/10/2018.
// Copyright © 2018 Russell Archer. All rights reserved.
//
import UIKit
import ColorGenerator
@russell-archer
russell-archer / ViewController.swift
Created October 8, 2018 23:35
ShowRandomColor. Donate the Siri shortcut
//
// ViewController.swift
// ShowRandomColor
//
// Created by Russell Archer on 05/10/2018.
// Copyright © 2018 Russell Archer. All rights reserved.
//
import UIKit
import ColorGenerator
@russell-archer
russell-archer / ColorIntentHandler.swift
Created October 8, 2018 23:39
ShowRandomColor. The app extension code
//
// ColorIntentHandler.swift
// ColorIntent
//
// Created by Russell Archer on 06/10/2018.
// Copyright © 2018 Russell Archer. All rights reserved.
//
import Foundation
import ColorGenerator