Commit 3dc91c33 authored by Aral Balkan's avatar Aral Balkan

Update to Swift 3

Also update the readme.
parents b2a75469 af78de10
git "git@source.ind.ie:project/handle.git" ~> 3.0
\ No newline at end of file
git "git@source.ind.ie:project/handle.git"
\ No newline at end of file
git "git@source.ind.ie:project/handle.git" "v3.0.0"
git "git@source.ind.ie:project/handle.git" "4.0.0"
......@@ -5,7 +5,7 @@
location = "group:DelayDemo-iOS/DelayDemo-iOS.xcodeproj">
</FileRef>
<FileRef
location = "group:DelayDemo-OSX/DelayDemo-OSX.xcodeproj">
location = "group:/Users/aral/Ind.ie/products/Delay/DelayDemo-OSX/DelayDemo-macOS.xcodeproj">
</FileRef>
<FileRef
location = "group:Delay/Delay.xcodeproj">
......
......@@ -151,6 +151,7 @@
TargetAttributes = {
A7C0EA8F1C234E5D00110179 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
};
A7C0EA991C234E5D00110179 = {
CreatedOnToolsVersion = 7.2;
......@@ -324,10 +325,12 @@
INFOPLIST_FILE = Delay/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = ind.ie.Delay;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
......@@ -342,9 +345,11 @@
INFOPLIST_FILE = Delay/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = ind.ie.Delay;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Release;
};
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
......
......@@ -36,23 +36,26 @@ import Foundation
// MARK: Public API
public func delay(delay:Double, block:dispatch_block_t) -> CancellableDelayedCommand
// Swift 3 (to replace dispatch_block_t)
public typealias Block = (Void) -> Void
public func delay(_ delay:Double, block:@escaping Block) -> CancellableDelayedCommand
{
return CancellableDelayedCommand(delay: delay, block: block)
}
// MARK: - Class
public class CancellableDelayedCommand
open class CancellableDelayedCommand
{
public var executed:Bool
open var executed:Bool
var originalBlock:dispatch_block_t
var delayedBlock:dispatch_block_t?
var originalBlock:Block
var delayedBlock:Block?
var cancelled:Bool
var delay:Double
public init(delay:Double, block:dispatch_block_t)
public init(delay:Double, block:@escaping Block)
{
self.delay = delay
self.originalBlock = block
......@@ -79,7 +82,7 @@ public class CancellableDelayedCommand
if !self.cancelled
{
// println("\(self): delayed block about to dispatch!")
dispatch_async(dispatch_get_main_queue(), block)
DispatchQueue.main.async(execute: block)
self.executed = true
}
// else
......@@ -90,7 +93,7 @@ public class CancellableDelayedCommand
}
// Set up the delayed dispatch.
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue())
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(delay * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC))
{
dispatch_block_t in
......@@ -102,14 +105,14 @@ public class CancellableDelayedCommand
}
public func cancel()
open func cancel()
{
// println("\(self): Cancelling.")
cancelled = true
}
public func reset() -> CancellableDelayedCommand?
open func reset() -> CancellableDelayedCommand?
{
//
// Cancels this command and creates and returns a new one
......
......@@ -9,18 +9,16 @@
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(aNotification: NSNotification) {
class AppDelegate: NSObject, NSApplicationDelegate
{
func applicationDidFinishLaunching(_ aNotification: Notification)
{
// Insert code here to initialize your application
}
func applicationWillTerminate(aNotification: NSNotification) {
func applicationWillTerminate(_ aNotification: Notification)
{
// Insert code here to tear down your application
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16A319" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
</dependencies>
<scenes>
<!--Application-->
......@@ -11,11 +11,11 @@
<application id="hnw-xV-0zn" sceneMemberID="viewController">
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>
<menuItem title="DelayDemo-OSX" id="1Xt-HY-uBw">
<menuItem title="DelayDemo-macOS" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="DelayDemo-OSX" systemMenu="apple" id="uQy-DD-JDr">
<menu key="submenu" title="DelayDemo-macOS" systemMenu="apple" id="uQy-DD-JDr">
<items>
<menuItem title="About DelayDemo-OSX" id="5kV-Vb-QxS">
<menuItem title="About DelayDemo-macOS" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
......@@ -29,7 +29,7 @@
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
<menuItem title="Hide DelayDemo-OSX" keyEquivalent="h" id="Olw-nP-bQN">
<menuItem title="Hide DelayDemo-macOS" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
</connections>
......@@ -47,7 +47,7 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit DelayDemo-OSX" keyEquivalent="q" id="4sb-4s-VLi">
<menuItem title="Quit DelayDemo-macOS" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
</connections>
......@@ -628,7 +628,7 @@
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="DelayDemo-OSX Help" keyEquivalent="?" id="FKE-Sm-Kum">
<menuItem title="DelayDemo-macOS Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections>
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
</connections>
......@@ -642,7 +642,7 @@
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
</connections>
</application>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="DelayDemo_OSX" customModuleProvider="target"/>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="DelayDemo_macOS" customModuleProvider="target"/>
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="0.0"/>
......@@ -651,7 +651,7 @@
<scene sceneID="R2V-B0-nI4">
<objects>
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<window key="window" title="Delay" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
......@@ -665,16 +665,17 @@
</objects>
<point key="canvasLocation" x="75" y="250"/>
</scene>
<!--View Controller-->
<!--MacOS View Controller-->
<scene sceneID="ZRU-uf-6Xw">
<objects>
<viewController id="YIn-Fy-2zn" customClass="OSXViewController" customModule="DelayDemo_OSX" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="YIn-Fy-2zn" customClass="MacOSViewController" customModule="DelayDemo_macOS" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="O4i-B2-QY7">
<rect key="frame" x="0.0" y="0.0" width="480" height="236"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TIb-aV-NWi">
<rect key="frame" x="14" y="155" width="81" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="3 secs" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="MBU-dv-nlL">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
......@@ -685,6 +686,7 @@
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7Fz-8U-QF9">
<rect key="frame" x="108" y="155" width="81" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="5 secs" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="9mR-B6-m9m">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
......@@ -695,6 +697,7 @@
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ETj-Hl-cdU">
<rect key="frame" x="108" y="122" width="83" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="oMn-lz-Hwj">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
......@@ -708,6 +711,7 @@ Gw
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uAZ-XC-92b">
<rect key="frame" x="20" y="93" width="72" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" id="MSb-ej-wgd">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
......@@ -716,6 +720,7 @@ Gw
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LhR-7C-cwc">
<rect key="frame" x="18" y="199" width="72" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Simple" id="158-DL-jtY">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
......@@ -724,6 +729,7 @@ Gw
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Vu3-ks-H5z">
<rect key="frame" x="110" y="199" width="81" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Cancellable" id="D6Y-bS-MFa">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
......@@ -732,6 +738,7 @@ Gw
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Na1-hH-U4y">
<rect key="frame" x="114" y="93" width="72" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" id="gIl-H4-oJ6">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
......@@ -740,6 +747,7 @@ Gw
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Qzm-5U-35o">
<rect key="frame" x="221" y="163" width="239" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="NFb-Mc-Pi1">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
......@@ -752,15 +760,13 @@ Gw
<rect key="frame" x="1" y="1" width="238" height="133"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView importsGraphics="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="g2C-Fx-Qfg">
<textView importsGraphics="NO" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="g2C-Fx-Qfg">
<rect key="frame" x="0.0" y="0.0" width="238" height="133"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<size key="minSize" width="238" height="133"/>
<size key="maxSize" width="463" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="238" height="133"/>
<size key="maxSize" width="463" height="10000000"/>
</textView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
......@@ -780,6 +786,7 @@ Gw
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ddw-4Z-uaf">
<rect key="frame" x="219" y="199" width="64" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Throttled" id="p7l-ry-lFk">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
......
////////////////////////////////////////////////////////////////////////////////
//
// Delay - demonstration - OS X.
// Delay - demonstration - macOS.
//
// With thanks to Mattt Thompson’s write-up on NSLinguisticTagger
// (http://nshipster.com/nslinguistictagger/)
......@@ -16,7 +16,7 @@ import Handle
// MARK: - Class
class OSXViewController: NSViewController
class MacOSViewController: NSViewController
{
// MARK: - Outlets
......@@ -46,34 +46,34 @@ class OSXViewController: NSViewController
override func viewWillAppear()
{
textDidChangeNotificationHandler = handle(NSControlTextDidChangeNotification, from:throttledTextField)
textDidChangeNotificationHandler = handle(NSNotification.Name.NSControlTextDidChange.rawValue, from:throttledTextField)
{
/* with */ notification in
//
// Wait 0.3 seconds after the last keystroke to analyse the entered text and
// provide a linguistic breakdown of it.
//
self.cancellableTextFieldLookupCommand = self.cancellableTextFieldLookupCommand?.reset() ?? delay(0.3)
{
/* with */ notification in
let options: NSLinguisticTagger.Options = [.omitWhitespace, .omitPunctuation, .joinNames]
let schemes = NSLinguisticTagger.availableTagSchemes(forLanguage: "en")
let tagger = NSLinguisticTagger(tagSchemes: schemes, options: Int(options.rawValue))
let text = self.throttledTextField.stringValue
tagger.string = text
//
// Wait 0.3 seconds after the last keystroke to analyse the entered text and
// provide a linguistic breakdown of it.
//
self.cancellableTextFieldLookupCommand = self.cancellableTextFieldLookupCommand?.reset() ?? delay(0.3)
{
let options: NSLinguisticTaggerOptions = [.OmitWhitespace, .OmitPunctuation, .JoinNames]
let schemes = NSLinguisticTagger.availableTagSchemesForLanguage("en")
let tagger = NSLinguisticTagger(tagSchemes: schemes, options: Int(options.rawValue))
let text = self.throttledTextField.stringValue
tagger.string = text
var linguisticBreakdownOfText = ""
tagger.enumerateTagsInRange(NSMakeRange(0, (text as NSString).length), scheme: NSLinguisticTagSchemeNameTypeOrLexicalClass, options: options)
{
(tag, tokenRange, sentenceRange, _) in
let token = (text as NSString).substringWithRange(tokenRange)
linguisticBreakdownOfText += "\(token): \(tag)\n"
}
self.throttledTextView.string = linguisticBreakdownOfText
var linguisticBreakdownOfText = ""
tagger.enumerateTags(in: NSMakeRange(0, (text as NSString).length), scheme: NSLinguisticTagSchemeNameTypeOrLexicalClass, options: options)
{
(tag, tokenRange, sentenceRange, _) in
let token = (text as NSString).substring(with: tokenRange)
linguisticBreakdownOfText += "\(token): \(tag)\n"
}
self.throttledTextView.string = linguisticBreakdownOfText
}
}
}
......@@ -88,17 +88,17 @@ class OSXViewController: NSViewController
// MARK: - Actions
//
@IBAction func threeSecondsButtonAction(sender: NSButton)
@IBAction func threeSecondsButtonAction(_ sender: NSButton)
{
threeSecondDelayLabel.stringValue = "Waiting…"
delay(3)
_ = delay(3)
{
self.threeSecondDelayLabel.stringValue = "Done!"
}
}
@IBAction func fiveSecondsButtonAction(sender: NSButton)
@IBAction func fiveSecondsButtonAction(_ sender: NSButton)
{
fiveSecondDelayLabel.stringValue = "Waiting…"
......@@ -109,7 +109,7 @@ class OSXViewController: NSViewController
}
@IBAction func cancelFiveSecondDelayButtonAction(sender: NSButton)
@IBAction func cancelFiveSecondDelayButtonAction(_ sender: NSButton)
{
// Note: you can also check if a command had been cancelled
// by examining its .cancelled property (Bool).
......
......@@ -35,7 +35,7 @@
/* Begin PBXFileReference section */
A7394BDC1CA435C70096FF28 /* Delay.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Delay.framework; path = "$(CONFIGURATION_BUILD_DIR)/Delay.framework"; sourceTree = "<group>"; };
A787D4671C24811E00CDBF66 /* Handle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Handle.framework; path = ../Carthage/Build/Mac/Handle.framework; sourceTree = "<group>"; };
A7C0EB6A1C2441C800110179 /* DelayDemo-OSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DelayDemo-OSX.app"; sourceTree = BUILT_PRODUCTS_DIR; };
A7C0EB6A1C2441C800110179 /* DelayDemo-macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DelayDemo-macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
A7C0EB6D1C2441C800110179 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
A7C0EB6F1C2441C800110179 /* OSXViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSXViewController.swift; sourceTree = "<group>"; };
A7C0EB711C2441C800110179 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
......@@ -60,7 +60,7 @@
isa = PBXGroup;
children = (
A787D4671C24811E00CDBF66 /* Handle.framework */,
A7C0EB6C1C2441C800110179 /* DelayDemo-OSX */,
A7C0EB6C1C2441C800110179 /* DelayDemo-macOS */,
A7C0EB6B1C2441C800110179 /* Products */,
);
sourceTree = "<group>";
......@@ -68,12 +68,12 @@
A7C0EB6B1C2441C800110179 /* Products */ = {
isa = PBXGroup;
children = (
A7C0EB6A1C2441C800110179 /* DelayDemo-OSX.app */,
A7C0EB6A1C2441C800110179 /* DelayDemo-macOS.app */,
);
name = Products;
sourceTree = "<group>";
};
A7C0EB6C1C2441C800110179 /* DelayDemo-OSX */ = {
A7C0EB6C1C2441C800110179 /* DelayDemo-macOS */ = {
isa = PBXGroup;
children = (
A7C0EB6D1C2441C800110179 /* AppDelegate.swift */,
......@@ -82,15 +82,16 @@
A7C0EB731C2441C800110179 /* Main.storyboard */,
A7C0EB761C2441C800110179 /* Info.plist */,
);
name = "DelayDemo-macOS";
path = "DelayDemo-OSX";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
A7C0EB691C2441C800110179 /* DelayDemo-OSX */ = {
A7C0EB691C2441C800110179 /* DelayDemo-macOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = A7C0EB791C2441C800110179 /* Build configuration list for PBXNativeTarget "DelayDemo-OSX" */;
buildConfigurationList = A7C0EB791C2441C800110179 /* Build configuration list for PBXNativeTarget "DelayDemo-macOS" */;
buildPhases = (
A7C0EB661C2441C800110179 /* Sources */,
A7C0EB671C2441C800110179 /* Frameworks */,
......@@ -101,9 +102,9 @@
);
dependencies = (
);
name = "DelayDemo-OSX";
name = "DelayDemo-macOS";
productName = "DelayDemo-OSX";
productReference = A7C0EB6A1C2441C800110179 /* DelayDemo-OSX.app */;
productReference = A7C0EB6A1C2441C800110179 /* DelayDemo-macOS.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
......@@ -118,10 +119,11 @@
TargetAttributes = {
A7C0EB691C2441C800110179 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
};
};
};
buildConfigurationList = A7C0EB651C2441C800110179 /* Build configuration list for PBXProject "DelayDemo-OSX" */;
buildConfigurationList = A7C0EB651C2441C800110179 /* Build configuration list for PBXProject "DelayDemo-macOS" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
......@@ -134,7 +136,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
A7C0EB691C2441C800110179 /* DelayDemo-OSX */,
A7C0EB691C2441C800110179 /* DelayDemo-macOS */,
);
};
/* End PBXProject section */
......@@ -214,7 +216,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
......@@ -255,7 +257,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
LIBRARY_SEARCH_PATHS = "";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
......@@ -272,8 +274,10 @@
);
INFOPLIST_FILE = "DelayDemo-OSX/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = "ind.ie.DelayDemo-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
......@@ -288,15 +292,17 @@
);
INFOPLIST_FILE = "DelayDemo-OSX/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = "ind.ie.DelayDemo-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
A7C0EB651C2441C800110179 /* Build configuration list for PBXProject "DelayDemo-OSX" */ = {
A7C0EB651C2441C800110179 /* Build configuration list for PBXProject "DelayDemo-macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A7C0EB771C2441C800110179 /* Debug */,
......@@ -305,7 +311,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
A7C0EB791C2441C800110179 /* Build configuration list for PBXNativeTarget "DelayDemo-OSX" */ = {
A7C0EB791C2441C800110179 /* Build configuration list for PBXNativeTarget "DelayDemo-macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A7C0EB7A1C2441C800110179 /* Debug */,
......
......@@ -7,14 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
A7394BDD1CA435C70096FF28 /* Delay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7394BDC1CA435C70096FF28 /* Delay.framework */; };
A787D4771C24867500CDBF66 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A787D4761C24867500CDBF66 /* AppDelegate.swift */; };
A787D4791C24867500CDBF66 /* IOSViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A787D4781C24867500CDBF66 /* IOSViewController.swift */; };
A787D47C1C24867500CDBF66 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A787D47A1C24867500CDBF66 /* Main.storyboard */; };
A787D47E1C24867500CDBF66 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A787D47D1C24867500CDBF66 /* Assets.xcassets */; };
A787D4811C24867500CDBF66 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A787D47F1C24867500CDBF66 /* LaunchScreen.storyboard */; };
A787D48D1C24871A00CDBF66 /* Handle.framework.dSYM in CopyFiles */ = {isa = PBXBuildFile; fileRef = A787D48C1C24871A00CDBF66 /* Handle.framework.dSYM */; };
A7D97E361CA4073D007C185B /* Handle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7D97E351CA4073D007C185B /* Handle.framework */; };
A7E2C25F1CA43ACB00CD92AE /* Delay.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7394BDC1CA435C70096FF28 /* Delay.framework */; };
A7E2C2601CA43ACB00CD92AE /* Delay.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A7394BDC1CA435C70096FF28 /* Delay.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
......@@ -61,9 +59,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A7D97E361CA4073D007C185B /* Handle.framework in Frameworks */,
A7E2C25F1CA43ACB00CD92AE /* Delay.framework in Frameworks */,
A7394BDD1CA435C70096FF28 /* Delay.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -132,11 +128,12 @@