diff --git a/Lister/About Lister.pdf b/Lister/About Lister.pdf index 81f7643d..f03a08db 100644 Binary files a/Lister/About Lister.pdf and b/Lister/About Lister.pdf differ diff --git a/Lister/Swift/Common/AllListItemsPresenter.swift b/Lister/Common/AllListItemsPresenter.swift similarity index 99% rename from Lister/Swift/Common/AllListItemsPresenter.swift rename to Lister/Common/AllListItemsPresenter.swift index 240b3a35..66bceed1 100644 --- a/Lister/Swift/Common/AllListItemsPresenter.swift +++ b/Lister/Common/AllListItemsPresenter.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Common/AppConfiguration.swift b/Lister/Common/AppConfiguration.swift similarity index 99% rename from Lister/Swift/Common/AppConfiguration.swift rename to Lister/Common/AppConfiguration.swift index 778fc144..61a40a36 100644 --- a/Lister/Swift/Common/AppConfiguration.swift +++ b/Lister/Common/AppConfiguration.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Common/CheckBoxLayer.swift b/Lister/Common/CheckBoxLayer.swift similarity index 98% rename from Lister/Swift/Common/CheckBoxLayer.swift rename to Lister/Common/CheckBoxLayer.swift index f8660d44..9413901c 100644 --- a/Lister/Swift/Common/CheckBoxLayer.swift +++ b/Lister/Common/CheckBoxLayer.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Common/IncompleteListItemsPresenter.swift b/Lister/Common/IncompleteListItemsPresenter.swift similarity index 99% rename from Lister/Swift/Common/IncompleteListItemsPresenter.swift rename to Lister/Common/IncompleteListItemsPresenter.swift index 9142d376..8f527a1c 100644 --- a/Lister/Swift/Common/IncompleteListItemsPresenter.swift +++ b/Lister/Common/IncompleteListItemsPresenter.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Common/List.swift b/Lister/Common/List.swift similarity index 96% rename from Lister/Swift/Common/List.swift rename to Lister/Common/List.swift index 10ef8f54..f809ff36 100644 --- a/Lister/Swift/Common/List.swift +++ b/Lister/Common/List.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -18,7 +18,7 @@ import Foundation the Objective-C version of Lister to unarchive a `List` instance that was archived in the Swift version. */ @objc(AAPLList) -final public class List: NSObject, NSCoding, NSCopying, CustomDebugStringConvertible { +final public class List: NSObject, NSCoding, NSCopying { // MARK: Types /** diff --git a/Lister/Swift/Common/ListColorUI.swift b/Lister/Common/ListColorUI.swift similarity index 97% rename from Lister/Swift/Common/ListColorUI.swift rename to Lister/Common/ListColorUI.swift index 06e57eaf..572504ee 100644 --- a/Lister/Swift/Common/ListColorUI.swift +++ b/Lister/Common/ListColorUI.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Common/ListItem.swift b/Lister/Common/ListItem.swift similarity index 96% rename from Lister/Swift/Common/ListItem.swift rename to Lister/Common/ListItem.swift index 6f9fb2c8..87040f31 100644 --- a/Lister/Swift/Common/ListItem.swift +++ b/Lister/Common/ListItem.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -18,7 +18,7 @@ import Foundation version of Lister to unarchive a `ListItem` instance that was archived in the Swift version. */ @objc(AAPLListItem) -final public class ListItem: NSObject, NSCoding, NSCopying, CustomDebugStringConvertible { +final public class ListItem: NSObject, NSCoding, NSCopying { // MARK: Types /** @@ -130,6 +130,6 @@ final public class ListItem: NSObject, NSCoding, NSCopying, CustomDebugStringCon // MARK: DebugPrintable public override var debugDescription: String { - return "\"\(text)\"" + return "\"\(text)\" [\(isComplete ? "X" : " ")]" } } diff --git a/Lister/Swift/Common/ListPresenterAlgorithms.swift b/Lister/Common/ListPresenterAlgorithms.swift similarity index 98% rename from Lister/Swift/Common/ListPresenterAlgorithms.swift rename to Lister/Common/ListPresenterAlgorithms.swift index ec2caac7..24e9cfdf 100644 --- a/Lister/Swift/Common/ListPresenterAlgorithms.swift +++ b/Lister/Common/ListPresenterAlgorithms.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Common/ListPresenterDelegate.swift b/Lister/Common/ListPresenterDelegate.swift similarity index 99% rename from Lister/Swift/Common/ListPresenterDelegate.swift rename to Lister/Common/ListPresenterDelegate.swift index 3575ebd5..094e0a44 100644 --- a/Lister/Swift/Common/ListPresenterDelegate.swift +++ b/Lister/Common/ListPresenterDelegate.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Common/ListPresenterType.swift b/Lister/Common/ListPresenterType.swift similarity index 98% rename from Lister/Swift/Common/ListPresenterType.swift rename to Lister/Common/ListPresenterType.swift index 377030a3..22998422 100644 --- a/Lister/Swift/Common/ListPresenterType.swift +++ b/Lister/Common/ListPresenterType.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Common/ListPresenterUtilities.swift b/Lister/Common/ListPresenterUtilities.swift similarity index 98% rename from Lister/Swift/Common/ListPresenterUtilities.swift rename to Lister/Common/ListPresenterUtilities.swift index c06080c5..5a1e27ac 100644 --- a/Lister/Swift/Common/ListPresenterUtilities.swift +++ b/Lister/Common/ListPresenterUtilities.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/LICENSE.txt b/Lister/LICENSE.txt index a26f5a41..adad4ad3 100644 --- a/Lister/LICENSE.txt +++ b/Lister/LICENSE.txt @@ -1,5 +1,5 @@ Sample code project: Lister (for watchOS, iOS, and OS X) -Version: 3.0 +Version: 3.3 IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple") in consideration of your agreement to the following @@ -39,4 +39,4 @@ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Copyright (C) 2015 Apple Inc. All Rights Reserved. +Copyright (C) 2016 Apple Inc. All Rights Reserved. diff --git a/Lister/Swift/Lister Tests/AppLaunchContextTests.swift b/Lister/Lister Tests/AppLaunchContextTests.swift similarity index 67% rename from Lister/Swift/Lister Tests/AppLaunchContextTests.swift rename to Lister/Lister Tests/AppLaunchContextTests.swift index bfa657e5..a5495195 100644 --- a/Lister/Swift/Lister Tests/AppLaunchContextTests.swift +++ b/Lister/Lister Tests/AppLaunchContextTests.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -42,7 +42,12 @@ class AppLaunchContextTests: XCTestCase { AppConfiguration.UserActivity.listColorUserInfoKey: color.rawValue ]) - let launchContext = AppLaunchContext(userActivity: userActivity) + let listsController = AppConfiguration.sharedConfiguration.listsControllerForCurrentConfigurationWithPathExtension(AppConfiguration.listerFileExtension, firstQueryHandler: nil) + let possibleLaunchContext = AppLaunchContext(userActivity: userActivity, listsController: listsController) + + XCTAssertNotNil(possibleLaunchContext) + + guard let launchContext = possibleLaunchContext else { return } XCTAssertEqual(launchContext.listURL.absoluteURL, listURLs.first!.absoluteURL) XCTAssertEqual(launchContext.listColor, color) @@ -56,7 +61,12 @@ class AppLaunchContextTests: XCTestCase { AppConfiguration.UserActivity.listColorUserInfoKey: color.rawValue ]) - let launchContext = AppLaunchContext(userActivity: userActivity) + let listsController = AppConfiguration.sharedConfiguration.listsControllerForCurrentConfigurationWithPathExtension(AppConfiguration.listerFileExtension, firstQueryHandler: nil) + let possibleLaunchContext = AppLaunchContext(userActivity: userActivity, listsController: listsController) + + XCTAssertNotNil(possibleLaunchContext) + + guard let launchContext = possibleLaunchContext else { return } XCTAssertEqual(launchContext.listURL.absoluteURL, listURLs.first!.absoluteURL) XCTAssertEqual(launchContext.listColor, color) @@ -71,7 +81,12 @@ class AppLaunchContextTests: XCTestCase { AppConfiguration.UserActivity.listColorUserInfoKey: color.rawValue ]) - let launchContext = AppLaunchContext(userActivity: userActivity) + let listsController = AppConfiguration.sharedConfiguration.listsControllerForCurrentConfigurationWithPathExtension(AppConfiguration.listerFileExtension, firstQueryHandler: nil) + let possibleLaunchContext = AppLaunchContext(userActivity: userActivity, listsController: listsController) + + XCTAssertNotNil(possibleLaunchContext) + + guard let launchContext = possibleLaunchContext else { return } XCTAssertEqual(launchContext.listURL.absoluteURL, listURLs.first!.absoluteURL) XCTAssertEqual(launchContext.listColor, color) @@ -88,7 +103,11 @@ class AppLaunchContextTests: XCTestCase { let colorQueryItem = NSURLQueryItem(name: AppConfiguration.ListerScheme.colorQueryKey, value: colorQueryValue) urlComponents.queryItems = [colorQueryItem] - let launchContext = AppLaunchContext(listerURL: urlComponents.URL!) + let possibleLaunchContext = AppLaunchContext(listerURL: urlComponents.URL!) + + XCTAssertNotNil(possibleLaunchContext) + + guard let launchContext = possibleLaunchContext else { return } XCTAssertEqual(launchContext.listURL.absoluteURL, listURLs.first!.absoluteURL) XCTAssertEqual(launchContext.listColor, color) diff --git a/Lister/Objective-C/Lister Tests/Info.plist b/Lister/Lister Tests/Info.plist similarity index 100% rename from Lister/Objective-C/Lister Tests/Info.plist rename to Lister/Lister Tests/Info.plist diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-0@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-0@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-0@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-0@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-10@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-10@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-10@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-10@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-11@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-11@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-11@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-11@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-12@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-12@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-12@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-12@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-13@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-13@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-13@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-13@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-14@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-14@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-14@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-14@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-15@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-15@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-15@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-15@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-16@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-16@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-16@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-16@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-17@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-17@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-17@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-17@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-18@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-18@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-18@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-18@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-19@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-19@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-19@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-19@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-1@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-1@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-1@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-1@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-20@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-20@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-20@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-20@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-21@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-21@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-21@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-21@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-22@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-22@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-22@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-22@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-23@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-23@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-23@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-23@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-24@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-24@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-24@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-24@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-25@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-25@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-25@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-25@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-26@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-26@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-26@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-26@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-27@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-27@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-27@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-27@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-28@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-28@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-28@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-28@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-29@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-29@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-29@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-29@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-2@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-2@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-2@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-2@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-30@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-30@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-30@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-30@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-31@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-31@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-31@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-31@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-32@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-32@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-32@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-32@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-33@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-33@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-33@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-33@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-34@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-34@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-34@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-34@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-35@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-35@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-35@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-35@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-36@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-36@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-36@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-36@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-37@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-37@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-37@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-37@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-38@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-38@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-38@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-38@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-39@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-39@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-39@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-39@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-3@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-3@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-3@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-3@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-40@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-40@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-40@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-40@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-41@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-41@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-41@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-41@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-42@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-42@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-42@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-42@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-43@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-43@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-43@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-43@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-44@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-44@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-44@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-44@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-4@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-4@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-4@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-4@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-5@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-5@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-5@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-5@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-6@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-6@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-6@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-6@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-7@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-7@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-7@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-7@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-8@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-8@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-8@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-8@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Badge/glance-9@2x.png b/Lister/Lister Watch App/Assets/Badge/glance-9@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Badge/glance-9@2x.png rename to Lister/Lister Watch App/Assets/Badge/glance-9@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-blue-checked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-blue-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-blue-checked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-blue-checked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-blue-unchecked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-blue-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-blue-unchecked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-blue-unchecked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-gray-checked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-gray-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-gray-checked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-gray-checked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-gray-unchecked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-gray-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-gray-unchecked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-gray-unchecked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-green-checked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-green-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-green-checked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-green-checked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-green-unchecked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-green-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-green-unchecked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-green-unchecked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-orange-checked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-orange-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-orange-checked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-orange-checked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-orange-unchecked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-orange-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-orange-unchecked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-orange-unchecked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-red-checked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-red-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-red-checked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-red-checked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-red-unchecked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-red-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-red-unchecked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-red-unchecked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-yellow-checked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-yellow-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-yellow-checked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-yellow-checked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png b/Lister/Lister Watch App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png rename to Lister/Lister Watch App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Menus/check-all@2x.png b/Lister/Lister Watch App/Assets/Menus/check-all@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Menus/check-all@2x.png rename to Lister/Lister Watch App/Assets/Menus/check-all@2x.png diff --git a/Lister/Objective-C/Lister Watch App/Assets/Menus/uncheck-all@2x.png b/Lister/Lister Watch App/Assets/Menus/uncheck-all@2x.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Assets/Menus/uncheck-all@2x.png rename to Lister/Lister Watch App/Assets/Menus/uncheck-all@2x.png diff --git a/Lister/Swift/Lister Watch App/Base.lproj/Interface.storyboard b/Lister/Lister Watch App/Base.lproj/Interface.storyboard similarity index 100% rename from Lister/Swift/Lister Watch App/Base.lproj/Interface.storyboard rename to Lister/Lister Watch App/Base.lproj/Interface.storyboard diff --git a/Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json b/Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json rename to Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister172.png b/Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister172.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister172.png rename to Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister172.png diff --git a/Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister196.png b/Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister196.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister196.png rename to Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister196.png diff --git a/Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister58.png b/Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister58.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister58.png rename to Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister58.png diff --git a/Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister80.png b/Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister80.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister80.png rename to Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister80.png diff --git a/Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister87.png b/Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister87.png similarity index 100% rename from Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister87.png rename to Lister/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister87.png diff --git a/Lister/Swift/Lister Watch App/Info.plist b/Lister/Lister Watch App/Info.plist similarity index 97% rename from Lister/Swift/Lister Watch App/Info.plist rename to Lister/Lister Watch App/Info.plist index be9f57d5..2342ca13 100644 --- a/Lister/Swift/Lister Watch App/Info.plist +++ b/Lister/Lister Watch App/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion diff --git a/Lister/Swift/Lister Watch Extension/ExtensionDelegate.swift b/Lister/Lister Watch Extension/ExtensionDelegate.swift similarity index 93% rename from Lister/Swift/Lister Watch Extension/ExtensionDelegate.swift rename to Lister/Lister Watch Extension/ExtensionDelegate.swift index 2973aa49..c2e9b933 100644 --- a/Lister/Swift/Lister Watch Extension/ExtensionDelegate.swift +++ b/Lister/Lister Watch Extension/ExtensionDelegate.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Lister Watch Extension/Glance/GlanceInterfaceController.swift b/Lister/Lister Watch Extension/Glance/GlanceInterfaceController.swift similarity index 99% rename from Lister/Swift/Lister Watch Extension/Glance/GlanceInterfaceController.swift rename to Lister/Lister Watch Extension/Glance/GlanceInterfaceController.swift index d8aad1c7..6beaa438 100644 --- a/Lister/Swift/Lister Watch Extension/Glance/GlanceInterfaceController.swift +++ b/Lister/Lister Watch Extension/Glance/GlanceInterfaceController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -7,7 +7,7 @@ */ import WatchKit -import ListerKit +import ListerWatchKit class GlanceInterfaceController: WKInterfaceController, ConnectivityListsControllerDelegate, ListPresenterDelegate, NSFilePresenter { // MARK: Properties diff --git a/Lister/Swift/Lister Watch Extension/Info.plist b/Lister/Lister Watch Extension/Info.plist similarity index 93% rename from Lister/Swift/Lister Watch Extension/Info.plist rename to Lister/Lister Watch Extension/Info.plist index 4b871167..9b373120 100644 --- a/Lister/Swift/Lister Watch Extension/Info.plist +++ b/Lister/Lister Watch Extension/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion @@ -29,7 +29,7 @@ NSExtensionAttributes WKAppBundleIdentifier - ${LISTER_BUNDLE_PREFIX}.Lister.nativewatchkitapp + ${LISTER_BUNDLE_PREFIX}.Lister.watchkitapp NSExtensionPointIdentifier com.apple.watchkit diff --git a/Lister/Swift/Lister Watch Extension/ListInterfaceController.swift b/Lister/Lister Watch Extension/ListInterfaceController.swift similarity index 96% rename from Lister/Swift/Lister Watch Extension/ListInterfaceController.swift rename to Lister/Lister Watch Extension/ListInterfaceController.swift index 315108aa..09b1c79b 100644 --- a/Lister/Swift/Lister Watch Extension/ListInterfaceController.swift +++ b/Lister/Lister Watch Extension/ListInterfaceController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -8,7 +8,7 @@ import WatchKit import WatchConnectivity -import ListerKit +import ListerWatchKit /** The interface controller that presents a list. The interface controller listens for changes to how the list @@ -233,6 +233,9 @@ class ListInterfaceController: WKInterfaceController, ListPresenterDelegate, NSF let session = WCSession.defaultSession() + // Do not proceed if `session` is not currently `.Activated`. + guard session.activationState == .Activated else { return } + for transfer in session.outstandingFileTransfers { if transfer.file.fileURL == self.presentedItemURL! { transfer.cancel() @@ -263,6 +266,10 @@ class ListInterfaceController: WKInterfaceController, ListPresenterDelegate, NSF setupInterfaceTable() } + override func willActivate() { + addFilePresenterIfNeeded() + } + override func didDeactivate() { saveUnsavedChangesWithCompletionHandler { _ in self.removeFilePresenterIfNeeded() diff --git a/Lister/Swift/Lister Watch Extension/ListsInterfaceController.swift b/Lister/Lister Watch Extension/ListsInterfaceController.swift similarity index 91% rename from Lister/Swift/Lister Watch Extension/ListsInterfaceController.swift rename to Lister/Lister Watch Extension/ListsInterfaceController.swift index 0b7b67ac..9a6ff66e 100644 --- a/Lister/Swift/Lister Watch Extension/ListsInterfaceController.swift +++ b/Lister/Lister Watch Extension/ListsInterfaceController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -7,7 +7,7 @@ */ import WatchKit -import ListerKit +import ListerWatchKit class ListsInterfaceController: WKInterfaceController, ConnectivityListsControllerDelegate { // MARK: Types @@ -83,12 +83,12 @@ class ListsInterfaceController: WKInterfaceController, ConnectivityListsControll // MARK: Convenience func configureRowControllerAtIndex(index: Int) { - let ListRowController = interfaceTable.rowControllerAtIndex(index) as! ColoredTextRowController + let listRowController = interfaceTable.rowControllerAtIndex(index) as! ColoredTextRowController let listInfo = listsController[index] - ListRowController.setColor(listInfo.color.colorValue) - ListRowController.setText(listInfo.name) + listRowController.setColor(listInfo.color.colorValue) + listRowController.setText(listInfo.name) } // MARK: Interface Life Cycle @@ -117,7 +117,8 @@ class ListsInterfaceController: WKInterfaceController, ConnectivityListsControll let color = List.Color(rawValue: rawColor) else { return } // Create a `ListInfo` that represents the list at `listInfoURL`. - let name = listInfoFilePath.lastPathComponent.stringByDeletingPathExtension + let lastPathComponent = (listInfoFilePath as NSString).lastPathComponent + let name = (lastPathComponent as NSString).stringByDeletingPathExtension let listInfo = ListInfo(name: name, color: color) // Present a `ListInterfaceController`. diff --git a/Lister/Objective-C/Lister Watch Extension/Localizable.strings b/Lister/Lister Watch Extension/Localizable.strings similarity index 100% rename from Lister/Objective-C/Lister Watch Extension/Localizable.strings rename to Lister/Lister Watch Extension/Localizable.strings diff --git a/Lister/Swift/Lister Watch Extension/Localizable.stringsdict b/Lister/Lister Watch Extension/Localizable.stringsdict similarity index 100% rename from Lister/Swift/Lister Watch Extension/Localizable.stringsdict rename to Lister/Lister Watch Extension/Localizable.stringsdict diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-0@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-0@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-0@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-0@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-10@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-10@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-10@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-10@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-11@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-11@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-11@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-11@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-12@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-12@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-12@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-12@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-13@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-13@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-13@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-13@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-14@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-14@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-14@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-14@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-15@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-15@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-15@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-15@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-16@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-16@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-16@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-16@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-17@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-17@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-17@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-17@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-18@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-18@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-18@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-18@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-19@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-19@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-19@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-19@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-1@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-1@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-1@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-1@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-20@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-20@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-20@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-20@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-21@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-21@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-21@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-21@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-22@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-22@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-22@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-22@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-23@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-23@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-23@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-23@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-24@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-24@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-24@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-24@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-25@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-25@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-25@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-25@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-26@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-26@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-26@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-26@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-27@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-27@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-27@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-27@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-28@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-28@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-28@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-28@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-29@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-29@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-29@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-29@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-2@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-2@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-2@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-2@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-30@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-30@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-30@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-30@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-31@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-31@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-31@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-31@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-32@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-32@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-32@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-32@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-33@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-33@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-33@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-33@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-34@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-34@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-34@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-34@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-35@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-35@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-35@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-35@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-36@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-36@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-36@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-36@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-37@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-37@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-37@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-37@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-38@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-38@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-38@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-38@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-39@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-39@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-39@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-39@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-3@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-3@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-3@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-3@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-40@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-40@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-40@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-40@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-41@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-41@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-41@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-41@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-42@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-42@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-42@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-42@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-43@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-43@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-43@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-43@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-44@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-44@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-44@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-44@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-4@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-4@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-4@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-4@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-5@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-5@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-5@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-5@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-6@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-6@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-6@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-6@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-7@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-7@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-7@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-7@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-8@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-8@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-8@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-8@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-9@2x.png b/Lister/Lister WatchKit App/Assets/Badge/glance-9@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Badge/glance-9@2x.png rename to Lister/Lister WatchKit App/Assets/Badge/glance-9@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-blue-checked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-blue-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-blue-checked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-blue-checked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-blue-unchecked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-blue-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-blue-unchecked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-blue-unchecked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-gray-checked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-gray-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-gray-checked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-gray-checked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-gray-unchecked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-gray-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-gray-unchecked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-gray-unchecked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-green-checked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-green-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-green-checked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-green-checked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-green-unchecked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-green-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-green-unchecked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-green-unchecked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-orange-checked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-orange-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-orange-checked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-orange-checked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-orange-unchecked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-orange-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-orange-unchecked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-orange-unchecked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-red-checked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-red-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-red-checked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-red-checked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-red-unchecked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-red-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-red-unchecked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-red-unchecked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-checked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-checked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-checked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-checked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png b/Lister/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png rename to Lister/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Menus/check-all@2x.png b/Lister/Lister WatchKit App/Assets/Menus/check-all@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Menus/check-all@2x.png rename to Lister/Lister WatchKit App/Assets/Menus/check-all@2x.png diff --git a/Lister/Objective-C/Lister WatchKit App/Assets/Menus/uncheck-all@2x.png b/Lister/Lister WatchKit App/Assets/Menus/uncheck-all@2x.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Assets/Menus/uncheck-all@2x.png rename to Lister/Lister WatchKit App/Assets/Menus/uncheck-all@2x.png diff --git a/Lister/Swift/Lister WatchKit App/Base.lproj/Interface.storyboard b/Lister/Lister WatchKit App/Base.lproj/Interface.storyboard similarity index 100% rename from Lister/Swift/Lister WatchKit App/Base.lproj/Interface.storyboard rename to Lister/Lister WatchKit App/Base.lproj/Interface.storyboard diff --git a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Contents.json b/Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Contents.json rename to Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister172.png b/Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister172.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister172.png rename to Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister172.png diff --git a/Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister196.png b/Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister196.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister196.png rename to Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister196.png diff --git a/Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister58.png b/Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister58.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister58.png rename to Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister58.png diff --git a/Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister80.png b/Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister80.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister80.png rename to Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister80.png diff --git a/Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister87.png b/Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister87.png similarity index 100% rename from Lister/Objective-C/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister87.png rename to Lister/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister87.png diff --git a/Lister/Objective-C/Lister Watch App/Info.plist b/Lister/Lister WatchKit App/Info.plist similarity index 97% rename from Lister/Objective-C/Lister Watch App/Info.plist rename to Lister/Lister WatchKit App/Info.plist index b1e09646..97d48018 100644 --- a/Lister/Objective-C/Lister Watch App/Info.plist +++ b/Lister/Lister WatchKit App/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion diff --git a/Lister/Swift/Lister WatchKit Common/ColoredTextRowController.swift b/Lister/Lister WatchKit Common/ColoredTextRowController.swift similarity index 93% rename from Lister/Swift/Lister WatchKit Common/ColoredTextRowController.swift rename to Lister/Lister WatchKit Common/ColoredTextRowController.swift index ecbc7603..ba870a21 100644 --- a/Lister/Swift/Lister WatchKit Common/ColoredTextRowController.swift +++ b/Lister/Lister WatchKit Common/ColoredTextRowController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Lister WatchKit Common/Glance/GlanceBadge.swift b/Lister/Lister WatchKit Common/Glance/GlanceBadge.swift similarity index 95% rename from Lister/Swift/Lister WatchKit Common/Glance/GlanceBadge.swift rename to Lister/Lister WatchKit Common/Glance/GlanceBadge.swift index e9d27517..e761e0c5 100644 --- a/Lister/Swift/Lister WatchKit Common/Glance/GlanceBadge.swift +++ b/Lister/Lister WatchKit Common/Glance/GlanceBadge.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -128,8 +128,8 @@ class GlanceBadge { let doneRect = CGRect(x: center.x - 0.5 * doneSize.width, y: center.y + 0.125 * doneSize.height, width: doneSize.width, height: doneSize.height) - itemsCompleteText.drawInRect(completeRect.integerRect, withAttributes: completeAttributes) + itemsCompleteText.drawInRect(completeRect.integral, withAttributes: completeAttributes) - doneText.drawInRect(doneRect.integerRect, withAttributes: doneAttributes) + doneText.drawInRect(doneRect.integral, withAttributes: doneAttributes) } } diff --git a/Lister/Swift/Lister WatchKit Common/ListItemRowController.swift b/Lister/Lister WatchKit Common/ListItemRowController.swift similarity index 94% rename from Lister/Swift/Lister WatchKit Common/ListItemRowController.swift rename to Lister/Lister WatchKit Common/ListItemRowController.swift index 1ebec78f..9e292395 100644 --- a/Lister/Swift/Lister WatchKit Common/ListItemRowController.swift +++ b/Lister/Lister WatchKit Common/ListItemRowController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Lister WatchKit Extension/Glance/GlanceInterfaceController.swift b/Lister/Lister WatchKit Extension/Glance/GlanceInterfaceController.swift similarity index 99% rename from Lister/Swift/Lister WatchKit Extension/Glance/GlanceInterfaceController.swift rename to Lister/Lister WatchKit Extension/Glance/GlanceInterfaceController.swift index b4bf9252..e247b924 100644 --- a/Lister/Swift/Lister WatchKit Extension/Glance/GlanceInterfaceController.swift +++ b/Lister/Lister WatchKit Extension/Glance/GlanceInterfaceController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Objective-C/Lister Watch Extension/Images.xcassets/README__ignoredByTemplate__ b/Lister/Lister WatchKit Extension/Images.xcassets/README__ignoredByTemplate__ similarity index 100% rename from Lister/Objective-C/Lister Watch Extension/Images.xcassets/README__ignoredByTemplate__ rename to Lister/Lister WatchKit Extension/Images.xcassets/README__ignoredByTemplate__ diff --git a/Lister/Swift/Lister WatchKit Extension/Info.plist b/Lister/Lister WatchKit Extension/Info.plist similarity index 98% rename from Lister/Swift/Lister WatchKit Extension/Info.plist rename to Lister/Lister WatchKit Extension/Info.plist index 9a06ab9d..6c68ce0b 100644 --- a/Lister/Swift/Lister WatchKit Extension/Info.plist +++ b/Lister/Lister WatchKit Extension/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion diff --git a/Lister/Swift/Lister WatchKit Extension/ListInterfaceController.swift b/Lister/Lister WatchKit Extension/ListInterfaceController.swift similarity index 99% rename from Lister/Swift/Lister WatchKit Extension/ListInterfaceController.swift rename to Lister/Lister WatchKit Extension/ListInterfaceController.swift index ce8e0918..c929c2ab 100644 --- a/Lister/Swift/Lister WatchKit Extension/ListInterfaceController.swift +++ b/Lister/Lister WatchKit Extension/ListInterfaceController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Objective-C/Lister WatchKit Extension/Lister WatchKit Extension.entitlements b/Lister/Lister WatchKit Extension/Lister WatchKit Extension.entitlements similarity index 100% rename from Lister/Objective-C/Lister WatchKit Extension/Lister WatchKit Extension.entitlements rename to Lister/Lister WatchKit Extension/Lister WatchKit Extension.entitlements diff --git a/Lister/Swift/Lister WatchKit Extension/ListsInterfaceController.swift b/Lister/Lister WatchKit Extension/ListsInterfaceController.swift similarity index 94% rename from Lister/Swift/Lister WatchKit Extension/ListsInterfaceController.swift rename to Lister/Lister WatchKit Extension/ListsInterfaceController.swift index 81e85c9c..5d648dbb 100644 --- a/Lister/Swift/Lister WatchKit Extension/ListsInterfaceController.swift +++ b/Lister/Lister WatchKit Extension/ListsInterfaceController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -89,11 +89,11 @@ class ListsInterfaceController: WKInterfaceController, ListsControllerDelegate { // MARK: Convenience func configureRowControllerAtIndex(index: Int) { - let ListRowController = interfaceTable.rowControllerAtIndex(index) as! ColoredTextRowController + let listRowController = interfaceTable.rowControllerAtIndex(index) as! ColoredTextRowController let listInfo = listsController[index] - ListRowController.setText(listInfo.name) + listRowController.setText(listInfo.name) listInfo.fetchInfoWithCompletionHandler() { /* @@ -101,9 +101,9 @@ class ListsInterfaceController: WKInterfaceController, ListsControllerDelegate { queue, dispatch back to the main queue to make UI updates. */ dispatch_async(dispatch_get_main_queue()) { - let ListRowController = self.interfaceTable.rowControllerAtIndex(index) as! ColoredTextRowController + let listRowController = self.interfaceTable.rowControllerAtIndex(index) as! ColoredTextRowController - ListRowController.setColor(listInfo.color!.colorValue) + listRowController.setColor(listInfo.color!.colorValue) } } } diff --git a/Lister/Objective-C/Lister WatchKit Extension/Localizable.strings b/Lister/Lister WatchKit Extension/Localizable.strings similarity index 100% rename from Lister/Objective-C/Lister WatchKit Extension/Localizable.strings rename to Lister/Lister WatchKit Extension/Localizable.strings diff --git a/Lister/Swift/Lister WatchKit Extension/Localizable.stringsdict b/Lister/Lister WatchKit Extension/Localizable.stringsdict similarity index 100% rename from Lister/Swift/Lister WatchKit Extension/Localizable.stringsdict rename to Lister/Lister WatchKit Extension/Localizable.stringsdict diff --git a/Lister/Swift/Lister.xcodeproj/project.pbxproj b/Lister/Lister.xcodeproj/project.pbxproj similarity index 99% rename from Lister/Swift/Lister.xcodeproj/project.pbxproj rename to Lister/Lister.xcodeproj/project.pbxproj index eae62cdd..c305ab1d 100644 --- a/Lister/Swift/Lister.xcodeproj/project.pbxproj +++ b/Lister/Lister.xcodeproj/project.pbxproj @@ -120,8 +120,8 @@ 16CD55F51B127D2400DB4F4F /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16CD55F41B127D2400DB4F4F /* ExtensionDelegate.swift */; }; 16CD55F71B127D2400DB4F4F /* GlanceInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16CD55F61B127D2400DB4F4F /* GlanceInterfaceController.swift */; }; 16CD55FD1B127D2400DB4F4F /* Lister Watch App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 16CD55E11B127D2400DB4F4F /* Lister Watch App.app */; }; - 16CD56141B127E6600DB4F4F /* ListerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16CD560C1B127DDC00DB4F4F /* ListerKit.framework */; }; - 16CD56151B127E6600DB4F4F /* ListerKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 16CD560C1B127DDC00DB4F4F /* ListerKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 16CD56141B127E6600DB4F4F /* ListerWatchKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16CD560C1B127DDC00DB4F4F /* ListerWatchKit.framework */; }; + 16CD56151B127E6600DB4F4F /* ListerWatchKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 16CD560C1B127DDC00DB4F4F /* ListerWatchKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16DAC8AD18F9BB5400251E9D /* ListColorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16DAC8AC18F9BB5400251E9D /* ListColorCell.swift */; }; 16DAC8AF18F9DAA800251E9D /* ListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16DAC8AE18F9DAA800251E9D /* ListCell.swift */; }; 16E63F2E1B128078001D63DF /* GlanceBadge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16E63F2C1B12806F001D63DF /* GlanceBadge.swift */; }; @@ -512,7 +512,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 16CD56151B127E6600DB4F4F /* ListerKit.framework in Embed Frameworks */, + 16CD56151B127E6600DB4F4F /* ListerWatchKit.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -633,6 +633,7 @@ 16AF5213191FF94B0088ED08 /* CheckBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CheckBox.swift; path = ../ListerKit/CheckBox.swift; sourceTree = ""; }; 16AF9FD11987FEA3008CAA4C /* LocalListCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalListCoordinator.swift; sourceTree = ""; }; 16AF9FD5198864DA008CAA4C /* CloudListCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CloudListCoordinator.swift; sourceTree = ""; }; + 16BB13ED1B82AFCE006E0F7C /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 16C8CB3C1986C2D100F8BCFE /* ListsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; name = ListsController.swift; path = ../ListerKit/ListsController.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 16CBDAA718F6EE3A00233D3C /* Lister.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Lister.app; sourceTree = BUILT_PRODUCTS_DIR; }; 16CBDAAB18F6EE3A00233D3C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -649,7 +650,7 @@ 16CD55F41B127D2400DB4F4F /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; 16CD55F61B127D2400DB4F4F /* GlanceInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlanceInterfaceController.swift; sourceTree = ""; }; 16CD55FA1B127D2400DB4F4F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 16CD560C1B127DDC00DB4F4F /* ListerKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ListerKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 16CD560C1B127DDC00DB4F4F /* ListerWatchKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ListerWatchKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 16CD56101B127DDC00DB4F4F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 16DAC8AC18F9BB5400251E9D /* ListColorCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListColorCell.swift; sourceTree = ""; }; 16DAC8AE18F9DAA800251E9D /* ListCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListCell.swift; sourceTree = ""; }; @@ -813,7 +814,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 16CD56141B127E6600DB4F4F /* ListerKit.framework in Frameworks */, + 16CD56141B127E6600DB4F4F /* ListerWatchKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1111,6 +1112,7 @@ 16CBDA9E18F6EE3A00233D3C = { isa = PBXGroup; children = ( + 16BB13ED1B82AFCE006E0F7C /* README.md */, 16CBDAA918F6EE3A00233D3C /* Lister iOS App */, 55EEFA841A1A5C9A00172D58 /* Lister WatchKit App */, 16E63F251B12802C001D63DF /* Shared Lister WatchKit Code */, @@ -1139,7 +1141,7 @@ 1611C5E81A925C1D00472891 /* Lister Tests.xctest */, 16CD55E11B127D2400DB4F4F /* Lister Watch App.app */, 16CD55ED1B127D2400DB4F4F /* Lister Watch Extension.appex */, - 16CD560C1B127DDC00DB4F4F /* ListerKit.framework */, + 16CD560C1B127DDC00DB4F4F /* ListerWatchKit.framework */, ); name = Products; sourceTree = ""; @@ -1925,7 +1927,7 @@ ); name = "ListerKit (watchOS)"; productName = "ListerKit (watchOS)"; - productReference = 16CD560C1B127DDC00DB4F4F /* ListerKit.framework */; + productReference = 16CD560C1B127DDC00DB4F4F /* ListerWatchKit.framework */; productType = "com.apple.product-type.framework"; }; 16EE5953192016410052916A /* ListerKit */ = { @@ -2123,6 +2125,7 @@ }; 16CD560B1B127DDC00DB4F4F = { CreatedOnToolsVersion = 7.0; + DevelopmentTeam = A93A5CM278; }; 16EE5953192016410052916A = { CreatedOnToolsVersion = 6.0; @@ -2803,10 +2806,6 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -2826,10 +2825,6 @@ BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); INFOPLIST_FILE = "Lister Tests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; @@ -3008,7 +3003,7 @@ IBSC_MODULE = "Lister Watch Extension"; INFOPLIST_FILE = "$(SRCROOT)/Lister Watch App/Info.plist"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.nativewatchkitapp"; + PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.watchkitapp"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3030,7 +3025,7 @@ IBSC_MODULE = "Lister Watch Extension"; INFOPLIST_FILE = "$(SRCROOT)/Lister Watch App/Info.plist"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.nativewatchkitapp"; + PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.watchkitapp"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3052,7 +3047,7 @@ INFOPLIST_FILE = "$(SRCROOT)/Lister Watch Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.nativewatchkitapp.nativewatchkitextension"; + PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.watchkitapp.watchkitextension"; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3073,7 +3068,7 @@ INFOPLIST_FILE = "$(SRCROOT)/Lister Watch Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.nativewatchkitapp.nativewatchkitextension"; + PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.watchkitapp.watchkitextension"; PRODUCT_NAME = "${TARGET_NAME}"; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3085,7 +3080,9 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; @@ -3100,7 +3097,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.ListerKit--watchOS-"; - PRODUCT_NAME = ListerKit; + PRODUCT_NAME = ListerWatchKit; + PROVISIONING_PROFILE = ""; SDKROOT = watchos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 4; @@ -3113,7 +3111,9 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; @@ -3127,7 +3127,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.ListerKit--watchOS-"; - PRODUCT_NAME = ListerKit; + PRODUCT_NAME = ListerWatchKit; + PROVISIONING_PROFILE = ""; SDKROOT = watchos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 4; @@ -3283,10 +3284,6 @@ buildSettings = { EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -3305,10 +3302,6 @@ buildSettings = { EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); INFOPLIST_FILE = "ListerKit Tests/iOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; @@ -3326,10 +3319,6 @@ COMBINE_HIDPI_IMAGES = YES; EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -3353,10 +3342,6 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); INFOPLIST_FILE = "ListerKit Tests/OS X/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; diff --git a/Lister/Swift/Lister/AppDelegate.swift b/Lister/Lister/AppDelegate.swift similarity index 79% rename from Lister/Swift/Lister/AppDelegate.swift rename to Lister/Lister/AppDelegate.swift index 1ed8a3df..ffb8c108 100644 --- a/Lister/Swift/Lister/AppDelegate.swift +++ b/Lister/Lister/AppDelegate.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -20,6 +20,24 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele static let emptyViewController = "emptyViewController" } } + + enum ShortcutIdentifier: String { + case NewInToday + + // MARK: Initializers + + init?(fullType: String) { + guard let last = fullType.componentsSeparatedByString(".").last else { return nil } + + self.init(rawValue: last) + } + + // MARK: Properties + + var type: String { + return NSBundle.mainBundle().bundleIdentifier! + ".\(self.rawValue)" + } + } // MARK: Properties @@ -27,6 +45,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele var listsController: ListsController! + var launchedShortcutItem: UIApplicationShortcutItem? + /** A private, local queue used to ensure serialized access to Cloud containers during application startup. @@ -78,7 +98,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Observe changes to the user's iCloud account status (account changed, logged out, etc...). - NSNotificationCenter.defaultCenter().addObserver(self, selector: "handleUbiquityIdentityDidChangeNotification:", name: NSUbiquityIdentityDidChangeNotification, object: nil) + NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppDelegate.handleUbiquityIdentityDidChangeNotification(_:)), name: NSUbiquityIdentityDidChangeNotification, object: nil) // Provide default lists from the app's bundle on first launch. AppConfiguration.sharedConfiguration.runHandlerOnFirstLaunch { @@ -93,14 +113,33 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele navigationController.topViewController?.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem() navigationController.topViewController?.navigationItem.leftItemsSupplementBackButton = true - return true - } - - func applicationDidBecomeActive(application: UIApplication) { + var shouldPerformAdditionalDelegateHandling = true + + // If a shortcut was launched, display its information and take the appropriate action. + if let shortcutItem = launchOptions?[UIApplicationLaunchOptionsShortcutItemKey] as? UIApplicationShortcutItem { + + launchedShortcutItem = shortcutItem + + // This will block "performActionForShortcutItem:completionHandler" from being called. + shouldPerformAdditionalDelegateHandling = false + } + // Make sure that user storage preferences are set up after the app sandbox is extended. See `application(_:, willFinishLaunchingWithOptions:)` above. dispatch_async(appDelegateQueue) { self.setupUserStoragePreferences() } + + return shouldPerformAdditionalDelegateHandling + } + + func applicationDidBecomeActive(application: UIApplication) { + guard let launchedShortcutItem = launchedShortcutItem else { return } + + // Make sure that shortcut handling occurs after storage preference have been set. See `application(_:, didFinishLaunchingWithOptions:)` above. + dispatch_async(appDelegateQueue) { + self.handleApplicationShortcutItem(launchedShortcutItem) + self.launchedShortcutItem = nil + } } func application(_: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool { @@ -121,7 +160,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele // Lister currently only opens URLs of the Lister scheme type. if url.scheme == AppConfiguration.ListerScheme.name { // Obtain an app launch context from the provided lister:// URL and configure the view controller with it. - let launchContext = AppLaunchContext(listerURL: url) + guard let launchContext = AppLaunchContext(listerURL: url) else { return false } if let listDocumentsViewController = listDocumentsViewController { // Make sure that URL opening is handled after the app sandbox is extended. See `application(_:, willFinishLaunchingWithOptions:)` above. @@ -136,6 +175,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele return false } + func application(application: UIApplication, performActionForShortcutItem shortcutItem: UIApplicationShortcutItem, completionHandler: (Bool) -> Void) { + // Make sure that shortcut handling is coordinated with other activities handled asynchronously. + dispatch_async(appDelegateQueue) { + completionHandler(self.handleApplicationShortcutItem(shortcutItem)) + } + } + // MARK: UISplitViewControllerDelegate func splitViewController(splitViewController: UISplitViewController, collapseSecondaryViewController secondaryViewController: UIViewController, ontoPrimaryViewController _: UIViewController) -> Bool { @@ -268,7 +314,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele } signedOutController.addAction(action) - listDocumentsViewController?.presentViewController(signedOutController, animated: true, completion: nil) + dispatch_async(dispatch_get_main_queue()) { + self.listDocumentsViewController?.presentViewController(signedOutController, animated: true, completion: nil) + } } func promptUserForStorageOption() { @@ -295,11 +343,33 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele } storageController.addAction(cloudOption) - listDocumentsViewController?.presentViewController(storageController, animated: true, completion: nil) + dispatch_async(dispatch_get_main_queue()) { + self.listDocumentsViewController?.presentViewController(storageController, animated: true, completion: nil) + } } // MARK: Convenience + func handleApplicationShortcutItem(shortcutItem: UIApplicationShortcutItem) -> Bool { + // Verify that the provided `shortcutItem`'s `type` is one handled by the application. + guard let shortcutIdentifier = ShortcutIdentifier(fullType: shortcutItem.type) else { return false } + + switch shortcutIdentifier { + case .NewInToday: + guard let listDocuments = self.listDocumentsViewController else { return false } + guard let listsController = self.listsController else { return false } + + let todayURL = listsController.documentsDirectory.URLByAppendingPathComponent(AppConfiguration.localizedTodayDocumentNameAndExtension, isDirectory: false) + let launchContext = AppLaunchContext(listURL: todayURL, listColor: List.Color.Orange) + + listDocuments.configureViewControllerWithLaunchContext(launchContext) + + return true + } + + // The switch is exhaustive so there is no need for a 'final' return statement. + } + func configureListsController(accountChanged accountChanged: Bool, storageOptionChangeHandler: (Void -> Void)? = nil) { if listsController != nil && !accountChanged { // The current controller is correct. There is no need to reconfigure it. @@ -317,7 +387,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele } else if accountChanged { // A lists controller is configured; however, it needs to have its coordinator updated based on the account change. - listsController.listCoordinator = AppConfiguration.sharedConfiguration.listCoordinatorForCurrentConfigurationWithLastPathComponent(AppConfiguration.listerFileExtension, firstQueryHandler: storageOptionChangeHandler) + listsController.listCoordinator = AppConfiguration.sharedConfiguration.listCoordinatorForCurrentConfigurationWithPathExtension(AppConfiguration.listerFileExtension, firstQueryHandler: storageOptionChangeHandler) } } } diff --git a/Lister/Lister/AppLaunchContext.swift b/Lister/Lister/AppLaunchContext.swift new file mode 100644 index 00000000..892a81c4 --- /dev/null +++ b/Lister/Lister/AppLaunchContext.swift @@ -0,0 +1,136 @@ +/* + Copyright (C) 2016 Apple Inc. All Rights Reserved. + See LICENSE.txt for this sample’s licensing information + + Abstract: + A data object for storing context information relevant to how the app was launched. +*/ + +import UIKit +import ListerKit + +struct AppLaunchContext { + // MARK: Properties + + let listURL: NSURL + + let listColor: List.Color + + // MARK: Initializers + + /** + Initializes an `AppLaunchContext` instance with the color and URL provided. + + - parameter listURL: The `URL` of the file to launch to. + - parameter listColor: The `List.Color` of the file to launch to. + */ + init(listURL: NSURL, listColor: List.Color) { + self.listURL = listURL + self.listColor = listColor + } + + /** + Initializes an `AppLaunchContext` instance with the color and URL designated by the user activity. + + - parameter userActivity: The `userActivity` providing the file URL and list color to launch to. + - parameter listsController: The `listsController` to be used to derive the `URL` available in the `userActivty`, if necessary. + */ + init?(userActivity: NSUserActivity, listsController: ListsController) { + guard let userInfo = userActivity.userInfo else { + assertionFailure("User activity provided to \(#function) has no `userInfo` dictionary.") + return nil + } + + /* + The URL may be provided as either a URL or a URL path via separate keys. Check first for + `NSUserActivityDocumentURLKey`, if not provided, obtain the path and create a file URL from it. + */ + + var possibleURL = userInfo[NSUserActivityDocumentURLKey] as? NSURL + + // If `URL` is `nil` the activity is being continued from a platofrm other than iOS or OS X. + if possibleURL == nil { + guard let listInfoFilePath = userInfo[AppConfiguration.UserActivity.listURLPathUserInfoKey] as? String else { + assertionFailure("The `userInfo` dictionary provided to \(#function) did not contain a URL or URL path.") + return nil + } + + let fileURLForPath = NSURL(fileURLWithPath: listInfoFilePath, isDirectory: false) + + // Test for the existence of the file at the URL. If it exists proceed. + if !fileURLForPath.checkPromisedItemIsReachableAndReturnError(nil) && !fileURLForPath.checkResourceIsReachableAndReturnError(nil) { + // If the file does not exist at the URL created from the path construct one based on the filename. + let derivedURL = listsController.documentsDirectory.URLByAppendingPathComponent(fileURLForPath.lastPathComponent!, isDirectory: false) + + if !derivedURL.checkPromisedItemIsReachableAndReturnError(nil) && !derivedURL.checkResourceIsReachableAndReturnError(nil) { + possibleURL = nil + } + else { + possibleURL = derivedURL + } + } + else { + possibleURL = fileURLForPath + } + } + + guard let URL = possibleURL else { + assertionFailure("The `userInfo` dictionary provided to \(#function) did not contain a valid URL.") + return nil + } + + // Assign the URL resolved from the dictionary. + listURL = URL + + // Attempt to obtain the `rawColor` stored as an `Int` value and construct a `List.Color` from it. + guard let rawColor = userInfo[AppConfiguration.UserActivity.listColorUserInfoKey] as? Int, + let color = List.Color(rawValue: rawColor) else { + assertionFailure("The `userInfo` dictionary provided to \(#function) contains an invalid value for `color`.") + return nil + } + + listColor = color + } + + /** + Initializes an `AppLaunchContext` instance with the color and URL designated by the lister:// URL. + + - parameter listerURL: The URL adhering to the lister:// scheme providing the file URL and list color to launch to. + */ + init?(listerURL: NSURL) { + precondition(listerURL.scheme == AppConfiguration.ListerScheme.name, "Non-lister URL provided to \(#function).") + + guard let filePath = listerURL.path else { + assertionFailure("URL provided to \(#function) is missing `path`.") + return nil + } + + // Construct a file URL from the path of the lister:// URL. + listURL = NSURL(fileURLWithPath: filePath, isDirectory: false) + + // Extract the query items to initialize the `listColor` property from the `color` query item. + guard let urlComponents = NSURLComponents(URL: listerURL, resolvingAgainstBaseURL: false), + let queryItems = urlComponents.queryItems else { + assertionFailure("URL provided to \(#function) contains no query items.") + return nil + } + + // Filter down to only the `color` query items. There should only be one. + let colorQueryItems = queryItems.filter { $0.name == AppConfiguration.ListerScheme.colorQueryKey } + + guard let colorQueryItem = colorQueryItems.first where colorQueryItems.count == 1 else { + assertionFailure("URL provided to \(#function) should contain only one `color` query item.") + return nil + } + + // Attempt to obtain the `rawColor` stored as an `Int` value and construct a `List.Color` from it. + guard let colorQueryItemValue = colorQueryItem.value, + let rawColor = Int(colorQueryItemValue), + let color = List.Color(rawValue: rawColor) else { + assertionFailure("URL provided to \(#function) contains an invalid value for `color`: \(colorQueryItem.value).") + return nil + } + + listColor = color + } +} diff --git a/Lister/Objective-C/Lister/Base.lproj/Launch Screen.storyboard b/Lister/Lister/Base.lproj/Launch Screen.storyboard similarity index 100% rename from Lister/Objective-C/Lister/Base.lproj/Launch Screen.storyboard rename to Lister/Lister/Base.lproj/Launch Screen.storyboard diff --git a/Lister/Swift/Lister/Base.lproj/Main.storyboard b/Lister/Lister/Base.lproj/Main.storyboard similarity index 100% rename from Lister/Swift/Lister/Base.lproj/Main.storyboard rename to Lister/Lister/Base.lproj/Main.storyboard diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Contents.json b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 94% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Contents.json rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Contents.json index b7f7ed2c..3b5e2c72 100644 --- a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Contents.json @@ -3,7 +3,7 @@ { "size" : "29x29", "idiom" : "iphone", - "filename" : "Lister-29.png", + "filename" : "Lister-29-1.png", "scale" : "1x" }, { @@ -21,13 +21,13 @@ { "size" : "40x40", "idiom" : "iphone", - "filename" : "Lister-80.png", + "filename" : "Lister-80-1.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "iphone", - "filename" : "Lister-120.png", + "filename" : "Lister-120-1.png", "scale" : "3x" }, { @@ -43,7 +43,7 @@ { "size" : "60x60", "idiom" : "iphone", - "filename" : "Lister-120-1.png", + "filename" : "Lister-120.png", "scale" : "2x" }, { @@ -55,7 +55,7 @@ { "size" : "29x29", "idiom" : "ipad", - "filename" : "Lister-29-1.png", + "filename" : "Lister-29.png", "scale" : "1x" }, { @@ -73,7 +73,7 @@ { "size" : "40x40", "idiom" : "ipad", - "filename" : "Lister-80-1.png", + "filename" : "Lister-80.png", "scale" : "2x" }, { @@ -107,6 +107,12 @@ "idiom" : "ipad", "filename" : "Lister-152.png", "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Lister-167.png", + "scale" : "2x" } ], "info" : { diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-120-1.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-120-1.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-120-1.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-120-1.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-120.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-120.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-120.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-120.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-152.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-152.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-152.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-152.png diff --git a/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-167.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-167.png new file mode 100644 index 00000000..4790af1d Binary files /dev/null and b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-167.png differ diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-180.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-180.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-180.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-180.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-29-1.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-29-1.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-29-1.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-29-1.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-29.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-29.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-29.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-29.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-40.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-40.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-40.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-40.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-58-1.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-58-1.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-58-1.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-58-1.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-58.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-58.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-58.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-58.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-76.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-76.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-76.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-76.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-80-1.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-80-1.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-80-1.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-80-1.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-80.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-80.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-80.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-80.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-87.png b/Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-87.png similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/AppIcon.appiconset/Lister-87.png rename to Lister/Lister/Images.xcassets/AppIcon.appiconset/Lister-87.png diff --git a/Lister/Objective-C/Lister/Images.xcassets/Contents.json b/Lister/Lister/Images.xcassets/Contents.json similarity index 100% rename from Lister/Objective-C/Lister/Images.xcassets/Contents.json rename to Lister/Lister/Images.xcassets/Contents.json diff --git a/Lister/Swift/Lister/Info.plist b/Lister/Lister/Info.plist similarity index 88% rename from Lister/Swift/Lister/Info.plist rename to Lister/Lister/Info.plist index f61e9e8f..712432e0 100644 --- a/Lister/Swift/Lister/Info.plist +++ b/Lister/Lister/Info.plist @@ -38,7 +38,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleURLTypes @@ -61,6 +61,17 @@ com.example.apple-samplecode.Lister.editing com.example.apple-samplecode.Lister.watch + UIApplicationShortcutItems + + + UIApplicationShortcutItemIconType + UIApplicationShortcutIconTypeCompose + UIApplicationShortcutItemTitle + New In Today + UIApplicationShortcutItemType + $(PRODUCT_BUNDLE_IDENTIFIER).NewInToday + + UILaunchStoryboardName Launch Screen UIMainStoryboardFile diff --git a/Lister/Swift/Lister/ListCell.swift b/Lister/Lister/ListCell.swift similarity index 95% rename from Lister/Swift/Lister/ListCell.swift rename to Lister/Lister/ListCell.swift index 5d225b6b..3e5cbadd 100644 --- a/Lister/Swift/Lister/ListCell.swift +++ b/Lister/Lister/ListCell.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/Lister/ListColorCell.swift b/Lister/Lister/ListColorCell.swift similarity index 95% rename from Lister/Swift/Lister/ListColorCell.swift rename to Lister/Lister/ListColorCell.swift index 92e6ca8f..72e58888 100644 --- a/Lister/Swift/Lister/ListColorCell.swift +++ b/Lister/Lister/ListColorCell.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -43,7 +43,7 @@ class ListColorCell: UITableViewCell { func configure() { // Set up a gesture recognizer to track taps on color views in the cell. - let colorGesture = UITapGestureRecognizer(target: self, action: "colorTap:") + let colorGesture = UITapGestureRecognizer(target: self, action: #selector(ListColorCell.colorTap(_:))) colorGesture.numberOfTapsRequired = 1 colorGesture.numberOfTouchesRequired = 1 diff --git a/Lister/Swift/Lister/ListDocumentsViewController.swift b/Lister/Lister/ListDocumentsViewController.swift similarity index 82% rename from Lister/Swift/Lister/ListDocumentsViewController.swift rename to Lister/Lister/ListDocumentsViewController.swift index 7d0027ff..1d247cf5 100644 --- a/Lister/Swift/Lister/ListDocumentsViewController.swift +++ b/Lister/Lister/ListDocumentsViewController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -43,16 +43,22 @@ class ListDocumentsViewController: UITableViewController, ListsControllerDelegat private var pendingLaunchContext: AppLaunchContext? private var watchAppInstalledAtLastStateChange = false - - // MARK: View Life Cycle - override func viewDidLoad() { - super.viewDidLoad() + // MARK: Initializers + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) if WCSession.isSupported() { WCSession.defaultSession().delegate = self WCSession.defaultSession().activateSession() } + } + + // MARK: View Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() tableView.rowHeight = 44.0 @@ -61,7 +67,7 @@ class ListDocumentsViewController: UITableViewController, ListsControllerDelegat NSForegroundColorAttributeName: List.Color.Gray.colorValue ] - NSNotificationCenter.defaultCenter().addObserver(self, selector: "handleContentSizeCategoryDidChangeNotification:", name: UIContentSizeCategoryDidChangeNotification, object: nil) + NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(ListDocumentsViewController.handleContentSizeCategoryDidChangeNotification(_:)), name: UIContentSizeCategoryDidChangeNotification, object: nil) } override func viewWillAppear(animated: Bool) { @@ -98,7 +104,7 @@ class ListDocumentsViewController: UITableViewController, ListsControllerDelegat override func restoreUserActivityState(activity: NSUserActivity) { // Obtain an app launch context from the provided activity and configure the view controller with it. - let launchContext = AppLaunchContext(userActivity: activity) + guard let launchContext = AppLaunchContext(userActivity: activity, listsController: listsController) else { return } configureViewControllerWithLaunchContext(launchContext) } @@ -264,7 +270,40 @@ class ListDocumentsViewController: UITableViewController, ListsControllerDelegat // MARK: WCSessionDelegate + func session(session: WCSession, activationDidCompleteWithState activationState: WCSessionActivationState, error: NSError?) { + if let error = error { + print("session activation failed with error: \(error.localizedDescription)") + return + } + + // Return early if `session` is not currently `.Activated`. + guard activationState == .Activated else { return } + + updateWatchConnectivitySessionApplicationContext() + } + + func sessionDidBecomeInactive(session: WCSession) { + /* + The `sessionDidBecomeInactive(_:)` callback indicates sending has been disabled. If your iOS app + sends content to its Watch extension it will need to stop trying at this point. This sample + checks the session state before transmitting so no further action is required. + */ + } + + func sessionDidDeactivate(session: WCSession) { + /* + The `sessionDidDeactivate(_:)` callback indicates `WCSession` is finished delivering content to + the iOS app. iOS apps that process content delivered from their Watch Extension should finish + processing that content and call `activateSession()`. This sample immediately calls + `activateSession()` as the data provided by the Watch Extension is handled immediately. + */ + WCSession.defaultSession().activateSession() + } + func sessionWatchStateDidChange(session: WCSession) { + // Return early if `session` is not currently `.Activated`. + guard session.activationState == .Activated else { return } + if !watchAppInstalledAtLastStateChange && session.watchAppInstalled { watchAppInstalledAtLastStateChange = session.watchAppInstalled updateWatchConnectivitySessionApplicationContext() @@ -272,13 +311,14 @@ class ListDocumentsViewController: UITableViewController, ListsControllerDelegat } func session(session: WCSession, didFinishFileTransfer fileTransfer: WCSessionFileTransfer, error: NSError?) { - if error != nil { - print("\(__FUNCTION__), file: \(fileTransfer.file.fileURL), error: \(error!.localizedDescription)") + if let error = error { + print("\(#function), file: \(fileTransfer.file.fileURL), error: \(error.localizedDescription)") } } func session(session: WCSession, didReceiveFile file: WCSessionFile) { - listsController.copyListFromURL(file.fileURL, toListWithName:file.fileURL.lastPathComponent!.stringByDeletingPathExtension) + guard let lastPathComponent = file.fileURL.lastPathComponent else { return } + listsController.copyListFromURL(file.fileURL, toListWithName:(lastPathComponent as NSString).stringByDeletingPathExtension) } // MARK: UIStoryboardSegue Handling @@ -325,15 +365,20 @@ class ListDocumentsViewController: UITableViewController, ListsControllerDelegat continue configuration from there. Otherwise, configure the view controller directly. */ if navigationController?.topViewController is UINavigationController { - navigationController?.popToRootViewControllerAnimated(false) - pendingLaunchContext = launchContext + dispatch_async(dispatch_get_main_queue()) { + // Ensure that any UI updates occur on the main queue. + self.navigationController?.popToRootViewControllerAnimated(false) + self.pendingLaunchContext = launchContext + } return } let listInfo = ListInfo(URL: launchContext.listURL) listInfo.color = launchContext.listColor - performSegueWithIdentifier(.ShowListDocumentFromUserActivity, sender: listInfo) + dispatch_async(dispatch_get_main_queue()) { + self.performSegueWithIdentifier(.ShowListDocumentFromUserActivity, sender: listInfo) + } } func updateWatchConnectivitySessionApplicationContext() { @@ -342,17 +387,23 @@ class ListDocumentsViewController: UITableViewController, ListsControllerDelegat let session = WCSession.defaultSession() + // Do not proceed if `session` is not currently `.Activated`. + guard session.activationState == .Activated else { return } + // Do not proceed if the watch app is not installed on the paired watch. - if !session.watchAppInstalled { return } + guard session.watchAppInstalled else { return } // This array will be used to collect the data about the lists for the application context. - var lists: [[String: AnyObject]] = [] + var lists = [[String: AnyObject]]() // A background queue to execute operations on to fetch the information about the lists. let queue = NSOperationQueue() // This operation will execute last and will actually update the application context. - let updateApplicationContextOperation = NSBlockOperation(block: { + let updateApplicationContextOperation = NSBlockOperation { do { + // Do not proceed if `session` is not currently `.Activated`. + guard session.activationState == .Activated else { return } + try session.updateApplicationContext([AppConfiguration.ApplicationActivityContext.currentListsKey: lists]) } catch let error as NSError { @@ -360,7 +411,7 @@ class ListDocumentsViewController: UITableViewController, ListsControllerDelegat } // Requiring an additional catch to satisfy exhaustivity is a known issue. catch {} - }) + } // Loop through the available lists in order to accumulate contextual information about them. for idx in 0.. Void) { + func expectOnNextChange(expectations: Void -> Void) { isTesting = true - self.assertions = assertions + self.assertions = expectations willChangeCallbackCount = 0 remainingExpectedWillChanges = nil diff --git a/Lister/Swift/ListerKit Tests/ListTests.swift b/Lister/ListerKit Tests/ListTests.swift similarity index 90% rename from Lister/Swift/ListerKit Tests/ListTests.swift rename to Lister/ListerKit Tests/ListTests.swift index fb0a3419..6b32d3ac 100644 --- a/Lister/Swift/ListerKit Tests/ListTests.swift +++ b/Lister/ListerKit Tests/ListTests.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -106,14 +106,14 @@ class ListTests: XCTestCase { // MARK: Archive Compatibility /** - Ensure that the runtime name of the `List` class is "AAPLList". This is to ensure compatibility - with the Objective-C version of the app that archives its data with the `AAPLList` class. + Ensure that the runtime name of the `List` class is "ListerKit.List". This is to ensure compatibility + with earlier versions of the app. */ func testClassRuntimeNameForArchiveCompatibility() { let classRuntimeName = NSStringFromClass(List.self) XCTAssertNotNil(classRuntimeName, "The List class should be an @objc subclass.") - XCTAssertEqual(classRuntimeName, "AAPLList", "List should be archivable with the ObjC version of Lister.") + XCTAssertEqual(classRuntimeName, "AAPLList", "List should be archivable with earlier versions of Lister.") } } diff --git a/Lister/Swift/ListerKit Tests/OS X/Info.plist b/Lister/ListerKit Tests/OS X/Info.plist similarity index 100% rename from Lister/Swift/ListerKit Tests/OS X/Info.plist rename to Lister/ListerKit Tests/OS X/Info.plist diff --git a/Lister/Swift/ListerKit Tests/iOS/Info.plist b/Lister/ListerKit Tests/iOS/Info.plist similarity index 100% rename from Lister/Swift/ListerKit Tests/iOS/Info.plist rename to Lister/ListerKit Tests/iOS/Info.plist diff --git a/Lister/Swift/ListerKit/CheckBox.swift b/Lister/ListerKit/CheckBox.swift similarity index 96% rename from Lister/Swift/ListerKit/CheckBox.swift rename to Lister/ListerKit/CheckBox.swift index 00f5dcf3..e68cb833 100644 --- a/Lister/Swift/ListerKit/CheckBox.swift +++ b/Lister/ListerKit/CheckBox.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerKit/CloudListCoordinator.swift b/Lister/ListerKit/CloudListCoordinator.swift similarity index 95% rename from Lister/Swift/ListerKit/CloudListCoordinator.swift rename to Lister/ListerKit/CloudListCoordinator.swift index af82bc49..88526a22 100644 --- a/Lister/Swift/ListerKit/CloudListCoordinator.swift +++ b/Lister/ListerKit/CloudListCoordinator.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -28,7 +28,7 @@ import Foundation it must make its delegate aware by calling one of the appropriate error methods defined in the `ListCoordinatorDelegate` protocol. */ -@objc public class CloudListCoordinator: ListCoordinator { +public class CloudListCoordinator: ListCoordinator { // MARK: Properties public weak var delegate: ListCoordinatorDelegate? @@ -39,7 +39,7 @@ import Foundation /// Initialized asynchronously in init(predicate:). private var _documentsDirectory: NSURL! - private var documentsDirectory: NSURL { + public var documentsDirectory: NSURL { var documentsDirectory: NSURL! dispatch_sync(documentsDirectoryQueue) { @@ -104,9 +104,9 @@ import Foundation // Observe the query. let notificationCenter = NSNotificationCenter.defaultCenter() - notificationCenter.addObserver(self, selector: "metadataQueryDidFinishGathering:", name: NSMetadataQueryDidFinishGatheringNotification, object: metadataQuery) + notificationCenter.addObserver(self, selector: #selector(CloudListCoordinator.metadataQueryDidFinishGathering(_:)), name: NSMetadataQueryDidFinishGatheringNotification, object: metadataQuery) - notificationCenter.addObserver(self, selector: "metadataQueryDidUpdate:", name: NSMetadataQueryDidUpdateNotification, object: metadataQuery) + notificationCenter.addObserver(self, selector: #selector(CloudListCoordinator.metadataQueryDidUpdate(_:)), name: NSMetadataQueryDidUpdateNotification, object: metadataQuery) } // MARK: Lifetime diff --git a/Lister/Swift/ListerKit/DirectoryMonitor.swift b/Lister/ListerKit/DirectoryMonitor.swift similarity index 98% rename from Lister/Swift/ListerKit/DirectoryMonitor.swift rename to Lister/ListerKit/DirectoryMonitor.swift index 0238e768..69ffaafb 100644 --- a/Lister/Swift/ListerKit/DirectoryMonitor.swift +++ b/Lister/ListerKit/DirectoryMonitor.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerKit/Info.plist b/Lister/ListerKit/Info.plist similarity index 97% rename from Lister/Swift/ListerKit/Info.plist rename to Lister/ListerKit/Info.plist index eb39cacc..d8857800 100644 --- a/Lister/Swift/ListerKit/Info.plist +++ b/Lister/ListerKit/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion diff --git a/Lister/Swift/ListerKit/ListCoordinator.swift b/Lister/ListerKit/ListCoordinator.swift similarity index 96% rename from Lister/Swift/ListerKit/ListCoordinator.swift rename to Lister/ListerKit/ListCoordinator.swift index 15d296c5..b1d466c2 100644 --- a/Lister/Swift/ListerKit/ListCoordinator.swift +++ b/Lister/ListerKit/ListCoordinator.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -28,7 +28,7 @@ import Foundation make its delegate aware by calling one of the appropriate error methods defined in the `ListCoordinatorDelegate` protocol. */ -@objc public protocol ListCoordinator { +public protocol ListCoordinator: class { // MARK: Properties /** @@ -37,6 +37,9 @@ import Foundation */ weak var delegate: ListCoordinatorDelegate? { get set } + /// A URL for the directory containing documents within the application's container. + var documentsDirectory: NSURL { get } + // MARK: Methods /** @@ -116,7 +119,7 @@ import Foundation tracked `NSURL` instances. The `ListCoordinatorDelegate` also allows a `ListCoordinator` to notify its delegate of any errors that occured when removing or creating a list for a given URL. */ -@objc public protocol ListCoordinatorDelegate { +public protocol ListCoordinatorDelegate: class { /** Notifies the `ListCoordinatorDelegate` instance of any changes to the tracked URLs of the `ListCoordinator`. For more information about when this method should be called, see the diff --git a/Lister/Swift/ListerKit/ListDocument.swift b/Lister/ListerKit/ListDocument.swift similarity index 84% rename from Lister/Swift/ListerKit/ListDocument.swift rename to Lister/ListerKit/ListDocument.swift index 93b867d8..927395ba 100644 --- a/Lister/Swift/ListerKit/ListDocument.swift +++ b/Lister/ListerKit/ListDocument.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -69,8 +69,22 @@ public class ListDocument: UIDocument { override public func saveToURL(url: NSURL, forSaveOperation saveOperation: UIDocumentSaveOperation, completionHandler: ((Bool) -> Void)?) { super.saveToURL(url, forSaveOperation: saveOperation) { success in + // If `WCSession` isn't supported there is nothing else required. + guard WCSession.isSupported() else { + completionHandler?(success) + return + } + + let session = WCSession.defaultSession() + + // Do not proceed if `session` is not currently `.Activated` or the watch app is not installed. + guard session.activationState == .Activated && session.watchAppInstalled else { + completionHandler?(success) + return + } + // On a successful save, transfer the file to the paired watch if appropriate. - if WCSession.isSupported() && WCSession.defaultSession().watchAppInstalled && success { + if success { let fileCoordinator = NSFileCoordinator() let readingIntent = NSFileAccessIntent.readingIntentWithURL(url, options: []) fileCoordinator.coordinateAccessWithIntents([readingIntent], queue: NSOperationQueue()) { accessError in @@ -78,7 +92,8 @@ public class ListDocument: UIDocument { return } - let session = WCSession.defaultSession() + // Do not proceed if `session` is not currently `.Activated`. + guard session.activationState == .Activated else { return } for transfer in session.outstandingFileTransfers { if transfer.file.fileURL == readingIntent.URL { diff --git a/Lister/Swift/ListerKit/ListInfo.swift b/Lister/ListerKit/ListInfo.swift similarity index 93% rename from Lister/Swift/ListerKit/ListInfo.swift rename to Lister/ListerKit/ListInfo.swift index cc9af00e..1ca2c7c9 100644 --- a/Lister/Swift/ListerKit/ListInfo.swift +++ b/Lister/ListerKit/ListInfo.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -18,7 +18,7 @@ public class ListInfo: NSObject { public var name: String { let displayName = NSFileManager.defaultManager().displayNameAtPath(URL.path!) - return displayName.stringByDeletingPathExtension + return (displayName as NSString).stringByDeletingPathExtension } private let fetchQueue = dispatch_queue_create("com.example.apple-samplecode.listinfo", DISPATCH_QUEUE_SERIAL) diff --git a/Lister/Swift/ListerKit/ListUtilities.swift b/Lister/ListerKit/ListUtilities.swift similarity index 99% rename from Lister/Swift/ListerKit/ListUtilities.swift rename to Lister/ListerKit/ListUtilities.swift index a6a3cac8..f05babab 100644 --- a/Lister/Swift/ListerKit/ListUtilities.swift +++ b/Lister/ListerKit/ListUtilities.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerKit/ListsController.swift b/Lister/ListerKit/ListsController.swift similarity index 98% rename from Lister/Swift/ListerKit/ListsController.swift rename to Lister/ListerKit/ListsController.swift index 1db8da2c..50c67491 100644 --- a/Lister/Swift/ListerKit/ListsController.swift +++ b/Lister/ListerKit/ListsController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -144,6 +144,11 @@ final public class ListsController: NSObject, ListCoordinatorDelegate { self.listCoordinator.startQuery() } } + + /// A URL for the directory containing documents within the application's container. + public var documentsDirectory: NSURL { + return listCoordinator.documentsDirectory + } /** The `ListInfo` objects that are cached by the `ListsController` to allow for users of the diff --git a/Lister/Swift/ListerKit/LocalListCoordinator.swift b/Lister/ListerKit/LocalListCoordinator.swift similarity index 95% rename from Lister/Swift/ListerKit/LocalListCoordinator.swift rename to Lister/ListerKit/LocalListCoordinator.swift index 576a300e..9cb623fe 100644 --- a/Lister/Swift/ListerKit/LocalListCoordinator.swift +++ b/Lister/ListerKit/LocalListCoordinator.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -28,7 +28,7 @@ import Foundation it must make its delegate aware by calling one of the appropriate error methods defined in the `ListCoordinatorDelegate` protocol. */ -@objc public class LocalListCoordinator: ListCoordinator, DirectoryMonitorDelegate { +public class LocalListCoordinator: ListCoordinator, DirectoryMonitorDelegate { // MARK: Properties public weak var delegate: ListCoordinatorDelegate? @@ -46,7 +46,11 @@ import Foundation private let predicate: NSPredicate - private var currentLocalContents: [NSURL] = [] + private var currentLocalContents = [NSURL]() + + public var documentsDirectory: NSURL { + return ListUtilities.localDocumentsDirectory + } // MARK: Initializers @@ -182,7 +186,7 @@ import Foundation } private func documentURLForName(name: String) -> NSURL { - let documentURLWithoutExtension = ListUtilities.localDocumentsDirectory.URLByAppendingPathComponent(name) + let documentURLWithoutExtension = documentsDirectory.URLByAppendingPathComponent(name) return documentURLWithoutExtension.URLByAppendingPathExtension(AppConfiguration.listerFileExtension) } diff --git a/Lister/Swift/ListerKitOSX/CheckBox.swift b/Lister/ListerKitOSX/CheckBox.swift similarity index 96% rename from Lister/Swift/ListerKitOSX/CheckBox.swift rename to Lister/ListerKitOSX/CheckBox.swift index 37114c58..ad7da799 100644 --- a/Lister/Swift/ListerKitOSX/CheckBox.swift +++ b/Lister/ListerKitOSX/CheckBox.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerKitOSX/Info.plist b/Lister/ListerKitOSX/Info.plist similarity index 97% rename from Lister/Swift/ListerKitOSX/Info.plist rename to Lister/ListerKitOSX/Info.plist index 71867967..78df68e5 100644 --- a/Lister/Swift/ListerKitOSX/Info.plist +++ b/Lister/ListerKitOSX/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion diff --git a/Lister/Swift/ListerKitOSX/ListDocument.swift b/Lister/ListerKitOSX/ListDocument.swift similarity index 98% rename from Lister/Swift/ListerKitOSX/ListDocument.swift rename to Lister/ListerKitOSX/ListDocument.swift index cfebbf66..a912e044 100644 --- a/Lister/Swift/ListerKitOSX/ListDocument.swift +++ b/Lister/ListerKitOSX/ListDocument.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerKitOSX/ListFormatting.swift b/Lister/ListerKitOSX/ListFormatting.swift similarity index 91% rename from Lister/Swift/ListerKitOSX/ListFormatting.swift rename to Lister/ListerKitOSX/ListFormatting.swift index f49db427..db580deb 100644 --- a/Lister/Swift/ListerKitOSX/ListFormatting.swift +++ b/Lister/ListerKitOSX/ListFormatting.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -14,7 +14,7 @@ public class ListFormatting { var listItems = [ListItem]() let enumerationOptions: NSStringEnumerationOptions = [.BySentences, .ByLines] - let range = Range(start: string.startIndex, end: string.endIndex) + let range = string.startIndex..CFBundlePackageType APPL CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion diff --git a/Lister/Swift/ListerOSX/ListItemView.swift b/Lister/ListerOSX/ListItemView.swift similarity index 91% rename from Lister/Swift/ListerOSX/ListItemView.swift rename to Lister/ListerOSX/ListItemView.swift index c143087b..d275e472 100644 --- a/Lister/Swift/ListerOSX/ListItemView.swift +++ b/Lister/ListerOSX/ListItemView.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -57,7 +57,7 @@ class ListItemView: NSTableCellView, NSTextFieldDelegate { // Listen for the NSControlTextDidEndEditingNotification notification to notify the delegate of any // updates it has to do its underlying model. - NSNotificationCenter.defaultCenter().addObserver(self, selector: "handleControlTextDidEndEditingNotification:", name: NSControlTextDidEndEditingNotification, object: textField) + NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(ListItemView.handleControlTextDidEndEditingNotification(_:)), name: NSControlTextDidEndEditingNotification, object: textField) } // MARK: Lifetime diff --git a/Lister/Swift/ListerOSX/ListTableView.swift b/Lister/ListerOSX/ListTableView.swift similarity index 90% rename from Lister/Swift/ListerOSX/ListTableView.swift rename to Lister/ListerOSX/ListTableView.swift index 6227bc3b..8bbe3aef 100644 --- a/Lister/Swift/ListerOSX/ListTableView.swift +++ b/Lister/ListerOSX/ListTableView.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerOSX/ListViewController.swift b/Lister/ListerOSX/ListViewController.swift similarity index 99% rename from Lister/Swift/ListerOSX/ListViewController.swift rename to Lister/ListerOSX/ListViewController.swift index 3799c5e1..d4b04ad5 100644 --- a/Lister/Swift/ListerOSX/ListViewController.swift +++ b/Lister/ListerOSX/ListViewController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: @@ -133,7 +133,7 @@ class ListViewController: NSViewController, ColorPaletteViewDelegate, ListItemVi var normalizedToIndex = row if fromIndex < row { - normalizedToIndex-- + normalizedToIndex -= 1 } listPresenter!.moveListItem(listItem, toIndex: normalizedToIndex) diff --git a/Lister/Swift/ListerOSX/ListWindowController.swift b/Lister/ListerOSX/ListWindowController.swift similarity index 97% rename from Lister/Swift/ListerOSX/ListWindowController.swift rename to Lister/ListerOSX/ListWindowController.swift index b2a2ccb0..1c998541 100644 --- a/Lister/Swift/ListerOSX/ListWindowController.swift +++ b/Lister/ListerOSX/ListWindowController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Objective-C/ListerOSX/ListerOSX.entitlements b/Lister/ListerOSX/ListerOSX.entitlements similarity index 100% rename from Lister/Objective-C/ListerOSX/ListerOSX.entitlements rename to Lister/ListerOSX/ListerOSX.entitlements diff --git a/Lister/Swift/ListerOSX/Main.storyboard b/Lister/ListerOSX/Main.storyboard similarity index 100% rename from Lister/Swift/ListerOSX/Main.storyboard rename to Lister/ListerOSX/Main.storyboard diff --git a/Lister/Swift/ListerOSX/NSColor+AppSpecific.swift b/Lister/ListerOSX/NSColor+AppSpecific.swift similarity index 91% rename from Lister/Swift/ListerOSX/NSColor+AppSpecific.swift rename to Lister/ListerOSX/NSColor+AppSpecific.swift index e548b471..eeefafb9 100644 --- a/Lister/Swift/ListerOSX/NSColor+AppSpecific.swift +++ b/Lister/ListerOSX/NSColor+AppSpecific.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerOSX/ResizingTextField.swift b/Lister/ListerOSX/ResizingTextField.swift similarity index 95% rename from Lister/Swift/ListerOSX/ResizingTextField.swift rename to Lister/ListerOSX/ResizingTextField.swift index 9750c737..050dea5d 100644 --- a/Lister/Swift/ListerOSX/ResizingTextField.swift +++ b/Lister/ListerOSX/ResizingTextField.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerOSX/TableRowView.swift b/Lister/ListerOSX/TableRowView.swift similarity index 93% rename from Lister/Swift/ListerOSX/TableRowView.swift rename to Lister/ListerOSX/TableRowView.swift index b13d7232..568c0dcb 100644 --- a/Lister/Swift/ListerOSX/TableRowView.swift +++ b/Lister/ListerOSX/TableRowView.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerToday/CheckBoxCell.swift b/Lister/ListerToday/CheckBoxCell.swift similarity index 85% rename from Lister/Swift/ListerToday/CheckBoxCell.swift rename to Lister/ListerToday/CheckBoxCell.swift index cc639df4..51613b5e 100644 --- a/Lister/Swift/ListerToday/CheckBoxCell.swift +++ b/Lister/ListerToday/CheckBoxCell.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerToday/Info.plist b/Lister/ListerToday/Info.plist similarity index 97% rename from Lister/Swift/ListerToday/Info.plist rename to Lister/ListerToday/Info.plist index 29275581..24b9d7e8 100644 --- a/Lister/Swift/ListerToday/Info.plist +++ b/Lister/ListerToday/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion diff --git a/Lister/Objective-C/ListerToday/ListerToday.entitlements b/Lister/ListerToday/ListerToday.entitlements similarity index 100% rename from Lister/Objective-C/ListerToday/ListerToday.entitlements rename to Lister/ListerToday/ListerToday.entitlements diff --git a/Lister/Swift/ListerToday/Today.storyboard b/Lister/ListerToday/Today.storyboard similarity index 100% rename from Lister/Swift/ListerToday/Today.storyboard rename to Lister/ListerToday/Today.storyboard diff --git a/Lister/Swift/ListerToday/TodayViewController.swift b/Lister/ListerToday/TodayViewController.swift similarity index 99% rename from Lister/Swift/ListerToday/TodayViewController.swift rename to Lister/ListerToday/TodayViewController.swift index bc47f170..04dc4ff1 100644 --- a/Lister/Swift/ListerToday/TodayViewController.swift +++ b/Lister/ListerToday/TodayViewController.swift @@ -1,6 +1,6 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerTodayOSX/Info.plist b/Lister/ListerTodayOSX/Info.plist similarity index 98% rename from Lister/Swift/ListerTodayOSX/Info.plist rename to Lister/ListerTodayOSX/Info.plist index a1c36798..93c05a9d 100644 --- a/Lister/Swift/ListerTodayOSX/Info.plist +++ b/Lister/ListerTodayOSX/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.0 + 3.1 CFBundleSignature ???? CFBundleVersion diff --git a/Lister/Swift/ListerTodayOSX/ListRowRepresentedObject.swift b/Lister/ListerTodayOSX/ListRowRepresentedObject.swift similarity index 91% rename from Lister/Swift/ListerTodayOSX/ListRowRepresentedObject.swift rename to Lister/ListerTodayOSX/ListRowRepresentedObject.swift index ffcb4e2e..7cd27892 100644 --- a/Lister/Swift/ListerTodayOSX/ListRowRepresentedObject.swift +++ b/Lister/ListerTodayOSX/ListRowRepresentedObject.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerTodayOSX/ListRowViewController.swift b/Lister/ListerTodayOSX/ListRowViewController.swift similarity index 96% rename from Lister/Swift/ListerTodayOSX/ListRowViewController.swift rename to Lister/ListerTodayOSX/ListRowViewController.swift index ada8ce47..c9df439d 100644 --- a/Lister/Swift/ListerTodayOSX/ListRowViewController.swift +++ b/Lister/ListerTodayOSX/ListRowViewController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerTodayOSX/ListRowViewController.xib b/Lister/ListerTodayOSX/ListRowViewController.xib similarity index 100% rename from Lister/Swift/ListerTodayOSX/ListRowViewController.xib rename to Lister/ListerTodayOSX/ListRowViewController.xib diff --git a/Lister/Objective-C/ListerTodayOSX/ListerTodayOSX.entitlements b/Lister/ListerTodayOSX/ListerTodayOSX.entitlements similarity index 100% rename from Lister/Objective-C/ListerTodayOSX/ListerTodayOSX.entitlements rename to Lister/ListerTodayOSX/ListerTodayOSX.entitlements diff --git a/Lister/Swift/ListerTodayOSX/NoItemsRowViewController.swift b/Lister/ListerTodayOSX/NoItemsRowViewController.swift similarity index 87% rename from Lister/Swift/ListerTodayOSX/NoItemsRowViewController.swift rename to Lister/ListerTodayOSX/NoItemsRowViewController.swift index 659f5f73..e0043dec 100644 --- a/Lister/Swift/ListerTodayOSX/NoItemsRowViewController.swift +++ b/Lister/ListerTodayOSX/NoItemsRowViewController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerTodayOSX/NoItemsRowViewController.xib b/Lister/ListerTodayOSX/NoItemsRowViewController.xib similarity index 100% rename from Lister/Swift/ListerTodayOSX/NoItemsRowViewController.xib rename to Lister/ListerTodayOSX/NoItemsRowViewController.xib diff --git a/Lister/Swift/ListerTodayOSX/OpenListerRowViewController.swift b/Lister/ListerTodayOSX/OpenListerRowViewController.swift similarity index 94% rename from Lister/Swift/ListerTodayOSX/OpenListerRowViewController.swift rename to Lister/ListerTodayOSX/OpenListerRowViewController.swift index a094cb53..32399505 100644 --- a/Lister/Swift/ListerTodayOSX/OpenListerRowViewController.swift +++ b/Lister/ListerTodayOSX/OpenListerRowViewController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerTodayOSX/OpenListerRowViewController.xib b/Lister/ListerTodayOSX/OpenListerRowViewController.xib similarity index 100% rename from Lister/Swift/ListerTodayOSX/OpenListerRowViewController.xib rename to Lister/ListerTodayOSX/OpenListerRowViewController.xib diff --git a/Lister/Swift/ListerTodayOSX/TodayViewController.swift b/Lister/ListerTodayOSX/TodayViewController.swift similarity index 99% rename from Lister/Swift/ListerTodayOSX/TodayViewController.swift rename to Lister/ListerTodayOSX/TodayViewController.swift index 0349dcaa..d5ee2326 100644 --- a/Lister/Swift/ListerTodayOSX/TodayViewController.swift +++ b/Lister/ListerTodayOSX/TodayViewController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerTodayOSX/TodayViewController.xib b/Lister/ListerTodayOSX/TodayViewController.xib similarity index 100% rename from Lister/Swift/ListerTodayOSX/TodayViewController.xib rename to Lister/ListerTodayOSX/TodayViewController.xib diff --git a/Lister/Swift/ListerTodayOSX/TodayWidgetRequiresCloudViewController.swift b/Lister/ListerTodayOSX/TodayWidgetRequiresCloudViewController.swift similarity index 89% rename from Lister/Swift/ListerTodayOSX/TodayWidgetRequiresCloudViewController.swift rename to Lister/ListerTodayOSX/TodayWidgetRequiresCloudViewController.swift index f7195c90..ab3a0e29 100644 --- a/Lister/Swift/ListerTodayOSX/TodayWidgetRequiresCloudViewController.swift +++ b/Lister/ListerTodayOSX/TodayWidgetRequiresCloudViewController.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Swift/ListerTodayOSX/TodayWidgetRequiresCloudViewController.xib b/Lister/ListerTodayOSX/TodayWidgetRequiresCloudViewController.xib similarity index 100% rename from Lister/Swift/ListerTodayOSX/TodayWidgetRequiresCloudViewController.xib rename to Lister/ListerTodayOSX/TodayWidgetRequiresCloudViewController.xib diff --git a/Lister/Swift/ListerTodayOSX/TodayWidgetRowPurpose.swift b/Lister/ListerTodayOSX/TodayWidgetRowPurpose.swift similarity index 95% rename from Lister/Swift/ListerTodayOSX/TodayWidgetRowPurpose.swift rename to Lister/ListerTodayOSX/TodayWidgetRowPurpose.swift index 1111623f..1316d4a7 100644 --- a/Lister/Swift/ListerTodayOSX/TodayWidgetRowPurpose.swift +++ b/Lister/ListerTodayOSX/TodayWidgetRowPurpose.swift @@ -1,5 +1,5 @@ /* - Copyright (C) 2015 Apple Inc. All Rights Reserved. + Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: diff --git a/Lister/Objective-C/ListerTodayOSX/en.lproj/InfoPlist.strings b/Lister/ListerTodayOSX/en.lproj/InfoPlist.strings similarity index 100% rename from Lister/Objective-C/ListerTodayOSX/en.lproj/InfoPlist.strings rename to Lister/ListerTodayOSX/en.lproj/InfoPlist.strings diff --git a/Lister/Mac Quick Start.pdf b/Lister/Mac Quick Start.pdf index 4d00d347..86a26d50 100644 Binary files a/Lister/Mac Quick Start.pdf and b/Lister/Mac Quick Start.pdf differ diff --git a/Lister/Objective-C/Common/AAPLAllListItemsPresenter.h b/Lister/Objective-C/Common/AAPLAllListItemsPresenter.h deleted file mode 100644 index c24a7af3..00000000 --- a/Lister/Objective-C/Common/AAPLAllListItemsPresenter.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The implementation for the \c AAPLAllListItemsPresenter type. This class is responsible for managing how a list is presented in the iOS and OS X apps. -*/ - -#import "AAPLListPresenting.h" - -@class AAPLListItem; - -/*! - The \c AAPLAllListItemsPresenter list presenter class is responsible for managing how a list is displayed - in both the iOS and OS X apps. The \c AAPLAllListItemsPresenter class conforms to \c AAPLListPresenting so - consumers of this class can work with the presenter with a common interface. - - When a list is presented with an \c AAPLAllListItemsPresenter, all of the list items with a list are - presented as the name suggests!). When the list items are displayed to a user, the incomplete list items - are ordered before the complete list items. This order is determined when \c -setList: is called on the \c - AAPLAllListItemsPresenter instance. The presenter then reorders the list items accordingly, calling the - delegate methods with any relevant changes. - - An \c AAPLAllListItemsPresenter can be interacted with in a few ways. It can insert, remove, toggle, move, - and update list items. It can also change the color of the presented list. All of these changes get - funnelled through callbacks to the delegate (an \c AAPLListPresenterDelegate). For more information about - how the delegate pattern for the \c AAPLListPresenting instance is architected, see the \c - AAPLListPresenting definition. What's unique about the \c AAPLAllListItemsPresenter with respect to the - delegate methods is that the \c AAPLAllListItemsPresenter has an undo manager. Whenever the presentation of - the list is manipulated (as described above), the presenter pushes an undo operation that reverses the - manipulation onto the undo stack. For example, if a list item is inserted, the \c - AAPLAllListItemsPresenter instance registers an undo operation to remove the list item. When a user - performs an undo in either the iOS or OS X app, the list item that was inserted is removed. The remove - operation gets funnelled into the same delegate that inserted the list item. By abstracting these - operations away into a presenter and delegate architecture, we're not only able to easily test the code - that manipulates the list, but we're also able to test the undo registration code. - - One thing to note is that when a list item is toggled in the \c AAPLAllListItemsPresenter, it is moved from - an index in its current completion state to an index opposite of the list items completion state. For - example, if a list item that is complete is toggled, it will move to an incomplete index (e.g. index 0). - For the \c AAPLAllListItemsPresenter, a toggle represents both the list item moving as well as the list - item being updated. - */ -@interface AAPLAllListItemsPresenter : NSObject - -/*! - The undo manager to register undo events with when the \c AAPLAllListItemsPresenter instance is manipulated. - */ -@property NSUndoManager *undoManager; - -/*! - Inserts \c listItem into the list. If the list item is incomplete, \c listItem is inserted at index 0. - Otherwise, it is inserted at the end of the list. Inserting a list item calls the delegate's \c - -listPresenter:didInsertListItem:atIndex: method. Calling this method registers an undo event to remove the - list item. - - \param listItem - The \c AAPLListItem instance to insert. - */ -- (void)insertListItem:(AAPLListItem *)listItem; - -/*! - Inserts \c listItems into the list. The net effect of this is calling \c -insertListItem: for each \c - AAPLListItem instance in \c listItems. Inserting list items calls the delegate's \c - -listPresenter:didInsertListItem:atIndex: method for each inserted list item after an individual list item - has been inserted. Calling this method registers an undo event to remove each list item. - - \param listItems - The \c AAPLListItem instances to insert. - */ -- (void)insertListItems:(NSArray *)listItems; - -/*! - Removes \c listItem from the list. Removing the list item calls the delegate's \c - -listPresenter:didRemoveListItem:atIndex: method for the removed list item after it has been removed. - Calling this method registers an undo event to insert the list item at its previous index. - - \param listItem - The \c AAPLListItem instance to remove. - */ -- (void)removeListItem:(AAPLListItem *)listItem; - -/*! - Removes \c listItems from the list. Removing list items calls the delegate's \c - -listPresenter:didRemoveListItem:atIndex: method for each of the removed list items after an individual - list item has been removed. Calling this method registers an undo event to insert the list items that were - removed at their previous indexes. - - \param listItems - The \c AAPLListItem instances to remove. - */ -- (void)removeListItems:(NSArray *)listItems; - -/*! - Updates the \c text property of \c listItem with \c newText. Updating the text property of the list item - calls the delegate's \c -listPresenter:didUpdateListItem:atIndex: method for the list item that was - updated. Calling this method registers an undo event to revert the text change back to the text before the - method was invoked. - - \param listItem - The \c AAPLListItem instance whose text needs to be updated. - - \param newText - The new text for \c listItem. - */ -- (void)updateListItem:(AAPLListItem *)listItem withText:(NSString *)newText; - -/*! - Tests whether \c listItem is in the list and can be moved from its current index in the list (if it's - already in the list) to \c toIndex. - - \param listItem - The item to test for insertion. - - \param toIndex - The index to use to determine if \c listItem can be inserted into the list. - - \returns - Whether or not \c listItem and be moved to \c toIndex. - */ -- (BOOL)canMoveListItem:(AAPLListItem *)listItem toIndex:(NSInteger)toIndex; - -/*! - Moves \c listItem to \c toIndex. Moving the \c listItem to a new index calls the delegate's \c - -listPresenter:didMoveListItem:fromIndex:toIndex method with the moved list item. Calling this method - registers an undo event that moves the list item from its new index back to its old index. - - \param listItem - The list item to move. - - \param toIndex - The index to move \c listItem to. - */ -- (void)moveListItem:(AAPLListItem *)listItem toIndex:(NSInteger)toIndex; - -/*! - Toggles \c listItem within the list. This method moves a complete list item to an incomplete index at the - beginning of the list, or it moves an incomplete list item to a complete index at the last index of the - list. The list item is also updated in place since the completion state is flipped. Toggling a list item - calls the delegate's \c -listPresenter:didMoveListItem:fromIndex:toIndex: method followed by the delegate's - \c -listPresenter:didUpdateListItem:atIndex: method. Calling this method registers an undo event that - toggles the list item back to its original location and completion state. - - \param listItem - The list item to toggle. - */ -- (void)toggleListItem:(AAPLListItem *)listItem; - -/*! - Set all of the presented list item's completion states to \c completionState. This method does not move the - list items around whatsoever. Changing the completion state on all of the list items calls the delegate's - \c -listPresenter:didUpdateListItem:atIndex: method for each list item that has been updated. Calling this - method registers an undo event that sets the completion states for all of the list items back to the - original state before the method was invoked. - - \param completionState - The value that all presented list item instances should have as their \c isComplete property. - */ -- (void)updatePresentedListItemsToCompletionState:(BOOL)completionState; - -@end diff --git a/Lister/Objective-C/Common/AAPLAllListItemsPresenter.m b/Lister/Objective-C/Common/AAPLAllListItemsPresenter.m deleted file mode 100644 index da0e9cb8..00000000 --- a/Lister/Objective-C/Common/AAPLAllListItemsPresenter.m +++ /dev/null @@ -1,511 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The implementation for the \c AAPLAllListItemsPresenter type. This class is responsible for managing how a list is presented in the iOS and OS X apps. -*/ - -#import "AAPLAllListItemsPresenter.h" -#import "AAPLListPresenterDelegate.h" -#import "AAPLList.h" -#import "AAPLListItem.h" -#import "AAPLListPresenterAlgorithms.h" -#import "AAPLListPresenterUtilities.h" - -@interface AAPLAllListItemsPresenter () - -/// The internal storage for the list that we're presenting. By default, it's an empty list. -@property (readwrite, nonatomic) AAPLList *list; - -/// Flag to see whether or not the first \c -setList: call should trigger a batch reload. -@property (getter=isInitialList) BOOL initialList; - -/// The index of the first complete item within the list's items. -@property (readonly) NSInteger indexOfFirstCompleteItem; - -@end - -@implementation AAPLAllListItemsPresenter -@synthesize delegate = _delegate; -@dynamic color; - -#pragma mark - Initialization - -- (instancetype)init { - self = [super init]; - - if (self) { - // Use a default, empty list. - _list = [[AAPLList alloc] initWithColor:AAPLListColorGray items:@[]]; - _initialList = YES; - } - - return self; -} - -#pragma mark - AAPLListItemPresenter - -- (void)setColor:(AAPLListColor)color { - AAPLListColor oldColor = self.color; - - BOOL different = AAPLUpdateListColorForListPresenterIfDifferent(self, self.list, color, AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForNonInitialLayout); - - // Register the undo color operation with the old color if the list's color was changed. - if (different) { - [[self.undoManager prepareWithInvocationTarget:self] setColor:oldColor]; - - NSString *undoActionName = NSLocalizedString(@"Change Color", nil); - [self.undoManager setActionName:undoActionName]; - } -} - -- (AAPLListColor)color { - return self.list.color; -} - -- (AAPLList *)archiveableList { - return self.list; -} - -- (NSArray *)presentedListItems { - return [self.list items]; -} - -/*! - Sets the list that should be presented. Calling \c -setList: on an - \c AAPLAllListItemsPresenter does not trigger any undo registrations. Calling - \c -setList: also removes all of the undo actions from the undo manager. - */ -- (void)setList:(AAPLList *)newList { - /* - If this is the initial list that's being presented, just tell the delegate - to reload all of the data. - */ - if (self.isInitialList) { - self.initialList = NO; - - _list = newList; - newList.items = [self reorderedListItemsFromListItems:newList.items]; - - [self.delegate listPresenterDidRefreshCompleteLayout:self]; - - return; - } - - /** - Perform more granular changes (if we can). To do this, we'll group the changes into the different - types of possible changes. If we know that a group of similar changes occured, we'll batch them - together (e.g. four updates to list items). If multiple changes occur that we can't correctly resolve - (an implementation detail), we'll refresh the complete layout. An example of this is if more than one - list item is inserted or toggled. Since this algorithm doesn't track the indexes that list items - are inserted at, we will just refresh the complete layout to make sure that the list items are presented - correctly. This applies for multiple groups of changes (e.g. one insert and one toggle), and also for - any unique group of toggles / inserts where there's more than a single update. - */ - AAPLList *oldList = self.list; - - NSArray *newRemovedListItems = AAPLFindRemovedListItemsFromInitialListItemsToChangedListItems(oldList.items, newList.items); - NSArray *newInsertedListItems = AAPLFindInsertedListItemsFromInitialListItemsToChangedListItems(oldList.items, newList.items, nil); - NSArray *newToggledListItems = AAPLFindToggledListItemsFromInitialListItemsToChangedListItems(oldList.items, newList.items); - NSArray *newListItemsWithUpdatedText = AAPLFindListItemsWithUpdatedTextFromInitialListItemsToChangedListItems(oldList.items, newList.items); - - /** - Determine if there was a unique group of batch changes we can make. Otherwise, we'll - refresh all the data in the list. - */ - AAPLListItemsBatchChangeKind listItemsBatchChangeKind = AAPLListItemsBatchChangeKindForChanges(newRemovedListItems, newInsertedListItems, newToggledListItems, newListItemsWithUpdatedText); - - if (listItemsBatchChangeKind == AAPLListItemsBatchChangeKindNone) { - if (oldList.color != newList.color) { - [self.undoManager removeAllActionsWithTarget:self]; - - AAPLUpdateListColorForListPresenterIfDifferent(self, self.list, newList.color, AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForInitialLayout); - } - - return; - } - - /** - Check to see if there was more than one kind of unique group of changes, or if there were multiple toggled / - inserted list items that we don't handle. - */ - if (listItemsBatchChangeKind == AAPLListItemsBatchChangeKindMultiple || newToggledListItems.count > 1 || newInsertedListItems.count > 1) { - [self.undoManager removeAllActionsWithTarget:self]; - - _list = newList; - newList.items = [self reorderedListItemsFromListItems:newList.items]; - - [self.delegate listPresenterDidRefreshCompleteLayout:self]; - - return; - } - - /** - At this point we know that we have changes that are uniquely identifiable: e.g. one inserted list item, - one toggled list item, multiple removed list items, or multiple list items whose text has been updated. - */ - [self.undoManager removeAllActionsWithTarget:self]; - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:YES]; - - // Make the changes based on the unique change kind. - - switch (listItemsBatchChangeKind) { - case AAPLListItemsBatchChangeKindRemoved: { - NSMutableArray *oldListItemsMutableProxy = [self.list mutableArrayValueForKey:@"items"]; - - AAPLRemoveListItemsFromListItemsWithListPresenter(self, oldListItemsMutableProxy, newRemovedListItems); - - break; - } - case AAPLListItemsBatchChangeKindInserted: { - [self unsafeInsertListItem:newInsertedListItems.firstObject]; - - break; - } - case AAPLListItemsBatchChangeKindToggled: { - // We want to toggle the *old* list item, not the one that's in newList. - NSInteger indexOfToggledListItemInOldListItems = [oldList.items indexOfObject:newToggledListItems.firstObject]; - - AAPLListItem *listItemToToggle = oldList.items[indexOfToggledListItemInOldListItems]; - - [self unsafeToggleListItem:listItemToToggle]; - - break; - } - case AAPLListItemsBatchChangeKindUpdatedText: { - NSMutableArray *oldListItemsMutableProxy = [self.list mutableArrayValueForKey:@"items"]; - - AAPLUpdateListItemsWithListItemsForListPresenter(self, oldListItemsMutableProxy, newListItemsWithUpdatedText); - - break; - } - - default: abort(); - } - - AAPLUpdateListColorForListPresenterIfDifferent(self, self.list, newList.color, AAPLListColorUpdateActionDontSendDelegateChangeLayoutCalls); - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:YES]; -} - -- (NSInteger)count { - return self.presentedListItems.count; -} - -- (BOOL)isEmpty { - return self.presentedListItems.count == 0; -} - -#pragma mark - Public Methods - -- (void)insertListItem:(AAPLListItem *)listItem { - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - [self unsafeInsertListItem:listItem]; - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] removeListItem:listItem]; - - NSString *undoActionName = NSLocalizedString(@"Remove", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (void)insertListItems:(NSArray *)listItems { - if (listItems.count == 0) { - return; - } - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - for (AAPLListItem *listItem in listItems) { - [self unsafeInsertListItem:listItem]; - } - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] removeListItems:listItems]; - - NSString *undoActionName = NSLocalizedString(@"Remove", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (void)removeListItem:(AAPLListItem *)listItem { - NSInteger listItemIndex = [self.presentedListItems indexOfObject:listItem]; - - NSAssert(listItemIndex != NSNotFound, @"To remove a list item, it must already be in the list."); - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - [[self.list mutableArrayValueForKey:@"items"] removeObjectAtIndex:listItemIndex]; - - [self.delegate listPresenter:self didRemoveListItem:listItem atIndex:listItemIndex]; - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] insertListItemsForUndo:@[listItem] atIndexes:@[@(listItemIndex)]]; - - NSString *undoActionName = NSLocalizedString(@"Remove", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (void)removeListItems:(NSArray *)listItemsToRemove { - if (listItemsToRemove.count == 0) { - return; - } - - NSMutableArray *listItems = [self.list mutableArrayValueForKey:@"items"]; - - /** - We're going to store the indexes of the list items that will be removed in an array. - We do that so that when we insert the same list items back in for undo, we don't need - to worry about insertion order (since it will just be the opposite of insertion order). - */ - NSMutableArray *removedIndexes = [NSMutableArray array]; - - for (AAPLListItem *listItem in listItemsToRemove) { - NSInteger listItemIndex = [self.presentedListItems indexOfObject:listItem]; - - NSAssert(listItemIndex != NSNotFound, @"List items to remove must already be in the list."); - - [listItems removeObjectAtIndex:listItemIndex]; - - [self.delegate listPresenter:self didRemoveListItem:listItem atIndex:listItemIndex]; - - [removedIndexes addObject:@(listItemIndex)]; - } - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - NSArray *reverseListItemsToRemove = [[listItemsToRemove reverseObjectEnumerator] allObjects]; - NSArray *reverseRemovedIndexes = [[removedIndexes reverseObjectEnumerator] allObjects]; - [[self.undoManager prepareWithInvocationTarget:self] insertListItemsForUndo:reverseListItemsToRemove atIndexes:reverseRemovedIndexes]; - - NSString *undoActionName = NSLocalizedString(@"Remove", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (void)updateListItem:(AAPLListItem *)listItem withText:(NSString *)newText { - NSInteger listItemIndex = [self.presentedListItems indexOfObject:listItem]; - - NSAssert(listItemIndex != NSNotFound, @"A list item can only be updated if it already exists in the list."); - - // If the text is the same, it's a no op. - if ([listItem.text isEqualToString:newText]) { - return; - } - - NSString *oldText = listItem.text; - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - listItem.text = newText; - - [self.delegate listPresenter:self didUpdateListItem:listItem atIndex:listItemIndex]; - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] updateListItem:listItem withText:oldText]; - - NSString *undoActionName = NSLocalizedString(@"Text Change", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (BOOL)canMoveListItem:(AAPLListItem *)listItem toIndex:(NSInteger)toIndex { - if (![self.presentedListItems containsObject:listItem]) { - return NO; - } - - NSInteger indexOfFirstCompleteItem = self.indexOfFirstCompleteItem; - - if (indexOfFirstCompleteItem != NSNotFound) { - if (listItem.isComplete) { - return toIndex >= indexOfFirstCompleteItem && toIndex <= self.count; - } - else { - return toIndex >= 0 && toIndex < indexOfFirstCompleteItem; - } - } - - return !listItem.isComplete && toIndex >= 0 && toIndex <= self.count; -} - -- (void)moveListItem:(AAPLListItem *)listItem toIndex:(NSInteger)toIndex { - NSAssert([self canMoveListItem:listItem toIndex:toIndex], @"An item can only be moved if it passed a \"can move\" test."); - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - NSInteger fromIndex = [self unsafeMoveListItem:listItem toIndex:toIndex]; - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] moveListItem:listItem toIndex:fromIndex]; - - NSString *undoActionName = NSLocalizedString(@"Move", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (void)toggleListItem:(AAPLListItem *)listItem { - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - NSInteger fromIndex = [self unsafeToggleListItem:listItem]; - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] toggleListItemForUndo:listItem toPreviousIndex:fromIndex]; - - NSString *undoActionName = NSLocalizedString(@"Toggle", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (void)updatePresentedListItemsToCompletionState:(BOOL)completionState { - NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"isComplete != %@", @(completionState)]; - - NSArray *presentedListItemsNotMatchingCompletionState = [self.presentedListItems filteredArrayUsingPredicate:filterPredicate]; - - // If there are no list items that match the completion state, it's a no op. - if (presentedListItemsNotMatchingCompletionState.count == 0) { - return; - } - - NSString *undoActionName = completionState ? NSLocalizedString(@"Complete All", nil) : NSLocalizedString(@"Incomplete All", nil); - [self toggleListItemsWithoutMoving:presentedListItemsNotMatchingCompletionState undoActionName:undoActionName]; -} - -#pragma mark - Undo Helper Methods - -- (void)toggleListItemForUndo:(AAPLListItem *)listItem toPreviousIndex:(NSInteger)previousIndex { - NSAssert([self.presentedListItems containsObject:listItem], @"The list item should already be in the list if it's going to be toggled."); - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - // Move the list item. - NSInteger fromIndex = [self unsafeMoveListItem:listItem toIndex:previousIndex]; - - // Update the list item's state. - listItem.complete = !listItem.isComplete; - - [self.delegate listPresenter:self didUpdateListItem:listItem atIndex:previousIndex]; - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] toggleListItemForUndo:listItem toPreviousIndex:fromIndex]; - - NSString *undoActionName = NSLocalizedString(@"Toggle", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (void)insertListItemsForUndo:(NSArray *)listItemsToInsert atIndexes:(NSArray *)indexes { - NSAssert(listItemsToInsert.count == indexes.count, @"`listItems` must have as many elements as `indexes`."); - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - NSMutableArray *listItems = [self.list mutableArrayValueForKey:@"items"]; - - [listItemsToInsert enumerateObjectsUsingBlock:^(AAPLListItem *listItemToInsert, NSUInteger idx, BOOL *stop) { - // Get the index that we need to insert `listItem` into. - NSInteger insertionIndex = [indexes[idx] integerValue]; - - [listItems insertObject:listItemToInsert atIndex:insertionIndex]; - - [self.delegate listPresenter:self didInsertListItem:listItemToInsert atIndex:insertionIndex]; - }]; - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] removeListItems:listItemsToInsert]; - - NSString *undoActionName = NSLocalizedString(@"Remove", nil); - [self.undoManager setActionName:undoActionName]; -} - -- (void)toggleListItemsWithoutMoving:(NSArray *)listItems undoActionName:(NSString *)undoActionName { - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - for (AAPLListItem *listItem in listItems) { - listItem.complete = !listItem.isComplete; - - NSInteger updatedIndex = [self.presentedListItems indexOfObject:listItem]; - - [self.delegate listPresenter:self didUpdateListItem:listItem atIndex:updatedIndex]; - } - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; - - // Undo - [[self.undoManager prepareWithInvocationTarget:self] toggleListItemsWithoutMoving:listItems undoActionName:undoActionName]; - - [self.undoManager setActionName:undoActionName]; -} - -#pragma mark - Unsafe Updating Methods - -- (void)unsafeInsertListItem:(AAPLListItem *)listItem { - NSAssert(![self.presentedListItems containsObject:listItem], @"A list item was requested to be added that is already in the list."); - - NSInteger indexToInsertListItem = listItem.isComplete ? self.count : 0; - - [[self.list mutableArrayValueForKey:@"items"] insertObject:listItem atIndex:indexToInsertListItem]; - - [self.delegate listPresenter:self didInsertListItem:listItem atIndex:indexToInsertListItem]; -} - -- (NSInteger)unsafeMoveListItem:(AAPLListItem *)listItem toIndex:(NSInteger)toIndex { - NSInteger fromIndex = [self.presentedListItems indexOfObject:listItem]; - - NSAssert(fromIndex != NSNotFound, @"A list item can only be moved if it already exists in the presented list items."); - - NSMutableArray *listItems = [self.list mutableArrayValueForKey:@"items"]; - - [listItems removeObjectAtIndex:fromIndex]; - [listItems insertObject:listItem atIndex:toIndex]; - - [self.delegate listPresenter:self didMoveListItem:listItem fromIndex:fromIndex toIndex:toIndex]; - - return fromIndex; -} - -- (NSInteger)unsafeToggleListItem:(AAPLListItem *)listItem { - NSAssert([self.presentedListItems containsObject:listItem], @"A list item can only be toggled if it already exists in the list."); - - // Move the list item. - NSInteger targetIndex = listItem.isComplete ? 0 : self.count - 1; - NSInteger fromIndex = [self unsafeMoveListItem:listItem toIndex:targetIndex]; - - // Update the list item's state. - listItem.complete = !listItem.isComplete; - [self.delegate listPresenter:self didUpdateListItem:listItem atIndex:targetIndex]; - - return fromIndex; -} - -#pragma mark - Private Convenience Methods - -- (NSInteger)indexOfFirstCompleteItem { - return [self.presentedListItems indexOfObjectPassingTest:^BOOL(AAPLListItem *listItem, NSUInteger idx, BOOL *stop) { - return listItem.isComplete; - }]; -} - -- (NSArray *)reorderedListItemsFromListItems:(NSArray *)listItems { - NSPredicate *incompleteListItemsPredicate = [NSPredicate predicateWithFormat:@"isComplete = NO"]; - NSPredicate *completeListItemsPredicate = [NSPredicate predicateWithFormat:@"isComplete = YES"]; - - NSArray *incompleteListItems = [listItems filteredArrayUsingPredicate:incompleteListItemsPredicate]; - NSArray *completeListItems = [listItems filteredArrayUsingPredicate:completeListItemsPredicate]; - - return [incompleteListItems arrayByAddingObjectsFromArray:completeListItems]; -} - -@end diff --git a/Lister/Objective-C/Common/AAPLAppConfiguration.h b/Lister/Objective-C/Common/AAPLAppConfiguration.h deleted file mode 100644 index 1119026b..00000000 --- a/Lister/Objective-C/Common/AAPLAppConfiguration.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Handles application configuration logic and information. -*/ - -@import Foundation; - -typedef NS_ENUM(NSInteger, AAPLAppStorage) { - AAPLAppStorageNotSet = 0, - AAPLAppStorageCloud, - AAPLAppStorageLocal -}; - -typedef struct AAPLAppStorageState { - AAPLAppStorage storageOption; - BOOL accountDidChange; - BOOL cloudAvailable; -} AAPLAppStorageState; - -// User activity type names used by the Lister app. -extern NSString *const AAPLAppConfigurationUserActivityTypeEditing; -extern NSString *const AAPLAppConfigurationUserActivityTypeWatch; - -// Keys used to store relevant list data in the userInfo dictionary of an NSUserActivity for continuation. -extern NSString *const AAPLAppConfigurationUserActivityListURLPathUserInfoKey; -extern NSString *const AAPLAppConfigurationUserActivityListColorUserInfoKey; - -// Keys used to store information in a WCSession context. -extern NSString *const AAPLApplicationActivityContextCurrentListsKey; -extern NSString *const AAPLApplicationActivityContextListNameKey; -extern NSString *const AAPLApplicationActivityContextListColorKey; - -// Constants used in assembling and handling the custom lister:// URL scheme. -extern NSString *const AAPLAppConfigurationListerSchemeName; -extern NSString *const AAPLAppConfigurationListerColorQueryKey; - -// The identifier for the primary shared application group used for document and defaults storage. -extern NSString *const AAPLAppConfigurationApplicationGroupsPrimary; - -// Constants used when indentifying the file types supported by Lister. -extern NSString *const AAPLAppConfigurationListerFileUTI; -extern NSString *const AAPLAppConfigurationListerFileExtension; - -// The bundle identifier for the Today widget. Used in communication from the app to the widget. -extern NSString *const AAPLAppConfigurationWidgetBundleIdentifier; - -#if TARGET_OS_MAC -extern NSString *const AAPLAppConfigurationListerOSXBundleIdentifier; -#endif - -#if TARGET_OS_IOS -@protocol AAPLListCoordinator; -@class AAPLListsController; -#endif - -@interface AAPLAppConfiguration : NSObject - -+ (AAPLAppConfiguration *)sharedAppConfiguration; - -- (void)runHandlerOnFirstLaunch:(void (^)(void))firstLaunchHandler; - -@property (nonatomic, readonly, copy) NSString *localizedTodayDocumentName; -@property (nonatomic, readonly, copy) NSString *localizedTodayDocumentNameAndExtension; - -@property (nonatomic, readonly, getter=isCloudAvailable) BOOL cloudAvailable; - -@property (nonatomic, readonly, copy) NSString *defaultListerDraftName; - -@property (nonatomic, readonly) AAPLAppStorageState storageState; - -@property (nonatomic) AAPLAppStorage storageOption; - -@property (nonatomic, readonly, getter=isFirstLaunch) BOOL firstLaunch; - -#if TARGET_OS_IOS - -/*! - Returns an \c AAPLListCoordinator based on the current configuration that queries based on \c pathExtension. - For example, if the user has chosen local storage, a local \c AAPLListCoordinator object will be returned. - */ -- (id)listsCoordinatorForCurrentConfigurationWithPathExtension:(NSString *)pathExtension firstQueryHandler:(void (^)(void))firstQueryHandler; - -/*! - Returns an \c AAPLListCoordinator based on the current configuration that queries based on \c lastPathComponent. - For example, if the user has chosen local storage, a local \c AAPLListCoordinator object will be returned. - */ -- (id)listsCoordinatorForCurrentConfigurationWithLastPathComponent:(NSString *)lastPathComponent firstQueryHandler:(void (^)(void))firstQueryHandler; - -/*! - Returns an \c AAPLListsController instance based on the current configuration. For example, if the user has - chosen local storage, an \c AAPLListsController object will be returned that uses a local list coordinator. - \c pathExtension is passed down to the list coordinator to filter results. - */ -- (AAPLListsController *)listsControllerForCurrentConfigurationWithPathExtension:(NSString *)pathExtension firstQueryHandler:(void (^)(void))firstQueryHandler; - -/*! - Returns an \c AAPLListsController instance based on the current configuration. For example, if the user has - chosen local storage, an \c AAPLListsController object will be returned that uses a local list coordinator. - \c lastPathComponent is passed down to the list coordinator to filter results. - */ -- (AAPLListsController *)listsControllerForCurrentConfigurationWithLastPathComponent:(NSString *)lastPathComponent firstQueryHandler:(void (^)(void))firstQueryHandler; - -#endif - -@end diff --git a/Lister/Objective-C/Common/AAPLAppConfiguration.m b/Lister/Objective-C/Common/AAPLAppConfiguration.m deleted file mode 100644 index 6b72de55..00000000 --- a/Lister/Objective-C/Common/AAPLAppConfiguration.m +++ /dev/null @@ -1,237 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Handles application configuration logic and information. -*/ - -#import "AAPLAppConfiguration.h" - -#if TARGET_OS_IOS -#import "AAPLListsController.h" -#import "AAPLListInfo.h" -#import "AAPLLocalListCoordinator.h" -#import "AAPLCloudListCoordinator.h" -#endif - -NSString *const AAPLAppConfigurationFirstLaunchUserDefaultsKey = @"AAPLAppConfigurationFirstLaunchUserDefaultsKey"; -NSString *const AAPLAppConfigurationStorageOptionUserDefaultsKey = @"AAPLAppConfigurationStorageOptionUserDefaultsKey"; -NSString *const AAPLAppConfigurationStoredUbiquityIdentityTokenKey = @"com.example.apple-samplecode.Lister.UbiquityIdentityToken"; - -NSString *const AAPLAppConfigurationUserActivityTypeEditing = @"com.example.apple-samplecode.Lister.editing"; -NSString *const AAPLAppConfigurationUserActivityTypeWatch = @"com.example.apple-samplecode.Lister.watch"; - -NSString *const AAPLAppConfigurationUserActivityListURLPathUserInfoKey = @"listURLUserInfoKey"; -NSString *const AAPLAppConfigurationUserActivityListColorUserInfoKey = @"listColorUserInfoKey"; - -NSString *const AAPLApplicationActivityContextCurrentListsKey = @"ListerCurrentLists"; -NSString *const AAPLApplicationActivityContextListNameKey = @"name"; -NSString *const AAPLApplicationActivityContextListColorKey = @"color"; - -NSString *const AAPLAppConfigurationListerSchemeName = @"lister"; -NSString *const AAPLAppConfigurationListerColorQueryKey = @"color"; - -/*! - The \c LISTER_BUNDLE_PREFIX_STRING preprocessor macro is used below to concatenate the value of the - \c LISTER_BUNDLE_PREFIX user-defined build setting with other strings. This avoids the need for developers - to edit both LISTER_BUNDLE_PREFIX and the code below. \c LISTER_BUNDLE_PREFIX_STRING is equal to - \c @"LISTER_BUNDLE_PREFIX", i.e. an \c NSString literal for the value of \c LISTER_BUNDLE_PREFIX. (Multiple - \c NSString literals can be concatenated at compile-time to create a new string literal.) -*/ -NSString *const AAPLAppConfigurationApplicationGroupsPrimary = @"group."LISTER_BUNDLE_PREFIX_STRING@".Lister.Documents"; - -NSString *const AAPLAppConfigurationListerFileUTI = @"com.example.apple-samplecode.Lister"; -NSString *const AAPLAppConfigurationListerFileExtension = @"list"; - -#if TARGET_OS_IOS -NSString *const AAPLAppConfigurationWidgetBundleIdentifier = LISTER_BUNDLE_PREFIX_STRING@".Lister.ListerToday"; -#elif TARGET_OS_MAC -NSString *const AAPLAppConfigurationWidgetBundleIdentifier = LISTER_BUNDLE_PREFIX_STRING@".ListerOSX.ListerTodayOSX"; - -NSString *const AAPLAppConfigurationListerOSXBundleIdentifier = LISTER_BUNDLE_PREFIX_STRING@".ListerOSX"; -#endif - -@interface AAPLAppConfiguration () - -@property (nonatomic, readonly) NSUserDefaults *applicationUserDefaults; - -@property (nonatomic, readwrite, getter=isFirstLaunch) BOOL firstLaunch; - -@end - -@implementation AAPLAppConfiguration - -+ (AAPLAppConfiguration *)sharedAppConfiguration { - static AAPLAppConfiguration *sharedAppConfiguration; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedAppConfiguration = [[AAPLAppConfiguration alloc] init]; - }); - - return sharedAppConfiguration; -} - -- (NSString *)localizedTodayDocumentName { - return NSLocalizedString(@"Today", @""); -} - -- (NSString *)localizedTodayDocumentNameAndExtension { - return [NSString stringWithFormat:@"%@.%@", self.localizedTodayDocumentName, AAPLAppConfigurationListerFileExtension]; -} - -- (NSUserDefaults *)applicationUserDefaults { - return [[NSUserDefaults alloc] initWithSuiteName:AAPLAppConfigurationApplicationGroupsPrimary]; -} - -- (NSString *)defaultListerDraftName { - return NSLocalizedString(@"List", @""); -} - -#pragma mark - Property Overrides - -- (AAPLAppStorage)storageOption { - NSInteger value = [self.applicationUserDefaults integerForKey:AAPLAppConfigurationStorageOptionUserDefaultsKey]; - - return (AAPLAppStorage)value; -} - -- (void)setStorageOption:(AAPLAppStorage)storageOption { - [self.applicationUserDefaults setInteger:storageOption forKey:AAPLAppConfigurationStorageOptionUserDefaultsKey]; -} - -- (BOOL)isCloudAvailable { - return [[NSFileManager defaultManager] ubiquityIdentityToken] != nil; -} - -- (AAPLAppStorageState)storageState { - return (AAPLAppStorageState) { - .storageOption = self.storageOption, - .accountDidChange = [self hasUbiquityIdentityChanged], - .cloudAvailable = self.isCloudAvailable - }; -} - -- (BOOL)isFirstLaunch { - [self registerDefaults]; - - return [self.applicationUserDefaults boolForKey:AAPLAppConfigurationFirstLaunchUserDefaultsKey]; -} - -- (void)setFirstLaunch:(BOOL)firstLaunch { - [self.applicationUserDefaults setBool:firstLaunch forKey:AAPLAppConfigurationFirstLaunchUserDefaultsKey]; -} - -- (void)registerDefaults { - NSUserDefaults *defaults = self.applicationUserDefaults; - - [defaults registerDefaults:@{ - AAPLAppConfigurationFirstLaunchUserDefaultsKey: @YES, -#if TARGET_OS_IOS - AAPLAppConfigurationStorageOptionUserDefaultsKey: @(AAPLAppStorageNotSet) -#endif - }]; -} - -- (void)runHandlerOnFirstLaunch:(void (^)(void))firstLaunchHandler { - if (self.isFirstLaunch) { - self.firstLaunch = NO; - - firstLaunchHandler(); - } -} - -#pragma mark - Ubiquity Identity Token Handling (Account Change Info) - -- (BOOL)hasUbiquityIdentityChanged { - BOOL hasChanged = NO; - - id currentToken = [NSFileManager defaultManager].ubiquityIdentityToken; - id storedToken = [self storedUbiquityIdentityToken]; - - BOOL currentTokenNilStoredNonNil = !currentToken && storedToken; - BOOL storedTokenNilCurrentNonNil = !storedToken && currentToken; - BOOL currentNotEqualStored = currentToken && storedToken && ![currentToken isEqual:storedToken]; - - if (currentTokenNilStoredNonNil || storedTokenNilCurrentNonNil || currentNotEqualStored) { - [self persistAccount]; - - hasChanged = YES; - } - - return hasChanged; -} - -- (void)persistAccount { - NSUserDefaults *defaults = self.applicationUserDefaults; - id token = [NSFileManager defaultManager].ubiquityIdentityToken; - - if (token) { - // The account has changed. - NSData *ubiquityIdentityTokenArchive = [NSKeyedArchiver archivedDataWithRootObject:token]; - - [defaults setObject:ubiquityIdentityTokenArchive forKey:AAPLAppConfigurationStoredUbiquityIdentityTokenKey]; - } - else { - // There is no signed-in account. - [defaults removeObjectForKey:AAPLAppConfigurationStoredUbiquityIdentityTokenKey]; - } -} - -- (id)storedUbiquityIdentityToken { - id storedToken = nil; - - // Determine if the iCloud account associated with this device has changed since the last time the user launched the app. - NSData *ubiquityIdentityTokenArchive = [self.applicationUserDefaults objectForKey:AAPLAppConfigurationStoredUbiquityIdentityTokenKey]; - - if (ubiquityIdentityTokenArchive) { - storedToken = [NSKeyedUnarchiver unarchiveObjectWithData:ubiquityIdentityTokenArchive]; - } - - return storedToken; -} - -#pragma mark - Conveience Methods - -#if TARGET_OS_IOS - -- (id)listsCoordinatorForCurrentConfigurationWithPathExtension:(NSString *)pathExtension firstQueryHandler:(void (^)(void))firstQueryHandler; { - if ([AAPLAppConfiguration sharedAppConfiguration].storageOption != AAPLAppStorageCloud) { - // This will be called if the storage option is either `AAPLAppStorageLocal` or `AAPLAppStorageNotSet`. - return [[AAPLLocalListCoordinator alloc] initWithPathExtension:pathExtension firstQueryUpdateHandler:firstQueryHandler]; - } - else { - return [[AAPLCloudListCoordinator alloc] initWithPathExtension:pathExtension firstQueryUpdateHandler:firstQueryHandler]; - } -} - -- (id)listsCoordinatorForCurrentConfigurationWithLastPathComponent:(NSString *)lastPathComponent firstQueryHandler:(void (^)(void))firstQueryHandler { - if ([AAPLAppConfiguration sharedAppConfiguration].storageOption != AAPLAppStorageCloud) { - // This will be called if the storage option is either `AAPLAppStorageLocal` or `AAPLAppStorageNotSet`. - return [[AAPLLocalListCoordinator alloc] initWithLastPathComponent:lastPathComponent firstQueryUpdateHandler:firstQueryHandler]; - } - else { - return [[AAPLCloudListCoordinator alloc] initWithLastPathComponent:lastPathComponent firstQueryUpdateHandler:firstQueryHandler]; - } -} - -- (AAPLListsController *)listsControllerForCurrentConfigurationWithPathExtension:(NSString *)pathExtension firstQueryHandler:(void (^)(void))firstQueryHandler { - id listCoordinator = [self listsCoordinatorForCurrentConfigurationWithPathExtension:pathExtension firstQueryHandler:firstQueryHandler]; - - return [[AAPLListsController alloc] initWithListCoordinator:listCoordinator delegateQueue:[NSOperationQueue mainQueue] sortComparator:^NSComparisonResult(AAPLListInfo *lhs, AAPLListInfo *rhs) { - return [lhs.name localizedCaseInsensitiveCompare:rhs.name]; - }]; -} - -- (AAPLListsController *)listsControllerForCurrentConfigurationWithLastPathComponent:(NSString *)lastPathComponent firstQueryHandler:(void (^)(void))firstQueryHandler { - id listCoordinator = [self listsCoordinatorForCurrentConfigurationWithLastPathComponent:lastPathComponent firstQueryHandler:firstQueryHandler]; - - return [[AAPLListsController alloc] initWithListCoordinator:listCoordinator delegateQueue:[NSOperationQueue mainQueue] sortComparator:^NSComparisonResult(AAPLListInfo *lhs, AAPLListInfo *rhs) { - return [lhs.name localizedCaseInsensitiveCompare:rhs.name]; - }]; -} - -#endif - -@end diff --git a/Lister/Objective-C/Common/AAPLCheckBoxLayer.h b/Lister/Objective-C/Common/AAPLCheckBoxLayer.h deleted file mode 100644 index b8cc0b4d..00000000 --- a/Lister/Objective-C/Common/AAPLCheckBoxLayer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A \c CALayer subclass that draws a check box within its layer. This is shared between ListerKit on iOS and OS X to draw their respective \c AAPLCheckBox controls. -*/ - -@import QuartzCore; - -@interface AAPLCheckBoxLayer : CALayer - -@property CGColorRef tintColor; - -@property (getter=isChecked) BOOL checked; - -@property CGFloat strokeFactor; -@property CGFloat insetFactor; -@property CGFloat markInsetFactor; - -@end diff --git a/Lister/Objective-C/Common/AAPLCheckBoxLayer.m b/Lister/Objective-C/Common/AAPLCheckBoxLayer.m deleted file mode 100644 index c42b1127..00000000 --- a/Lister/Objective-C/Common/AAPLCheckBoxLayer.m +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A \c CALayer subclass that draws a check box within its layer. This is shared between ListerKit on iOS and OS X to draw their respective \c AAPLCheckBox controls. -*/ - -#import "AAPLCheckBoxLayer.h" - -@implementation AAPLCheckBoxLayer -@synthesize tintColor = _tintColor; -@synthesize checked = _checked; - -+ (BOOL)needsDisplayForKey:(NSString *)key { - if ([@[@"tintColor", @"checked", @"strokeFactor", @"insetFactor", @"markInsetFactor"] containsObject:key]) { - return YES; - } - - return [super needsDisplayForKey:key]; -} - -- (instancetype)init { - - self = [super init]; - - if (self) { - CGFloat components[] = {0.5, 0.5, 0.5}; - _tintColor = CGColorCreate(CGColorSpaceCreateDeviceRGB(), components); - - _strokeFactor = 0.07; - _insetFactor = 0.17; - _markInsetFactor = 0.34; - } - - return self; -} - -- (void)drawInContext:(CGContextRef)context { - [super drawInContext:context]; - - const CGFloat size = MIN(self.bounds.size.width, self.bounds.size.height); - - CGAffineTransform transform = self.affineTransform; - - CGFloat xTranslate = 0; - CGFloat yTranslate = 0; - - if (self.bounds.size.width < self.bounds.size.height) { - yTranslate = (self.bounds.size.height - size)/2.f; - } - else { - xTranslate = (self.bounds.size.width - size)/2.f; - } - transform = CGAffineTransformTranslate(transform, xTranslate, yTranslate); - - const CGFloat strokeWidth = self.strokeFactor * size; - const CGFloat checkBoxInset = self.insetFactor * size; - - // Create the outer border for the check box. - CGFloat outerDimension = size - 2.0 * checkBoxInset; - CGRect checkBoxRect = CGRectMake(checkBoxInset, checkBoxInset, outerDimension, outerDimension); - checkBoxRect = CGRectApplyAffineTransform(checkBoxRect, transform); - - // Make the desired width of the outer box. - CGContextSetLineWidth(context, strokeWidth); - - // Set the tint color of the outer box. - CGContextSetStrokeColorWithColor(context, self.tintColor); - - // Draw the outer box. - CGContextStrokeRect(context, checkBoxRect); - - // Draw the inner box if it's checked. - if (self.isChecked) { - const CGFloat markInset = self.markInsetFactor * size; - - const CGFloat markDimension = size - 2.0 * markInset; - CGRect markRect = CGRectMake(markInset, markInset, markDimension, markDimension); - markRect = CGRectApplyAffineTransform(markRect, transform); - - CGContextSetFillColorWithColor(context, self.tintColor); - CGContextFillRect(context, markRect); - } -} - -- (void)setTintColor:(CGColorRef)tintColor { - if (!CGColorEqualToColor(_tintColor, tintColor)) { - _tintColor = tintColor; - - [self setNeedsDisplay]; - } -} - -- (CGColorRef)tintColor { - return _tintColor; -} - -- (void)setChecked:(BOOL)checked { - if (_checked != checked) { - _checked = checked; - - [self setNeedsDisplay]; - } -} - -- (BOOL)isChecked { - return _checked; -} - -@end diff --git a/Lister/Objective-C/Common/AAPLIncompleteListItemsPresenter.h b/Lister/Objective-C/Common/AAPLIncompleteListItemsPresenter.h deleted file mode 100644 index 06ab3e7f..00000000 --- a/Lister/Objective-C/Common/AAPLIncompleteListItemsPresenter.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The implementation for the \c AAPLIncompleteListItemsPresenter type. This class is responsible for managing how a list is presented in the iOS and OS X app Today widgets, as well as the Lister WatchKit application. -*/ - -#import "AAPLListPresenting.h" - -@class AAPLListItem; - -/*! - The \c AAPLIncompleteListItemsPresenter list presenter is responsible for managing the how a list's - incomplete list items are displayed in the iOS and OS X Today widgets as well as the Lister WatchKit app. - The \c AAPLIncompleteListItemsPresenter class conforms to \c AAPLListPresenting so consumers of this class - can work with the presenter using a common interface. - - When a list is initially presented with an \c AAPLIncompleteListItemsPresenter, only the incomplete list - items are presented. That can change, however, if a user toggles list items (changing the list item's - completion state). An \c AAPLIncompleteListItemsPresenter always shows the list items that are initially - presented (unless they are removed from the list from another device). If an \c - AAPLIncompleteListItemsPresenter stops presenting a list that has some presented list items that are complete - (after toggling them) and another \c AAPLIncompleteListItemsPresenter presents the same list, the presenter - displays *only* the incomplete list items. - - The \c AAPLIncompleteListItemsPresenter can be interacted with in a two ways. \c AAPLListItem instances can - be toggled individually, or using a batch update, and the color of the list presenter can be changed. All - of these methods trigger calls to the delegate to be notified about inserted list items, removed list - items, updated list items, etc. - */ -@interface AAPLIncompleteListItemsPresenter : NSObject - -/*! - Toggles \c listItem within the list. This method keeps the list item in the same place, but it toggles the - completion state of the list item. Toggling a list item will call the delegate's \c - -listPresenter:didUpdateListItem:atIndex: method. - - \param listItem - The list item to toggle. - */ -- (void)toggleListItem:(AAPLListItem *)listItem; - -/*! - Sets all of the presented list item's completion states to \c completionState. This method does not move the - list items around whatsoever. Changing the completion state on all of the list items will call the - delegate's \c -listPresenter:didUpdateListItem:atIndex: method for each list item that has been updated. - - \param completionState - The value that all presented list item instances should have as their \c isComplete property. - */ -- (void)updatePresentedListItemsToCompletionState:(BOOL)completionState; - -@end diff --git a/Lister/Objective-C/Common/AAPLIncompleteListItemsPresenter.m b/Lister/Objective-C/Common/AAPLIncompleteListItemsPresenter.m deleted file mode 100644 index f5f70c31..00000000 --- a/Lister/Objective-C/Common/AAPLIncompleteListItemsPresenter.m +++ /dev/null @@ -1,224 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The implementation for the \c AAPLIncompleteListItemsPresenter type. This class is responsible for managing how a list is presented in the iOS and OS X app Today widgets, as well as the Lister WatchKit application. -*/ - -#import "AAPLIncompleteListItemsPresenter.h" -#import "AAPLListPresenterDelegate.h" -#import "AAPLListPresenterUtilities.h" -#import "AAPLListPresenterAlgorithms.h" -#import "AAPLListItem.h" - -@interface AAPLIncompleteListItemsPresenter () - -/// The internal storage for the list that we're presenting. By default, it's an empty list. -@property (nonatomic, readwrite) AAPLList *list; - -/// Flag to see whether or not the first \c -setList: call should trigger a batch reload. -@property (getter=isInitialList) BOOL initialList; - -/*! - A cached array of the list items that should be presented. When the presenter initially has its underlying \c list - set, the \c presentedListItems is set to all of the incomplete list items. As list items are toggled, \c presentedListItems - may not only contain incomplete list items. Note that we've named the property \c presentedListItems since - there's already a readonly \c presentedListItems property (which returns the value of \c presentedListItems). - */ -@property (readwrite, copy) NSArray *presentedListItems; - -@end - -@implementation AAPLIncompleteListItemsPresenter -@synthesize delegate = _delegate; -@dynamic color; - -#pragma mark - AAPLListItemPresenter - -- (instancetype)init { - self = [super init]; - - if (self) { - // Use a default, empty list. - _list = [[AAPLList alloc] initWithColor:AAPLListColorGray items:@[]]; - _initialList = YES; - - _presentedListItems = [NSArray array]; - } - - return self; -} - -- (void)setColor:(AAPLListColor)color { - AAPLUpdateListColorForListPresenterIfDifferent(self, self.list, color, AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForNonInitialLayout); -} - -- (AAPLListColor)color { - return self.list.color; -} - -- (AAPLList *)archiveableList { - return self.list; -} - -/*! - This methods determines the diff betwen the current list and the new list provided and notifies the delegate - accordingly. The delegate will be notified of all changes except for reordering list items (an implementation - detail). If the list is the initial list to be presented, we just reload all of the data. - */ -- (void)setList:(AAPLList *)newList { - // If this is the initial list that's being presented, just tell the delegate to reload all of the data. - if (self.isInitialList) { - self.initialList = NO; - - _list = newList; - - NSPredicate *incompleteListItemsFilterPredicate = [NSPredicate predicateWithFormat:@"isComplete == NO"]; - self.presentedListItems = [newList.items filteredArrayUsingPredicate:incompleteListItemsFilterPredicate]; - - [self.delegate listPresenterDidRefreshCompleteLayout:self]; - - return; - } - - /** - First find all the differences between the lists that we want to reflect in the presentation - of the list: removed list items that were incomplete, inserted list items that are incomplete, presented list items - that are toggled, and presented list items whose text has changed. Note that although we'll gradually - update presentedListItems to reflect the changes we find, we also want to save the latest state of - the list (i.e. the `newList` parameter) as the underlying storage of the list. Since we'll be presenting - the same list either way, it's better not to change the underlying list representation unless we need - to. Keep in mind, however, that all of the list items in presentedListItems should also be in `list.items`. - In short, once we modify `presentedListItems` with all of the changes, we need to also update `list.items` - to contain all of the list items that were unchanged (this can be done by replacing the new list item - representation by the old representation of the list item). Once that happens, all of the presentation - logic carries on as normal. - */ - AAPLList *oldList = self.list; - - NSArray *newRemovedPresentedListItems = AAPLFindRemovedListItemsFromInitialListItemsToChangedListItems(self.presentedListItems, newList.items); - NSArray *newInsertedIncompleteListItems = AAPLFindInsertedListItemsFromInitialListItemsToChangedListItems(self.presentedListItems, newList.items, ^BOOL(AAPLListItem *listItem) { - return !listItem.isComplete; - }); - NSArray *newPresentedToggledListItems = AAPLFindToggledListItemsFromInitialListItemsToChangedListItems(self.presentedListItems, newList.items); - NSArray *newPresentedListItemsWithUpdatedText = AAPLFindListItemsWithUpdatedTextFromInitialListItemsToChangedListItems(self.presentedListItems, newList.items); - - AAPLListItemsBatchChangeKind listItemsBatchChangeKind = AAPLListItemsBatchChangeKindForChanges(newRemovedPresentedListItems, newInsertedIncompleteListItems, newPresentedToggledListItems, newPresentedListItemsWithUpdatedText); - - // If no changes occured we'll ignore the update. - if (listItemsBatchChangeKind == AAPLListItemsBatchChangeKindNone && oldList.color == newList.color) { - return; - } - - // Start performing changes to the presentation of the list. - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:YES]; - - NSMutableArray *presentedListItemsProxy = [self mutableArrayValueForKey:@"presentedListItems"]; - - // Remove the list items from the presented list items that were removed somewhere else. - if (newRemovedPresentedListItems.count > 0) { - AAPLRemoveListItemsFromListItemsWithListPresenter(self, presentedListItemsProxy, newRemovedPresentedListItems); - } - - // Insert the incomplete list items into the presented list items that were inserted elsewhere. - if (newInsertedIncompleteListItems.count > 0) { - AAPLInsertListItemsIntoListItemsWithListPresenter(self, presentedListItemsProxy, newInsertedIncompleteListItems); - } - - /** - For all of the list items whose content has changed elsewhere, we need to update the list items in place. - Since the `AAPLIncompleteListItemsPresenter` keeps toggled list items in place, we only need to perform one - update for list items that have a different completion state and text. We'll batch both of these changes - into a single update. - */ - if (newPresentedToggledListItems.count > 0 || newPresentedListItemsWithUpdatedText.count > 0) { - // Find the unique list of list items that are updated. - NSMutableSet *uniqueUpdatedListItemsSet = [NSMutableSet setWithArray:newPresentedToggledListItems]; - [uniqueUpdatedListItemsSet addObjectsFromArray:newPresentedListItemsWithUpdatedText]; - - AAPLUpdateListItemsWithListItemsForListPresenter(self, presentedListItemsProxy, uniqueUpdatedListItemsSet.allObjects); - } - - /** - At this point the presented list items have been updated. As mentioned before, to ensure that we're - consistent about how we persist the updated list, we'll just use new the new list as the underlying - model. To do that we'll need to update the new list's unchanged list items with the list items that - are stored in the visual list items. i.e. We need to make sure that any references to list items in - `presentedListItems` are reflected in the new list's items. - */ - _list = newList; - - // Obtain the presented list items that were unchanged. We need to update the new list to reference the old list items. - NSPredicate *unboundFindUnchangedPresentedListItemsPredicate = [NSPredicate predicateWithFormat:@"!(self in $newRemovedPresentedListItems) && !(self in $newInsertedIncompleteListItems) && !(self in $newPresentedToggledListItems) && !(self in $newPresentedListItemsWithUpdatedText)"]; - - NSPredicate *findUnchangedPresentedListItemsPredicate = [unboundFindUnchangedPresentedListItemsPredicate predicateWithSubstitutionVariables:@{ - @"newRemovedPresentedListItems": newRemovedPresentedListItems, - @"newInsertedIncompleteListItems": newInsertedIncompleteListItems, - @"newPresentedToggledListItems": newPresentedToggledListItems, - @"newPresentedListItemsWithUpdatedText": newPresentedListItemsWithUpdatedText - }]; - - NSArray *unchangedPresentedListItems = [self.presentedListItems filteredArrayUsingPredicate:findUnchangedPresentedListItemsPredicate]; - - NSMutableArray *listItemsProxy = [self.list mutableArrayValueForKey:@"items"]; - - AAPLReplaceAnyEqualUnchangedNewListItemsWithPreviousUnchangedListItems(listItemsProxy, unchangedPresentedListItems); - - /** - Even though the old list's color will change if there's a difference between the old list's color and - the new list's color, the delegate only cares about this change in reference to what it already knows. - Because the delegate hasn't seen a color change yet, the update (if it happens) is ok. - */ - AAPLUpdateListColorForListPresenterIfDifferent(self, oldList, newList.color, AAPLListColorUpdateActionDontSendDelegateChangeLayoutCalls); - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:YES]; -} - -- (NSInteger)count { - return self.presentedListItems.count; -} - -- (BOOL)isEmpty { - return self.presentedListItems.count == 0; -} - -#pragma mark - Public Methods - -- (void)toggleListItem:(AAPLListItem *)listItem { - NSAssert([self.presentedListItems containsObject:listItem], @"The list item must already be in the presented list items."); - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - listItem.complete = !listItem.isComplete; - - NSInteger currentIndex = [self.presentedListItems indexOfObject:listItem]; - - [self.delegate listPresenter:self didUpdateListItem:listItem atIndex:currentIndex]; - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; -} - -- (void)updatePresentedListItemsToCompletionState:(BOOL)completionState { - NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"isComplete != %@", @(completionState)]; - NSArray *presentedListItemsNotMatchingCompletionState = [self.presentedListItems filteredArrayUsingPredicate:filterPredicate]; - - // If there are no list items that match the completion state, it's a no op. - if (presentedListItemsNotMatchingCompletionState.count == 0) { - return; - } - - [self.delegate listPresenterWillChangeListLayout:self isInitialLayout:NO]; - - for (AAPLListItem *listItem in presentedListItemsNotMatchingCompletionState) { - listItem.complete = !listItem.isComplete; - - NSInteger indexOfListItem = [self.presentedListItems indexOfObject:listItem]; - - [self.delegate listPresenter:self didUpdateListItem:listItem atIndex:indexOfListItem]; - } - - [self.delegate listPresenterDidChangeListLayout:self isInitialLayout:NO]; -} - -@end diff --git a/Lister/Objective-C/Common/AAPLList.h b/Lister/Objective-C/Common/AAPLList.h deleted file mode 100644 index a4209570..00000000 --- a/Lister/Objective-C/Common/AAPLList.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLList class manages a list of items and the color of the list. -*/ - -@import Foundation; - -@class AAPLListItem; - -/*! - The possible colors a list can have. - */ -typedef NS_ENUM(NSInteger, AAPLListColor) { - AAPLListColorGray = 0, - AAPLListColorBlue, - AAPLListColorGreen, - AAPLListColorYellow, - AAPLListColorOrange, - AAPLListColorRed -}; - -/*! - Returns the name of \c listColor in a human readable form. As an example, \c AAPLNameFromListColor(AAPLListColorRed) - returns the string \c @"Red". - - \param listColor - The list color to determine the name of. - - \returns - The human readable representation of the color as a string. - */ -NSString *AAPLNameFromListColor(AAPLListColor listColor); - -/*! - The \c AAPLList class manages the color of a list and each \c AAPLListItem, including the order of - the list. Incomplete items are located at the start of the items array, followed by complete list - items. There are many convenience methods on the \c AAPLList class to query whether an item can be - moved or inserted at a certain index, to perform those move and insert operations, to toggle an - item between a complete and incomplete state, and to fetch list items by index. Note that in order - to be able to archive and unarchive \c AAPLList objects in both the Objective-C and Swift versions - of the app, the Swift version of the app ensures that the runtime name of its \c List object is - also \c AAPLList. - */ -@interface AAPLList : NSObject - -/*! - Initializes an \c AAPLList instance with the designated color and items. - - \param color - The intended color of the list. - - \param items - The items that represent the underlying list. The \c AAPLList class copies the items in - initialization. - */ -- (instancetype)initWithColor:(AAPLListColor)color items:(NSArray *)items; - -/*! - The list's color. This property is stored when it is archived and read when it is unarchived. - */ -@property AAPLListColor color; - -/*! - \returns - A copy of the list items. The underlying items are stored when the list is archived and read when - they are unarchived. - */ -@property (copy) NSArray *items; - -/*! - Determines whether or not a list is equal to another list. This is a specialization of \c -isEqual: - that is specific for instances of \c AAPLList. - - \param - list Any list. - - \returns - \c YES if the list has the same color and items as the receiving instance. \c NO otherwise. - */ -- (BOOL)isEqualToList:(AAPLList *)list; - -@end diff --git a/Lister/Objective-C/Common/AAPLList.m b/Lister/Objective-C/Common/AAPLList.m deleted file mode 100644 index 859f925d..00000000 --- a/Lister/Objective-C/Common/AAPLList.m +++ /dev/null @@ -1,94 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLList class manages a list of items and the color of the list. -*/ - -#import "AAPLList.h" -#import "AAPLListItem.h" - -NSString *AAPLNameFromListColor(AAPLListColor listColor) { - switch (listColor) { - case AAPLListColorGray: return @"Gray"; - case AAPLListColorBlue: return @"Blue"; - case AAPLListColorGreen: return @"Green"; - case AAPLListColorYellow: return @"Yellow"; - case AAPLListColorOrange: return @"Orange"; - case AAPLListColorRed: return @"Red"; - } -} - -/*! - String constants that are used to archive the stored properties of an \c AAPLListItem. - These constants are used to help implement \c NSCoding. -*/ -NSString *const AAPLListEncodingItemsKey = @"items"; -NSString *const AAPLListEncodingColorKey = @"color"; - -@implementation AAPLList - -#pragma mark - Initialization - -- (instancetype)initWithColor:(AAPLListColor)color items:(NSArray *)items { - self = [super init]; - - if (self) { - _items = [[NSArray alloc] initWithArray:items copyItems:YES]; - _color = color; - } - - return self; -} - -#pragma mark - NSCoding - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super init]; - - if (self) { - _items = [[aDecoder decodeObjectForKey:AAPLListEncodingItemsKey] copy]; - - _color = (AAPLListColor)[aDecoder decodeIntegerForKey:AAPLListEncodingColorKey]; - } - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:self.items forKey:AAPLListEncodingItemsKey]; - [aCoder encodeInteger:self.color forKey:AAPLListEncodingColorKey]; -} - -#pragma mark - NSCopying - -- (id)copyWithZone:(NSZone *)zone { - return [[AAPLList alloc] initWithColor:self.color items:self.items]; -} - -#pragma mark - Equality - -- (BOOL)isEqual:(id)object { - if ([object isKindOfClass:[AAPLList class]]) { - return [self isEqualToList:object]; - } - - return NO; -} - -- (BOOL)isEqualToList:(AAPLList *)list { - if (self.color != list.color) { - return NO; - } - - return [self.items isEqualToArray:list.items]; -} - -#pragma mark - Debugging - -- (NSString *)debugDescription { - return [NSString stringWithFormat:@"{color: %@, items: %@}", AAPLNameFromListColor(self.color), self.items]; -} - -@end diff --git a/Lister/Objective-C/Common/AAPLListColor+UI.h b/Lister/Objective-C/Common/AAPLListColor+UI.h deleted file mode 100644 index 860f39e5..00000000 --- a/Lister/Objective-C/Common/AAPLListColor+UI.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Enhancements for the \c AAPLListColor enumeration that add the ability to obtain a platform-specific color object from the enumeration value. -*/ - -@import Foundation; -#import "AAPLList.h" - -#if TARGET_OS_IOS || TARGET_OS_WATCH - -@import UIKit; -#define AAPLAppColor UIColor - -#elif TARGET_OS_MAC - -@import Cocoa; -#define AAPLAppColor NSColor - -#endif - -/// Returns the platform-specific color that is reprsented by \c listColor. -AAPLAppColor *AAPLColorFromListColor(AAPLListColor listColor); - -/// Returns the platform-specific color that is reprsented by \c listColor for use in Notifcation Center. -AAPLAppColor *AAPLColorFromListColorForNotificationCenter(AAPLListColor listColor); - -#undef AAPLAppColor \ No newline at end of file diff --git a/Lister/Objective-C/Common/AAPLListColor+UI.m b/Lister/Objective-C/Common/AAPLListColor+UI.m deleted file mode 100644 index 5566b699..00000000 --- a/Lister/Objective-C/Common/AAPLListColor+UI.m +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Enhancements for the \c AAPLListColor enumeration that add the ability to obtain a platform-specific color object from the enumeration value. -*/ - -#import "AAPLListColor+UI.h" - -#if TARGET_OS_IOS || TARGET_OS_WATCH -#define AAPLAppColor UIColor -#elif TARGET_OS_MAC -#define AAPLAppColor NSColor -#endif - -AAPLAppColor *AAPLColorFromListColor(AAPLListColor listColor) { - static AAPLAppColor *_grayColor = nil; - static AAPLAppColor *_blueColor = nil; - static AAPLAppColor *_greenColor = nil; - static AAPLAppColor *_yellowColor = nil; - static AAPLAppColor *_orangeColor = nil; - static AAPLAppColor *_redColor = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _grayColor = [AAPLAppColor darkGrayColor]; - _blueColor = [AAPLAppColor colorWithRed:0.42 green:0.70 blue:0.88 alpha:1]; - _greenColor = [AAPLAppColor colorWithRed:0.71 green:0.84 blue:0.31 alpha:1]; - _yellowColor = [AAPLAppColor colorWithRed:0.95 green:0.88 blue:0.15 alpha:1]; - _orangeColor = [AAPLAppColor colorWithRed:0.96 green:0.63 blue:0.20 alpha:1]; - _redColor = [AAPLAppColor colorWithRed:0.96 green:0.42 blue:0.42 alpha:1]; - }); - - switch (listColor) { - case AAPLListColorGray: return _grayColor; - case AAPLListColorBlue: return _blueColor; - case AAPLListColorGreen: return _greenColor; - case AAPLListColorYellow: return _yellowColor; - case AAPLListColorOrange: return _orangeColor; - case AAPLListColorRed: return _redColor; - } - - return nil; -} - -AAPLAppColor *AAPLColorFromListColorForNotificationCenter(AAPLListColor listColor) { - static AAPLAppColor *_grayColor = nil; - static AAPLAppColor *_blueColor = nil; - static AAPLAppColor *_greenColor = nil; - static AAPLAppColor *_yellowColor = nil; - static AAPLAppColor *_orangeColor = nil; - static AAPLAppColor *_redColor = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _grayColor = [AAPLAppColor lightGrayColor]; - _blueColor = [AAPLAppColor colorWithRed:0.42 green:0.70 blue:0.88 alpha:1]; - _greenColor = [AAPLAppColor colorWithRed:0.71 green:0.84 blue:0.31 alpha:1]; - _yellowColor = [AAPLAppColor colorWithRed:0.95 green:0.88 blue:0.15 alpha:1]; - _orangeColor = [AAPLAppColor colorWithRed:0.96 green:0.63 blue:0.20 alpha:1]; - _redColor = [AAPLAppColor colorWithRed:0.96 green:0.42 blue:0.42 alpha:1]; - }); - - switch (listColor) { - case AAPLListColorGray: return _grayColor; - case AAPLListColorBlue: return _blueColor; - case AAPLListColorGreen: return _greenColor; - case AAPLListColorYellow: return _yellowColor; - case AAPLListColorOrange: return _orangeColor; - case AAPLListColorRed: return _redColor; - } - - return nil; -} - -#undef AAPLAppColor \ No newline at end of file diff --git a/Lister/Objective-C/Common/AAPLListItem.h b/Lister/Objective-C/Common/AAPLListItem.h deleted file mode 100644 index 7ad988ef..00000000 --- a/Lister/Objective-C/Common/AAPLListItem.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListItem class represents the text and completion state of a single item in the list. -*/ - -@import Foundation; - -/*! - An \c AAPLListItem object is composed of a text property, a completion status, and an underlying - opaque identity that distinguishes one \c AAPLListItem object from another. Note that in order to - be able to archive and unarchive \c AAPLListItem objects in both the Objective-C and Swift versions - of the app, the Swift version of the app ensures that the runtime name of its \c AAPLListItem object - is also \c AAPLListItem. - */ -@interface AAPLListItem : NSObject - -/*! - Initializes an \c AAPLListItem instance with the designated text and completion state. - - \param text - The intended text content of the list item. - - \param complete - The item's initial completion state. - */ -- (instancetype)initWithText:(NSString *)text complete:(BOOL)complete; - -/*! - Initializes an \c AAPLListItem instance with the designated text and a default value for \c complete. - The default value for \c complete is \c NO. - - \param text - The intended text content of the list item. - */ -- (instancetype)initWithText:(NSString *)text; - -/*! - The text content for an \c AAPLListItem. - */ -@property (copy) NSString *text; - -/*! - Whether or not this \c AAPLListItem is complete. - */ -@property (getter=isComplete) BOOL complete; - -/*! - Resets the underlying identity of the \c AAPLListItem. If a copy of this item is made, and a call - to \c -refreshIdentity is made afterward, the items will no longer be equal. - */ -- (void)refreshIdentity; - -/*! - Determines whether or not a list item is equal to another list item. This is a specialization of \c -isEqual: that is specific for \c AAPLListItem instances. - - \param listItem - Any list item. - - \returns - \c YES if the object is an \c AAPLListItem and it has the same underlying identity as the receiving - instance. \c NO otherwise. - */ -- (BOOL)isEqualToListItem:(AAPLListItem *)listItem; - -@end diff --git a/Lister/Objective-C/Common/AAPLListItem.m b/Lister/Objective-C/Common/AAPLListItem.m deleted file mode 100644 index 0d693e4a..00000000 --- a/Lister/Objective-C/Common/AAPLListItem.m +++ /dev/null @@ -1,95 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListItem class represents the text and completion state of a single item in the list. -*/ - -#import "AAPLListItem.h" - -@interface AAPLListItem () - -@property NSUUID *UUID; - -@end - -NSString *const AAPLListItemEncodingTextKey = @"text"; -NSString *const AAPLListItemEncodingCompleteKey = @"completed"; -NSString *const AAPLListItemEncodingUUIDKey = @"uuid"; - -@implementation AAPLListItem - -#pragma mark - Initialization - -- (instancetype)initWithText:(NSString *)text complete:(BOOL)complete UUID:(NSUUID *)UUID { - self = [super init]; - - if (self) { - _text = [text copy]; - _complete = complete; - _UUID = UUID; - } - - return self; -} - -- (instancetype)initWithText:(NSString *)text complete:(BOOL)complete { - return [self initWithText:text complete:complete UUID:[NSUUID UUID]]; -} - -- (instancetype)initWithText:(NSString *)text { - return [self initWithText:text complete:NO]; -} - -#pragma mark - NSCopying - -- (instancetype)copyWithZone:(NSZone *)zone { - return [[AAPLListItem alloc] initWithText:self.text complete:self.isComplete UUID:self.UUID]; -} - -#pragma mark - NSCoding - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - self = [super init]; - - if (self) { - _text = [aDecoder decodeObjectForKey:AAPLListItemEncodingTextKey]; - _UUID = [aDecoder decodeObjectForKey:AAPLListItemEncodingUUIDKey]; - _complete = [aDecoder decodeBoolForKey:AAPLListItemEncodingCompleteKey]; - } - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:self.text forKey:AAPLListItemEncodingTextKey]; - [aCoder encodeObject:self.UUID forKey:AAPLListItemEncodingUUIDKey]; - [aCoder encodeBool:self.isComplete forKey:AAPLListItemEncodingCompleteKey]; -} - -- (void)refreshIdentity { - self.UUID = [NSUUID UUID]; -} - -#pragma mark - Equality - -- (BOOL)isEqualToListItem:(AAPLListItem *)item { - return [self.UUID isEqual:item.UUID]; -} - -- (BOOL)isEqual:(id)object { - if ([object isKindOfClass:[AAPLListItem class]]) { - return [self isEqualToListItem:object]; - } - - return NO; -} - -#pragma mark - Debugging - -- (NSString *)debugDescription { - return [NSString stringWithFormat:@"\"%@\"", self.text]; -} - -@end diff --git a/Lister/Objective-C/Common/AAPLListPresenterAlgorithms.h b/Lister/Objective-C/Common/AAPLListPresenterAlgorithms.h deleted file mode 100644 index 042fe597..00000000 --- a/Lister/Objective-C/Common/AAPLListPresenterAlgorithms.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Simple internal helper functions to share across \c AAPLIncompleteListItemsPresenter and \c AAPLAllListItemsPresenter. These functions help diff two arrays of \c AAPLListItem objects. -*/ - -@import Foundation; - -@class AAPLListItem; - -/// An enum to keep track of the different kinds of changes that may take place within a list. -typedef NS_ENUM(NSInteger, AAPLListItemsBatchChangeKind) { - AAPLListItemsBatchChangeKindNone, - AAPLListItemsBatchChangeKindRemoved, - AAPLListItemsBatchChangeKindInserted, - AAPLListItemsBatchChangeKindToggled, - AAPLListItemsBatchChangeKindUpdatedText, - AAPLListItemsBatchChangeKindMultiple -}; - -/// Returns an array of \c AAPLListItem objects in \c initialListItems that don't exist in \c changedListItems. -NSArray *AAPLFindRemovedListItemsFromInitialListItemsToChangedListItems(NSArray *initialListItems, NSArray *changedListItems); - -/// Returns an array of \c AAPLListItem objects in \c changedListItems that don't exist in \c initialListItems. -NSArray *AAPLFindInsertedListItemsFromInitialListItemsToChangedListItems(NSArray *initialListItems, NSArray *changedListItems, BOOL (^filterHandlerOrNil)(AAPLListItem *listItem)); - -/*! - Returns an array of \c AAPLListItem objects in \c changedListItems whose completion state changed from \c initialListItems - relative to `changedListItems`. - */ -NSArray *AAPLFindToggledListItemsFromInitialListItemsToChangedListItems(NSArray *initialListItems, NSArray *changedListItems); - -/*! - Returns an array of \c AAPLListItem objects in \c changedListItems whose text changed from \c initialListItems - relative to \c changedListItems. - */ -NSArray *AAPLFindListItemsWithUpdatedTextFromInitialListItemsToChangedListItems(NSArray *initialListItems, NSArray *changedListItems); - -/*! - Update \c replaceableNewListItems in place with all of the list items that are equal in \c previousUnchangedListItems. - For example, if \c replaceableNewListItems has list items of UUID "1", "2", and "3" and \c previousUnchangedListItems - has list items of UUID "2" and "3", the \c replaceableNewListItems array will have it's list items with UUID - "2" and "3" replaced with the list items whose UUID is "2" and "3" in \c previousUnchangedListItems. This is - used to ensure that the list items in multiple arrays are referencing the same objects in memory as what the - presented list items are presenting. - */ -void AAPLReplaceAnyEqualUnchangedNewListItemsWithPreviousUnchangedListItems(NSMutableArray *replaceableNewListItems, NSArray *previousUnchangedListItems); - -/*! - Returns the type of \c AAPLListItemsBatchChangeKind based on the different types of changes. The parameters - for this function should be based on the result of the functions above. If there were no changes whatsoever, - \c nil is returned. - */ -AAPLListItemsBatchChangeKind AAPLListItemsBatchChangeKindForChanges(NSArray *removedListItems, NSArray *insertedListItems, NSArray *toggledListItems, NSArray *listItemsWithUpdatedText); \ No newline at end of file diff --git a/Lister/Objective-C/Common/AAPLListPresenterAlgorithms.m b/Lister/Objective-C/Common/AAPLListPresenterAlgorithms.m deleted file mode 100644 index 61e9a172..00000000 --- a/Lister/Objective-C/Common/AAPLListPresenterAlgorithms.m +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Simple internal helper functions to share across \c AAPLIncompleteListItemsPresenter and \c AAPLAllListItemsPresenter. These functions help diff two arrays of \c AAPLListItem objects. -*/ - -#import "AAPLListPresenterAlgorithms.h" -#import "AAPLListItem.h" - -NSArray *AAPLFindRemovedListItemsFromInitialListItemsToChangedListItems(NSArray *initialListItems, NSArray *changedListItems) { - NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"!(self in %@)", changedListItems]; - - return [initialListItems filteredArrayUsingPredicate:filterPredicate]; -} - -NSArray *AAPLFindInsertedListItemsFromInitialListItemsToChangedListItems(NSArray *initialListItems, NSArray *changedListItems, BOOL (^filterHandlerOrNil)(AAPLListItem *listItem)) { - NSPredicate *containmentPredicate = [NSPredicate predicateWithFormat:@"!(self in %@)", initialListItems]; - - NSMutableArray *predicates = [NSMutableArray arrayWithObject:containmentPredicate]; - - if (filterHandlerOrNil) { - NSPredicate *filterHandlerPredicate = [NSPredicate predicateWithBlock:^BOOL(AAPLListItem *listItem, NSDictionary *bindings) { - return filterHandlerOrNil(listItem); - }]; - - [predicates addObject:filterHandlerPredicate]; - } - - NSCompoundPredicate *filterPredicate = [[NSCompoundPredicate alloc] initWithType:NSAndPredicateType subpredicates:predicates]; - - return [changedListItems filteredArrayUsingPredicate:filterPredicate]; -} - -NSArray *AAPLFindToggledListItemsFromInitialListItemsToChangedListItems(NSArray *initialListItems, NSArray *changedListItems) { - NSPredicate *filterPredicate = [NSPredicate predicateWithBlock:^BOOL(AAPLListItem *changedListItem, NSDictionary *bindings) { - NSInteger indexOfChangedListItemInInitialListItems = [initialListItems indexOfObject:changedListItem]; - - if (indexOfChangedListItemInInitialListItems == NSNotFound) { - return NO; - } - - AAPLListItem *initialListItem = initialListItems[indexOfChangedListItemInInitialListItems]; - - return initialListItem.isComplete != changedListItem.isComplete; - }]; - - return [changedListItems filteredArrayUsingPredicate:filterPredicate]; -} - -NSArray *AAPLFindListItemsWithUpdatedTextFromInitialListItemsToChangedListItems(NSArray *initialListItems, NSArray *changedListItems) { - NSPredicate *filterPredicate = [NSPredicate predicateWithBlock:^BOOL(AAPLListItem *changedListItem, NSDictionary *bindings) { - NSInteger indexOfChangedListItemInInitialListItems = [initialListItems indexOfObject:changedListItem]; - - if (indexOfChangedListItemInInitialListItems == NSNotFound) { - return NO; - } - - AAPLListItem *initialListItem = initialListItems[indexOfChangedListItemInInitialListItems]; - - return ![initialListItem.text isEqualToString:changedListItem.text]; - }]; - - return [changedListItems filteredArrayUsingPredicate:filterPredicate]; -} - -void AAPLReplaceAnyEqualUnchangedNewListItemsWithPreviousUnchangedListItems(NSMutableArray *replaceableNewListItems, NSArray *previousUnchangedListItems) { - NSArray *replaceableNewListItemsCopy = [replaceableNewListItems copy]; - - [replaceableNewListItemsCopy enumerateObjectsUsingBlock:^(AAPLListItem *replaceableNewListItem, NSUInteger idx, BOOL *stop) { - NSInteger indexOfUnchangedListItem = [previousUnchangedListItems indexOfObject:replaceableNewListItem]; - - if (indexOfUnchangedListItem != NSNotFound) { - replaceableNewListItems[idx] = previousUnchangedListItems[indexOfUnchangedListItem]; - } - }]; -} - -AAPLListItemsBatchChangeKind AAPLListItemsBatchChangeKindForChanges(NSArray *removedListItems, NSArray *insertedListItems, NSArray *toggledListItems, NSArray *listItemsWithUpdatedText) { - __block AAPLListItemsBatchChangeKind listItemsBatchChangeKind = AAPLListItemsBatchChangeKindNone; - - /* - A simple helper block that takes in the new change kind. If there has already been a change kind set - to a value other than AAPLListItemsBatchChangeKindMultiple, the block updates listItemsBatchChangeKind - to be AAPLListItemsBatchChangeKindMultiple instead of newChangeKind. - */ - void (^setListItemsBatchChangeKind)(AAPLListItemsBatchChangeKind) = ^(AAPLListItemsBatchChangeKind newChangeKind) { - if (listItemsBatchChangeKind != AAPLListItemsBatchChangeKindNone) { - listItemsBatchChangeKind = AAPLListItemsBatchChangeKindMultiple; - } - else { - listItemsBatchChangeKind = newChangeKind; - } - }; - - if (removedListItems.count > 0) { - setListItemsBatchChangeKind(AAPLListItemsBatchChangeKindRemoved); - } - - if (insertedListItems.count > 0) { - setListItemsBatchChangeKind(AAPLListItemsBatchChangeKindInserted); - } - - if (toggledListItems.count > 0) { - setListItemsBatchChangeKind(AAPLListItemsBatchChangeKindToggled); - } - - if (listItemsWithUpdatedText.count > 0) { - setListItemsBatchChangeKind(AAPLListItemsBatchChangeKindUpdatedText); - } - - return listItemsBatchChangeKind; -} \ No newline at end of file diff --git a/Lister/Objective-C/Common/AAPLListPresenterDelegate.h b/Lister/Objective-C/Common/AAPLListPresenterDelegate.h deleted file mode 100644 index 11c3a7bb..00000000 --- a/Lister/Objective-C/Common/AAPLListPresenterDelegate.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The definition for the \c AAPLListPresenterDelegate type. This protocol defines the contract between the \c AAPLListPresenting interactions and receivers of those events (the type that conforms to the \c AAPLListPresenterDelegate protocol). -*/ - -@protocol AAPLListPresenting; - -/*! - The \c AAPLListPresenterDelegate type is used to receive events from an \c AAPLListPresenting instance - about updates to the presenter's layout. This happens, for example, if an \c AAPLListItem object is - inserted into the list or removed from the list. For any change that occurs to the list, a delegate message - can be called, but you may decide not to take any action if the method doesn’t apply to your use case. For - an implementation of \c AAPLListPresenterDelegate, see the \c AAPLAllListItemsPresenter or \c - AAPLIncompleteListItemsPresenter types. - */ -@protocol AAPLListPresenterDelegate - -/*! - An \c AAPLListPresenting instance invokes this method on its delegate when a large change to the underlying - list changed, but the presenter couldn't resolve the granular changes. A full layout change includes - changing anything on the underlying list: list item toggling, text updates, color changes, etc. This is - invoked, for example, when the list is initially loaded, because there could be many changes that happened - relative to an empty list--the delegate should just reload everything immediately. This method is not - wrapped in \c -listPresenterWillChangeListLayout:isInitialLayout: and \c - -listPresenterDidChangeListLayout:isInitialLayout: method invocations. - - \param listPresenter - The list presenter whose full layout has changed. - */ -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter; - -/*! - An \c AAPLListPresenting instance invokes this method on its delegate before a set of layout changes - occur. This could involve list item insertions, removals, updates, toggles, etc. This can also include - changes to the color of the \c AAPLListPresenting instance. If \c isInitialLayout is \c YES, it means that - the new list is being presented for the first time--for example, if \c -setList: is called on the \c AAPLListPresenting - instance, the delegate will receive a \c -listPresenterWillChangeListLayout:isInitialLayout: call where - \c isInitialLayout is \c YES. - - \param listPresenter - The list presenter whose presentation will change. - - \param isInitialLayout - Whether or not the presenter is presenting the most recent list for the first time. - */ -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout; - -/*! - A \c AAPLListPresenting invokes this method on its delegate when an item was inserted into the list. This - method is called only if the invocation is wrapped in a call to \c - -listPresenterWillChangeListLayout:isInitialLayout: and \c -listPresenterDidChangeListLayout:isInitialLayout:. - - \param listPresenter - The list presenter whose presentation has changed. - - \param listItem - The list item that has been inserted. - - \param index - The index that \c listItem was inserted into. - */ -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index; - -/*! - An \c AAPLListPresenting invokes this method on its delegate when an item was removed from the list. This - method is called only if the invocation is wrapped in a call to \c - -listPresenterWillChangeListLayout:isInitialLayout: and \c -listPresenterDidChangeListLayout:isInitialLayout:. - - \param listPresenter - The list presenter whose presentation has changed. - - \param listItem - The list item that has been removed. - - \param index - The index that \c listItem was removed from. - */ -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index; - -/*! - An \c AAPLListPresenting invokes this method on its delegate when an item is updated in place. This could - happen, for example, if the text of an \c AAPLListItem instance changes. This method is called only if the - invocation is wrapped in a call to \c -listPresenterWillChangeListLayout:isInitialLayout: and \c - -listPresenterDidChangeListLayout:isInitialLayout:. - - \param listPresenter - The list presenter whose presentation has changed. - - \param listItem - The list item that has been updated. - - \param index - The index that \c listItem was updated at in place. - */ -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index; - -/*! - An \c AAPLListPresenting invokes this method on its delegate when an item moved \c fromIndex to \c toIndex. - This could happen, for example, if the list presenter toggles an \c AAPLListItem instance and it needs to - be moved from one index to another. This method is called only if the invocation is wrapped in a call to \c - -listPresenterWillChangeListLayout:isInitialLayout: and \c -listPresenterDidChangeListLayout:isInitialLayout:. - - \param listPresenter - The list presenter whose presentation has changed. - - \param listItem - The list item that has been moved. - - \param fromIndex - The original index that \c listItem was located at before the move. - - \param toIndex - The index that \c listItem was moved to. - */ -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex; - -/*! - An \c AAPLListPresenting invokes this method on its delegate when the color of the \c AAPLListPresenting - instance's changes. This method is called only if the invocation is wrapped in a call to \c - -listPresenterWillChangeListLayout:isInitialLayout: and \c -listPresenterDidChangeListLayout:isInitialLayout:. - - \param listPresenter - The list presenter whose presentation has changed. - - \param color - The new color of the presented list. - */ -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color; - -/*! - An \c AAPLListPresenting invokes this method on its delegate after a set of layout changes occur. See \c - -listPresenterWillChangeListLayout:isInitialLayout: for examples of when this would be called. - - \param listPresenter - The list presenter whose presentation has changed. - - \param isInitialLayout - Whether or not the presenter is presenting the most recent list for the first time. - */ -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout; - -@end diff --git a/Lister/Objective-C/Common/AAPLListPresenterUtilities.h b/Lister/Objective-C/Common/AAPLListPresenterUtilities.h deleted file mode 100644 index 1f36bcdd..00000000 --- a/Lister/Objective-C/Common/AAPLListPresenterUtilities.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Helper functions to perform common operations in \c AAPLIncompleteListItemsPresenter and \c AAPLAllListItemsPresenter. -*/ - -@import Foundation; -#import "AAPLList.h" - -@protocol AAPLListPresenting; - -/*! - Removes each list item found in \c listItemsToRemove from the \c initialListItems array. For each removal, - the function notifies the \c listPresenter's delegate of the change. - */ -void AAPLRemoveListItemsFromListItemsWithListPresenter(id listPresenter, NSMutableArray *initialListItems, NSArray *listItemsToRemove); - -/*! - Inserts each list item in \c listItemsToInsert into \c initialListItems. For each insertion, the function - notifies the \c listPresenter's delegate of the change. - */ -void AAPLInsertListItemsIntoListItemsWithListPresenter(id listPresenter, NSMutableArray *initialListItems, NSArray *listItemsToInsert); - -/*! - Replaces the stale list items in \c presentedListItems with the new ones found in \c newUpdatedListItems. For - each update, the function notifies the \c listPresenter's delegate of the update. - */ -void AAPLUpdateListItemsWithListItemsForListPresenter(id listPresenter, NSMutableArray *presentedListItems, NSArray *newUpdatedListItems); - -/*! - An enum to determine that determines how the \c AAPLUpdateListColorForListPresenterIfDifferent function handles - calling list presenter delegate methods (and with what parameters). - */ -typedef NS_ENUM(NSInteger, AAPLListColorUpdateAction) { - AAPLListColorUpdateActionDontSendDelegateChangeLayoutCalls, - AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForInitialLayout, - AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForNonInitialLayout -}; - -/*! - Replaces the presented list's \c color with \c newColor if the colors are different. If the colors are different, - the function notifies the delegate of the updated color change if the the \c listColorUpdateAction parameter - is either \c AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForInitialLayout or - \c AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForNonInitialLayout. Based on which one of those - values are provided, the function will pass \c YES or \c NO to \c -listPresenterWillChangeListLayout:isInitialLayout: - and \c -listPresenterDidChangeListLayout:isInitialLayout: for the \c isInitialLayout parameter. The function - returns whether or not the list's color was updated. - */ -BOOL AAPLUpdateListColorForListPresenterIfDifferent(id listPresenter, AAPLList *presentedList, AAPLListColor newColor, AAPLListColorUpdateAction listColorUpdateAction); diff --git a/Lister/Objective-C/Common/AAPLListPresenterUtilities.m b/Lister/Objective-C/Common/AAPLListPresenterUtilities.m deleted file mode 100644 index c59bbae2..00000000 --- a/Lister/Objective-C/Common/AAPLListPresenterUtilities.m +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Helper functions to perform common operations in \c AAPLIncompleteListItemsPresenter and \c AAPLAllListItemsPresenter. -*/ - -#import "AAPLListPresenterUtilities.h" -#import "AAPLListPresenterDelegate.h" -#import "AAPLListPresenting.h" -#import "AAPLList.h" - -void AAPLRemoveListItemsFromListItemsWithListPresenter(id listPresenter, NSMutableArray *initialListItems, NSArray *listItemsToRemove) { - NSArray *sortedListItemsToRemove = [listItemsToRemove sortedArrayUsingComparator:^NSComparisonResult(AAPLListItem *lhs, AAPLListItem *rhs) { - return [initialListItems indexOfObject:lhs] > [initialListItems indexOfObject:rhs]; - }]; - - for (AAPLListItem *listItemToRemove in sortedListItemsToRemove) { - // Use the index of the list item to remove in the current list's list items. - NSInteger indexOfListItemToRemoveInOldList = [initialListItems indexOfObject:listItemToRemove]; - - [initialListItems removeObjectAtIndex:indexOfListItemToRemoveInOldList]; - - [listPresenter.delegate listPresenter:listPresenter didRemoveListItem:listItemToRemove atIndex:indexOfListItemToRemoveInOldList]; - } -} - -void AAPLInsertListItemsIntoListItemsWithListPresenter(id listPresenter, NSMutableArray *initialListItems, NSArray *listItemsToInsert) { - [listItemsToInsert enumerateObjectsUsingBlock:^(AAPLListItem *insertedIncompleteListItem, NSUInteger idx, BOOL *stop) { - [initialListItems insertObject:insertedIncompleteListItem atIndex:idx]; - - [listPresenter.delegate listPresenter:listPresenter didInsertListItem:insertedIncompleteListItem atIndex:idx]; - }]; -} - -void AAPLUpdateListItemsWithListItemsForListPresenter(id listPresenter, NSMutableArray *presentedListItems, NSArray *newUpdatedListItems) { - for (AAPLListItem *newlyUpdatedListItem in newUpdatedListItems) { - NSInteger indexOfListItem = [presentedListItems indexOfObject:newlyUpdatedListItem]; - - presentedListItems[indexOfListItem] = newlyUpdatedListItem; - - [listPresenter.delegate listPresenter:listPresenter didUpdateListItem:newlyUpdatedListItem atIndex:indexOfListItem]; - } -} - -BOOL AAPLUpdateListColorForListPresenterIfDifferent(id listPresenter, AAPLList *presentedList, AAPLListColor newColor, AAPLListColorUpdateAction listColorUpdateAction) { - // Don't trigger any updates if the new color is the same as the current color. - if (presentedList.color == newColor) { - return NO; - } - - if (listColorUpdateAction == AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForInitialLayout) { - [listPresenter.delegate listPresenterWillChangeListLayout:listPresenter isInitialLayout:YES]; - } - else if (listColorUpdateAction == AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForNonInitialLayout) { - [listPresenter.delegate listPresenterWillChangeListLayout:listPresenter isInitialLayout:NO]; - } - - presentedList.color = newColor; - - [listPresenter.delegate listPresenter:listPresenter didUpdateListColorWithColor:newColor]; - - if (listColorUpdateAction == AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForInitialLayout) { - [listPresenter.delegate listPresenterDidChangeListLayout:listPresenter isInitialLayout:YES]; - } - else if (listColorUpdateAction == AAPLListColorUpdateActionSendDelegateChangeLayoutCallsForNonInitialLayout) { - [listPresenter.delegate listPresenterDidChangeListLayout:listPresenter isInitialLayout:NO]; - } - - return YES; -} \ No newline at end of file diff --git a/Lister/Objective-C/Common/AAPLListPresenting.h b/Lister/Objective-C/Common/AAPLListPresenting.h deleted file mode 100644 index cf7c8074..00000000 --- a/Lister/Objective-C/Common/AAPLListPresenting.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The definition for the \c AAPLListPresenting type. This protocol defines the contract between list presenters and how their lists are presented / archived. -*/ - -@import Foundation; -#import "AAPLList.h" - -@protocol AAPLListPresenterDelegate; - -/*! - The \c AAPLListPresenting protocol defines the building blocks required for an object to be used as a list - presenter. List presenters are meant to be used where an \c AAPLList object is displayed; in essence, a list - presenter "fronts" an \c AAPLList object. With iOS / OS X apps, iOS / OS X widgets, and WatchKit extensions, - we can classify these interaction models into list presenters. All of the logic can then be abstracted away - so that the interaction is testable, reusable, and scalable. By defining the core requirements of a list - presenter through the \c AAPLListPresenting, consumers of \c AAPLListPresenting instances can share a common - interaction interface to a list. - - Types that conform to \c AAPLListPresenting will have other methods to manipulate a list. For example, a - presenter can allow for inserting list items into the list, it can allow moving a list item from one index - to another, etc. All of these updates require that the \c AAPLListPresenting notify its delegate (an - \c AAPLListPresenterDelegate) of these changes through the common delegate methods. Each of these methods - should be surrounded by \c -listPresenterWillChangeListLayout: and \c -listPresenterDidChangeListLayout: - invocations. For more information about the expectations of how an \c AAPLListPresenterDelegate interacts - with an \c AAPLListPresenting, see the \c AAPLListPresenterDelegate protocol comments. - - The underlying implementation of the \c AAPLListPresenting may use an \c AAPLList object to store certain properties - as a convenience, but there's no need to do that directly. You query an instance of an \c AAPLListPresenting - instance for its \c archiveableList representation; that is, a representation of the currently presented list - that can be archiveable. This may happen, for example, when a document needs to save the currently presented - list in an archiveable form. Note that list presenters should be used on the main queue only. - */ -@protocol AAPLListPresenting - -/*! - The delegate that will receive callbacks from the \c AAPLListPresenting instance when the presentation - of the list changes. - */ -@property (nonatomic, weak) id delegate; - -/*! - Resets the presented list to a new list. This can be called, for example, when a new list is unarchived and - needs to be presented. Calls to this method should wrap the entire sequence of changes in a single - \c -listPresenterWillChangeListLayout:isInitialLayout: and \c -listPresenterDidChangeListLayout:isInitialLayout: - invocation. In more complicated implementations of this method, you can find the intersection / difference - between the new list's presented list items and the old list's presented list items. You can then call into the - remove / update / move delegate methods to inform the delegate of the re-organization. Delegates should - receive updates if the text of a \c AAPLListItem instance has changed. Delegates should also receive a - callback if the new color is different from the old list's color. - - \param list - The new list that the \c AAPLListPresenting instance should present. - */ -- (void)setList:(AAPLList *)list; - -/*! - The color of the presented list. If the new color is different from the old color, the delegate should be - notified through the \c -listPresenter:didUpdateListColorWithColor: method. - */ -@property AAPLListColor color; - -/*! - An archiveable presentation of the list that that presenter is presenting. This commonly returns the underlying - list being manipulated. However, this can be computed based on the current state of the presenter (color, list - items, etc.). If a presenter has changes that are not yet applied to the list, the list returned here should - have those changes applied. - */ -@property (readonly, copy) AAPLList *archiveableList; - -/*! - The presented list items that should be displayed in order. Adopters of the \c AAPLListPresenting protocol can - decide not to show all of the list items within a list. - */ -@property (readonly, copy) NSArray *presentedListItems; - -/*! - A convenience property that should return the equivalent of \c self.presentedListItems.count. - */ -@property (readonly) NSInteger count; - -/*! - A convenience property that should return whether or not there are any presented list items. - */ -@property (readonly, getter=isEmpty) BOOL empty; - -@end \ No newline at end of file diff --git a/Lister/Objective-C/Common/ListerKit.h b/Lister/Objective-C/Common/ListerKit.h deleted file mode 100644 index 8a5a0451..00000000 --- a/Lister/Objective-C/Common/ListerKit.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Umbrella header for the ListerKit framework. -*/ - -@import Foundation; - -// Models -#import -#import - - -// Documents - UI/NSDocument architecture is unavailable on the watch platform. -#if !TARGET_OS_WATCH -#import -#endif - -// Configuration -#import - -// List Presentation -#import -#import -#import -#import - -// UI -#import - -// Custom View Drawing - CoreGraphics and other custom drawing APIs are not available on the watch platform. -#if !TARGET_OS_WATCH -#import -#import -#endif - -#if TARGET_OS_IOS || TARGET_OS_WATCH -#import -#import -#endif - -#if TARGET_OS_IOS -#import -#import -#import -#import -#endif - -#if TARGET_OS_WATCH -#import -#endif - -#if TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IOS || TARGET_OS_WATCH) -#import -#import -#endif diff --git a/Lister/Objective-C/Lister Tests/AAPLAppLaunchContextTests.m b/Lister/Objective-C/Lister Tests/AAPLAppLaunchContextTests.m deleted file mode 100644 index 8bd945e8..00000000 --- a/Lister/Objective-C/Lister Tests/AAPLAppLaunchContextTests.m +++ /dev/null @@ -1,93 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The test case class for the `AAPLAppLaunchContext` class. -*/ - -#import "AAPLAppLaunchContext.h" -@import ListerKit; -@import UIKit; -@import XCTest; - -NSString *const AAPLAppLaunchContextTestsUserActivityType = @"com.example.apple-samplecode.Lister.testing"; - -@interface AAPLAppLaunchContextTests : XCTestCase - -@property (nonatomic, copy) NSArray *listURLs; -@property (nonatomic) AAPLListColor color; - -@end - -@implementation AAPLAppLaunchContextTests - -- (void)setUp { - [super setUp]; - - self.color = AAPLListColorBlue; - - self.listURLs = [[NSBundle mainBundle] URLsForResourcesWithExtension:AAPLAppConfigurationListerFileExtension subdirectory:@""]; -} - -- (void)testUserActivityInitializerWithNSUserActivityDocumentURLKey { - NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:AAPLAppLaunchContextTestsUserActivityType]; - - [userActivity addUserInfoEntriesFromDictionary:@{ - NSUserActivityDocumentURLKey: self.listURLs.firstObject, - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.color) - }]; - - AAPLAppLaunchContext *launchContext = [[AAPLAppLaunchContext alloc] initWithUserActivity:userActivity]; - - XCTAssertEqualObjects(launchContext.listURL.absoluteURL, ((NSURL *)self.listURLs.firstObject).absoluteURL); - XCTAssertEqual(launchContext.listColor, self.color); -} - -- (void)testUserActivityInitializerWithAppConfigurationUserActivityListURLUserInfoKey { - NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:AAPLAppLaunchContextTestsUserActivityType]; - - [userActivity addUserInfoEntriesFromDictionary:@{ - AAPLAppConfigurationUserActivityListURLPathUserInfoKey: ((NSURL *)self.listURLs.firstObject).path, - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.color) - }]; - - AAPLAppLaunchContext *launchContext = [[AAPLAppLaunchContext alloc] initWithUserActivity:userActivity]; - - XCTAssertEqualObjects(launchContext.listURL.absoluteURL, ((NSURL *)self.listURLs.firstObject).absoluteURL); - XCTAssertEqual(launchContext.listColor, self.color); -} - -- (void)testUserActivityInitializerPrefersNSUserActivityDocumentURLKey { - NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:AAPLAppLaunchContextTestsUserActivityType]; - - [userActivity addUserInfoEntriesFromDictionary:@{ - NSUserActivityDocumentURLKey: self.listURLs.firstObject, - AAPLAppConfigurationUserActivityListURLPathUserInfoKey: self.listURLs.lastObject, - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.color) - }]; - - AAPLAppLaunchContext *launchContext = [[AAPLAppLaunchContext alloc] initWithUserActivity:userActivity]; - - XCTAssertEqualObjects(launchContext.listURL.absoluteURL, ((NSURL *)self.listURLs.firstObject).absoluteURL); - XCTAssertEqual(launchContext.listColor, self.color); -} - -- (void)testListerURLSchemeInitializer { - // Construct a URL with the lister scheme and the file path of the document. - NSURLComponents *urlComponents = [[NSURLComponents alloc] init]; - urlComponents.scheme = AAPLAppConfigurationListerSchemeName; - urlComponents.path = ((NSURL *)self.listURLs.firstObject).path; - - // Add a query item to encode the color associated with the list. - NSString *colorQueryValue = [NSString stringWithFormat:@"%ld", (long)self.color]; - NSURLQueryItem *colorQueryItem = [NSURLQueryItem queryItemWithName:AAPLAppConfigurationListerColorQueryKey value:colorQueryValue]; - urlComponents.queryItems = @[colorQueryItem]; - - AAPLAppLaunchContext *launchContext = [[AAPLAppLaunchContext alloc] initWithListerURL:urlComponents.URL]; - - XCTAssertEqualObjects(launchContext.listURL.absoluteURL, ((NSURL *)self.listURLs.firstObject).absoluteURL); - XCTAssertEqual(launchContext.listColor, self.color); -} - -@end diff --git a/Lister/Objective-C/Lister Watch App/Base.lproj/Interface.storyboard b/Lister/Objective-C/Lister Watch App/Base.lproj/Interface.storyboard deleted file mode 100644 index 738aadce..00000000 --- a/Lister/Objective-C/Lister Watch App/Base.lproj/Interface.storyboard +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
- -
diff --git a/Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Contents.json b/Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 7d829a9c..00000000 --- a/Lister/Objective-C/Lister Watch App/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "images" : [ - { - "size" : "24x24", - "idiom" : "watch", - "scale" : "2x", - "role" : "notificationCenter", - "subtype" : "38mm" - }, - { - "size" : "27.5x27.5", - "idiom" : "watch", - "scale" : "2x", - "role" : "notificationCenter", - "subtype" : "42mm" - }, - { - "size" : "29x29", - "idiom" : "watch", - "filename" : "Lister58.png", - "role" : "companionSettings", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "watch", - "filename" : "Lister87.png", - "role" : "companionSettings", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "watch", - "filename" : "Lister80.png", - "scale" : "2x", - "role" : "appLauncher", - "subtype" : "38mm" - }, - { - "size" : "44x44", - "idiom" : "watch", - "scale" : "2x", - "role" : "longLook", - "subtype" : "42mm" - }, - { - "size" : "86x86", - "idiom" : "watch", - "filename" : "Lister172.png", - "scale" : "2x", - "role" : "quickLook", - "subtype" : "38mm" - }, - { - "size" : "98x98", - "idiom" : "watch", - "filename" : "Lister196.png", - "scale" : "2x", - "role" : "quickLook", - "subtype" : "42mm" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Lister/Objective-C/Lister Watch Extension/AAPLExtensionDelegate.h b/Lister/Objective-C/Lister Watch Extension/AAPLExtensionDelegate.h deleted file mode 100644 index 6e1ba0d7..00000000 --- a/Lister/Objective-C/Lister Watch Extension/AAPLExtensionDelegate.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLExtensionDelegate that manages app level behavior for the WatchKit extension. -*/ - -@import WatchKit; - -@interface AAPLExtensionDelegate : NSObject - -/*! - The extension's main interface controller; who is responsible for assigning itself to this property. In - order to enable appropriate messages to be relayed to it from the extension delegate. - */ -@property (nonatomic,strong) WKInterfaceController *mainInterfaceController; - -@end diff --git a/Lister/Objective-C/Lister Watch Extension/AAPLExtensionDelegate.m b/Lister/Objective-C/Lister Watch Extension/AAPLExtensionDelegate.m deleted file mode 100644 index 0be89f96..00000000 --- a/Lister/Objective-C/Lister Watch Extension/AAPLExtensionDelegate.m +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLExtensionDelegate that manages app level behavior for the WatchKit extension. -*/ - -#import "AAPLExtensionDelegate.h" -#import "AAPLListsInterfaceController.h" -#import "AAPLWatchStoryboardConstants.h" - -@implementation AAPLExtensionDelegate - -#pragma mark - WKExtensionDelegate - -- (void)handleUserActivity:(NSDictionary *)userInfo { - [self.mainInterfaceController handleUserActivity:userInfo]; -} - -@end diff --git a/Lister/Objective-C/Lister Watch Extension/AAPLListInterfaceController.h b/Lister/Objective-C/Lister Watch Extension/AAPLListInterfaceController.h deleted file mode 100644 index e4dce8f5..00000000 --- a/Lister/Objective-C/Lister Watch Extension/AAPLListInterfaceController.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInterfaceController interface controller that presents a single list managed by an \c AAPLListPresenting object. -*/ - -@import Foundation; -@import WatchKit; - -@interface AAPLListInterfaceController : WKInterfaceController - -@end \ No newline at end of file diff --git a/Lister/Objective-C/Lister Watch Extension/AAPLListInterfaceController.m b/Lister/Objective-C/Lister Watch Extension/AAPLListInterfaceController.m deleted file mode 100644 index e02458c2..00000000 --- a/Lister/Objective-C/Lister Watch Extension/AAPLListInterfaceController.m +++ /dev/null @@ -1,339 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInterfaceController interface controller that presents a single list managed by an \c AAPLListPresenting object. -*/ - -#import "AAPLListInterfaceController.h" -#import "AAPLListsInterfaceController.h" -#import "AAPLListItemRowController.h" -#import "AAPLWatchStoryboardConstants.h" - -@import WatchConnectivity; -@import ListerKit; - -@interface AAPLListInterfaceController () - -@property (nonatomic,strong) AAPLIncompleteListItemsPresenter *listPresenter; -@property (nonatomic,strong) AAPLListInfo *listInfo; -@property (unsafe_unretained, nonatomic) IBOutlet WKInterfaceTable *interfaceTable; - -@property (copy) NSURL *listURL; -@property (readwrite, retain) NSOperationQueue *presentedItemOperationQueue; - -@property (nonatomic) BOOL presenting; -@property (nonatomic) BOOL hasUnsavedChanges; -@property (nonatomic) BOOL editingDisabled; - -@end - -@implementation AAPLListInterfaceController - -#pragma mark - Initializers - -- (instancetype)init { - self = [super init]; - - if (self) { - _presentedItemOperationQueue = [[NSOperationQueue alloc] init]; - } - - return self; -} - -#pragma mark - Property Overrides - -- (NSURL *)presentedItemURL { - return self.listURL; -} - -#pragma mark - Interface Table Selection - -- (void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex { - if (self.editingDisabled) { return; } - - AAPLListItem *listItem = self.listPresenter.presentedListItems[rowIndex]; - - [self.listPresenter toggleListItem:listItem]; - self.hasUnsavedChanges = YES; -} - -#pragma mark - Actions - -- (IBAction)markAllListItemsAsComplete { - [self.listPresenter updatePresentedListItemsToCompletionState:YES]; -} - -- (IBAction)markAllListItemsAsIncomplete { - [self.listPresenter updatePresentedListItemsToCompletionState:NO]; -} - -- (void)refreshAllData { - NSInteger listItemCount = self.listPresenter.count; - - if (listItemCount > 0) { - // Update the data to show all of the list items. - [self.interfaceTable setNumberOfRows:listItemCount withRowType:AAPLListInterfaceControllerListItemRowType]; - - for (NSInteger idx = 0; idx < listItemCount; idx++) { - [self configureRowControllerAtIndex:idx]; - } - } - else { - // Show a "No Items" row. - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:0]; - - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListInterfaceControllerNoItemsRowType]; - } -} - -#pragma mark - ListPresenterDelegate - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - [self refreshAllData]; -} - -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - // `WKInterfaceTable` objects do not need to be notified of changes to the table, so this is a no op. -} - -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - // The list presenter was previously empty. Remove the "no items" row. - if (index == 0 && self.listPresenter.count == 1) { - [self.interfaceTable removeRowsAtIndexes:indexSet]; - } - - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListInterfaceControllerListItemRowType]; -} - -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - [self.interfaceTable removeRowsAtIndexes:indexSet]; - - // The list presenter is now empty. Add the "no items" row. - if (index == 0 && self.listPresenter.isEmpty) { - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListInterfaceControllerNoItemsRowType]; - } -} - -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - [self configureRowControllerAtIndex:index]; -} - -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color { - for (NSInteger idx = 0; idx < self.listPresenter.count; idx++) { - [self configureRowControllerAtIndex:idx]; - } -} - -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex { - // Remove the item from the fromIndex straight away. - NSIndexSet *fromIndexSet = [[NSIndexSet alloc] initWithIndex:fromIndex]; - [self.interfaceTable removeRowsAtIndexes:fromIndexSet]; - - /* - Determine where to insert the moved item. If the `toIndex` was beyond the `fromIndex`, normalize - its value. - */ - NSIndexSet *toIndexSet; - if (toIndex > fromIndex) { - toIndexSet = [[NSIndexSet alloc] initWithIndex:toIndex - 1]; - } - else { - toIndexSet = [[NSIndexSet alloc] initWithIndex:toIndex]; - } - - [self.interfaceTable insertRowsAtIndexes:toIndexSet withRowType:AAPLListInterfaceControllerListItemRowType]; -} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - if (isInitialLayout) { - // Display all of the list items on the first layout. - [self refreshAllData]; - } -} - -#pragma mark - Convenience - -- (void)addFilePresenterIfNeeded { - if (!self.presenting) { - self.presenting = YES; - [NSFileCoordinator addFilePresenter:self]; - } -} - -- (void)removeFilePresenterIfNeeded { - if (self.presenting) { - self.presenting = NO; - [NSFileCoordinator removeFilePresenter:self]; - } -} - -- (void)setUpInterfaceTable { - self.listPresenter = [[AAPLIncompleteListItemsPresenter alloc] init]; - self.listPresenter.delegate = self; - - [AAPLListUtilities readListAtURL:self.presentedItemURL withCompletionHandler:^(AAPLList *list, NSError *error) { - if (error) { - NSLog(@"Unable to read list at URL."); - } - else { - [self addFilePresenterIfNeeded]; - [self.listPresenter setList:list]; - - /* - Once the document for the list has been found and opened, update the user activity with its URL path - to enable the container iOS app to start directly in this list document. A URL path - is passed instead of a URL because the `userInfo` dictionary of a WatchKit app's user activity - does not allow NSURL values. - */ - NSDictionary *userInfo = @{ - AAPLAppConfigurationUserActivityListURLPathUserInfoKey: self.presentedItemURL.path, - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.listPresenter.color) - }; - - /* - Lister uses a specific user activity name registered in the Info.plist and defined as a constant to - separate this action from the built-in UIDocument handoff support. - */ - [self updateUserActivity:AAPLAppConfigurationUserActivityTypeWatch userInfo:userInfo webpageURL:nil]; - } - }]; -} - -- (void)configureRowControllerAtIndex:(NSInteger)index { - AAPLListItemRowController *listItemRowController = [self.interfaceTable rowControllerAtIndex:index]; - - AAPLListItem *listItem = self.listPresenter.presentedListItems[index]; - - [listItemRowController setText:listItem.text]; - UIColor *textColor = listItem.isComplete ? [UIColor grayColor] : [UIColor whiteColor]; - [listItemRowController setTextColor:textColor]; - - // Update the checkbox image. - NSString *state = listItem.isComplete ? @"checked" : @"unchecked"; - - NSString *colorName = [AAPLNameFromListColor(self.listPresenter.color) lowercaseString]; - - NSString *imageName = [NSString stringWithFormat:@"checkbox-%@-%@", colorName, state]; - - [listItemRowController setCheckBoxImageNamed:imageName]; -} - -- (void)saveUnsavedChangesWithCompletionHandler:(void (^)(BOOL success))completionHandler { - if (!self.hasUnsavedChanges) { - if (completionHandler) { - completionHandler(YES); - } - - return; - } - - [AAPLListUtilities createList:self.listPresenter.archiveableList atURL:self.presentedItemURL withCompletionHandler:^(NSError *error) { - BOOL success; - if (error) { - success = false; - } - else { - success = true; - - WCSession *session = [WCSession defaultSession]; - - for (WCSessionFileTransfer *transfer in session.outstandingFileTransfers) { - if ([transfer.file.fileURL isEqual:self.presentedItemURL]) { - [transfer cancel]; - break; - } - } - - [session transferFile:self.presentedItemURL metadata:nil]; - } - - if (completionHandler) { - completionHandler(success); - } - }]; -} - -#pragma mark - Interface Life Cycle - -- (void)awakeWithContext:(id)context { - NSAssert([context isKindOfClass:[AAPLListInfo class]], @"Expected class of `context` is AAPLListInfo."); - - self.listInfo = context; - NSURL *documentsURL = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].firstObject; - self.listURL = [documentsURL URLByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", self.listInfo.name, AAPLAppConfigurationListerFileExtension]]; - - [self setTitle:self.listInfo.name]; - [self setUpInterfaceTable]; -} - -- (void)willActivate { - // This method is called when watch view controller is about to be visible to user - [super willActivate]; -} - -- (void)didDeactivate { - // This method is called when watch view controller is no longer visible - [super didDeactivate]; - - [self saveUnsavedChangesWithCompletionHandler:^(BOOL success) { - [self removeFilePresenterIfNeeded]; - }]; -} - -#pragma mark - NSFilePresenter - -- (void)relinquishPresentedItemToReader:(void (^)(void (^ __nullable reacquirer)(void)))reader { - self.editingDisabled = YES; - - if (reader) { - reader(^{ - self.editingDisabled = NO; - }); - } -} - -- (void)relinquishPresentedItemToWriter:(void (^)(void (^ __nullable reacquirer)(void)))writer { - self.editingDisabled = YES; - - if (writer) { - writer(^{ - self.editingDisabled = NO; - }); - } -} - -- (void)presentedItemDidChange { - [self setUpInterfaceTable]; -} - -- (void)savePresentedItemChangesWithCompletionHandler:(void (^)(NSError * __nullable errorOrNil))completionHandler { - if (!self.hasUnsavedChanges) { - if (completionHandler) { - completionHandler(nil); - } - - return; - } - - [self saveUnsavedChangesWithCompletionHandler:^(BOOL success) { - if (completionHandler) { - completionHandler(nil); - } - }]; -} - -- (void)presentedItemDidMoveToURL:(NSURL *)newURL { - self.listURL = newURL; -} - -@end - - - diff --git a/Lister/Objective-C/Lister Watch Extension/AAPLListsInterfaceController.h b/Lister/Objective-C/Lister Watch Extension/AAPLListsInterfaceController.h deleted file mode 100644 index e358689b..00000000 --- a/Lister/Objective-C/Lister Watch Extension/AAPLListsInterfaceController.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInterfaceController interface controller that presents a single list managed by an \c AAPLListPresenting object. -*/ - -@import WatchKit; -@import ListerKit; - -@interface AAPLListsInterfaceController : WKInterfaceController -@end diff --git a/Lister/Objective-C/Lister Watch Extension/AAPLListsInterfaceController.m b/Lister/Objective-C/Lister Watch Extension/AAPLListsInterfaceController.m deleted file mode 100644 index d767266e..00000000 --- a/Lister/Objective-C/Lister Watch Extension/AAPLListsInterfaceController.m +++ /dev/null @@ -1,138 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInterfaceController interface controller that presents a single list managed by an \c AAPLListPresenting object. -*/ - -#import "AAPLListsInterfaceController.h" -#import "AAPLExtensionDelegate.h" -#import "AAPLWatchStoryboardConstants.h" -#import "AAPLColoredTextRowController.h" - -@import UIKit; -@import WatchConnectivity; -@import ListerKit; - -@interface AAPLListsInterfaceController () - -@property (nonatomic, strong) AAPLConnectivityListsController *listsController; - -@property (nonatomic, weak) IBOutlet WKInterfaceTable *interfaceTable; - -@end - -@implementation AAPLListsInterfaceController - -- (instancetype)init { - self = [super init]; - - if (self) { - _listsController = [[AAPLConnectivityListsController alloc] init]; - - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:0]; - [_interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListsInterfaceControllerNoListsRowType]; - } - - return self; -} - -#pragma mark - Segues - -- (id)contextForSegueWithIdentifier:(NSString *)segueIdentifier inTable:(WKInterfaceTable *)table rowIndex:(NSInteger)rowIndex { - if ([segueIdentifier isEqualToString:AAPLListsInterfaceControllerListSelectionSegue]) { - AAPLListInfo *listInfo = self.listsController[rowIndex]; - - return listInfo; - } - - return nil; -} - -#pragma mark - AAPLConnectivityListsController - -- (void)listsController:(AAPLConnectivityListsController *)listsController didInsertListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - NSInteger numberOfLists = self.listsController.count; - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - // The lists controller was previously empty. Remove the "no lists" row. - if (index == 0 && numberOfLists == 1) { - [self.interfaceTable removeRowsAtIndexes:indexSet]; - } - - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListsInterfaceControllerListRowType]; - [self configureRowControllerAtIndex:index]; -} - -- (void)listsController:(AAPLConnectivityListsController *)listsController didRemoveListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - NSInteger numberOfLists = self.listsController.count; - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - [self.interfaceTable removeRowsAtIndexes:indexSet]; - - // The lists controller is now empty. Add the "no lists" row. - if (index == 0 && numberOfLists == 0) { - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListsInterfaceControllerNoListsRowType]; - } -} - -- (void)listsController:(AAPLConnectivityListsController *)listsController didUpdateListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - [self configureRowControllerAtIndex:index]; -} - -#pragma mark - Convenience - -- (void)configureRowControllerAtIndex:(NSInteger)index { - AAPLColoredTextRowController *watchListRowController = [self.interfaceTable rowControllerAtIndex:index]; - - AAPLListInfo *listInfo = self.listsController[index]; - - [watchListRowController setColor:AAPLColorFromListColor(listInfo.color)]; - [watchListRowController setText:listInfo.name]; -} - -#pragma mark - Interface Life Cycle - -- (void)willActivate { - AAPLExtensionDelegate *extensionDelegate = [WKExtension sharedExtension].delegate; - - if (extensionDelegate) { - extensionDelegate.mainInterfaceController = self; - } - - // If the `AAPLListsController` is activating, we should invalidate any pending user activities. - [self invalidateUserActivity]; - - self.listsController.delegate = self; - - [self.listsController startSearching]; -} - -- (void)didDeactivate { - [self.listsController stopSearching]; -} - -- (void)handleUserActivity:(NSDictionary *)userInfo { - // The Lister watch app only supports continuing activities where `AAPLAppConfigurationUserActivityListURLPathUserInfoKey` is provided. - NSString *listInfoFilePath = userInfo[AAPLAppConfigurationUserActivityListURLPathUserInfoKey]; - - - // If no `listInfoFilePath` is found, there is no activity of interest to handle. - if (!listInfoFilePath) { - return; - } - - // Create an `AAPLListInfo` that represents the list at `listInfoFilePath`. - AAPLListInfo *listInfo = [[AAPLListInfo alloc] init]; - listInfo.name = listInfoFilePath.lastPathComponent.stringByDeletingPathExtension; - listInfo.color = [userInfo[AAPLAppConfigurationUserActivityListColorUserInfoKey] integerValue]; - - // Present an `AAPLListInterfaceController`. - [self pushControllerWithName:AAPLListInterfaceControllerName context:listInfo]; -} - -@end - - - diff --git a/Lister/Objective-C/Lister Watch Extension/Glance/AAPLGlanceInterfaceController.h b/Lister/Objective-C/Lister Watch Extension/Glance/AAPLGlanceInterfaceController.h deleted file mode 100644 index f676467a..00000000 --- a/Lister/Objective-C/Lister Watch Extension/Glance/AAPLGlanceInterfaceController.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Controls the interface of the Glance. The controller displays statistics about the Today list. -*/ - -@import Foundation; -@import WatchKit; - -@interface AAPLGlanceInterfaceController : WKInterfaceController - -@end diff --git a/Lister/Objective-C/Lister Watch Extension/Glance/AAPLGlanceInterfaceController.m b/Lister/Objective-C/Lister Watch Extension/Glance/AAPLGlanceInterfaceController.m deleted file mode 100644 index 1be7df49..00000000 --- a/Lister/Objective-C/Lister Watch Extension/Glance/AAPLGlanceInterfaceController.m +++ /dev/null @@ -1,246 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Controls the interface of the Glance. The controller displays statistics about the Today list. -*/ - -#import "AAPLGlanceInterfaceController.h" -#import "AAPLWatchStoryboardConstants.h" -#import "AAPLGlanceBadge.h" -@import ListerKit; - -@interface AAPLGlanceInterfaceController() - -@property (nonatomic, weak) IBOutlet WKInterfaceImage *glanceBadgeImage; -@property (nonatomic, weak) IBOutlet WKInterfaceGroup *glanceBadgeGroup; -@property (nonatomic, weak) IBOutlet WKInterfaceLabel *remainingItemsLabel; - -@property (nonatomic, strong) AAPLConnectivityListsController *listsController; -@property (nonatomic, strong) AAPLAllListItemsPresenter *listPresenter; - -@property (nonatomic, getter=isPresenting) BOOL presenting; - -@property (copy) NSURL *listURL; -@property (readwrite, retain) NSOperationQueue *presentedItemOperationQueue; - -/// These properties track the underlying values that represent the badge. -@property (nonatomic) NSInteger presentedTotalListItemCount; -@property (nonatomic) NSInteger presentedCompleteListItemCount; - -@end - -/*! - Represents an undefined state for either the \c presentedTotalListItemCount or \c presentedCompleteListItemCount - properties. - */ -const NSInteger AAPLGlanceInterfaceControllerCountUndefined = -1; - -@implementation AAPLGlanceInterfaceController - -#pragma mark - Initializers - -- (instancetype)init { - self = [super init]; - - if (self) { - _presentedItemOperationQueue = [[NSOperationQueue alloc] init]; - - _presentedTotalListItemCount = AAPLGlanceInterfaceControllerCountUndefined; - _presentedCompleteListItemCount = AAPLGlanceInterfaceControllerCountUndefined; - } - - return self; -} - -#pragma mark - Property Overrides - -- (NSURL *)presentedItemURL { - return self.listURL; -} - -#pragma mark - Setup - -- (void)setUpInterface { - // If no previously presented data exists, clear the initial UI elements. - if (self.presentedCompleteListItemCount == AAPLGlanceInterfaceControllerCountUndefined && - self.presentedTotalListItemCount == AAPLGlanceInterfaceControllerCountUndefined) { - [self.glanceBadgeGroup setBackgroundImage:nil]; - [self.glanceBadgeImage setImage:nil]; - [self.remainingItemsLabel setHidden:YES]; - } - - [self initializeListController]; -} - -- (void)initializeListController { - NSString *localizedTodayListName = [AAPLAppConfiguration sharedAppConfiguration].localizedTodayDocumentName; - - self.listsController = [[AAPLConnectivityListsController alloc] initWithListName:localizedTodayListName]; - - self.listsController.delegate = self; - - [self.listsController startSearching]; -} - -#pragma mark - AAPLListsControllerDelegate - -- (void)listsController:(AAPLConnectivityListsController *)listsController didInsertListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - // Once we've found the Today list, we'll hand off ownership of listening to udpates to the list presenter. - [self.listsController stopSearching]; - - // Update the badge with the Today list info. - [self processListInfoAsTodayDocument:listInfo]; -} - -#pragma mark - AAPLListPresenterDelegate - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - // Since the list changed completely, show present the Glance badge. - [self presentGlanceBadge]; -} - -/*! - These methods are no ops because all of the data is bulk rendered after the the content changes. This can - occur in \c -listPresenterDidRefreshCompleteLayout: or in \c -listPresenterDidChangeListLayout:isInitialLayout:. - */ -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout {} -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color {} -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex {} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - /* - The list's layout changed. However, since we don't care that a small detail about the list changed, - we're going to re-animate the badge. - */ - [self presentGlanceBadge]; -} - -#pragma mark - Lifecycle - -- (void)willActivate { - /* - Setup the interface in `willActivate` to ensure the interface is refreshed each time the interface - controller is presented. - */ - [self setUpInterface]; -} - -- (void)didDeactivate { - [self.listsController stopSearching]; - self.listsController.delegate = nil; - self.listsController = nil; - - [self removeFilePresenterIfNeeded]; -} - -#pragma mark - Convenience - -- (void)addFilePresenterIfNeeded { - if (!self.presenting) { - self.presenting = YES; - [NSFileCoordinator addFilePresenter:self]; - } -} - -- (void)removeFilePresenterIfNeeded { - if (self.presenting) { - self.presenting = NO; - [NSFileCoordinator removeFilePresenter:self]; - } -} - -- (void)processListInfoAsTodayDocument:(AAPLListInfo *)listInfo { - self.listPresenter = [[AAPLAllListItemsPresenter alloc] init]; - - self.listPresenter.delegate = self; - - NSURL *documentsURL = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].firstObject; - self.listURL = [documentsURL URLByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", listInfo.name, AAPLAppConfigurationListerFileExtension]]; - - [self readTodayDocument]; -} - -- (void)readTodayDocument { - [AAPLListUtilities readListAtURL:self.presentedItemURL withCompletionHandler:^(AAPLList *list, NSError *error) { - if (error) { - NSLog(@"Couldn't open document: %@.", self.presentedItemURL.absoluteString); - } - else { - [self addFilePresenterIfNeeded]; - [self.listPresenter setList:list]; - - /* - Once the Today document has been found and opened, update the user activity with its URL path - to enable a tap on the glance to jump directly to the Today document in the watch app. A URL path - is passed instead of a URL because the `userInfo` dictionary of a WatchKit app's user activity - does not allow NSURL values. - */ - NSDictionary *userInfo = @{ - AAPLAppConfigurationUserActivityListURLPathUserInfoKey: self.presentedItemURL.path, - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.listPresenter.color) - }; - - /* - Lister uses a specific user activity name registered in the Info.plist and defined as a constant to - separate this action from the built-in UIDocument handoff support. - */ - [self updateUserActivity:AAPLAppConfigurationUserActivityTypeWatch userInfo:userInfo webpageURL:nil]; - } - }]; -} - -- (void)presentGlanceBadge { - NSInteger totalListItemCount = self.listPresenter.count; - - NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"isComplete == YES"]; - NSArray *completeListItems = [self.listPresenter.presentedListItems filteredArrayUsingPredicate:filterPredicate]; - NSInteger completeListItemCount = completeListItems.count; - - /* - If the `totalListItemCount` and the `completeListItemCount` haven't changed, there's no need to re-present - the badge. - */ - if (self.presentedTotalListItemCount == totalListItemCount && self.presentedCompleteListItemCount == completeListItemCount) { - return; - } - - // Update `totalListItemCount` and the `completeListItemCount`. - self.presentedTotalListItemCount = totalListItemCount; - self.presentedCompleteListItemCount = completeListItemCount; - - // Construct and present the new badge. - AAPLGlanceBadge *glanceBadge = [[AAPLGlanceBadge alloc] initWithTotalItemCount:totalListItemCount completeItemCount:completeListItemCount]; - - [self.glanceBadgeGroup setBackgroundImage:glanceBadge.groupBackgroundImage]; - [self.glanceBadgeImage setImageNamed:glanceBadge.imageName]; - [self.glanceBadgeImage startAnimatingWithImagesInRange:glanceBadge.imageRange duration:glanceBadge.animationDuration repeatCount:1]; - - /* - Create a localized string for the # items remaining in the Glance badge. The string is retrieved from - the Localizable.stringsdict file. - */ - NSString *itemsRemainingText = [NSString localizedStringWithFormat:NSLocalizedString(@"%d items left", nil), glanceBadge.incompleteItemCount]; - [self.remainingItemsLabel setText:itemsRemainingText]; - [self.remainingItemsLabel setHidden:NO]; -} - -#pragma mark - NSFilePresenter - -- (void)relinquishPresentedItemToWriter:(void (^)(void (^ __nullable reacquirer)(void)))writer { - if (writer) { - writer(^{ - [self readTodayDocument]; - }); - } -} - -- (void)presentedItemDidMoveToURL:(NSURL *)newURL { - self.listURL = newURL; -} - -@end diff --git a/Lister/Objective-C/Lister Watch Extension/Info.plist b/Lister/Objective-C/Lister Watch Extension/Info.plist deleted file mode 100644 index 0fb8287b..00000000 --- a/Lister/Objective-C/Lister Watch Extension/Info.plist +++ /dev/null @@ -1,42 +0,0 @@ - - - - - AAPLListerBundlePrefix - ${LISTER_BUNDLE_PREFIX} - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Lister Watch Extension - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - XPC! - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - 6 - NSExtension - - NSExtensionAttributes - - WKAppBundleIdentifier - ${LISTER_BUNDLE_PREFIX}.Lister.nativewatchkitapp - - NSExtensionPointIdentifier - com.apple.watchkit - - RemoteInterfacePrincipalClass - AAPLListsInterfaceController - WKExtensionDelegateClassName - AAPLExtensionDelegate - - diff --git a/Lister/Objective-C/Lister Watch Extension/Localizable.stringsdict b/Lister/Objective-C/Lister Watch Extension/Localizable.stringsdict deleted file mode 100644 index b1e144f0..00000000 --- a/Lister/Objective-C/Lister Watch Extension/Localizable.stringsdict +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - %d items left - - NSStringLocalizedFormatKey - %#@items@ - items - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - d - zero - Great job! - one - One left! - other - %d items left - - - - diff --git a/Lister/Objective-C/Lister WatchKit App/Base.lproj/Interface.storyboard b/Lister/Objective-C/Lister WatchKit App/Base.lproj/Interface.storyboard deleted file mode 100644 index e1fdbbbe..00000000 --- a/Lister/Objective-C/Lister WatchKit App/Base.lproj/Interface.storyboard +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
- -
diff --git a/Lister/Objective-C/Lister WatchKit App/Info.plist b/Lister/Objective-C/Lister WatchKit App/Info.plist deleted file mode 100644 index b1e09646..00000000 --- a/Lister/Objective-C/Lister WatchKit App/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Lister - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - 6 - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - WKCompanionAppBundleIdentifier - ${LISTER_BUNDLE_PREFIX}.Lister - WKWatchKitApp - - - diff --git a/Lister/Objective-C/Lister WatchKit Common/AAPLColoredTextRowController.h b/Lister/Objective-C/Lister WatchKit Common/AAPLColoredTextRowController.h deleted file mode 100644 index 52c5af51..00000000 --- a/Lister/Objective-C/Lister WatchKit Common/AAPLColoredTextRowController.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLColoredTextRowController class defines a simple interface that the \c AAPLListsInterfaceController uses to represent an \c AAPLList object in the table. -*/ - -@import UIKit; - -/*! - A lightweight controller object that is responsible for displaying the content in a group within the - \c AAPLListsInterfaceController controller's \c WKInterfaceTable property. - */ -@interface AAPLColoredTextRowController : NSObject - -- (void)setText:(NSString *)text; -- (void)setColor:(UIColor *)color; - -@end diff --git a/Lister/Objective-C/Lister WatchKit Common/AAPLColoredTextRowController.m b/Lister/Objective-C/Lister WatchKit Common/AAPLColoredTextRowController.m deleted file mode 100644 index 2aa2cf9f..00000000 --- a/Lister/Objective-C/Lister WatchKit Common/AAPLColoredTextRowController.m +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLColoredTextRowController class defines a simple interface that the \c AAPLListsInterfaceController uses to represent an \c AAPLList object in the table. -*/ - -#import "AAPLColoredTextRowController.h" -@import WatchKit; - -@interface AAPLColoredTextRowController () - -@property (nonatomic, weak) IBOutlet WKInterfaceGroup *listColorGroup; -@property (nonatomic, weak) IBOutlet WKInterfaceLabel *textLabel; - -@end - -@implementation AAPLColoredTextRowController - -- (void)setText:(NSString *)text { - [self.textLabel setText:text]; -} - -- (void)setColor:(UIColor *)color { - [self.listColorGroup setBackgroundColor:color]; -} - -@end diff --git a/Lister/Objective-C/Lister WatchKit Common/AAPLListItemRowController.h b/Lister/Objective-C/Lister WatchKit Common/AAPLListItemRowController.h deleted file mode 100644 index ae08c5e8..00000000 --- a/Lister/Objective-C/Lister WatchKit Common/AAPLListItemRowController.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Defines the row controllers used in the \c AAPLListInterfaceController class. -*/ - -@import WatchKit; - -/// An empty row controller that is displayed when there are no list items in a list. -@interface AAPLNoItemsRowController : NSObject -@end - -/*! - A row controller that represents a \c AAPLListItem object. The \c AAPLListItemRowController is used by the - \c AAPLListInterfaceController. - */ -@interface AAPLListItemRowController : NSObject - -- (void)setText:(NSString *)text; -- (void)setTextColor:(UIColor *)color; -- (void)setCheckBoxImageNamed:(NSString *)imageName; - -@end diff --git a/Lister/Objective-C/Lister WatchKit Common/AAPLListItemRowController.m b/Lister/Objective-C/Lister WatchKit Common/AAPLListItemRowController.m deleted file mode 100644 index d94416bc..00000000 --- a/Lister/Objective-C/Lister WatchKit Common/AAPLListItemRowController.m +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Defines the row controllers used in the \c AAPLListInterfaceController class. -*/ - -#import "AAPLListItemRowController.h" - -@implementation AAPLNoItemsRowController -@end - -@interface AAPLListItemRowController () - -@property (nonatomic, weak) IBOutlet WKInterfaceLabel *textLabel; - -@property (nonatomic, weak) IBOutlet WKInterfaceImage *checkBox; - -@end - -@implementation AAPLListItemRowController - -- (void)setText:(NSString *)text { - [self.textLabel setText:text]; -} - -- (void)setTextColor:(UIColor *)color { - [self.textLabel setTextColor:color]; -} - -- (void)setCheckBoxImageNamed:(NSString *)imageName { - [self.checkBox setImageNamed:imageName]; -} - -@end diff --git a/Lister/Objective-C/Lister WatchKit Common/AAPLWatchStoryboardConstants.h b/Lister/Objective-C/Lister WatchKit Common/AAPLWatchStoryboardConstants.h deleted file mode 100644 index f0fc915d..00000000 --- a/Lister/Objective-C/Lister WatchKit Common/AAPLWatchStoryboardConstants.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Constants used in Lister's WatchKit app storyboard. These are centralized here for convenience throughout the rest of the application. -*/ - -@import Foundation; - -#pragma mark - AAPLListsInterfaceController - -extern NSString *const AAPLListsInterfaceControllerListRowType; -extern NSString *const AAPLListsInterfaceControllerNoListsRowType; - -extern NSString *const AAPLListsInterfaceControllerListSelectionSegue; - -#pragma mark - AAPLListInterfaceController - -extern NSString *const AAPLListInterfaceControllerName; - -extern NSString *const AAPLListInterfaceControllerListItemRowType; -extern NSString *const AAPLListInterfaceControllerNoItemsRowType; diff --git a/Lister/Objective-C/Lister WatchKit Common/AAPLWatchStoryboardConstants.m b/Lister/Objective-C/Lister WatchKit Common/AAPLWatchStoryboardConstants.m deleted file mode 100644 index 3b4bbe02..00000000 --- a/Lister/Objective-C/Lister WatchKit Common/AAPLWatchStoryboardConstants.m +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Constants used in Lister's WatchKit app storyboard. These are centralized here for convenience throughout the rest of the application. -*/ - -#import "AAPLWatchStoryboardConstants.h" - -#pragma mark - AAPLListsInterfaceController - -NSString *const AAPLListsInterfaceControllerListRowType = @"ListsInterfaceControllerListRowType"; -NSString *const AAPLListsInterfaceControllerNoListsRowType = @"ListsInterfaceControllerNoListsRowType"; - -NSString *const AAPLListsInterfaceControllerListSelectionSegue = @"ListsInterfaceControllerListSelectionSegue"; - -#pragma mark - AAPLListInterfaceController - -NSString *const AAPLListInterfaceControllerName = @"ListInterfaceController"; - -NSString *const AAPLListInterfaceControllerListItemRowType = @"ListInterfaceControllerListItemRowType"; -NSString *const AAPLListInterfaceControllerNoItemsRowType = @"ListInterfaceControllerNoItemsRowType"; diff --git a/Lister/Objective-C/Lister WatchKit Common/Glance/AAPLGlanceBadge.h b/Lister/Objective-C/Lister WatchKit Common/Glance/AAPLGlanceBadge.h deleted file mode 100644 index b9b6a713..00000000 --- a/Lister/Objective-C/Lister WatchKit Common/Glance/AAPLGlanceBadge.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A class that contains all the information needed to display the circular progress indicator badge in the Glance. -*/ - -@import WatchKit; - -/*! - The \c AAPLGlanceBadge class is responsible for rendering the glance badge text found in the Glance. It's also - responsible for maintaining the image and animation information for the circular indicator displayed in the - Glance. The information is calculated based on the percentage of complete items out of the total number - of items. - */ -@interface AAPLGlanceBadge : NSObject - -- (instancetype)initWithTotalItemCount:(NSInteger)totalItemCount completeItemCount:(NSInteger)completeItemCount; - -/// The total number of items. -@property (readonly) NSInteger totalItemCount; - -/// The number of complete items. -@property (readonly) NSInteger completeItemCount; - -/// The number of incomplete items. -@property (readonly) NSInteger incompleteItemCount; - -/// The image name of the image to be used for the Glance badge. -@property (readonly) NSString *imageName; - -/// The range of images to display in the Glance badge. -@property (readonly) NSRange imageRange; - -/// The length that the Glance badge image will animate. -@property (readonly) NSTimeInterval animationDuration; - -/*! - The background image to be displayed in the Glance badge. The \c groupBackgroundImage draws the text that - containing the number of remaining items to complete. - */ -@property (readonly) UIImage *groupBackgroundImage; - -@end diff --git a/Lister/Objective-C/Lister WatchKit Common/Glance/AAPLGlanceBadge.m b/Lister/Objective-C/Lister WatchKit Common/Glance/AAPLGlanceBadge.m deleted file mode 100644 index 23ef4f29..00000000 --- a/Lister/Objective-C/Lister WatchKit Common/Glance/AAPLGlanceBadge.m +++ /dev/null @@ -1,135 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A class that contains all the information needed to display the circular progress indicator badge in the Glance. -*/ - -#import "AAPLGlanceBadge.h" - -@import UIKit; - -const NSTimeInterval AAPLGlanceInterfaceControllerMaxDuration = 0.75; - -@interface AAPLGlanceBadge () - -@property (readwrite) NSInteger totalItemCount; - -@property (readwrite) NSInteger completeItemCount; - -@property (readwrite) NSInteger incompleteItemCount; - -@property CGFloat percentage; - -@property (readonly) NSInteger rangeLength; - -/// The color that is used to draw the number of complete items. -@property (readonly) UIColor *completeTextPathColor; - -@property (readonly) CGSize groupBackgroundImageSize; - -@end - -@implementation AAPLGlanceBadge -@dynamic completeTextPathColor; - -#pragma mark - Initializers - -- (instancetype)initWithTotalItemCount:(NSInteger)totalItemCount completeItemCount:(NSInteger)completeItemCount { - self = [super init]; - - if (self) { - _totalItemCount = totalItemCount; - - _completeItemCount = completeItemCount; - - _incompleteItemCount = _totalItemCount - _completeItemCount; - - _percentage = _totalItemCount > 0.0 ? (CGFloat)_completeItemCount / (CGFloat)_totalItemCount : 0.0; - - _groupBackgroundImageSize = CGSizeMake(136, 101); - } - - return self; -} - -#pragma mark - Property Overrides - -- (UIColor *)completeTextPathColor { - return [UIColor colorWithHue:199.0/360.0 saturation:0.64 brightness:0.98 alpha:1.0]; -} - -- (NSString *)imageName { - return @"glance-"; -} - -- (NSRange)imageRange { - return NSMakeRange(0, self.rangeLength); -} - -- (NSTimeInterval)animationDuration { - return self.percentage * AAPLGlanceInterfaceControllerMaxDuration; -} - -- (UIImage *)groupBackgroundImage { - UIGraphicsBeginImageContextWithOptions(self.groupBackgroundImageSize, false, 2.0); - - [self drawCompleteItemsCountInCurrentContext]; - - UIImage *frame = UIGraphicsGetImageFromCurrentImageContext(); - - UIGraphicsEndImageContext(); - - return frame; -} - -/*! - Determines the number of images to animate based on \c percentage. If \c percentage is larger than 1.0, - the \c rangeLength is the total number of available images. - */ -- (NSInteger)rangeLength { - CGFloat normalizedPercentage = self.percentage; - - if (normalizedPercentage > 1.0) { - normalizedPercentage = 1.0; - } - else if (normalizedPercentage == 0.0) { - return 1; - } - - return ceil(self.percentage * 45); -} - -#pragma mark - Drawing - -/// Draw the text containing the number of complete items. -- (void)drawCompleteItemsCountInCurrentContext { - CGPoint center = CGPointMake(self.groupBackgroundImageSize.width / 2.0, self.groupBackgroundImageSize.height / 2.0); - - NSString *itemsCompleteText = [NSString stringWithFormat:@"%ld", (long)self.completeItemCount]; - - NSDictionary *completeAttributes = @{ - NSFontAttributeName: [UIFont systemFontOfSize: 36], - NSForegroundColorAttributeName: self.completeTextPathColor - }; - - CGSize completeSize = [itemsCompleteText sizeWithAttributes:completeAttributes]; - - // Build and gather information about the done string. - NSString *doneText = NSLocalizedString(@"Done", @""); - NSDictionary *doneAttributes = @{ - NSFontAttributeName: [UIFont systemFontOfSize: 16], - NSForegroundColorAttributeName: [UIColor darkGrayColor] - }; - CGSize doneSize = [doneText sizeWithAttributes:doneAttributes]; - - CGRect completeRect = CGRectMake(center.x - 0.5 * completeSize.width, center.y - 0.5 * completeSize.height - 0.5 * doneSize.height, completeSize.width, completeSize.height); - CGRect doneRect = CGRectMake(center.x - 0.5 * doneSize.width, center.y + 0.125 * doneSize.height, doneSize.width, doneSize.height); - - [itemsCompleteText drawInRect:CGRectIntegral(completeRect) withAttributes:completeAttributes]; - - [doneText drawInRect:CGRectIntegral(doneRect) withAttributes:doneAttributes]; -} - -@end diff --git a/Lister/Objective-C/Lister WatchKit Extension/AAPLListInterfaceController.h b/Lister/Objective-C/Lister WatchKit Extension/AAPLListInterfaceController.h deleted file mode 100644 index 288b2a84..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/AAPLListInterfaceController.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInterfaceController interface controller that presents a single list managed by an \c AAPLListPresenting object. -*/ - -@import WatchKit; - -/*! - The interface controller that presents a list. The interface controller listens for changes to how the list - should be presented by the list presenter. - */ -@interface AAPLListInterfaceController : WKInterfaceController -@end diff --git a/Lister/Objective-C/Lister WatchKit Extension/AAPLListInterfaceController.m b/Lister/Objective-C/Lister WatchKit Extension/AAPLListInterfaceController.m deleted file mode 100644 index 778fc62a..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/AAPLListInterfaceController.m +++ /dev/null @@ -1,211 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInterfaceController that presents a single list managed by an \c AAPLListPresenting object. -*/ - -#import "AAPLListInterfaceController.h" -#import "AAPLListItemRowController.h" -#import "AAPLWatchStoryboardConstants.h" -@import ListerKit; - -@interface AAPLListInterfaceController () - -@property (nonatomic, weak) IBOutlet WKInterfaceTable *interfaceTable; - -@property (nonatomic, strong) AAPLListDocument *listDocument; - -@property (nonatomic, readonly) AAPLIncompleteListItemsPresenter *listPresenter; - -@end - -@implementation AAPLListInterfaceController - -#pragma mark - Property Overrides - -- (AAPLIncompleteListItemsPresenter *)listPresenter { - return self.listDocument.listPresenter; -} - -#pragma mark - Interface Table Selection - -- (void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex { - AAPLListItem *listItem = self.listPresenter.presentedListItems[rowIndex]; - - [self.listPresenter toggleListItem:listItem]; -} - -#pragma mark - Actions - -- (IBAction)markAllListItemsAsComplete { - [self.listPresenter updatePresentedListItemsToCompletionState:YES]; -} - -- (IBAction)markAllListItemsAsIncomplete { - [self.listPresenter updatePresentedListItemsToCompletionState:NO]; -} - -- (void)refreshAllData { - NSInteger listItemCount = self.listPresenter.count; - - if (listItemCount > 0) { - // Update the data to show all of the list items. - [self.interfaceTable setNumberOfRows:listItemCount withRowType:AAPLListInterfaceControllerListItemRowType]; - - for (NSInteger idx = 0; idx < listItemCount; idx++) { - [self configureRowControllerAtIndex:idx]; - } - } - else { - // Show a "No Items" row. - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:0]; - - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListInterfaceControllerNoItemsRowType]; - } -} - -#pragma mark - ListPresenterDelegate - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - [self refreshAllData]; -} - -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - // `WKInterfaceTable` objects do not need to be notified of changes to the table, so this is a no op. -} - -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - // The list presenter was previously empty. Remove the "no items" row. - if (index == 0 && self.listPresenter.count == 1) { - [self.interfaceTable removeRowsAtIndexes:indexSet]; - } - - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListInterfaceControllerListItemRowType]; -} - -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - [self.interfaceTable removeRowsAtIndexes:indexSet]; - - // The list presenter is now empty. Add the "no items" row. - if (index == 0 && self.listPresenter.isEmpty) { - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListInterfaceControllerNoItemsRowType]; - } -} - -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - [self configureRowControllerAtIndex:index]; -} - -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color { - for (NSInteger idx = 0; idx < self.listPresenter.count; idx++) { - [self configureRowControllerAtIndex:idx]; - } -} - -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex { - // Remove the item from the fromIndex straight away. - NSIndexSet *fromIndexSet = [[NSIndexSet alloc] initWithIndex:fromIndex]; - [self.interfaceTable removeRowsAtIndexes:fromIndexSet]; - - /* - Determine where to insert the moved item. If the `toIndex` was beyond the `fromIndex`, normalize - its value. - */ - NSIndexSet *toIndexSet; - if (toIndex > fromIndex) { - toIndexSet = [[NSIndexSet alloc] initWithIndex:toIndex - 1]; - } - else { - toIndexSet = [[NSIndexSet alloc] initWithIndex:toIndex]; - } - - [self.interfaceTable insertRowsAtIndexes:toIndexSet withRowType:AAPLListInterfaceControllerListItemRowType]; -} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - if (isInitialLayout) { - // Display all of the list items on the first layout. - [self refreshAllData]; - } - else { - /* - The underlying document changed because of user interaction (this event only occurs if the list - presenter's underlying list presentation changes based on user interaction). - */ - [self.listDocument updateChangeCount:UIDocumentChangeDone]; - } -} - -#pragma mark - Convenience - -- (void)setUpInterfaceTable { - self.listDocument.listPresenter = [[AAPLIncompleteListItemsPresenter alloc] init]; - - self.listPresenter.delegate = self; - - [self.listDocument openWithCompletionHandler:^(BOOL success) { - if (!success) { - NSLog(@"Couldn't open document: %@.", self.listDocument.fileURL); - } - - /* - Once the Today document has been found and opened, update the user activity with its URL path - to enable a tap on the container iOS app to to start directly in this list document. A URL path - is passed instead of a URL because the `userInfo` dictionary of a WatchKit app's user activity - does not allow NSURL values. - */ - NSDictionary *userInfo = @{ - AAPLAppConfigurationUserActivityListURLPathUserInfoKey: self.listDocument.fileURL.path, - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.listPresenter.color) - }; - - /* - Lister uses a specific user activity name registered in the Info.plist and defined as a constant to - separate this action from the built-in UIDocument handoff support. - */ - [self updateUserActivity:AAPLAppConfigurationUserActivityTypeWatch userInfo:userInfo webpageURL:nil]; - }]; -} - -- (void)configureRowControllerAtIndex:(NSInteger)index { - AAPLListItemRowController *listItemRowController = [self.interfaceTable rowControllerAtIndex:index]; - - AAPLListItem *listItem = self.listPresenter.presentedListItems[index]; - - [listItemRowController setText:listItem.text]; - UIColor *textColor = listItem.isComplete ? [UIColor grayColor] : [UIColor whiteColor]; - [listItemRowController setTextColor:textColor]; - - // Update the checkbox image. - NSString *state = listItem.isComplete ? @"checked" : @"unchecked"; - - NSString *colorName = [AAPLNameFromListColor(self.listPresenter.color) lowercaseString]; - - NSString *imageName = [NSString stringWithFormat:@"checkbox-%@-%@", colorName, state]; - - [listItemRowController setCheckBoxImageNamed:imageName]; -} - -#pragma mark - Interface Life Cycle - -- (void)awakeWithContext:(id)context { - NSAssert([context isKindOfClass:[AAPLListInfo class]], @"Expected class of `context` is AAPLListInfo."); - - AAPLListInfo *listInfo = context; - self.listDocument = [[AAPLListDocument alloc] initWithFileURL:listInfo.URL]; - - [self setTitle:listInfo.name]; - [self setUpInterfaceTable]; -} - -- (void)didDeactivate { - [self.listDocument closeWithCompletionHandler:nil]; -} - -@end diff --git a/Lister/Objective-C/Lister WatchKit Extension/AAPLListsInterfaceController.h b/Lister/Objective-C/Lister WatchKit Extension/AAPLListsInterfaceController.h deleted file mode 100644 index ff420761..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/AAPLListsInterfaceController.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInterfaceController that presents a single list managed by a \c AAPLListPresenting instance. -*/ - -@import WatchKit; - -@interface AAPLListsInterfaceController : WKInterfaceController -@end diff --git a/Lister/Objective-C/Lister WatchKit Extension/AAPLListsInterfaceController.m b/Lister/Objective-C/Lister WatchKit Extension/AAPLListsInterfaceController.m deleted file mode 100644 index 78034beb..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/AAPLListsInterfaceController.m +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInterfaceController that presents a single list managed by a \c AAPLListPresenting instance. -*/ - -#import "AAPLListsInterfaceController.h" -#import "AAPLWatchStoryboardConstants.h" -#import "AAPLColoredTextRowController.h" -@import ListerKit; - -@interface AAPLListsInterfaceController () - -@property (nonatomic, strong) AAPLListsController *listsController; - -@property (nonatomic, weak) IBOutlet WKInterfaceTable *interfaceTable; - -@end - - -@implementation AAPLListsInterfaceController - -- (instancetype)init { - self = [super init]; - - if (self) { - _listsController = [[AAPLAppConfiguration sharedAppConfiguration] listsControllerForCurrentConfigurationWithPathExtension:AAPLAppConfigurationListerFileExtension firstQueryHandler:nil]; - - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:0]; - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListsInterfaceControllerNoListsRowType]; - - if ([AAPLAppConfiguration sharedAppConfiguration].isFirstLaunch) { - NSLog(@"Lister does not currently support configuring a storage option before the iOS app is launched. Please launch the iOS app first. See the Release Notes section in README.md for more information."); - } - } - - return self; -} - -#pragma mark - Segues - -- (id)contextForSegueWithIdentifier:(NSString *)segueIdentifier inTable:(WKInterfaceTable *)table rowIndex:(NSInteger)rowIndex { - if ([segueIdentifier isEqualToString:AAPLListsInterfaceControllerListSelectionSegue]) { - AAPLListInfo *listInfo = self.listsController[rowIndex]; - - return listInfo; - } - - return nil; -} - -#pragma mark - AAPLListsControllerDelegate - -- (void)listsController:(AAPLListsController *)listsController didInsertListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - NSInteger numberOfLists = self.listsController.count; - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - // The lists controller was previously empty. Remove the "no lists" row. - if (index == 0 && numberOfLists == 1) { - [self.interfaceTable removeRowsAtIndexes:indexSet]; - } - - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListsInterfaceControllerListRowType]; - [self configureRowControllerAtIndex:index]; -} - -- (void)listsController:(AAPLListsController *)listsController didRemoveListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - NSInteger numberOfLists = self.listsController.count; - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - [self.interfaceTable removeRowsAtIndexes:indexSet]; - - // The lists controller is now empty. Add the "no lists" row. - if (index == 0 && numberOfLists == 0) { - [self.interfaceTable insertRowsAtIndexes:indexSet withRowType:AAPLListsInterfaceControllerNoListsRowType]; - } -} - -- (void)listsController:(AAPLListsController *)listsController didUpdateListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - [self configureRowControllerAtIndex:index]; -} - -#pragma mark - Convenience - -- (void)configureRowControllerAtIndex:(NSInteger)index { - AAPLColoredTextRowController *watchListRowController = [self.interfaceTable rowControllerAtIndex:index]; - - AAPLListInfo *listInfo = self.listsController[index]; - - [watchListRowController setText:listInfo.name]; - - [listInfo fetchInfoWithCompletionHandler:^{ - /* - The fetchInfoWithCompletionHandler: method calls its completion handler on a background - queue, dispatch back to the main queue to make UI updates. - */ - dispatch_async(dispatch_get_main_queue(), ^{ - AAPLColoredTextRowController *watchListRowController = [self.interfaceTable rowControllerAtIndex:index]; - - [watchListRowController setColor:AAPLColorFromListColor(listInfo.color)]; - }); - }]; -} - -#pragma mark - Interface Life Cycle - -- (void)willActivate { - // If the `AAPLListsController` is activating, we should invalidate any pending user activities. - [self invalidateUserActivity]; - - self.listsController.delegate = self; - - [self.listsController startSearching]; -} - -- (void)didDeactivate { - [self.listsController stopSearching]; - - self.listsController.delegate = nil; -} - -- (void)handleUserActivity:(NSDictionary *)userInfo { - // The Lister watch app only supports continuing activities where `AAPLAppConfigurationUserActivityListURLPathUserInfoKey` is provided. - NSString *listInfoFilePath = userInfo[AAPLAppConfigurationUserActivityListURLPathUserInfoKey]; - - // If no `listInfoFilePath` is found, there is no activity of interest to handle. - if (!listInfoFilePath) { - return; - } - - NSURL *listInfoURL = [NSURL fileURLWithPath:listInfoFilePath isDirectory:NO]; - - // Create an `AAPLListInfo` that represents the list at `listInfoURL`. - AAPLListInfo *listInfo = [[AAPLListInfo alloc] initWithURL:listInfoURL]; - - // Present an `AAPLListInterfaceController`. - [self pushControllerWithName:AAPLListInterfaceControllerName context:listInfo]; -} - -@end diff --git a/Lister/Objective-C/Lister WatchKit Extension/Glance/AAPLGlanceInterfaceController.h b/Lister/Objective-C/Lister WatchKit Extension/Glance/AAPLGlanceInterfaceController.h deleted file mode 100644 index aaa726ea..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/Glance/AAPLGlanceInterfaceController.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Controls the interface of the Glance. The controller displays statistics about the Today list. -*/ - -@import WatchKit; - -@interface AAPLGlanceInterfaceController : WKInterfaceController -@end diff --git a/Lister/Objective-C/Lister WatchKit Extension/Glance/AAPLGlanceInterfaceController.m b/Lister/Objective-C/Lister WatchKit Extension/Glance/AAPLGlanceInterfaceController.m deleted file mode 100644 index 3fedc58d..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/Glance/AAPLGlanceInterfaceController.m +++ /dev/null @@ -1,216 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Controls the interface of the Glance. The controller displays statistics about the Today list. -*/ - -#import "AAPLGlanceInterfaceController.h" -#import "AAPLWatchStoryboardConstants.h" -#import "AAPLGlanceBadge.h" -@import ListerKit; - -@interface AAPLGlanceInterfaceController () - -@property (nonatomic, weak) IBOutlet WKInterfaceImage *glanceBadgeImage; -@property (nonatomic, weak) IBOutlet WKInterfaceGroup *glanceBadgeGroup; -@property (nonatomic, weak) IBOutlet WKInterfaceLabel *remainingItemsLabel; - -@property (nonatomic, strong) AAPLListsController *listsController; -@property (nonatomic, strong) AAPLListDocument *listDocument; -@property (nonatomic, readonly) AAPLAllListItemsPresenter *listPresenter; - -/// These properties track the underlying values that represent the badge. -@property (nonatomic) NSInteger presentedTotalListItemCount; -@property (nonatomic) NSInteger presentedCompleteListItemCount; - -@end - -/*! - Represents an undefined state for either the \c presentedTotalListItemCount or \c presentedCompleteListItemCount - properties. -*/ -const NSInteger AAPLGlanceInterfaceControllerCountUndefined = -1; - -@implementation AAPLGlanceInterfaceController - -#pragma mark - Property Overrides - -- (AAPLAllListItemsPresenter *)listPresenter { - return self.listDocument.listPresenter; -} - -#pragma mark - Initializers - -- (instancetype)init { - self = [super init]; - - if (self) { - _presentedTotalListItemCount = AAPLGlanceInterfaceControllerCountUndefined; - _presentedCompleteListItemCount = AAPLGlanceInterfaceControllerCountUndefined; - } - - return self; -} - -#pragma mark - Setup - -- (void)setUpInterface { - // If no previously presented data exists, clear the initial UI elements. - if (self.presentedCompleteListItemCount == AAPLGlanceInterfaceControllerCountUndefined && - self.presentedTotalListItemCount == AAPLGlanceInterfaceControllerCountUndefined) { - [self.glanceBadgeGroup setBackgroundImage:nil]; - [self.glanceBadgeImage setImage:nil]; - [self.remainingItemsLabel setHidden:YES]; - } - - [self initializeListController]; -} - -- (void)initializeListController { - NSString *localizedTodayListName = [AAPLAppConfiguration sharedAppConfiguration].localizedTodayDocumentNameAndExtension; - - self.listsController = [[AAPLAppConfiguration sharedAppConfiguration] listsControllerForCurrentConfigurationWithLastPathComponent:localizedTodayListName firstQueryHandler:nil]; - - self.listsController.delegate = self; - - [self.listsController startSearching]; -} - -#pragma mark - AAPLListsControllerDelegate - -- (void)listsController:(AAPLListsController *)listsController didInsertListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - // Once we've found the Today list, we'll hand off ownership of listening to udpates to the list presenter. - [self.listsController stopSearching]; - - self.listsController = nil; - - // Update the badge with the Today list info. - [self processListInfoAsTodayDocument:listInfo]; -} - -#pragma mark - AAPLListPresenterDelegate - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - // Since the list changed completely, show present the Glance badge. - [self presentGlanceBadge]; -} - -/*! - These methods are no ops because all of the data is bulk rendered after the the content changes. This can - occur in \c -listPresenterDidRefreshCompleteLayout: or in \c -listPresenterDidChangeListLayout:isInitialLayout:. - */ -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout {} -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color {} -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex {} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - /* - The list's layout changed. However, since we don't care that a small detail about the list changed, - we're going to re-animate the badge. - */ - [self presentGlanceBadge]; -} - -#pragma mark - Lifecycle - -- (void)willActivate { - /* - Setup the interface in `willActivate` to ensure the interface is refreshed each time the interface - controller is presented. - */ - [self setUpInterface]; -} - -- (void)didDeactivate { - // Close the document when the interface controller is finished presenting. - [self.listDocument closeWithCompletionHandler:^(BOOL success) { - if (!success) { - NSLog(@"Couldn't close document: %@.", self.listDocument.fileURL.absoluteString); - - return; - } - - self.listDocument = nil; - }]; - - [self.listsController stopSearching]; - self.listsController.delegate = nil; - self.listsController = nil; -} - -#pragma mark - Convenience - -- (void)processListInfoAsTodayDocument:(AAPLListInfo *)listInfo { - AAPLAllListItemsPresenter *listPresenter = [[AAPLAllListItemsPresenter alloc] init]; - - self.listDocument = [[AAPLListDocument alloc] initWithFileURL:listInfo.URL listPresenter:listPresenter]; - - listPresenter.delegate = self; - - [self.listDocument openWithCompletionHandler:^(BOOL success) { - if (!success) { - NSLog(@"Couldn't open document: %@.", self.listDocument.fileURL.absoluteString); - - return; - } - - /* - Once the Today document has been found and opened, update the user activity with its URL path - to enable a tap on the glance to jump directly to the Today document in the watch app. A URL path - is passed instead of a URL because the `userInfo` dictionary of a WatchKit app's user activity - does not allow NSURL values. - */ - NSDictionary *userInfo = @{ - AAPLAppConfigurationUserActivityListURLPathUserInfoKey: self.listDocument.fileURL.path, - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.listPresenter.color) - }; - - /* - Lister uses a specific user activity name registered in the Info.plist and defined as a constant to - separate this action from the built-in UIDocument handoff support. - */ - [self updateUserActivity:AAPLAppConfigurationUserActivityTypeWatch userInfo:userInfo webpageURL:nil]; - }]; -} - -- (void)presentGlanceBadge { - NSInteger totalListItemCount = self.listPresenter.count; - - NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"isComplete == YES"]; - NSArray *completeListItems = [self.listPresenter.presentedListItems filteredArrayUsingPredicate:filterPredicate]; - NSInteger completeListItemCount = completeListItems.count; - - /* - If the `totalListItemCount` and the `completeListItemCount` haven't changed, there's no need to re-present - the badge. - */ - if (self.presentedTotalListItemCount == totalListItemCount && self.presentedCompleteListItemCount == completeListItemCount) { - return; - } - - // Update `totalListItemCount` and the `completeListItemCount`. - self.presentedTotalListItemCount = totalListItemCount; - self.presentedCompleteListItemCount = completeListItemCount; - - // Construct and present the new badge. - AAPLGlanceBadge *glanceBadge = [[AAPLGlanceBadge alloc] initWithTotalItemCount:totalListItemCount completeItemCount:completeListItemCount]; - - [self.glanceBadgeGroup setBackgroundImage:glanceBadge.groupBackgroundImage]; - [self.glanceBadgeImage setImageNamed:glanceBadge.imageName]; - [self.glanceBadgeImage startAnimatingWithImagesInRange:glanceBadge.imageRange duration:glanceBadge.animationDuration repeatCount:1]; - - /* - Create a localized string for the # items remaining in the Glance badge. The string is retrieved from - the Localizable.stringsdict file. - */ - NSString *itemsRemainingText = [NSString localizedStringWithFormat:NSLocalizedString(@"%d items left", nil), glanceBadge.incompleteItemCount]; - [self.remainingItemsLabel setText:itemsRemainingText]; - [self.remainingItemsLabel setHidden:NO]; -} - -@end diff --git a/Lister/Objective-C/Lister WatchKit Extension/Images.xcassets/README__ignoredByTemplate__ b/Lister/Objective-C/Lister WatchKit Extension/Images.xcassets/README__ignoredByTemplate__ deleted file mode 100644 index b601d383..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/Images.xcassets/README__ignoredByTemplate__ +++ /dev/null @@ -1 +0,0 @@ -Did you know that git does not support storing empty directories? diff --git a/Lister/Objective-C/Lister WatchKit Extension/Info.plist b/Lister/Objective-C/Lister WatchKit Extension/Info.plist deleted file mode 100644 index 7e469deb..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Lister WatchKit Extension - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - XPC! - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - 6 - NSExtension - - NSExtensionAttributes - - WKAppBundleIdentifier - ${LISTER_BUNDLE_PREFIX}.Lister.watchkitapp - - NSExtensionPointIdentifier - com.apple.watchkit - - RemoteInterfacePrincipalClass - InterfaceController - - diff --git a/Lister/Objective-C/Lister WatchKit Extension/Localizable.stringsdict b/Lister/Objective-C/Lister WatchKit Extension/Localizable.stringsdict deleted file mode 100644 index b1e144f0..00000000 --- a/Lister/Objective-C/Lister WatchKit Extension/Localizable.stringsdict +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - %d items left - - NSStringLocalizedFormatKey - %#@items@ - items - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - d - zero - Great job! - one - One left! - other - %d items left - - - - diff --git a/Lister/Objective-C/Lister.xcodeproj/project.pbxproj b/Lister/Objective-C/Lister.xcodeproj/project.pbxproj deleted file mode 100644 index 3517dd21..00000000 --- a/Lister/Objective-C/Lister.xcodeproj/project.pbxproj +++ /dev/null @@ -1,3839 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 16030B431B079FF800BA8EEB /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 16892DE11B06E2F00001FF08 /* Interface.storyboard */; }; - 160868761A8EA54300A5A707 /* AAPLAppLaunchContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 160868751A8EA54300A5A707 /* AAPLAppLaunchContext.m */; }; - 1608C4DC19398CE400CC1E53 /* AAPLNoItemsRowViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1608C4DA19398CE400CC1E53 /* AAPLNoItemsRowViewController.m */; }; - 1608C4DD19398CE400CC1E53 /* AAPLNoItemsRowViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1608C4DB19398CE400CC1E53 /* AAPLNoItemsRowViewController.xib */; }; - 160D913E1937921E00373D47 /* Lister.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 16A3C1CF18B2C2530087ACED /* Lister.entitlements */; }; - 160D913F1937922F00373D47 /* ListerToday.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 16EB5EDE1936D41C00532A4B /* ListerToday.entitlements */; }; - 160D914419380CE500373D47 /* AAPLCheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 16E1FA02191DD200006AF95B /* AAPLCheckBox.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 160D914519380CE500373D47 /* AAPLCheckBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 16E1FA03191DD200006AF95B /* AAPLCheckBox.m */; }; - 1611C5FD1A92A09100472891 /* AAPLAppLaunchContextTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1611C5FC1A92A09100472891 /* AAPLAppLaunchContextTests.m */; }; - 1623FD081A02FE6300631A60 /* AAPLListPresenting.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD061A02FE6300631A60 /* AAPLListPresenting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1623FD091A02FE6300631A60 /* AAPLListPresenting.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD061A02FE6300631A60 /* AAPLListPresenting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1623FD111A02FE7900631A60 /* AAPLAllListItemsPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD0D1A02FE7900631A60 /* AAPLAllListItemsPresenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1623FD121A02FE7900631A60 /* AAPLAllListItemsPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD0D1A02FE7900631A60 /* AAPLAllListItemsPresenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1623FD131A02FE7900631A60 /* AAPLAllListItemsPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1623FD0E1A02FE7900631A60 /* AAPLAllListItemsPresenter.m */; }; - 1623FD141A02FE7900631A60 /* AAPLAllListItemsPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1623FD0E1A02FE7900631A60 /* AAPLAllListItemsPresenter.m */; }; - 1623FD151A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD0F1A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1623FD161A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD0F1A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1623FD171A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1623FD101A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m */; }; - 1623FD181A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1623FD101A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m */; }; - 162C25C01B1CEA07004DD2FC /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 162C25BF1B1CEA07004DD2FC /* NotificationCenter.framework */; }; - 1632760318AD468F00A97A9F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1632760218AD468F00A97A9F /* main.m */; }; - 1632760918AD468F00A97A9F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1632760818AD468F00A97A9F /* Images.xcassets */; }; - 1632762118AD468F00A97A9F /* ListerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1632761E18AD468F00A97A9F /* ListerKit.framework */; }; - 1632762218AD468F00A97A9F /* ListerKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1632761E18AD468F00A97A9F /* ListerKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 1633C7371939338000A9CC5E /* ListerTodayOSX.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 1633C7361939338000A9CC5E /* ListerTodayOSX.entitlements */; }; - 1633C73A1939338000A9CC5E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1633C7381939338000A9CC5E /* InfoPlist.strings */; }; - 1633C74D193933B100A9CC5E /* ListerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E745ECB190880F30090B20E /* ListerKit.framework */; }; - 1633C77719393EB200A9CC5E /* AAPLListRowRepresentedObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 1633C76D19393EB200A9CC5E /* AAPLListRowRepresentedObject.m */; }; - 1633C77819393EB200A9CC5E /* AAPLListRowViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1633C76F19393EB200A9CC5E /* AAPLListRowViewController.m */; }; - 1633C77919393EB200A9CC5E /* AAPLListRowViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1633C77019393EB200A9CC5E /* AAPLListRowViewController.xib */; }; - 1633C77A19393EB200A9CC5E /* AAPLOpenListerRowViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1633C77219393EB200A9CC5E /* AAPLOpenListerRowViewController.m */; }; - 1633C77B19393EB200A9CC5E /* AAPLOpenListerRowViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1633C77319393EB200A9CC5E /* AAPLOpenListerRowViewController.xib */; }; - 1633C77C19393EB200A9CC5E /* AAPLTodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1633C77519393EB200A9CC5E /* AAPLTodayViewController.m */; }; - 1633C77D19393EB200A9CC5E /* AAPLTodayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1633C77619393EB200A9CC5E /* AAPLTodayViewController.xib */; }; - 163701CB190AD1F9003FF9D0 /* AAPLListColorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 163701CA190AD1F9003FF9D0 /* AAPLListColorCell.m */; }; - 163701CE190AFD1D003FF9D0 /* AAPLNewListDocumentController.m in Sources */ = {isa = PBXBuildFile; fileRef = 163701CD190AFD1D003FF9D0 /* AAPLNewListDocumentController.m */; }; - 163A6CA51906ED4C008E1930 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 163A6CA41906ED4C008E1930 /* main.m */; }; - 163A6CAE1906ED4C008E1930 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 163A6CAD1906ED4C008E1930 /* Images.xcassets */; }; - 163AD5B219082124007D9A03 /* AAPLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 163AD5AD19082124007D9A03 /* AAPLAppDelegate.m */; }; - 164346BF1B0FE7FE00F81674 /* AAPLListInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1645D9071B0CFAF4005E8148 /* AAPLListInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346C01B0FE80600F81674 /* AAPLListInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 1645D9081B0CFAF4005E8148 /* AAPLListInfo.m */; }; - 164346C11B0FE80D00F81674 /* AAPLConnectivityListsController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1645D90B1B0CFB5A005E8148 /* AAPLConnectivityListsController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346C21B0FE81400F81674 /* AAPLConnectivityListsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1645D90C1B0CFB5A005E8148 /* AAPLConnectivityListsController.m */; }; - 164346C31B0FE82200F81674 /* ListerKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E745ECF190880F30090B20E /* ListerKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346C41B0FE84D00F81674 /* AAPLList.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D4DA0A19082E2B0013342E /* AAPLList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346C51B0FE84D00F81674 /* AAPLListItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D4DA0C19082E2B0013342E /* AAPLListItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346C61B0FE84D00F81674 /* AAPLListPresenterDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053121A132884006DCBA7 /* AAPLListPresenterDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346C71B0FE84D00F81674 /* AAPLListPresenting.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD061A02FE6300631A60 /* AAPLListPresenting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346C81B0FE84D00F81674 /* AAPLAllListItemsPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD0D1A02FE7900631A60 /* AAPLAllListItemsPresenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346C91B0FE84D00F81674 /* AAPLIncompleteListItemsPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1623FD0F1A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346CB1B0FE85500F81674 /* AAPLListPresenterAlgorithms.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053151A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h */; }; - 164346CC1B0FE85500F81674 /* AAPLListPresenterUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053171A13289F006DCBA7 /* AAPLListPresenterUtilities.h */; }; - 164346CD1B0FE86900F81674 /* AAPLList.m in Sources */ = {isa = PBXBuildFile; fileRef = 16D4DA0B19082E2B0013342E /* AAPLList.m */; }; - 164346CE1B0FE86900F81674 /* AAPLListItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 16D4DA0D19082E2B0013342E /* AAPLListItem.m */; }; - 164346CF1B0FE86900F81674 /* AAPLAllListItemsPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1623FD0E1A02FE7900631A60 /* AAPLAllListItemsPresenter.m */; }; - 164346D01B0FE86900F81674 /* AAPLIncompleteListItemsPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1623FD101A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m */; }; - 164346D11B0FE86900F81674 /* AAPLListPresenterAlgorithms.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E9053161A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m */; }; - 164346D21B0FE86900F81674 /* AAPLListPresenterUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E9053181A13289F006DCBA7 /* AAPLListPresenterUtilities.m */; }; - 164346D41B0FEA0F00F81674 /* AAPLAppConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5C9F2E1936FE3E00EE1526 /* AAPLAppConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346D51B0FEA1600F81674 /* AAPLAppConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E5C9F2F1936FE3E00EE1526 /* AAPLAppConfiguration.m */; }; - 164346D61B0FED2F00F81674 /* AAPLListColor+UI.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EC72A2D1908B3F900AE5774 /* AAPLListColor+UI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346D71B0FED3800F81674 /* AAPLListColor+UI.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EC72A2E1908B3F900AE5774 /* AAPLListColor+UI.m */; }; - 164346D91B0FEDF500F81674 /* ListerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 164346B51B0FE72200F81674 /* ListerKit.framework */; }; - 164346DC1B0FEE6C00F81674 /* AAPLListUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EE49ED9198B342B002B78BC /* AAPLListUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 164346DD1B0FEE7300F81674 /* AAPLListUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EE49EDA198B342B002B78BC /* AAPLListUtilities.m */; }; - 16502F961B06877E00EB83DF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 16502F951B06877E00EB83DF /* Images.xcassets */; }; - 16502F9D1B06877E00EB83DF /* Lister Watch Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 16502F9C1B06877E00EB83DF /* Lister Watch Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 16502FA31B06877E00EB83DF /* AAPLListsInterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 16502FA21B06877E00EB83DF /* AAPLListsInterfaceController.m */; }; - 16502FA61B06877E00EB83DF /* AAPLExtensionDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 16502FA51B06877E00EB83DF /* AAPLExtensionDelegate.m */; }; - 16502FA91B06877E00EB83DF /* AAPLGlanceInterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 16502FA81B06877E00EB83DF /* AAPLGlanceInterfaceController.m */; }; - 16502FAB1B06877E00EB83DF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 16502FAA1B06877E00EB83DF /* Images.xcassets */; }; - 16502FAF1B06877E00EB83DF /* Lister Watch App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 16502F901B06877E00EB83DF /* Lister Watch App.app */; }; - 16533DB31B0921E3006A90C4 /* AAPLColoredTextRowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E351EBB19DA07E100971413 /* AAPLColoredTextRowController.m */; }; - 16533DB41B0921E3006A90C4 /* AAPLListItemRowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 16FEF6AB1A117A4500E0CC5E /* AAPLListItemRowController.m */; }; - 1656DCA51B113DF2001233FA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1656DCA41B113DF2001233FA /* UIKit.framework */; }; - 1656DCA61B113E60001233FA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1656DCA41B113DF2001233FA /* UIKit.framework */; }; - 1656DCA81B114CAE001233FA /* ListerKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 164346B51B0FE72200F81674 /* ListerKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 167843B61B0927D6009DEE8D /* AAPLListInterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 16533DB11B091B6C006A90C4 /* AAPLListInterfaceController.m */; }; - 167843B91B092FEA009DEE8D /* checkbox-blue-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE91B06892100EB83DF /* checkbox-blue-checked@2x.png */; }; - 167843BA1B092FEA009DEE8D /* checkbox-blue-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FEA1B06892100EB83DF /* checkbox-blue-unchecked@2x.png */; }; - 167843BB1B092FEA009DEE8D /* checkbox-gray-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FEB1B06892100EB83DF /* checkbox-gray-checked@2x.png */; }; - 167843BC1B092FEA009DEE8D /* checkbox-gray-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FEC1B06892100EB83DF /* checkbox-gray-unchecked@2x.png */; }; - 167843BD1B092FEA009DEE8D /* checkbox-green-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FED1B06892100EB83DF /* checkbox-green-checked@2x.png */; }; - 167843BE1B092FEA009DEE8D /* checkbox-green-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FEE1B06892100EB83DF /* checkbox-green-unchecked@2x.png */; }; - 167843BF1B092FEA009DEE8D /* checkbox-orange-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FEF1B06892100EB83DF /* checkbox-orange-checked@2x.png */; }; - 167843C01B092FEA009DEE8D /* checkbox-orange-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FF01B06892100EB83DF /* checkbox-orange-unchecked@2x.png */; }; - 167843C11B092FEA009DEE8D /* checkbox-red-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FF11B06892100EB83DF /* checkbox-red-checked@2x.png */; }; - 167843C21B092FEA009DEE8D /* checkbox-red-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FF21B06892100EB83DF /* checkbox-red-unchecked@2x.png */; }; - 167843C31B092FEA009DEE8D /* checkbox-yellow-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FF31B06892100EB83DF /* checkbox-yellow-checked@2x.png */; }; - 167843C41B092FEA009DEE8D /* checkbox-yellow-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FF41B06892100EB83DF /* checkbox-yellow-unchecked@2x.png */; }; - 167843F21B092FFB009DEE8D /* glance-0@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FBB1B06892100EB83DF /* glance-0@2x.png */; }; - 167843F31B092FFB009DEE8D /* glance-10@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FBC1B06892100EB83DF /* glance-10@2x.png */; }; - 167843F41B092FFB009DEE8D /* glance-11@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FBD1B06892100EB83DF /* glance-11@2x.png */; }; - 167843F51B092FFB009DEE8D /* glance-12@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FBE1B06892100EB83DF /* glance-12@2x.png */; }; - 167843F61B092FFB009DEE8D /* glance-13@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FBF1B06892100EB83DF /* glance-13@2x.png */; }; - 167843F71B092FFB009DEE8D /* glance-14@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC01B06892100EB83DF /* glance-14@2x.png */; }; - 167843F81B092FFB009DEE8D /* glance-15@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC11B06892100EB83DF /* glance-15@2x.png */; }; - 167843F91B092FFB009DEE8D /* glance-16@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC21B06892100EB83DF /* glance-16@2x.png */; }; - 167843FA1B092FFB009DEE8D /* glance-17@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC31B06892100EB83DF /* glance-17@2x.png */; }; - 167843FB1B092FFB009DEE8D /* glance-18@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC41B06892100EB83DF /* glance-18@2x.png */; }; - 167843FC1B092FFB009DEE8D /* glance-19@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC51B06892100EB83DF /* glance-19@2x.png */; }; - 167843FD1B092FFB009DEE8D /* glance-1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC61B06892100EB83DF /* glance-1@2x.png */; }; - 167843FE1B092FFB009DEE8D /* glance-20@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC71B06892100EB83DF /* glance-20@2x.png */; }; - 167843FF1B092FFB009DEE8D /* glance-21@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC81B06892100EB83DF /* glance-21@2x.png */; }; - 167844001B092FFB009DEE8D /* glance-22@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FC91B06892100EB83DF /* glance-22@2x.png */; }; - 167844011B092FFB009DEE8D /* glance-23@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FCA1B06892100EB83DF /* glance-23@2x.png */; }; - 167844021B092FFB009DEE8D /* glance-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FCB1B06892100EB83DF /* glance-24@2x.png */; }; - 167844031B092FFB009DEE8D /* glance-25@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FCC1B06892100EB83DF /* glance-25@2x.png */; }; - 167844041B092FFB009DEE8D /* glance-26@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FCD1B06892100EB83DF /* glance-26@2x.png */; }; - 167844051B092FFB009DEE8D /* glance-27@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FCE1B06892100EB83DF /* glance-27@2x.png */; }; - 167844061B092FFB009DEE8D /* glance-28@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FCF1B06892100EB83DF /* glance-28@2x.png */; }; - 167844071B092FFB009DEE8D /* glance-29@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD01B06892100EB83DF /* glance-29@2x.png */; }; - 167844081B092FFB009DEE8D /* glance-2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD11B06892100EB83DF /* glance-2@2x.png */; }; - 167844091B092FFB009DEE8D /* glance-30@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD21B06892100EB83DF /* glance-30@2x.png */; }; - 1678440A1B092FFB009DEE8D /* glance-31@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD31B06892100EB83DF /* glance-31@2x.png */; }; - 1678440B1B092FFB009DEE8D /* glance-32@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD41B06892100EB83DF /* glance-32@2x.png */; }; - 1678440C1B092FFB009DEE8D /* glance-33@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD51B06892100EB83DF /* glance-33@2x.png */; }; - 1678440D1B092FFB009DEE8D /* glance-34@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD61B06892100EB83DF /* glance-34@2x.png */; }; - 1678440E1B092FFB009DEE8D /* glance-35@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD71B06892100EB83DF /* glance-35@2x.png */; }; - 1678440F1B092FFB009DEE8D /* glance-36@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD81B06892100EB83DF /* glance-36@2x.png */; }; - 167844101B092FFB009DEE8D /* glance-37@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FD91B06892100EB83DF /* glance-37@2x.png */; }; - 167844111B092FFB009DEE8D /* glance-38@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FDA1B06892100EB83DF /* glance-38@2x.png */; }; - 167844121B092FFB009DEE8D /* glance-39@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FDB1B06892100EB83DF /* glance-39@2x.png */; }; - 167844131B092FFB009DEE8D /* glance-3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FDC1B06892100EB83DF /* glance-3@2x.png */; }; - 167844141B092FFB009DEE8D /* glance-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FDD1B06892100EB83DF /* glance-40@2x.png */; }; - 167844151B092FFB009DEE8D /* glance-41@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FDE1B06892100EB83DF /* glance-41@2x.png */; }; - 167844161B092FFB009DEE8D /* glance-42@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FDF1B06892100EB83DF /* glance-42@2x.png */; }; - 167844171B092FFB009DEE8D /* glance-43@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE01B06892100EB83DF /* glance-43@2x.png */; }; - 167844181B092FFB009DEE8D /* glance-44@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE11B06892100EB83DF /* glance-44@2x.png */; }; - 167844191B092FFB009DEE8D /* glance-4@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE21B06892100EB83DF /* glance-4@2x.png */; }; - 1678441A1B092FFB009DEE8D /* glance-5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE31B06892100EB83DF /* glance-5@2x.png */; }; - 1678441B1B092FFB009DEE8D /* glance-6@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE41B06892100EB83DF /* glance-6@2x.png */; }; - 1678441C1B092FFB009DEE8D /* glance-7@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE51B06892100EB83DF /* glance-7@2x.png */; }; - 1678441D1B092FFB009DEE8D /* glance-8@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE61B06892100EB83DF /* glance-8@2x.png */; }; - 1678441E1B092FFB009DEE8D /* glance-9@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FE71B06892100EB83DF /* glance-9@2x.png */; }; - 1678441F1B09300E009DEE8D /* check-all@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FF61B06892100EB83DF /* check-all@2x.png */; }; - 167844201B09300E009DEE8D /* uncheck-all@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16502FF71B06892100EB83DF /* uncheck-all@2x.png */; }; - 168A23671A93F05000BB2495 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 55BB61D61A13C84D001BE161 /* Images.xcassets */; }; - 168AF80B191AA89700D6BA5A /* ListerOSX.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 168AF80A191AA89700D6BA5A /* ListerOSX.entitlements */; }; - 169A57221B1B7EBE006BC62A /* Lister WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 16F60C5E1A8560470028B2D8 /* Lister WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 169E922C18AD7EF100139723 /* AAPLListDocumentsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 169E922B18AD7EF100139723 /* AAPLListDocumentsViewController.m */; }; - 16A1A286193818EE00302EE4 /* AAPLCheckBoxCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 16040D02190F32A5006D75CA /* AAPLCheckBoxCell.m */; }; - 16A1A287193819B900302EE4 /* AAPLTodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 169DAF1E192D1C1C007F738B /* AAPLTodayViewController.m */; }; - 16A1A2881938266C00302EE4 /* Lister.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 16EB5ECB1936D39400532A4B /* Lister.appex */; }; - 16A1A28C193836F900302EE4 /* Today.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 169DAF20192D1C1C007F738B /* Today.storyboard */; }; - 16ADF81A191AAC2E00CA9120 /* AAPLAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 16ADF818191AAC2E00CA9120 /* AAPLAppDelegate.h */; }; - 16ADF81B191AAC2E00CA9120 /* AAPLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 16ADF819191AAC2E00CA9120 /* AAPLAppDelegate.m */; }; - 16B1D92B1A1A785E009EEBED /* AAPLDirectoryMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 16B1D9291A1A785E009EEBED /* AAPLDirectoryMonitor.h */; }; - 16B1D92C1A1A785E009EEBED /* AAPLDirectoryMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 16B1D92A1A1A785E009EEBED /* AAPLDirectoryMonitor.m */; }; - 16B6ABA71939573B00CA7E11 /* Lister.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 1633C7311939337F00A9CC5E /* Lister.appex */; }; - 16B9353F1909753F004E89E3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 16B9353D1909753F004E89E3 /* Main.storyboard */; }; - 16C1577218AD9B7100B21147 /* AAPLListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C1577118AD9B7100B21147 /* AAPLListViewController.m */; }; - 16C1577618ADC47F00B21147 /* AAPLListItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C1577518ADC47F00B21147 /* AAPLListItemCell.m */; }; - 16C89AAA1909AD4600752460 /* AAPLListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C89AA91909AD4600752460 /* AAPLListCell.m */; }; - 16CD55B21B124B5100DB4F4F /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 16CD55B01B124B5100DB4F4F /* Launch Screen.storyboard */; }; - 16D1A47E1B06B0670027BF67 /* AAPLWatchStoryboardConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7FE73919DBB6AE0056487F /* AAPLWatchStoryboardConstants.m */; }; - 16D4DA1119082E2B0013342E /* AAPLList.m in Sources */ = {isa = PBXBuildFile; fileRef = 16D4DA0B19082E2B0013342E /* AAPLList.m */; }; - 16D4DA1219082E2B0013342E /* AAPLListItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D4DA0C19082E2B0013342E /* AAPLListItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 16D4DA1319082E2B0013342E /* AAPLListItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 16D4DA0D19082E2B0013342E /* AAPLListItem.m */; }; - 16E330CC191EDAC400698F8C /* AAPLTodayListManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 16E330C9191EDAC400698F8C /* AAPLTodayListManager.m */; }; - 16EB5EDF1936D48D00532A4B /* ListerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1632761E18AD468F00A97A9F /* ListerKit.framework */; }; - 16F60C691A8560470028B2D8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 16F60C681A8560470028B2D8 /* Images.xcassets */; }; - 16F60C6D1A8560470028B2D8 /* Lister WatchKit App.app in Resources */ = {isa = PBXBuildFile; fileRef = 16F60C6C1A8560470028B2D8 /* Lister WatchKit App.app */; }; - 16F60C751A8560470028B2D8 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 16F60C731A8560470028B2D8 /* Interface.storyboard */; }; - 16F60C811A8562160028B2D8 /* AAPLWatchStoryboardConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7FE73919DBB6AE0056487F /* AAPLWatchStoryboardConstants.m */; }; - 16F60C821A8562160028B2D8 /* AAPLListsInterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E04D0E819D9FB7500C59A0F /* AAPLListsInterfaceController.m */; }; - 16F60C831A8562160028B2D8 /* AAPLListInterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7FE73119DBB2AA0056487F /* AAPLListInterfaceController.m */; }; - 16F60C841A8562160028B2D8 /* AAPLColoredTextRowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E351EBB19DA07E100971413 /* AAPLColoredTextRowController.m */; }; - 16F60C851A8562160028B2D8 /* AAPLListItemRowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 16FEF6AB1A117A4500E0CC5E /* AAPLListItemRowController.m */; }; - 16F60C861A8562160028B2D8 /* AAPLGlanceBadge.m in Sources */ = {isa = PBXBuildFile; fileRef = 1634730619F5E46000387A94 /* AAPLGlanceBadge.m */; }; - 16F60C871A8562160028B2D8 /* AAPLGlanceInterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1634730819F5E46000387A94 /* AAPLGlanceInterfaceController.m */; }; - 16F60C881A8564460028B2D8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3E028CD11A1690B7004B6F9D /* Localizable.strings */; }; - 16F60C891A8564460028B2D8 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 3E028CCE1A1690B0004B6F9D /* Localizable.stringsdict */; }; - 16F60C8A1A8564790028B2D8 /* checkbox-blue-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDA61A126FD500CFB0F5 /* checkbox-blue-checked@2x.png */; }; - 16F60C8B1A8564790028B2D8 /* checkbox-blue-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDA71A126FD500CFB0F5 /* checkbox-blue-unchecked@2x.png */; }; - 16F60C8C1A8564790028B2D8 /* checkbox-gray-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDA81A126FD500CFB0F5 /* checkbox-gray-checked@2x.png */; }; - 16F60C8D1A8564790028B2D8 /* checkbox-gray-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDA91A126FD500CFB0F5 /* checkbox-gray-unchecked@2x.png */; }; - 16F60C8E1A8564790028B2D8 /* checkbox-green-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDAA1A126FD500CFB0F5 /* checkbox-green-checked@2x.png */; }; - 16F60C8F1A8564790028B2D8 /* checkbox-green-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDAB1A126FD500CFB0F5 /* checkbox-green-unchecked@2x.png */; }; - 16F60C901A8564790028B2D8 /* checkbox-orange-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDAC1A126FD500CFB0F5 /* checkbox-orange-checked@2x.png */; }; - 16F60C911A8564790028B2D8 /* checkbox-orange-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDAD1A126FD500CFB0F5 /* checkbox-orange-unchecked@2x.png */; }; - 16F60C921A8564790028B2D8 /* checkbox-red-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDAE1A126FD500CFB0F5 /* checkbox-red-checked@2x.png */; }; - 16F60C931A8564790028B2D8 /* checkbox-red-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDAF1A126FD500CFB0F5 /* checkbox-red-unchecked@2x.png */; }; - 16F60C941A8564790028B2D8 /* checkbox-yellow-checked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDB01A126FD500CFB0F5 /* checkbox-yellow-checked@2x.png */; }; - 16F60C951A8564790028B2D8 /* checkbox-yellow-unchecked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDB11A126FD500CFB0F5 /* checkbox-yellow-unchecked@2x.png */; }; - 16F60C961A8564810028B2D8 /* glance-0@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3778B19FAE1CC000F9EC3 /* glance-0@2x.png */; }; - 16F60C971A8564810028B2D8 /* glance-1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3778C19FAE1CC000F9EC3 /* glance-1@2x.png */; }; - 16F60C981A8564810028B2D8 /* glance-2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3778D19FAE1CC000F9EC3 /* glance-2@2x.png */; }; - 16F60C991A8564810028B2D8 /* glance-3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3778E19FAE1CC000F9EC3 /* glance-3@2x.png */; }; - 16F60C9A1A8564810028B2D8 /* glance-4@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3778F19FAE1CC000F9EC3 /* glance-4@2x.png */; }; - 16F60C9B1A8564810028B2D8 /* glance-5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779019FAE1CC000F9EC3 /* glance-5@2x.png */; }; - 16F60C9C1A8564810028B2D8 /* glance-6@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779119FAE1CC000F9EC3 /* glance-6@2x.png */; }; - 16F60C9D1A8564810028B2D8 /* glance-7@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779219FAE1CC000F9EC3 /* glance-7@2x.png */; }; - 16F60C9E1A8564810028B2D8 /* glance-8@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779319FAE1CC000F9EC3 /* glance-8@2x.png */; }; - 16F60C9F1A8564810028B2D8 /* glance-9@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779419FAE1CC000F9EC3 /* glance-9@2x.png */; }; - 16F60CA01A8564810028B2D8 /* glance-10@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779519FAE1CC000F9EC3 /* glance-10@2x.png */; }; - 16F60CA11A8564810028B2D8 /* glance-11@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779619FAE1CC000F9EC3 /* glance-11@2x.png */; }; - 16F60CA21A8564810028B2D8 /* glance-12@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779719FAE1CC000F9EC3 /* glance-12@2x.png */; }; - 16F60CA31A8564810028B2D8 /* glance-13@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779819FAE1CC000F9EC3 /* glance-13@2x.png */; }; - 16F60CA41A8564810028B2D8 /* glance-14@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779919FAE1CC000F9EC3 /* glance-14@2x.png */; }; - 16F60CA51A8564810028B2D8 /* glance-15@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779A19FAE1CC000F9EC3 /* glance-15@2x.png */; }; - 16F60CA61A8564810028B2D8 /* glance-16@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779B19FAE1CC000F9EC3 /* glance-16@2x.png */; }; - 16F60CA71A8564810028B2D8 /* glance-17@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779C19FAE1CC000F9EC3 /* glance-17@2x.png */; }; - 16F60CA81A8564810028B2D8 /* glance-18@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779D19FAE1CC000F9EC3 /* glance-18@2x.png */; }; - 16F60CA91A8564810028B2D8 /* glance-19@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779E19FAE1CC000F9EC3 /* glance-19@2x.png */; }; - 16F60CAA1A8564810028B2D8 /* glance-20@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E3779F19FAE1CC000F9EC3 /* glance-20@2x.png */; }; - 16F60CAB1A8564810028B2D8 /* glance-21@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A019FAE1CC000F9EC3 /* glance-21@2x.png */; }; - 16F60CAC1A8564810028B2D8 /* glance-22@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A119FAE1CC000F9EC3 /* glance-22@2x.png */; }; - 16F60CAD1A8564810028B2D8 /* glance-23@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A219FAE1CC000F9EC3 /* glance-23@2x.png */; }; - 16F60CAE1A8564810028B2D8 /* glance-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A319FAE1CC000F9EC3 /* glance-24@2x.png */; }; - 16F60CAF1A8564810028B2D8 /* glance-25@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A419FAE1CC000F9EC3 /* glance-25@2x.png */; }; - 16F60CB01A8564810028B2D8 /* glance-26@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A519FAE1CC000F9EC3 /* glance-26@2x.png */; }; - 16F60CB11A8564810028B2D8 /* glance-27@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A619FAE1CC000F9EC3 /* glance-27@2x.png */; }; - 16F60CB21A8564810028B2D8 /* glance-28@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A719FAE1CC000F9EC3 /* glance-28@2x.png */; }; - 16F60CB31A8564810028B2D8 /* glance-29@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A819FAE1CC000F9EC3 /* glance-29@2x.png */; }; - 16F60CB41A8564810028B2D8 /* glance-30@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377A919FAE1CC000F9EC3 /* glance-30@2x.png */; }; - 16F60CB51A8564810028B2D8 /* glance-31@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377AA19FAE1CC000F9EC3 /* glance-31@2x.png */; }; - 16F60CB61A8564810028B2D8 /* glance-32@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377AB19FAE1CC000F9EC3 /* glance-32@2x.png */; }; - 16F60CB71A8564810028B2D8 /* glance-33@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377AC19FAE1CC000F9EC3 /* glance-33@2x.png */; }; - 16F60CB81A8564810028B2D8 /* glance-34@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377AD19FAE1CC000F9EC3 /* glance-34@2x.png */; }; - 16F60CB91A8564810028B2D8 /* glance-35@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377AE19FAE1CC000F9EC3 /* glance-35@2x.png */; }; - 16F60CBA1A8564810028B2D8 /* glance-36@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377AF19FAE1CC000F9EC3 /* glance-36@2x.png */; }; - 16F60CBB1A8564810028B2D8 /* glance-37@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377B019FAE1CC000F9EC3 /* glance-37@2x.png */; }; - 16F60CBC1A8564810028B2D8 /* glance-38@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377B119FAE1CC000F9EC3 /* glance-38@2x.png */; }; - 16F60CBD1A8564810028B2D8 /* glance-39@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377B219FAE1CC000F9EC3 /* glance-39@2x.png */; }; - 16F60CBE1A8564810028B2D8 /* glance-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377B319FAE1CC000F9EC3 /* glance-40@2x.png */; }; - 16F60CBF1A8564810028B2D8 /* glance-41@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377B419FAE1CC000F9EC3 /* glance-41@2x.png */; }; - 16F60CC01A8564810028B2D8 /* glance-42@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377B519FAE1CC000F9EC3 /* glance-42@2x.png */; }; - 16F60CC11A8564810028B2D8 /* glance-43@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377B619FAE1CC000F9EC3 /* glance-43@2x.png */; }; - 16F60CC21A8564810028B2D8 /* glance-44@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 16E377B719FAE1CC000F9EC3 /* glance-44@2x.png */; }; - 16F60CC31A8564870028B2D8 /* check-all@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDB31A126FD500CFB0F5 /* check-all@2x.png */; }; - 16F60CC41A8564870028B2D8 /* uncheck-all@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1624FDB41A126FD500CFB0F5 /* uncheck-all@2x.png */; }; - 16F718961B10F8C800EA8C90 /* AAPLGlanceBadge.m in Sources */ = {isa = PBXBuildFile; fileRef = 1634730619F5E46000387A94 /* AAPLGlanceBadge.m */; }; - 16F718971B1128B000EA8C90 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 165030371B068AB600EB83DF /* Localizable.strings */; }; - 16F718981B1128B000EA8C90 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 165030381B068AB600EB83DF /* Localizable.stringsdict */; }; - 3E0C2C2F1A153DD600976F0D /* AAPLAllListItemsPresenterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7C9AFD1A15003900909602 /* AAPLAllListItemsPresenterTests.m */; }; - 3E0C2C301A153E5500976F0D /* ListerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E745ECB190880F30090B20E /* ListerKit.framework */; }; - 3E0C2C321A154B0900976F0D /* AAPLIncompleteListItemsPresenterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E0C2C311A154B0900976F0D /* AAPLIncompleteListItemsPresenterTests.m */; }; - 3E0C2C331A154B0900976F0D /* AAPLIncompleteListItemsPresenterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E0C2C311A154B0900976F0D /* AAPLIncompleteListItemsPresenterTests.m */; }; - 3E185F6719104409007B95FB /* AAPLTableRowView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E185F6519104409007B95FB /* AAPLTableRowView.h */; }; - 3E185F6819104409007B95FB /* AAPLTableRowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E185F6619104409007B95FB /* AAPLTableRowView.m */; }; - 3E1E31C81920AA5600A9BB12 /* AAPLList.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D4DA0A19082E2B0013342E /* AAPLList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E1E31C91920AA5600A9BB12 /* AAPLListItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D4DA0C19082E2B0013342E /* AAPLListItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E1E31CA1920AA5600A9BB12 /* AAPLListColor+UI.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EC72A2D1908B3F900AE5774 /* AAPLListColor+UI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E1E31CB1920AA5600A9BB12 /* AAPLListFormatting.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EC67B14190B56FB00290085 /* AAPLListFormatting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E1E31CC1920AA6100A9BB12 /* AAPLTodayListManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 16E330C8191EDAC400698F8C /* AAPLTodayListManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E1E31CD1920AA6A00A9BB12 /* AAPLCheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EDE4F981919E50A00AA599C /* AAPLCheckBox.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E2095BD1A1A8BC300080AA0 /* Today.list in Resources */ = {isa = PBXBuildFile; fileRef = 3EBE02C4198CA57B0007E4AC /* Today.list */; }; - 3E2517CC197F7D9700B8AF96 /* AAPLListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E2517CB197F7D9700B8AF96 /* AAPLListTests.m */; }; - 3E2517CD197F7D9700B8AF96 /* ListerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1632761E18AD468F00A97A9F /* ListerKit.framework */; }; - 3E3208C019088F60003C9147 /* AAPLColorPaletteView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E3208BE19088F60003C9147 /* AAPLColorPaletteView.h */; }; - 3E3208C119088F60003C9147 /* AAPLColorPaletteView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E3208BF19088F60003C9147 /* AAPLColorPaletteView.m */; }; - 3E5C9F1F1936FCAC00EE1526 /* AAPLListDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 163701C5190AC1A2003FF9D0 /* AAPLListDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E5C9F211936FD9100EE1526 /* AAPLListDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 163701C6190AC1A2003FF9D0 /* AAPLListDocument.m */; }; - 3E5C9F301936FE3E00EE1526 /* AAPLAppConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5C9F2E1936FE3E00EE1526 /* AAPLAppConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E5C9F311936FE3E00EE1526 /* AAPLAppConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5C9F2E1936FE3E00EE1526 /* AAPLAppConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E5C9F321936FE3E00EE1526 /* AAPLAppConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E5C9F2F1936FE3E00EE1526 /* AAPLAppConfiguration.m */; }; - 3E5C9F331936FE3E00EE1526 /* AAPLAppConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E5C9F2F1936FE3E00EE1526 /* AAPLAppConfiguration.m */; }; - 3E5C9F371936FE6500EE1526 /* AAPLListDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E5C9F341936FE6500EE1526 /* AAPLListDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E5C9F391936FE6500EE1526 /* AAPLListDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E5C9F351936FE6500EE1526 /* AAPLListDocument.m */; }; - 3E6224601924623D00FFC808 /* AAPLListWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E62245E1924623D00FFC808 /* AAPLListWindowController.h */; }; - 3E6224611924623D00FFC808 /* AAPLListWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E62245F1924623D00FFC808 /* AAPLListWindowController.m */; }; - 3E745ED0190880F30090B20E /* ListerKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E745ECF190880F30090B20E /* ListerKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E745EF41908833C0090B20E /* AAPLList.m in Sources */ = {isa = PBXBuildFile; fileRef = 16D4DA0B19082E2B0013342E /* AAPLList.m */; }; - 3E745EF61908833C0090B20E /* AAPLListItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 16D4DA0D19082E2B0013342E /* AAPLListItem.m */; }; - 3E745EFD190887500090B20E /* AAPLListViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E745EFB190887500090B20E /* AAPLListViewController.h */; }; - 3E745EFE190887500090B20E /* AAPLListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E745EFC190887500090B20E /* AAPLListViewController.m */; }; - 3E79958F19EC841D0077233E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E79958E19EC841D0077233E /* Main.storyboard */; }; - 3E7C9AFE1A15003900909602 /* AAPLAllListItemsPresenterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7C9AFD1A15003900909602 /* AAPLAllListItemsPresenterTests.m */; }; - 3E7C9AFF1A15004000909602 /* AAPLListPresenterTestHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E2A4A641A14800A00E40DA5 /* AAPLListPresenterTestHelper.m */; }; - 3E7C9B001A15004000909602 /* AAPLListPresenterTestHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E2A4A641A14800A00E40DA5 /* AAPLListPresenterTestHelper.m */; }; - 3E7DBC5B19296BF200830E02 /* AAPLAddItemViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E7DBC5919296BF200830E02 /* AAPLAddItemViewController.h */; }; - 3E7DBC5C19296BF200830E02 /* AAPLAddItemViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E7DBC5A19296BF200830E02 /* AAPLAddItemViewController.m */; }; - 3E9053131A132884006DCBA7 /* AAPLListPresenterDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053121A132884006DCBA7 /* AAPLListPresenterDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E9053141A132884006DCBA7 /* AAPLListPresenterDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053121A132884006DCBA7 /* AAPLListPresenterDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3E9053191A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053151A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h */; }; - 3E90531A1A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053151A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h */; }; - 3E90531B1A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E9053161A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m */; }; - 3E90531C1A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E9053161A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m */; }; - 3E90531D1A13289F006DCBA7 /* AAPLListPresenterUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053171A13289F006DCBA7 /* AAPLListPresenterUtilities.h */; }; - 3E90531E1A13289F006DCBA7 /* AAPLListPresenterUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9053171A13289F006DCBA7 /* AAPLListPresenterUtilities.h */; }; - 3E90531F1A13289F006DCBA7 /* AAPLListPresenterUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E9053181A13289F006DCBA7 /* AAPLListPresenterUtilities.m */; }; - 3E9053201A13289F006DCBA7 /* AAPLListPresenterUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E9053181A13289F006DCBA7 /* AAPLListPresenterUtilities.m */; }; - 3E97926519097A860062A433 /* AAPLListTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E97926319097A860062A433 /* AAPLListTableView.h */; }; - 3E97926619097A860062A433 /* AAPLListTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E97926419097A860062A433 /* AAPLListTableView.m */; }; - 3E9792691909807D0062A433 /* AAPLResizingTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9792671909807D0062A433 /* AAPLResizingTextField.h */; }; - 3E97926A1909807D0062A433 /* AAPLResizingTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E9792681909807D0062A433 /* AAPLResizingTextField.m */; }; - 3EAA58C619870A5F003D955F /* AAPLListItemTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E95067C1985AA8A0030A9D1 /* AAPLListItemTests.m */; }; - 3EAA58C719870A5F003D955F /* AAPLListItemTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E95067C1985AA8A0030A9D1 /* AAPLListItemTests.m */; }; - 3EAA58C819870A62003D955F /* AAPLListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E2517CB197F7D9700B8AF96 /* AAPLListTests.m */; }; - 3EBE029B198CA5280007E4AC /* ListerDocumentIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3EBE0299198CA51D0007E4AC /* ListerDocumentIcon.icns */; }; - 3EBE02C5198CA57B0007E4AC /* Groceries.list in Resources */ = {isa = PBXBuildFile; fileRef = 3EBE02C2198CA57B0007E4AC /* Groceries.list */; }; - 3EBE02C6198CA57B0007E4AC /* Tech Toys.list in Resources */ = {isa = PBXBuildFile; fileRef = 3EBE02C3198CA57B0007E4AC /* Tech Toys.list */; }; - 3EBE02C8198CA5C60007E4AC /* AAPLCheckBoxLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EBE0297198CA4EB0007E4AC /* AAPLCheckBoxLayer.m */; }; - 3EBE02C9198CA5C60007E4AC /* AAPLCheckBoxLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EBE0297198CA4EB0007E4AC /* AAPLCheckBoxLayer.m */; }; - 3EBE02CA198CA5CA0007E4AC /* AAPLCheckBoxLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EBE0296198CA4EB0007E4AC /* AAPLCheckBoxLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EBE02CB198CA5CB0007E4AC /* AAPLCheckBoxLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EBE0296198CA4EB0007E4AC /* AAPLCheckBoxLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EBE02CD198CA5FD0007E4AC /* Today.list in Resources */ = {isa = PBXBuildFile; fileRef = 3EBE02C4198CA57B0007E4AC /* Today.list */; }; - 3EC67B19190B58C600290085 /* AAPLListFormatting.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EC67B15190B56FB00290085 /* AAPLListFormatting.m */; }; - 3EC72A2F1908B3F900AE5774 /* AAPLListColor+UI.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EC72A2D1908B3F900AE5774 /* AAPLListColor+UI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EC72A301908B3F900AE5774 /* AAPLListColor+UI.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EC72A2E1908B3F900AE5774 /* AAPLListColor+UI.m */; }; - 3EC72A321908B73A00AE5774 /* AAPLListColor+UI.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EC72A2E1908B3F900AE5774 /* AAPLListColor+UI.m */; }; - 3EC72A351908BA8A00AE5774 /* AAPLListItemView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EC72A331908BA8A00AE5774 /* AAPLListItemView.h */; }; - 3EC72A361908BA8A00AE5774 /* AAPLListItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EC72A341908BA8A00AE5774 /* AAPLListItemView.m */; }; - 3ED603CA19384D630044A535 /* ListerKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E745ECB190880F30090B20E /* ListerKit.framework */; }; - 3ED603CB19384D630044A535 /* ListerKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3E745ECB190880F30090B20E /* ListerKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 3ED6CA7A1908D644003EB5C0 /* AAPLList.h in Headers */ = {isa = PBXBuildFile; fileRef = 16D4DA0A19082E2B0013342E /* AAPLList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3ED9B1B01A8583A4009D57A4 /* ListerKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E745ECF190880F30090B20E /* ListerKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EDE4F9B1919E50A00AA599C /* AAPLCheckBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EDE4F991919E50A00AA599C /* AAPLCheckBox.m */; }; - 3EE49ECA198B2D62002B78BC /* AAPLListsController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EE49EC7198B2D57002B78BC /* AAPLListsController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EE49ECB198B2D62002B78BC /* AAPLListsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EE49EC8198B2D57002B78BC /* AAPLListsController.m */; }; - 3EE49ECE198B2DB1002B78BC /* AAPLListCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EE49ECC198B2DB1002B78BC /* AAPLListCoordinator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EE49ED3198B3366002B78BC /* AAPLCloudListCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EE49ED1198B3366002B78BC /* AAPLCloudListCoordinator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EE49ED4198B3366002B78BC /* AAPLCloudListCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EE49ED2198B3366002B78BC /* AAPLCloudListCoordinator.m */; }; - 3EE49ED7198B33C4002B78BC /* AAPLLocalListCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EE49ED5198B33C4002B78BC /* AAPLLocalListCoordinator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EE49ED8198B33C4002B78BC /* AAPLLocalListCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EE49ED6198B33C4002B78BC /* AAPLLocalListCoordinator.m */; }; - 3EE49EDB198B342B002B78BC /* AAPLListUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EE49ED9198B342B002B78BC /* AAPLListUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EE49EDC198B342B002B78BC /* AAPLListUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EE49EDA198B342B002B78BC /* AAPLListUtilities.m */; }; - 3EE49EF0198B3F0F002B78BC /* AAPLListInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EE49EEF198B3F0F002B78BC /* AAPLListInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3EE49EF2198B3F18002B78BC /* AAPLListInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EE49EF1198B3F18002B78BC /* AAPLListInfo.m */; }; - 3EED111719AFC35C00848265 /* AAPLTodayWidgetRowPurposeBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EED110D19AFC1B600848265 /* AAPLTodayWidgetRowPurposeBox.m */; }; - 3EED111819AFC35C00848265 /* AAPLTodayWidgetRequiresCloudViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EED111119AFC30800848265 /* AAPLTodayWidgetRequiresCloudViewController.m */; }; - 3EED111919AFC55200848265 /* AAPLTodayWidgetRequiresCloudViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3EED111219AFC30800848265 /* AAPLTodayWidgetRequiresCloudViewController.xib */; }; - 3EFDBA0D198D435800DBDB93 /* NSColor+AppSpecific.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EBE02D0198CA78D0007E4AC /* NSColor+AppSpecific.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 160D670E1B1E188600E923AB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 163275F918AD468F00A97A9F; - remoteInfo = Lister; - }; - 1611C5FE1A92A09100472891 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 163275F918AD468F00A97A9F; - remoteInfo = Lister; - }; - 1632761F18AD468F00A97A9F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1632761D18AD468F00A97A9F; - remoteInfo = ListerKit; - }; - 1633C7481939338000A9CC5E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1633C7301939337F00A9CC5E; - remoteInfo = ListerTodayOSX; - }; - 1633C7601939356E00A9CC5E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3E745ECA190880F30090B20E; - remoteInfo = ListerKitOSX; - }; - 164346DA1B0FEE5500F81674 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 164346B41B0FE72200F81674; - remoteInfo = "ListerKit (WatchOS)"; - }; - 16502F9E1B06877E00EB83DF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 16502F9B1B06877E00EB83DF; - remoteInfo = "Lister Watch Extension"; - }; - 16502FAD1B06877E00EB83DF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 16502F8F1B06877E00EB83DF; - remoteInfo = "Lister Watch App"; - }; - 169A57231B1B7EBE006BC62A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 16F60C5D1A8560470028B2D8; - remoteInfo = "Lister WatchKit Extension"; - }; - 16A1A2891938266C00302EE4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 16EB5ECA1936D39400532A4B; - remoteInfo = ListerToday; - }; - 16B6ABA81939573B00CA7E11 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1633C7301939337F00A9CC5E; - remoteInfo = ListerTodayOSX; - }; - 16CD55B31B12537500DB4F4F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 16F60C6B1A8560470028B2D8; - remoteInfo = "Lister WatchKit App"; - }; - 16F60C6E1A8560470028B2D8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 16F60C6B1A8560470028B2D8; - remoteInfo = "Lister WatchKit App"; - }; - 3E1ACA041A85810600FF4AB3 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1632761D18AD468F00A97A9F; - remoteInfo = ListerKit; - }; - 3E1ACA061A85810A00FF4AB3 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1632761D18AD468F00A97A9F; - remoteInfo = ListerKit; - }; - 3E1E31B11920A94A00A9BB12 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3E745ECA190880F30090B20E; - remoteInfo = ListerKitOSX; - }; - 3E2517CE197F7D9700B8AF96 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1632761D18AD468F00A97A9F; - remoteInfo = ListerKit; - }; - 3ED603CC19384D630044A535 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3E745ECA190880F30090B20E; - remoteInfo = ListerKitOSX; - }; - 55C783451A19C782006B0C19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 163275F218AD468F00A97A9F /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3E745ECA190880F30090B20E; - remoteInfo = ListerKitOSX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1632764118AD468F00A97A9F /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 1632762218AD468F00A97A9F /* ListerKit.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - 16502FB51B06877E00EB83DF /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 16502F9D1B06877E00EB83DF /* Lister Watch Extension.appex in Embed App Extensions */, - ); - name = "Embed App Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; - 16502FB71B06877E00EB83DF /* Embed Watch Content */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; - dstSubfolderSpec = 16; - files = ( - 16502FAF1B06877E00EB83DF /* Lister Watch App.app in Embed Watch Content */, - ); - name = "Embed Watch Content"; - runOnlyForDeploymentPostprocessing = 0; - }; - 16A1A28B1938266C00302EE4 /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 169A57221B1B7EBE006BC62A /* Lister WatchKit Extension.appex in Embed App Extensions */, - 16A1A2881938266C00302EE4 /* Lister.appex in Embed App Extensions */, - ); - name = "Embed App Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; - 16B6ABAA1939573C00CA7E11 /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 16B6ABA71939573B00CA7E11 /* Lister.appex in Embed App Extensions */, - ); - name = "Embed App Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; - 16D1A4AD1B06C5D20027BF67 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 1656DCA81B114CAE001233FA /* ListerKit.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - 3ED603CE19384D630044A535 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 3ED603CB19384D630044A535 /* ListerKit.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 16040D01190F32A5006D75CA /* AAPLCheckBoxCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLCheckBoxCell.h; sourceTree = ""; }; - 16040D02190F32A5006D75CA /* AAPLCheckBoxCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLCheckBoxCell.m; sourceTree = ""; }; - 160868741A8EA54300A5A707 /* AAPLAppLaunchContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLAppLaunchContext.h; sourceTree = ""; }; - 160868751A8EA54300A5A707 /* AAPLAppLaunchContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLAppLaunchContext.m; sourceTree = ""; }; - 1608C4D919398CE400CC1E53 /* AAPLNoItemsRowViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLNoItemsRowViewController.h; sourceTree = ""; }; - 1608C4DA19398CE400CC1E53 /* AAPLNoItemsRowViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLNoItemsRowViewController.m; sourceTree = ""; }; - 1608C4DB19398CE400CC1E53 /* AAPLNoItemsRowViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AAPLNoItemsRowViewController.xib; sourceTree = ""; }; - 1611C5F81A92A09100472891 /* Lister Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Lister Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1611C5FB1A92A09100472891 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1611C5FC1A92A09100472891 /* AAPLAppLaunchContextTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AAPLAppLaunchContextTests.m; sourceTree = ""; }; - 1623E08319378BF000939745 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1623FD061A02FE6300631A60 /* AAPLListPresenting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListPresenting.h; path = Common/AAPLListPresenting.h; sourceTree = ""; }; - 1623FD0D1A02FE7900631A60 /* AAPLAllListItemsPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLAllListItemsPresenter.h; path = Common/AAPLAllListItemsPresenter.h; sourceTree = ""; }; - 1623FD0E1A02FE7900631A60 /* AAPLAllListItemsPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLAllListItemsPresenter.m; path = Common/AAPLAllListItemsPresenter.m; sourceTree = ""; }; - 1623FD0F1A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLIncompleteListItemsPresenter.h; path = Common/AAPLIncompleteListItemsPresenter.h; sourceTree = ""; }; - 1623FD101A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLIncompleteListItemsPresenter.m; path = Common/AAPLIncompleteListItemsPresenter.m; sourceTree = ""; }; - 1624FDA61A126FD500CFB0F5 /* checkbox-blue-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-blue-checked@2x.png"; sourceTree = ""; }; - 1624FDA71A126FD500CFB0F5 /* checkbox-blue-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-blue-unchecked@2x.png"; sourceTree = ""; }; - 1624FDA81A126FD500CFB0F5 /* checkbox-gray-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-gray-checked@2x.png"; sourceTree = ""; }; - 1624FDA91A126FD500CFB0F5 /* checkbox-gray-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-gray-unchecked@2x.png"; sourceTree = ""; }; - 1624FDAA1A126FD500CFB0F5 /* checkbox-green-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-green-checked@2x.png"; sourceTree = ""; }; - 1624FDAB1A126FD500CFB0F5 /* checkbox-green-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-green-unchecked@2x.png"; sourceTree = ""; }; - 1624FDAC1A126FD500CFB0F5 /* checkbox-orange-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-orange-checked@2x.png"; sourceTree = ""; }; - 1624FDAD1A126FD500CFB0F5 /* checkbox-orange-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-orange-unchecked@2x.png"; sourceTree = ""; }; - 1624FDAE1A126FD500CFB0F5 /* checkbox-red-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-red-checked@2x.png"; sourceTree = ""; }; - 1624FDAF1A126FD500CFB0F5 /* checkbox-red-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-red-unchecked@2x.png"; sourceTree = ""; }; - 1624FDB01A126FD500CFB0F5 /* checkbox-yellow-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-yellow-checked@2x.png"; sourceTree = ""; }; - 1624FDB11A126FD500CFB0F5 /* checkbox-yellow-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-yellow-unchecked@2x.png"; sourceTree = ""; }; - 1624FDB31A126FD500CFB0F5 /* check-all@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "check-all@2x.png"; sourceTree = ""; }; - 1624FDB41A126FD500CFB0F5 /* uncheck-all@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "uncheck-all@2x.png"; sourceTree = ""; }; - 162C25BF1B1CEA07004DD2FC /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; - 163275FA18AD468F00A97A9F /* Lister.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Lister.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 163275FE18AD468F00A97A9F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1632760218AD468F00A97A9F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 1632760418AD468F00A97A9F /* Lister-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Lister-Prefix.pch"; sourceTree = ""; }; - 1632760818AD468F00A97A9F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 1632761E18AD468F00A97A9F /* ListerKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ListerKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1632762518AD468F00A97A9F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1633C7311939337F00A9CC5E /* Lister.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Lister.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 1633C7351939338000A9CC5E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1633C7361939338000A9CC5E /* ListerTodayOSX.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = ListerTodayOSX.entitlements; sourceTree = ""; }; - 1633C7391939338000A9CC5E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 1633C76C19393EB200A9CC5E /* AAPLListRowRepresentedObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListRowRepresentedObject.h; sourceTree = ""; }; - 1633C76D19393EB200A9CC5E /* AAPLListRowRepresentedObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListRowRepresentedObject.m; sourceTree = ""; }; - 1633C76E19393EB200A9CC5E /* AAPLListRowViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListRowViewController.h; sourceTree = ""; }; - 1633C76F19393EB200A9CC5E /* AAPLListRowViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListRowViewController.m; sourceTree = ""; }; - 1633C77019393EB200A9CC5E /* AAPLListRowViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AAPLListRowViewController.xib; sourceTree = ""; }; - 1633C77119393EB200A9CC5E /* AAPLOpenListerRowViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLOpenListerRowViewController.h; sourceTree = ""; }; - 1633C77219393EB200A9CC5E /* AAPLOpenListerRowViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLOpenListerRowViewController.m; sourceTree = ""; }; - 1633C77319393EB200A9CC5E /* AAPLOpenListerRowViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AAPLOpenListerRowViewController.xib; sourceTree = ""; }; - 1633C77419393EB200A9CC5E /* AAPLTodayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLTodayViewController.h; sourceTree = ""; }; - 1633C77519393EB200A9CC5E /* AAPLTodayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLTodayViewController.m; sourceTree = ""; }; - 1633C77619393EB200A9CC5E /* AAPLTodayViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AAPLTodayViewController.xib; sourceTree = ""; }; - 1634730519F5E46000387A94 /* AAPLGlanceBadge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLGlanceBadge.h; path = "Lister WatchKit Common/Glance/AAPLGlanceBadge.h"; sourceTree = ""; }; - 1634730619F5E46000387A94 /* AAPLGlanceBadge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLGlanceBadge.m; path = "Lister WatchKit Common/Glance/AAPLGlanceBadge.m"; sourceTree = ""; }; - 1634730719F5E46000387A94 /* AAPLGlanceInterfaceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLGlanceInterfaceController.h; path = Glance/AAPLGlanceInterfaceController.h; sourceTree = ""; }; - 1634730819F5E46000387A94 /* AAPLGlanceInterfaceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLGlanceInterfaceController.m; path = Glance/AAPLGlanceInterfaceController.m; sourceTree = ""; }; - 163701C5190AC1A2003FF9D0 /* AAPLListDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListDocument.h; path = ListerKit/AAPLListDocument.h; sourceTree = ""; }; - 163701C6190AC1A2003FF9D0 /* AAPLListDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListDocument.m; path = ListerKit/AAPLListDocument.m; sourceTree = ""; }; - 163701C9190AD1F9003FF9D0 /* AAPLListColorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListColorCell.h; sourceTree = ""; }; - 163701CA190AD1F9003FF9D0 /* AAPLListColorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListColorCell.m; sourceTree = ""; }; - 163701CC190AFD1D003FF9D0 /* AAPLNewListDocumentController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLNewListDocumentController.h; sourceTree = ""; }; - 163701CD190AFD1D003FF9D0 /* AAPLNewListDocumentController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLNewListDocumentController.m; sourceTree = ""; }; - 163A6CA01906ED4C008E1930 /* Lister.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Lister.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 163A6CA31906ED4C008E1930 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 163A6CA41906ED4C008E1930 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 163A6CAD1906ED4C008E1930 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 163AD5AC19082124007D9A03 /* AAPLAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLAppDelegate.h; sourceTree = ""; }; - 163AD5AD19082124007D9A03 /* AAPLAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLAppDelegate.m; sourceTree = ""; }; - 164346B51B0FE72200F81674 /* ListerKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ListerKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 164346B91B0FE72200F81674 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1645D9071B0CFAF4005E8148 /* AAPLListInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListInfo.h; sourceTree = ""; }; - 1645D9081B0CFAF4005E8148 /* AAPLListInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListInfo.m; sourceTree = ""; }; - 1645D90B1B0CFB5A005E8148 /* AAPLConnectivityListsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLConnectivityListsController.h; sourceTree = ""; }; - 1645D90C1B0CFB5A005E8148 /* AAPLConnectivityListsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLConnectivityListsController.m; sourceTree = ""; }; - 16502F901B06877E00EB83DF /* Lister Watch App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Lister Watch App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 16502F951B06877E00EB83DF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 16502F971B06877E00EB83DF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 16502F9C1B06877E00EB83DF /* Lister Watch Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Lister Watch Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; - 16502FA11B06877E00EB83DF /* AAPLListsInterfaceController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AAPLListsInterfaceController.h; sourceTree = ""; }; - 16502FA21B06877E00EB83DF /* AAPLListsInterfaceController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AAPLListsInterfaceController.m; sourceTree = ""; }; - 16502FA41B06877E00EB83DF /* AAPLExtensionDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AAPLExtensionDelegate.h; sourceTree = ""; }; - 16502FA51B06877E00EB83DF /* AAPLExtensionDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AAPLExtensionDelegate.m; sourceTree = ""; }; - 16502FA71B06877E00EB83DF /* AAPLGlanceInterfaceController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AAPLGlanceInterfaceController.h; sourceTree = ""; }; - 16502FA81B06877E00EB83DF /* AAPLGlanceInterfaceController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AAPLGlanceInterfaceController.m; sourceTree = ""; }; - 16502FAA1B06877E00EB83DF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 16502FAC1B06877E00EB83DF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 16502FBB1B06892100EB83DF /* glance-0@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-0@2x.png"; sourceTree = ""; }; - 16502FBC1B06892100EB83DF /* glance-10@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-10@2x.png"; sourceTree = ""; }; - 16502FBD1B06892100EB83DF /* glance-11@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-11@2x.png"; sourceTree = ""; }; - 16502FBE1B06892100EB83DF /* glance-12@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-12@2x.png"; sourceTree = ""; }; - 16502FBF1B06892100EB83DF /* glance-13@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-13@2x.png"; sourceTree = ""; }; - 16502FC01B06892100EB83DF /* glance-14@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-14@2x.png"; sourceTree = ""; }; - 16502FC11B06892100EB83DF /* glance-15@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-15@2x.png"; sourceTree = ""; }; - 16502FC21B06892100EB83DF /* glance-16@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-16@2x.png"; sourceTree = ""; }; - 16502FC31B06892100EB83DF /* glance-17@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-17@2x.png"; sourceTree = ""; }; - 16502FC41B06892100EB83DF /* glance-18@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-18@2x.png"; sourceTree = ""; }; - 16502FC51B06892100EB83DF /* glance-19@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-19@2x.png"; sourceTree = ""; }; - 16502FC61B06892100EB83DF /* glance-1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-1@2x.png"; sourceTree = ""; }; - 16502FC71B06892100EB83DF /* glance-20@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-20@2x.png"; sourceTree = ""; }; - 16502FC81B06892100EB83DF /* glance-21@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-21@2x.png"; sourceTree = ""; }; - 16502FC91B06892100EB83DF /* glance-22@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-22@2x.png"; sourceTree = ""; }; - 16502FCA1B06892100EB83DF /* glance-23@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-23@2x.png"; sourceTree = ""; }; - 16502FCB1B06892100EB83DF /* glance-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-24@2x.png"; sourceTree = ""; }; - 16502FCC1B06892100EB83DF /* glance-25@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-25@2x.png"; sourceTree = ""; }; - 16502FCD1B06892100EB83DF /* glance-26@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-26@2x.png"; sourceTree = ""; }; - 16502FCE1B06892100EB83DF /* glance-27@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-27@2x.png"; sourceTree = ""; }; - 16502FCF1B06892100EB83DF /* glance-28@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-28@2x.png"; sourceTree = ""; }; - 16502FD01B06892100EB83DF /* glance-29@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-29@2x.png"; sourceTree = ""; }; - 16502FD11B06892100EB83DF /* glance-2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-2@2x.png"; sourceTree = ""; }; - 16502FD21B06892100EB83DF /* glance-30@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-30@2x.png"; sourceTree = ""; }; - 16502FD31B06892100EB83DF /* glance-31@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-31@2x.png"; sourceTree = ""; }; - 16502FD41B06892100EB83DF /* glance-32@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-32@2x.png"; sourceTree = ""; }; - 16502FD51B06892100EB83DF /* glance-33@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-33@2x.png"; sourceTree = ""; }; - 16502FD61B06892100EB83DF /* glance-34@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-34@2x.png"; sourceTree = ""; }; - 16502FD71B06892100EB83DF /* glance-35@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-35@2x.png"; sourceTree = ""; }; - 16502FD81B06892100EB83DF /* glance-36@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-36@2x.png"; sourceTree = ""; }; - 16502FD91B06892100EB83DF /* glance-37@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-37@2x.png"; sourceTree = ""; }; - 16502FDA1B06892100EB83DF /* glance-38@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-38@2x.png"; sourceTree = ""; }; - 16502FDB1B06892100EB83DF /* glance-39@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-39@2x.png"; sourceTree = ""; }; - 16502FDC1B06892100EB83DF /* glance-3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-3@2x.png"; sourceTree = ""; }; - 16502FDD1B06892100EB83DF /* glance-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-40@2x.png"; sourceTree = ""; }; - 16502FDE1B06892100EB83DF /* glance-41@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-41@2x.png"; sourceTree = ""; }; - 16502FDF1B06892100EB83DF /* glance-42@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-42@2x.png"; sourceTree = ""; }; - 16502FE01B06892100EB83DF /* glance-43@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-43@2x.png"; sourceTree = ""; }; - 16502FE11B06892100EB83DF /* glance-44@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-44@2x.png"; sourceTree = ""; }; - 16502FE21B06892100EB83DF /* glance-4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-4@2x.png"; sourceTree = ""; }; - 16502FE31B06892100EB83DF /* glance-5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-5@2x.png"; sourceTree = ""; }; - 16502FE41B06892100EB83DF /* glance-6@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-6@2x.png"; sourceTree = ""; }; - 16502FE51B06892100EB83DF /* glance-7@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-7@2x.png"; sourceTree = ""; }; - 16502FE61B06892100EB83DF /* glance-8@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-8@2x.png"; sourceTree = ""; }; - 16502FE71B06892100EB83DF /* glance-9@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "glance-9@2x.png"; sourceTree = ""; }; - 16502FE91B06892100EB83DF /* checkbox-blue-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-blue-checked@2x.png"; sourceTree = ""; }; - 16502FEA1B06892100EB83DF /* checkbox-blue-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-blue-unchecked@2x.png"; sourceTree = ""; }; - 16502FEB1B06892100EB83DF /* checkbox-gray-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-gray-checked@2x.png"; sourceTree = ""; }; - 16502FEC1B06892100EB83DF /* checkbox-gray-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-gray-unchecked@2x.png"; sourceTree = ""; }; - 16502FED1B06892100EB83DF /* checkbox-green-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-green-checked@2x.png"; sourceTree = ""; }; - 16502FEE1B06892100EB83DF /* checkbox-green-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-green-unchecked@2x.png"; sourceTree = ""; }; - 16502FEF1B06892100EB83DF /* checkbox-orange-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-orange-checked@2x.png"; sourceTree = ""; }; - 16502FF01B06892100EB83DF /* checkbox-orange-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-orange-unchecked@2x.png"; sourceTree = ""; }; - 16502FF11B06892100EB83DF /* checkbox-red-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-red-checked@2x.png"; sourceTree = ""; }; - 16502FF21B06892100EB83DF /* checkbox-red-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-red-unchecked@2x.png"; sourceTree = ""; }; - 16502FF31B06892100EB83DF /* checkbox-yellow-checked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-yellow-checked@2x.png"; sourceTree = ""; }; - 16502FF41B06892100EB83DF /* checkbox-yellow-unchecked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkbox-yellow-unchecked@2x.png"; sourceTree = ""; }; - 16502FF61B06892100EB83DF /* check-all@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "check-all@2x.png"; sourceTree = ""; }; - 16502FF71B06892100EB83DF /* uncheck-all@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "uncheck-all@2x.png"; sourceTree = ""; }; - 165030371B068AB600EB83DF /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; - 165030381B068AB600EB83DF /* Localizable.stringsdict */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Localizable.stringsdict; sourceTree = ""; }; - 16533DB01B091B6C006A90C4 /* AAPLListInterfaceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListInterfaceController.h; sourceTree = ""; }; - 16533DB11B091B6C006A90C4 /* AAPLListInterfaceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListInterfaceController.m; sourceTree = ""; }; - 1656DCA41B113DF2001233FA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS2.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 16892DE21B06E2F00001FF08 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; - 168AF80A191AA89700D6BA5A /* ListerOSX.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = ListerOSX.entitlements; sourceTree = ""; }; - 169DAF1D192D1C1C007F738B /* AAPLTodayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLTodayViewController.h; path = ListerToday/AAPLTodayViewController.h; sourceTree = ""; }; - 169DAF1E192D1C1C007F738B /* AAPLTodayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLTodayViewController.m; path = ListerToday/AAPLTodayViewController.m; sourceTree = ""; }; - 169DAF20192D1C1C007F738B /* Today.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Today.storyboard; path = ListerToday/Today.storyboard; sourceTree = ""; }; - 169E922A18AD7EF100139723 /* AAPLListDocumentsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListDocumentsViewController.h; sourceTree = ""; }; - 169E922B18AD7EF100139723 /* AAPLListDocumentsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListDocumentsViewController.m; sourceTree = ""; }; - 16A3C1CF18B2C2530087ACED /* Lister.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Lister.entitlements; sourceTree = ""; }; - 16ADF818191AAC2E00CA9120 /* AAPLAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLAppDelegate.h; sourceTree = ""; }; - 16ADF819191AAC2E00CA9120 /* AAPLAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLAppDelegate.m; sourceTree = ""; }; - 16B1D9291A1A785E009EEBED /* AAPLDirectoryMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLDirectoryMonitor.h; sourceTree = ""; }; - 16B1D92A1A1A785E009EEBED /* AAPLDirectoryMonitor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLDirectoryMonitor.m; sourceTree = ""; }; - 16B9353E1909753F004E89E3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 16C1577018AD9B7100B21147 /* AAPLListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListViewController.h; sourceTree = ""; }; - 16C1577118AD9B7100B21147 /* AAPLListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListViewController.m; sourceTree = ""; }; - 16C1577418ADC47F00B21147 /* AAPLListItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListItemCell.h; sourceTree = ""; }; - 16C1577518ADC47F00B21147 /* AAPLListItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListItemCell.m; sourceTree = ""; }; - 16C89AA81909AD4600752460 /* AAPLListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListCell.h; sourceTree = ""; }; - 16C89AA91909AD4600752460 /* AAPLListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListCell.m; sourceTree = ""; }; - 16CD55B11B124B5100DB4F4F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "Base.lproj/Launch Screen.storyboard"; sourceTree = ""; }; - 16D4DA0A19082E2B0013342E /* AAPLList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLList.h; path = Common/AAPLList.h; sourceTree = ""; }; - 16D4DA0B19082E2B0013342E /* AAPLList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLList.m; path = Common/AAPLList.m; sourceTree = ""; }; - 16D4DA0C19082E2B0013342E /* AAPLListItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListItem.h; path = Common/AAPLListItem.h; sourceTree = ""; }; - 16D4DA0D19082E2B0013342E /* AAPLListItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListItem.m; path = Common/AAPLListItem.m; sourceTree = ""; }; - 16E1FA02191DD200006AF95B /* AAPLCheckBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLCheckBox.h; path = ListerKit/AAPLCheckBox.h; sourceTree = ""; }; - 16E1FA03191DD200006AF95B /* AAPLCheckBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLCheckBox.m; path = ListerKit/AAPLCheckBox.m; sourceTree = ""; }; - 16E330C8191EDAC400698F8C /* AAPLTodayListManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLTodayListManager.h; sourceTree = ""; }; - 16E330C9191EDAC400698F8C /* AAPLTodayListManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLTodayListManager.m; sourceTree = ""; }; - 16E3778B19FAE1CC000F9EC3 /* glance-0@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-0@2x.png"; path = "Assets/Badge/glance-0@2x.png"; sourceTree = ""; }; - 16E3778C19FAE1CC000F9EC3 /* glance-1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-1@2x.png"; path = "Assets/Badge/glance-1@2x.png"; sourceTree = ""; }; - 16E3778D19FAE1CC000F9EC3 /* glance-2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-2@2x.png"; path = "Assets/Badge/glance-2@2x.png"; sourceTree = ""; }; - 16E3778E19FAE1CC000F9EC3 /* glance-3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-3@2x.png"; path = "Assets/Badge/glance-3@2x.png"; sourceTree = ""; }; - 16E3778F19FAE1CC000F9EC3 /* glance-4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-4@2x.png"; path = "Assets/Badge/glance-4@2x.png"; sourceTree = ""; }; - 16E3779019FAE1CC000F9EC3 /* glance-5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-5@2x.png"; path = "Assets/Badge/glance-5@2x.png"; sourceTree = ""; }; - 16E3779119FAE1CC000F9EC3 /* glance-6@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-6@2x.png"; path = "Assets/Badge/glance-6@2x.png"; sourceTree = ""; }; - 16E3779219FAE1CC000F9EC3 /* glance-7@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-7@2x.png"; path = "Assets/Badge/glance-7@2x.png"; sourceTree = ""; }; - 16E3779319FAE1CC000F9EC3 /* glance-8@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-8@2x.png"; path = "Assets/Badge/glance-8@2x.png"; sourceTree = ""; }; - 16E3779419FAE1CC000F9EC3 /* glance-9@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-9@2x.png"; path = "Assets/Badge/glance-9@2x.png"; sourceTree = ""; }; - 16E3779519FAE1CC000F9EC3 /* glance-10@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-10@2x.png"; path = "Assets/Badge/glance-10@2x.png"; sourceTree = ""; }; - 16E3779619FAE1CC000F9EC3 /* glance-11@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-11@2x.png"; path = "Assets/Badge/glance-11@2x.png"; sourceTree = ""; }; - 16E3779719FAE1CC000F9EC3 /* glance-12@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-12@2x.png"; path = "Assets/Badge/glance-12@2x.png"; sourceTree = ""; }; - 16E3779819FAE1CC000F9EC3 /* glance-13@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-13@2x.png"; path = "Assets/Badge/glance-13@2x.png"; sourceTree = ""; }; - 16E3779919FAE1CC000F9EC3 /* glance-14@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-14@2x.png"; path = "Assets/Badge/glance-14@2x.png"; sourceTree = ""; }; - 16E3779A19FAE1CC000F9EC3 /* glance-15@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-15@2x.png"; path = "Assets/Badge/glance-15@2x.png"; sourceTree = ""; }; - 16E3779B19FAE1CC000F9EC3 /* glance-16@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-16@2x.png"; path = "Assets/Badge/glance-16@2x.png"; sourceTree = ""; }; - 16E3779C19FAE1CC000F9EC3 /* glance-17@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-17@2x.png"; path = "Assets/Badge/glance-17@2x.png"; sourceTree = ""; }; - 16E3779D19FAE1CC000F9EC3 /* glance-18@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-18@2x.png"; path = "Assets/Badge/glance-18@2x.png"; sourceTree = ""; }; - 16E3779E19FAE1CC000F9EC3 /* glance-19@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-19@2x.png"; path = "Assets/Badge/glance-19@2x.png"; sourceTree = ""; }; - 16E3779F19FAE1CC000F9EC3 /* glance-20@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-20@2x.png"; path = "Assets/Badge/glance-20@2x.png"; sourceTree = ""; }; - 16E377A019FAE1CC000F9EC3 /* glance-21@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-21@2x.png"; path = "Assets/Badge/glance-21@2x.png"; sourceTree = ""; }; - 16E377A119FAE1CC000F9EC3 /* glance-22@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-22@2x.png"; path = "Assets/Badge/glance-22@2x.png"; sourceTree = ""; }; - 16E377A219FAE1CC000F9EC3 /* glance-23@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-23@2x.png"; path = "Assets/Badge/glance-23@2x.png"; sourceTree = ""; }; - 16E377A319FAE1CC000F9EC3 /* glance-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-24@2x.png"; path = "Assets/Badge/glance-24@2x.png"; sourceTree = ""; }; - 16E377A419FAE1CC000F9EC3 /* glance-25@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-25@2x.png"; path = "Assets/Badge/glance-25@2x.png"; sourceTree = ""; }; - 16E377A519FAE1CC000F9EC3 /* glance-26@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-26@2x.png"; path = "Assets/Badge/glance-26@2x.png"; sourceTree = ""; }; - 16E377A619FAE1CC000F9EC3 /* glance-27@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-27@2x.png"; path = "Assets/Badge/glance-27@2x.png"; sourceTree = ""; }; - 16E377A719FAE1CC000F9EC3 /* glance-28@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-28@2x.png"; path = "Assets/Badge/glance-28@2x.png"; sourceTree = ""; }; - 16E377A819FAE1CC000F9EC3 /* glance-29@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-29@2x.png"; path = "Assets/Badge/glance-29@2x.png"; sourceTree = ""; }; - 16E377A919FAE1CC000F9EC3 /* glance-30@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-30@2x.png"; path = "Assets/Badge/glance-30@2x.png"; sourceTree = ""; }; - 16E377AA19FAE1CC000F9EC3 /* glance-31@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-31@2x.png"; path = "Assets/Badge/glance-31@2x.png"; sourceTree = ""; }; - 16E377AB19FAE1CC000F9EC3 /* glance-32@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-32@2x.png"; path = "Assets/Badge/glance-32@2x.png"; sourceTree = ""; }; - 16E377AC19FAE1CC000F9EC3 /* glance-33@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-33@2x.png"; path = "Assets/Badge/glance-33@2x.png"; sourceTree = ""; }; - 16E377AD19FAE1CC000F9EC3 /* glance-34@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-34@2x.png"; path = "Assets/Badge/glance-34@2x.png"; sourceTree = ""; }; - 16E377AE19FAE1CC000F9EC3 /* glance-35@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-35@2x.png"; path = "Assets/Badge/glance-35@2x.png"; sourceTree = ""; }; - 16E377AF19FAE1CC000F9EC3 /* glance-36@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-36@2x.png"; path = "Assets/Badge/glance-36@2x.png"; sourceTree = ""; }; - 16E377B019FAE1CC000F9EC3 /* glance-37@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-37@2x.png"; path = "Assets/Badge/glance-37@2x.png"; sourceTree = ""; }; - 16E377B119FAE1CC000F9EC3 /* glance-38@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-38@2x.png"; path = "Assets/Badge/glance-38@2x.png"; sourceTree = ""; }; - 16E377B219FAE1CC000F9EC3 /* glance-39@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-39@2x.png"; path = "Assets/Badge/glance-39@2x.png"; sourceTree = ""; }; - 16E377B319FAE1CC000F9EC3 /* glance-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-40@2x.png"; path = "Assets/Badge/glance-40@2x.png"; sourceTree = ""; }; - 16E377B419FAE1CC000F9EC3 /* glance-41@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-41@2x.png"; path = "Assets/Badge/glance-41@2x.png"; sourceTree = ""; }; - 16E377B519FAE1CC000F9EC3 /* glance-42@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-42@2x.png"; path = "Assets/Badge/glance-42@2x.png"; sourceTree = ""; }; - 16E377B619FAE1CC000F9EC3 /* glance-43@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-43@2x.png"; path = "Assets/Badge/glance-43@2x.png"; sourceTree = ""; }; - 16E377B719FAE1CC000F9EC3 /* glance-44@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "glance-44@2x.png"; path = "Assets/Badge/glance-44@2x.png"; sourceTree = ""; }; - 16EB5ECB1936D39400532A4B /* Lister.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Lister.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 16EB5EDE1936D41C00532A4B /* ListerToday.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = ListerToday.entitlements; sourceTree = ""; }; - 16F60C5E1A8560470028B2D8 /* Lister WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Lister WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; - 16F60C611A8560470028B2D8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 16F60C681A8560470028B2D8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 16F60C6C1A8560470028B2D8 /* Lister WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Lister WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 16F60C741A8560470028B2D8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; - 16FEF6AA1A117A4500E0CC5E /* AAPLListItemRowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListItemRowController.h; path = "../Lister WatchKit Common/AAPLListItemRowController.h"; sourceTree = ""; }; - 16FEF6AB1A117A4500E0CC5E /* AAPLListItemRowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListItemRowController.m; path = "../Lister WatchKit Common/AAPLListItemRowController.m"; sourceTree = ""; }; - 3E028CCE1A1690B0004B6F9D /* Localizable.stringsdict */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Localizable.stringsdict; sourceTree = ""; }; - 3E028CD11A1690B7004B6F9D /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; - 3E04D0E219D9FB7500C59A0F /* WatchKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WatchKit.framework; path = System/Library/Frameworks/WatchKit.framework; sourceTree = SDKROOT; }; - 3E04D0E719D9FB7500C59A0F /* AAPLListsInterfaceController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AAPLListsInterfaceController.h; sourceTree = ""; }; - 3E04D0E819D9FB7500C59A0F /* AAPLListsInterfaceController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AAPLListsInterfaceController.m; sourceTree = ""; }; - 3E04D0F219D9FB7500C59A0F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 3E0C2C311A154B0900976F0D /* AAPLIncompleteListItemsPresenterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLIncompleteListItemsPresenterTests.m; path = "ListerKit Tests/AAPLIncompleteListItemsPresenterTests.m"; sourceTree = ""; }; - 3E185F6519104409007B95FB /* AAPLTableRowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLTableRowView.h; sourceTree = ""; }; - 3E185F6619104409007B95FB /* AAPLTableRowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLTableRowView.m; sourceTree = ""; }; - 3E2517C7197F7D9600B8AF96 /* ListerKit Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ListerKit Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3E2517CB197F7D9700B8AF96 /* AAPLListTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AAPLListTests.m; path = "ListerKit Tests/AAPLListTests.m"; sourceTree = ""; }; - 3E2517D4197F7DB100B8AF96 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 3E2517E7197F7E1900B8AF96 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 3E2A4A631A14800A00E40DA5 /* AAPLListPresenterTestHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListPresenterTestHelper.h; path = "ListerKit Tests/AAPLListPresenterTestHelper.h"; sourceTree = ""; }; - 3E2A4A641A14800A00E40DA5 /* AAPLListPresenterTestHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListPresenterTestHelper.m; path = "ListerKit Tests/AAPLListPresenterTestHelper.m"; sourceTree = ""; }; - 3E3208BE19088F60003C9147 /* AAPLColorPaletteView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLColorPaletteView.h; sourceTree = ""; }; - 3E3208BF19088F60003C9147 /* AAPLColorPaletteView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLColorPaletteView.m; sourceTree = ""; }; - 3E351EBA19DA07E100971413 /* AAPLColoredTextRowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLColoredTextRowController.h; path = "../Lister WatchKit Common/AAPLColoredTextRowController.h"; sourceTree = ""; }; - 3E351EBB19DA07E100971413 /* AAPLColoredTextRowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLColoredTextRowController.m; path = "../Lister WatchKit Common/AAPLColoredTextRowController.m"; sourceTree = ""; }; - 3E5C9F2E1936FE3E00EE1526 /* AAPLAppConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLAppConfiguration.h; path = Common/AAPLAppConfiguration.h; sourceTree = SOURCE_ROOT; }; - 3E5C9F2F1936FE3E00EE1526 /* AAPLAppConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLAppConfiguration.m; path = Common/AAPLAppConfiguration.m; sourceTree = SOURCE_ROOT; }; - 3E5C9F341936FE6500EE1526 /* AAPLListDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListDocument.h; sourceTree = ""; }; - 3E5C9F351936FE6500EE1526 /* AAPLListDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListDocument.m; sourceTree = ""; }; - 3E62245E1924623D00FFC808 /* AAPLListWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListWindowController.h; sourceTree = ""; }; - 3E62245F1924623D00FFC808 /* AAPLListWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListWindowController.m; sourceTree = ""; }; - 3E745ECB190880F30090B20E /* ListerKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ListerKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3E745ECE190880F30090B20E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 3E745ECF190880F30090B20E /* ListerKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ListerKit.h; path = Common/ListerKit.h; sourceTree = ""; }; - 3E745EFB190887500090B20E /* AAPLListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListViewController.h; sourceTree = ""; }; - 3E745EFC190887500090B20E /* AAPLListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListViewController.m; sourceTree = ""; }; - 3E79958E19EC841D0077233E /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; - 3E7C9AFD1A15003900909602 /* AAPLAllListItemsPresenterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLAllListItemsPresenterTests.m; path = "ListerKit Tests/AAPLAllListItemsPresenterTests.m"; sourceTree = ""; }; - 3E7DBC5919296BF200830E02 /* AAPLAddItemViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLAddItemViewController.h; sourceTree = ""; }; - 3E7DBC5A19296BF200830E02 /* AAPLAddItemViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLAddItemViewController.m; sourceTree = ""; }; - 3E7FE73019DBB2AA0056487F /* AAPLListInterfaceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListInterfaceController.h; sourceTree = ""; }; - 3E7FE73119DBB2AA0056487F /* AAPLListInterfaceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListInterfaceController.m; sourceTree = ""; }; - 3E7FE73819DBB6AE0056487F /* AAPLWatchStoryboardConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLWatchStoryboardConstants.h; path = "Lister WatchKit Common/AAPLWatchStoryboardConstants.h"; sourceTree = ""; }; - 3E7FE73919DBB6AE0056487F /* AAPLWatchStoryboardConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLWatchStoryboardConstants.m; path = "Lister WatchKit Common/AAPLWatchStoryboardConstants.m"; sourceTree = ""; }; - 3E9053121A132884006DCBA7 /* AAPLListPresenterDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListPresenterDelegate.h; path = Common/AAPLListPresenterDelegate.h; sourceTree = ""; }; - 3E9053151A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListPresenterAlgorithms.h; path = Common/AAPLListPresenterAlgorithms.h; sourceTree = ""; }; - 3E9053161A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListPresenterAlgorithms.m; path = Common/AAPLListPresenterAlgorithms.m; sourceTree = ""; }; - 3E9053171A13289F006DCBA7 /* AAPLListPresenterUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListPresenterUtilities.h; path = Common/AAPLListPresenterUtilities.h; sourceTree = ""; }; - 3E9053181A13289F006DCBA7 /* AAPLListPresenterUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListPresenterUtilities.m; path = Common/AAPLListPresenterUtilities.m; sourceTree = ""; }; - 3E950670198575570030A9D1 /* ListerKit Tests (OS X).xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ListerKit Tests (OS X).xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3E95067C1985AA8A0030A9D1 /* AAPLListItemTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListItemTests.m; path = "ListerKit Tests/AAPLListItemTests.m"; sourceTree = ""; }; - 3E97926319097A860062A433 /* AAPLListTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListTableView.h; sourceTree = ""; }; - 3E97926419097A860062A433 /* AAPLListTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListTableView.m; sourceTree = ""; }; - 3E9792671909807D0062A433 /* AAPLResizingTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLResizingTextField.h; sourceTree = ""; }; - 3E9792681909807D0062A433 /* AAPLResizingTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLResizingTextField.m; sourceTree = ""; }; - 3EB8B8AD19DA18CA0077FF44 /* Lister WatchKit Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Lister WatchKit Extension.entitlements"; sourceTree = ""; }; - 3EBE0296198CA4EB0007E4AC /* AAPLCheckBoxLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLCheckBoxLayer.h; path = Common/AAPLCheckBoxLayer.h; sourceTree = ""; }; - 3EBE0297198CA4EB0007E4AC /* AAPLCheckBoxLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLCheckBoxLayer.m; path = Common/AAPLCheckBoxLayer.m; sourceTree = ""; }; - 3EBE0299198CA51D0007E4AC /* ListerDocumentIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = ListerDocumentIcon.icns; path = Resources/ListerDocumentIcon.icns; sourceTree = ""; }; - 3EBE02C2198CA57B0007E4AC /* Groceries.list */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = Groceries.list; path = Resources/Groceries.list; sourceTree = SOURCE_ROOT; }; - 3EBE02C3198CA57B0007E4AC /* Tech Toys.list */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = "Tech Toys.list"; path = "Resources/Tech Toys.list"; sourceTree = SOURCE_ROOT; }; - 3EBE02C4198CA57B0007E4AC /* Today.list */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = Today.list; path = Resources/Today.list; sourceTree = SOURCE_ROOT; }; - 3EBE02CF198CA78D0007E4AC /* NSColor+AppSpecific.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSColor+AppSpecific.h"; sourceTree = ""; }; - 3EBE02D0198CA78D0007E4AC /* NSColor+AppSpecific.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSColor+AppSpecific.m"; sourceTree = ""; }; - 3EC67B14190B56FB00290085 /* AAPLListFormatting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListFormatting.h; sourceTree = ""; }; - 3EC67B15190B56FB00290085 /* AAPLListFormatting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListFormatting.m; sourceTree = ""; }; - 3EC72A2D1908B3F900AE5774 /* AAPLListColor+UI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "AAPLListColor+UI.h"; path = "Common/AAPLListColor+UI.h"; sourceTree = ""; }; - 3EC72A2E1908B3F900AE5774 /* AAPLListColor+UI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "AAPLListColor+UI.m"; path = "Common/AAPLListColor+UI.m"; sourceTree = ""; }; - 3EC72A331908BA8A00AE5774 /* AAPLListItemView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLListItemView.h; sourceTree = ""; }; - 3EC72A341908BA8A00AE5774 /* AAPLListItemView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLListItemView.m; sourceTree = ""; }; - 3EDE4F981919E50A00AA599C /* AAPLCheckBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLCheckBox.h; sourceTree = ""; }; - 3EDE4F991919E50A00AA599C /* AAPLCheckBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLCheckBox.m; sourceTree = ""; }; - 3EE49EC7198B2D57002B78BC /* AAPLListsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListsController.h; path = ListerKit/AAPLListsController.h; sourceTree = ""; }; - 3EE49EC8198B2D57002B78BC /* AAPLListsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListsController.m; path = ListerKit/AAPLListsController.m; sourceTree = ""; }; - 3EE49ECC198B2DB1002B78BC /* AAPLListCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListCoordinator.h; path = ListerKit/AAPLListCoordinator.h; sourceTree = ""; }; - 3EE49ED1198B3366002B78BC /* AAPLCloudListCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLCloudListCoordinator.h; sourceTree = ""; }; - 3EE49ED2198B3366002B78BC /* AAPLCloudListCoordinator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLCloudListCoordinator.m; sourceTree = ""; }; - 3EE49ED5198B33C4002B78BC /* AAPLLocalListCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLLocalListCoordinator.h; sourceTree = ""; }; - 3EE49ED6198B33C4002B78BC /* AAPLLocalListCoordinator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLLocalListCoordinator.m; sourceTree = ""; }; - 3EE49ED9198B342B002B78BC /* AAPLListUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListUtilities.h; path = ListerKit/AAPLListUtilities.h; sourceTree = ""; }; - 3EE49EDA198B342B002B78BC /* AAPLListUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListUtilities.m; path = ListerKit/AAPLListUtilities.m; sourceTree = ""; }; - 3EE49EEF198B3F0F002B78BC /* AAPLListInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AAPLListInfo.h; path = ListerKit/AAPLListInfo.h; sourceTree = ""; }; - 3EE49EF1198B3F18002B78BC /* AAPLListInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AAPLListInfo.m; path = ListerKit/AAPLListInfo.m; sourceTree = ""; }; - 3EED110C19AFC1B600848265 /* AAPLTodayWidgetRowPurposeBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLTodayWidgetRowPurposeBox.h; sourceTree = ""; }; - 3EED110D19AFC1B600848265 /* AAPLTodayWidgetRowPurposeBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLTodayWidgetRowPurposeBox.m; sourceTree = ""; }; - 3EED111019AFC30800848265 /* AAPLTodayWidgetRequiresCloudViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLTodayWidgetRequiresCloudViewController.h; sourceTree = ""; }; - 3EED111119AFC30800848265 /* AAPLTodayWidgetRequiresCloudViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLTodayWidgetRequiresCloudViewController.m; sourceTree = ""; }; - 3EED111219AFC30800848265 /* AAPLTodayWidgetRequiresCloudViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AAPLTodayWidgetRequiresCloudViewController.xib; sourceTree = ""; }; - 55BB61D61A13C84D001BE161 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1611C5F51A92A09100472891 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 163275F718AD468F00A97A9F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1632762118AD468F00A97A9F /* ListerKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1632761A18AD468F00A97A9F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1633C72E1939337F00A9CC5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1633C74D193933B100A9CC5E /* ListerKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 163A6C9C1906ED4C008E1930 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3ED603CA19384D630044A535 /* ListerKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 164346B11B0FE72200F81674 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1656DCA51B113DF2001233FA /* UIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16502F991B06877E00EB83DF /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1656DCA61B113E60001233FA /* UIKit.framework in Frameworks */, - 164346D91B0FEDF500F81674 /* ListerKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16EB5EC81936D39400532A4B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 162C25C01B1CEA07004DD2FC /* NotificationCenter.framework in Frameworks */, - 16EB5EDF1936D48D00532A4B /* ListerKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16F60C5B1A8560470028B2D8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E2517C4197F7D9600B8AF96 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E2517CD197F7D9700B8AF96 /* ListerKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E745EC7190880F30090B20E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E95066D198575570030A9D1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E0C2C301A153E5500976F0D /* ListerKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 16040CFD190F3259006D75CA /* Views */ = { - isa = PBXGroup; - children = ( - 16040D01190F32A5006D75CA /* AAPLCheckBoxCell.h */, - 16040D02190F32A5006D75CA /* AAPLCheckBoxCell.m */, - ); - name = Views; - path = ListerToday; - sourceTree = ""; - }; - 160868731A8EA49000A5A707 /* Context */ = { - isa = PBXGroup; - children = ( - 160868741A8EA54300A5A707 /* AAPLAppLaunchContext.h */, - 160868751A8EA54300A5A707 /* AAPLAppLaunchContext.m */, - ); - name = Context; - sourceTree = ""; - }; - 1611C5F91A92A09100472891 /* Tests */ = { - isa = PBXGroup; - children = ( - 1611C5FC1A92A09100472891 /* AAPLAppLaunchContextTests.m */, - 1611C5FA1A92A09100472891 /* Supporting Files */, - ); - name = Tests; - path = "Lister Tests"; - sourceTree = SOURCE_ROOT; - }; - 1611C5FA1A92A09100472891 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 1611C5FB1A92A09100472891 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 1623E08219378BD600939745 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 16EB5EDE1936D41C00532A4B /* ListerToday.entitlements */, - 1623E08319378BF000939745 /* Info.plist */, - ); - name = "Supporting Files"; - path = ListerToday; - sourceTree = ""; - }; - 1623FD0C1A02FE6700631A60 /* Presenters */ = { - isa = PBXGroup; - children = ( - 3E9053121A132884006DCBA7 /* AAPLListPresenterDelegate.h */, - 1623FD061A02FE6300631A60 /* AAPLListPresenting.h */, - 1623FD0D1A02FE7900631A60 /* AAPLAllListItemsPresenter.h */, - 1623FD0E1A02FE7900631A60 /* AAPLAllListItemsPresenter.m */, - 1623FD0F1A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h */, - 1623FD101A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m */, - 3EFDD4D01A118CE900FDAFCE /* Helper Functions */, - ); - name = Presenters; - sourceTree = ""; - }; - 1623FD191A02FE7F00631A60 /* List Presenter Tests */ = { - isa = PBXGroup; - children = ( - 3E2A4A631A14800A00E40DA5 /* AAPLListPresenterTestHelper.h */, - 3E2A4A641A14800A00E40DA5 /* AAPLListPresenterTestHelper.m */, - 3E7C9AFD1A15003900909602 /* AAPLAllListItemsPresenterTests.m */, - 3E0C2C311A154B0900976F0D /* AAPLIncompleteListItemsPresenterTests.m */, - ); - name = "List Presenter Tests"; - sourceTree = ""; - }; - 1624FDA51A126FD500CFB0F5 /* CheckBox */ = { - isa = PBXGroup; - children = ( - 1624FDA61A126FD500CFB0F5 /* checkbox-blue-checked@2x.png */, - 1624FDA71A126FD500CFB0F5 /* checkbox-blue-unchecked@2x.png */, - 1624FDA81A126FD500CFB0F5 /* checkbox-gray-checked@2x.png */, - 1624FDA91A126FD500CFB0F5 /* checkbox-gray-unchecked@2x.png */, - 1624FDAA1A126FD500CFB0F5 /* checkbox-green-checked@2x.png */, - 1624FDAB1A126FD500CFB0F5 /* checkbox-green-unchecked@2x.png */, - 1624FDAC1A126FD500CFB0F5 /* checkbox-orange-checked@2x.png */, - 1624FDAD1A126FD500CFB0F5 /* checkbox-orange-unchecked@2x.png */, - 1624FDAE1A126FD500CFB0F5 /* checkbox-red-checked@2x.png */, - 1624FDAF1A126FD500CFB0F5 /* checkbox-red-unchecked@2x.png */, - 1624FDB01A126FD500CFB0F5 /* checkbox-yellow-checked@2x.png */, - 1624FDB11A126FD500CFB0F5 /* checkbox-yellow-unchecked@2x.png */, - ); - name = CheckBox; - path = Assets/CheckBox; - sourceTree = ""; - }; - 1624FDB21A126FD500CFB0F5 /* Menus */ = { - isa = PBXGroup; - children = ( - 1624FDB31A126FD500CFB0F5 /* check-all@2x.png */, - 1624FDB41A126FD500CFB0F5 /* uncheck-all@2x.png */, - ); - name = Menus; - path = Assets/Menus; - sourceTree = ""; - }; - 163275F118AD468F00A97A9F = { - isa = PBXGroup; - children = ( - 3E6F0E44198C85D6009A4CBB /* Lister iOS App */, - 55EEFA861A1A5EAE00172D58 /* Lister WatchKit App */, - 1645D9031B0CF707005E8148 /* Shared Lister WatchKit Code */, - 16502FB81B06882800EB83DF /* Lister Watch App */, - 3E6F0E45198C85DE009A4CBB /* Lister OS X App */, - 3E6F0E47198C86C8009A4CBB /* Shared ListerKit Framework Code */, - 3E6F0E48198C86D5009A4CBB /* Shared Lister Resources */, - 3E04D0E119D9FB7500C59A0F /* Frameworks */, - 163275FB18AD468F00A97A9F /* Products */, - ); - indentWidth = 4; - sourceTree = ""; - tabWidth = 4; - }; - 163275FB18AD468F00A97A9F /* Products */ = { - isa = PBXGroup; - children = ( - 163275FA18AD468F00A97A9F /* Lister.app */, - 1632761E18AD468F00A97A9F /* ListerKit.framework */, - 163A6CA01906ED4C008E1930 /* Lister.app */, - 3E745ECB190880F30090B20E /* ListerKit.framework */, - 16EB5ECB1936D39400532A4B /* Lister.appex */, - 1633C7311939337F00A9CC5E /* Lister.appex */, - 3E2517C7197F7D9600B8AF96 /* ListerKit Tests.xctest */, - 3E950670198575570030A9D1 /* ListerKit Tests (OS X).xctest */, - 16F60C5E1A8560470028B2D8 /* Lister WatchKit Extension.appex */, - 16F60C6C1A8560470028B2D8 /* Lister WatchKit App.app */, - 1611C5F81A92A09100472891 /* Lister Tests.xctest */, - 16502F901B06877E00EB83DF /* Lister Watch App.app */, - 16502F9C1B06877E00EB83DF /* Lister Watch Extension.appex */, - 164346B51B0FE72200F81674 /* ListerKit.framework */, - ); - name = Products; - sourceTree = ""; - }; - 163275FC18AD468F00A97A9F /* Main App */ = { - isa = PBXGroup; - children = ( - 16B9353D1909753F004E89E3 /* Main.storyboard */, - 16CD55B01B124B5100DB4F4F /* Launch Screen.storyboard */, - 163AD5AC19082124007D9A03 /* AAPLAppDelegate.h */, - 163AD5AD19082124007D9A03 /* AAPLAppDelegate.m */, - 160868731A8EA49000A5A707 /* Context */, - 169E922918AD7EBD00139723 /* View Controllers */, - 16C1577318ADC45200B21147 /* Views */, - 1611C5F91A92A09100472891 /* Tests */, - 163275FD18AD468F00A97A9F /* Supporting Files */, - ); - name = "Main App"; - path = Lister; - sourceTree = ""; - }; - 163275FD18AD468F00A97A9F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 16A3C1CF18B2C2530087ACED /* Lister.entitlements */, - 1632760818AD468F00A97A9F /* Images.xcassets */, - 163275FE18AD468F00A97A9F /* Info.plist */, - 1632760218AD468F00A97A9F /* main.m */, - 1632760418AD468F00A97A9F /* Lister-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 1632762418AD468F00A97A9F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 1632762518AD468F00A97A9F /* Info.plist */, - ); - name = "Supporting Files"; - path = ListerKit; - sourceTree = ""; - }; - 1633C7331939338000A9CC5E /* Today Widget */ = { - isa = PBXGroup; - children = ( - 3EBE0287198CA0B10007E4AC /* Models */, - 3EBE0288198CA0B50007E4AC /* View Controllers */, - 1633C7341939338000A9CC5E /* Supporting Files */, - ); - name = "Today Widget"; - path = ListerTodayOSX; - sourceTree = ""; - }; - 1633C7341939338000A9CC5E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 1633C7351939338000A9CC5E /* Info.plist */, - 1633C7361939338000A9CC5E /* ListerTodayOSX.entitlements */, - 1633C7381939338000A9CC5E /* InfoPlist.strings */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 1634730419F5E3D500387A94 /* Glance */ = { - isa = PBXGroup; - children = ( - 1634730719F5E46000387A94 /* AAPLGlanceInterfaceController.h */, - 1634730819F5E46000387A94 /* AAPLGlanceInterfaceController.m */, - ); - name = Glance; - sourceTree = ""; - }; - 163A6CA11906ED4C008E1930 /* Main App */ = { - isa = PBXGroup; - children = ( - 3E79958E19EC841D0077233E /* Main.storyboard */, - 16ADF818191AAC2E00CA9120 /* AAPLAppDelegate.h */, - 16ADF819191AAC2E00CA9120 /* AAPLAppDelegate.m */, - 3EDCB8ED193A551A003B5830 /* Window Controllers */, - 3EDCB8EE193A5529003B5830 /* View Controllers */, - 3EDCB8EF193A5535003B5830 /* Views */, - 3EBE0284198C9F560007E4AC /* UI */, - 163A6CA21906ED4C008E1930 /* Supporting Files */, - ); - name = "Main App"; - path = ListerOSX; - sourceTree = ""; - }; - 163A6CA21906ED4C008E1930 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 163A6CAD1906ED4C008E1930 /* Images.xcassets */, - 168AF80A191AA89700D6BA5A /* ListerOSX.entitlements */, - 163A6CA31906ED4C008E1930 /* Info.plist */, - 163A6CA41906ED4C008E1930 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 164346B61B0FE72200F81674 /* ListerKit Framework (watchOS) */ = { - isa = PBXGroup; - children = ( - 1645D9061B0CFA8A005E8148 /* Storage */, - 164346BE1B0FE7C800F81674 /* Supporting Files */, - ); - name = "ListerKit Framework (watchOS)"; - path = "ListerKit (WatchOS)"; - sourceTree = ""; - }; - 164346BE1B0FE7C800F81674 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 164346B91B0FE72200F81674 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 1645D9031B0CF707005E8148 /* Shared Lister WatchKit Code */ = { - isa = PBXGroup; - children = ( - 3E7FE73819DBB6AE0056487F /* AAPLWatchStoryboardConstants.h */, - 3E7FE73919DBB6AE0056487F /* AAPLWatchStoryboardConstants.m */, - 16FEF6A91A116AA300E0CC5E /* Row Controllers */, - 1645D9041B0CF757005E8148 /* Glance */, - ); - name = "Shared Lister WatchKit Code"; - sourceTree = ""; - }; - 1645D9041B0CF757005E8148 /* Glance */ = { - isa = PBXGroup; - children = ( - 1634730519F5E46000387A94 /* AAPLGlanceBadge.h */, - 1634730619F5E46000387A94 /* AAPLGlanceBadge.m */, - ); - name = Glance; - sourceTree = ""; - }; - 1645D9061B0CFA8A005E8148 /* Storage */ = { - isa = PBXGroup; - children = ( - 1645D9071B0CFAF4005E8148 /* AAPLListInfo.h */, - 1645D9081B0CFAF4005E8148 /* AAPLListInfo.m */, - 1645D90B1B0CFB5A005E8148 /* AAPLConnectivityListsController.h */, - 1645D90C1B0CFB5A005E8148 /* AAPLConnectivityListsController.m */, - ); - name = Storage; - sourceTree = ""; - }; - 16502F911B06877E00EB83DF /* Lister Watch App */ = { - isa = PBXGroup; - children = ( - 16892DE11B06E2F00001FF08 /* Interface.storyboard */, - 16502FB91B06892100EB83DF /* Assets */, - 165030331B06898600EB83DF /* Supporting Files */, - ); - path = "Lister Watch App"; - sourceTree = ""; - }; - 16502FA01B06877E00EB83DF /* Lister Watch Extension */ = { - isa = PBXGroup; - children = ( - 165030341B0689E700EB83DF /* Main App */, - 165030351B0689F800EB83DF /* Glance */, - 165030361B068A0400EB83DF /* Supporting Files */, - ); - path = "Lister Watch Extension"; - sourceTree = ""; - }; - 16502FB81B06882800EB83DF /* Lister Watch App */ = { - isa = PBXGroup; - children = ( - 16502FA01B06877E00EB83DF /* Lister Watch Extension */, - 16502F911B06877E00EB83DF /* Lister Watch App */, - 164346B61B0FE72200F81674 /* ListerKit Framework (watchOS) */, - ); - name = "Lister Watch App"; - sourceTree = ""; - }; - 16502FB91B06892100EB83DF /* Assets */ = { - isa = PBXGroup; - children = ( - 16502FE81B06892100EB83DF /* CheckBox */, - 16502FBA1B06892100EB83DF /* Glance */, - 16502FF51B06892100EB83DF /* Menus */, - ); - path = Assets; - sourceTree = ""; - }; - 16502FBA1B06892100EB83DF /* Glance */ = { - isa = PBXGroup; - children = ( - 16502FBB1B06892100EB83DF /* glance-0@2x.png */, - 16502FBC1B06892100EB83DF /* glance-10@2x.png */, - 16502FBD1B06892100EB83DF /* glance-11@2x.png */, - 16502FBE1B06892100EB83DF /* glance-12@2x.png */, - 16502FBF1B06892100EB83DF /* glance-13@2x.png */, - 16502FC01B06892100EB83DF /* glance-14@2x.png */, - 16502FC11B06892100EB83DF /* glance-15@2x.png */, - 16502FC21B06892100EB83DF /* glance-16@2x.png */, - 16502FC31B06892100EB83DF /* glance-17@2x.png */, - 16502FC41B06892100EB83DF /* glance-18@2x.png */, - 16502FC51B06892100EB83DF /* glance-19@2x.png */, - 16502FC61B06892100EB83DF /* glance-1@2x.png */, - 16502FC71B06892100EB83DF /* glance-20@2x.png */, - 16502FC81B06892100EB83DF /* glance-21@2x.png */, - 16502FC91B06892100EB83DF /* glance-22@2x.png */, - 16502FCA1B06892100EB83DF /* glance-23@2x.png */, - 16502FCB1B06892100EB83DF /* glance-24@2x.png */, - 16502FCC1B06892100EB83DF /* glance-25@2x.png */, - 16502FCD1B06892100EB83DF /* glance-26@2x.png */, - 16502FCE1B06892100EB83DF /* glance-27@2x.png */, - 16502FCF1B06892100EB83DF /* glance-28@2x.png */, - 16502FD01B06892100EB83DF /* glance-29@2x.png */, - 16502FD11B06892100EB83DF /* glance-2@2x.png */, - 16502FD21B06892100EB83DF /* glance-30@2x.png */, - 16502FD31B06892100EB83DF /* glance-31@2x.png */, - 16502FD41B06892100EB83DF /* glance-32@2x.png */, - 16502FD51B06892100EB83DF /* glance-33@2x.png */, - 16502FD61B06892100EB83DF /* glance-34@2x.png */, - 16502FD71B06892100EB83DF /* glance-35@2x.png */, - 16502FD81B06892100EB83DF /* glance-36@2x.png */, - 16502FD91B06892100EB83DF /* glance-37@2x.png */, - 16502FDA1B06892100EB83DF /* glance-38@2x.png */, - 16502FDB1B06892100EB83DF /* glance-39@2x.png */, - 16502FDC1B06892100EB83DF /* glance-3@2x.png */, - 16502FDD1B06892100EB83DF /* glance-40@2x.png */, - 16502FDE1B06892100EB83DF /* glance-41@2x.png */, - 16502FDF1B06892100EB83DF /* glance-42@2x.png */, - 16502FE01B06892100EB83DF /* glance-43@2x.png */, - 16502FE11B06892100EB83DF /* glance-44@2x.png */, - 16502FE21B06892100EB83DF /* glance-4@2x.png */, - 16502FE31B06892100EB83DF /* glance-5@2x.png */, - 16502FE41B06892100EB83DF /* glance-6@2x.png */, - 16502FE51B06892100EB83DF /* glance-7@2x.png */, - 16502FE61B06892100EB83DF /* glance-8@2x.png */, - 16502FE71B06892100EB83DF /* glance-9@2x.png */, - ); - name = Glance; - path = Badge; - sourceTree = ""; - }; - 16502FE81B06892100EB83DF /* CheckBox */ = { - isa = PBXGroup; - children = ( - 16502FE91B06892100EB83DF /* checkbox-blue-checked@2x.png */, - 16502FEA1B06892100EB83DF /* checkbox-blue-unchecked@2x.png */, - 16502FEB1B06892100EB83DF /* checkbox-gray-checked@2x.png */, - 16502FEC1B06892100EB83DF /* checkbox-gray-unchecked@2x.png */, - 16502FED1B06892100EB83DF /* checkbox-green-checked@2x.png */, - 16502FEE1B06892100EB83DF /* checkbox-green-unchecked@2x.png */, - 16502FEF1B06892100EB83DF /* checkbox-orange-checked@2x.png */, - 16502FF01B06892100EB83DF /* checkbox-orange-unchecked@2x.png */, - 16502FF11B06892100EB83DF /* checkbox-red-checked@2x.png */, - 16502FF21B06892100EB83DF /* checkbox-red-unchecked@2x.png */, - 16502FF31B06892100EB83DF /* checkbox-yellow-checked@2x.png */, - 16502FF41B06892100EB83DF /* checkbox-yellow-unchecked@2x.png */, - ); - path = CheckBox; - sourceTree = ""; - }; - 16502FF51B06892100EB83DF /* Menus */ = { - isa = PBXGroup; - children = ( - 16502FF61B06892100EB83DF /* check-all@2x.png */, - 16502FF71B06892100EB83DF /* uncheck-all@2x.png */, - ); - path = Menus; - sourceTree = ""; - }; - 165030331B06898600EB83DF /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 16502F951B06877E00EB83DF /* Images.xcassets */, - 16502F971B06877E00EB83DF /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 165030341B0689E700EB83DF /* Main App */ = { - isa = PBXGroup; - children = ( - 16502FA11B06877E00EB83DF /* AAPLListsInterfaceController.h */, - 16502FA21B06877E00EB83DF /* AAPLListsInterfaceController.m */, - 16533DB01B091B6C006A90C4 /* AAPLListInterfaceController.h */, - 16533DB11B091B6C006A90C4 /* AAPLListInterfaceController.m */, - 16502FA41B06877E00EB83DF /* AAPLExtensionDelegate.h */, - 16502FA51B06877E00EB83DF /* AAPLExtensionDelegate.m */, - ); - name = "Main App"; - sourceTree = ""; - }; - 165030351B0689F800EB83DF /* Glance */ = { - isa = PBXGroup; - children = ( - 16502FA71B06877E00EB83DF /* AAPLGlanceInterfaceController.h */, - 16502FA81B06877E00EB83DF /* AAPLGlanceInterfaceController.m */, - ); - path = Glance; - sourceTree = ""; - }; - 165030361B068A0400EB83DF /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 165030371B068AB600EB83DF /* Localizable.strings */, - 165030381B068AB600EB83DF /* Localizable.stringsdict */, - 16502FAC1B06877E00EB83DF /* Info.plist */, - 16502FAA1B06877E00EB83DF /* Images.xcassets */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 169E922918AD7EBD00139723 /* View Controllers */ = { - isa = PBXGroup; - children = ( - 169E922A18AD7EF100139723 /* AAPLListDocumentsViewController.h */, - 169E922B18AD7EF100139723 /* AAPLListDocumentsViewController.m */, - 163701CC190AFD1D003FF9D0 /* AAPLNewListDocumentController.h */, - 163701CD190AFD1D003FF9D0 /* AAPLNewListDocumentController.m */, - 16C1577018AD9B7100B21147 /* AAPLListViewController.h */, - 16C1577118AD9B7100B21147 /* AAPLListViewController.m */, - ); - name = "View Controllers"; - sourceTree = ""; - }; - 16B1D9281A1A7847009EEBED /* Local Monitoring */ = { - isa = PBXGroup; - children = ( - 16B1D9291A1A785E009EEBED /* AAPLDirectoryMonitor.h */, - 16B1D92A1A1A785E009EEBED /* AAPLDirectoryMonitor.m */, - ); - name = "Local Monitoring"; - sourceTree = ""; - }; - 16C1577318ADC45200B21147 /* Views */ = { - isa = PBXGroup; - children = ( - 16C89AA81909AD4600752460 /* AAPLListCell.h */, - 16C89AA91909AD4600752460 /* AAPLListCell.m */, - 16C1577418ADC47F00B21147 /* AAPLListItemCell.h */, - 16C1577518ADC47F00B21147 /* AAPLListItemCell.m */, - 163701C9190AD1F9003FF9D0 /* AAPLListColorCell.h */, - 163701CA190AD1F9003FF9D0 /* AAPLListColorCell.m */, - ); - name = Views; - sourceTree = ""; - }; - 16E3778919FAE190000F9EC3 /* Assets */ = { - isa = PBXGroup; - children = ( - 1624FDA51A126FD500CFB0F5 /* CheckBox */, - 16E3778A19FAE199000F9EC3 /* Glance */, - 1624FDB21A126FD500CFB0F5 /* Menus */, - ); - name = Assets; - sourceTree = ""; - }; - 16E3778A19FAE199000F9EC3 /* Glance */ = { - isa = PBXGroup; - children = ( - 16E3778B19FAE1CC000F9EC3 /* glance-0@2x.png */, - 16E3778C19FAE1CC000F9EC3 /* glance-1@2x.png */, - 16E3778D19FAE1CC000F9EC3 /* glance-2@2x.png */, - 16E3778E19FAE1CC000F9EC3 /* glance-3@2x.png */, - 16E3778F19FAE1CC000F9EC3 /* glance-4@2x.png */, - 16E3779019FAE1CC000F9EC3 /* glance-5@2x.png */, - 16E3779119FAE1CC000F9EC3 /* glance-6@2x.png */, - 16E3779219FAE1CC000F9EC3 /* glance-7@2x.png */, - 16E3779319FAE1CC000F9EC3 /* glance-8@2x.png */, - 16E3779419FAE1CC000F9EC3 /* glance-9@2x.png */, - 16E3779519FAE1CC000F9EC3 /* glance-10@2x.png */, - 16E3779619FAE1CC000F9EC3 /* glance-11@2x.png */, - 16E3779719FAE1CC000F9EC3 /* glance-12@2x.png */, - 16E3779819FAE1CC000F9EC3 /* glance-13@2x.png */, - 16E3779919FAE1CC000F9EC3 /* glance-14@2x.png */, - 16E3779A19FAE1CC000F9EC3 /* glance-15@2x.png */, - 16E3779B19FAE1CC000F9EC3 /* glance-16@2x.png */, - 16E3779C19FAE1CC000F9EC3 /* glance-17@2x.png */, - 16E3779D19FAE1CC000F9EC3 /* glance-18@2x.png */, - 16E3779E19FAE1CC000F9EC3 /* glance-19@2x.png */, - 16E3779F19FAE1CC000F9EC3 /* glance-20@2x.png */, - 16E377A019FAE1CC000F9EC3 /* glance-21@2x.png */, - 16E377A119FAE1CC000F9EC3 /* glance-22@2x.png */, - 16E377A219FAE1CC000F9EC3 /* glance-23@2x.png */, - 16E377A319FAE1CC000F9EC3 /* glance-24@2x.png */, - 16E377A419FAE1CC000F9EC3 /* glance-25@2x.png */, - 16E377A519FAE1CC000F9EC3 /* glance-26@2x.png */, - 16E377A619FAE1CC000F9EC3 /* glance-27@2x.png */, - 16E377A719FAE1CC000F9EC3 /* glance-28@2x.png */, - 16E377A819FAE1CC000F9EC3 /* glance-29@2x.png */, - 16E377A919FAE1CC000F9EC3 /* glance-30@2x.png */, - 16E377AA19FAE1CC000F9EC3 /* glance-31@2x.png */, - 16E377AB19FAE1CC000F9EC3 /* glance-32@2x.png */, - 16E377AC19FAE1CC000F9EC3 /* glance-33@2x.png */, - 16E377AD19FAE1CC000F9EC3 /* glance-34@2x.png */, - 16E377AE19FAE1CC000F9EC3 /* glance-35@2x.png */, - 16E377AF19FAE1CC000F9EC3 /* glance-36@2x.png */, - 16E377B019FAE1CC000F9EC3 /* glance-37@2x.png */, - 16E377B119FAE1CC000F9EC3 /* glance-38@2x.png */, - 16E377B219FAE1CC000F9EC3 /* glance-39@2x.png */, - 16E377B319FAE1CC000F9EC3 /* glance-40@2x.png */, - 16E377B419FAE1CC000F9EC3 /* glance-41@2x.png */, - 16E377B519FAE1CC000F9EC3 /* glance-42@2x.png */, - 16E377B619FAE1CC000F9EC3 /* glance-43@2x.png */, - 16E377B719FAE1CC000F9EC3 /* glance-44@2x.png */, - ); - name = Glance; - sourceTree = ""; - }; - 16F60C5F1A8560470028B2D8 /* Lister WatchKit Extension */ = { - isa = PBXGroup; - children = ( - 55EEFA871A1A5ED700172D58 /* Main App */, - 1634730419F5E3D500387A94 /* Glance */, - 16F60C601A8560470028B2D8 /* Supporting Files */, - ); - path = "Lister WatchKit Extension"; - sourceTree = ""; - }; - 16F60C601A8560470028B2D8 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 3E028CD11A1690B7004B6F9D /* Localizable.strings */, - 3E028CCE1A1690B0004B6F9D /* Localizable.stringsdict */, - 3EB8B8AD19DA18CA0077FF44 /* Lister WatchKit Extension.entitlements */, - 16F60C611A8560470028B2D8 /* Info.plist */, - 16F60C681A8560470028B2D8 /* Images.xcassets */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 16F60C701A8560470028B2D8 /* Lister WatchKit App */ = { - isa = PBXGroup; - children = ( - 16F60C731A8560470028B2D8 /* Interface.storyboard */, - 16E3778919FAE190000F9EC3 /* Assets */, - 3E04D0F119D9FB7500C59A0F /* Supporting Files */, - ); - path = "Lister WatchKit App"; - sourceTree = ""; - }; - 16FEF6A91A116AA300E0CC5E /* Row Controllers */ = { - isa = PBXGroup; - children = ( - 3E351EBA19DA07E100971413 /* AAPLColoredTextRowController.h */, - 3E351EBB19DA07E100971413 /* AAPLColoredTextRowController.m */, - 16FEF6AA1A117A4500E0CC5E /* AAPLListItemRowController.h */, - 16FEF6AB1A117A4500E0CC5E /* AAPLListItemRowController.m */, - ); - name = "Row Controllers"; - path = "Lister WatchKit Extension"; - sourceTree = ""; - }; - 3E04D0E119D9FB7500C59A0F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 162C25BF1B1CEA07004DD2FC /* NotificationCenter.framework */, - 1656DCA41B113DF2001233FA /* UIKit.framework */, - 3E04D0E219D9FB7500C59A0F /* WatchKit.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 3E04D0F119D9FB7500C59A0F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 3E04D0F219D9FB7500C59A0F /* Info.plist */, - 55BB61D61A13C84D001BE161 /* Images.xcassets */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 3E2517D3197F7DB100B8AF96 /* iOS Supporting Files */ = { - isa = PBXGroup; - children = ( - 3E2517D4197F7DB100B8AF96 /* Info.plist */, - ); - name = "iOS Supporting Files"; - path = "ListerKit Tests/iOS"; - sourceTree = ""; - }; - 3E2517E6197F7E1900B8AF96 /* OS X Supporting Files */ = { - isa = PBXGroup; - children = ( - 3E2517E7197F7E1900B8AF96 /* Info.plist */, - ); - name = "OS X Supporting Files"; - path = "ListerKit Tests/OS X"; - sourceTree = ""; - }; - 3E5FDD9C1937251600D9161C /* Default Lists */ = { - isa = PBXGroup; - children = ( - 3EBE02C2198CA57B0007E4AC /* Groceries.list */, - 3EBE02C3198CA57B0007E4AC /* Tech Toys.list */, - 3EBE02C4198CA57B0007E4AC /* Today.list */, - ); - name = "Default Lists"; - path = ListerKit; - sourceTree = ""; - }; - 3E6F0E44198C85D6009A4CBB /* Lister iOS App */ = { - isa = PBXGroup; - children = ( - 163275FC18AD468F00A97A9F /* Main App */, - 3EBE027C198C9D130007E4AC /* Today Widget */, - 3EBE027E198C9D780007E4AC /* ListerKit Framework (iOS) */, - ); - name = "Lister iOS App"; - sourceTree = ""; - }; - 3E6F0E45198C85DE009A4CBB /* Lister OS X App */ = { - isa = PBXGroup; - children = ( - 163A6CA11906ED4C008E1930 /* Main App */, - 1633C7331939338000A9CC5E /* Today Widget */, - 3E745ECC190880F30090B20E /* ListerKit Framework (OS X) */, - ); - name = "Lister OS X App"; - sourceTree = ""; - }; - 3E6F0E47198C86C8009A4CBB /* Shared ListerKit Framework Code */ = { - isa = PBXGroup; - children = ( - 3E745ECF190880F30090B20E /* ListerKit.h */, - 3EBE028C198CA1390007E4AC /* Models */, - 1623FD0C1A02FE6700631A60 /* Presenters */, - 3EBE028D198CA13C0007E4AC /* UI */, - 3EBE028E198CA13F0007E4AC /* Configuration */, - 3EBE028F198CA1430007E4AC /* Tests */, - ); - name = "Shared ListerKit Framework Code"; - sourceTree = ""; - }; - 3E6F0E48198C86D5009A4CBB /* Shared Lister Resources */ = { - isa = PBXGroup; - children = ( - 3EBE0299198CA51D0007E4AC /* ListerDocumentIcon.icns */, - 3E5FDD9C1937251600D9161C /* Default Lists */, - ); - name = "Shared Lister Resources"; - sourceTree = ""; - }; - 3E745ECC190880F30090B20E /* ListerKit Framework (OS X) */ = { - isa = PBXGroup; - children = ( - 3EBE0289198CA0F10007E4AC /* Document Architecture */, - 3EBE028A198CA1010007E4AC /* Views */, - 3EBE028B198CA11A0007E4AC /* Convenience */, - 3E745ECD190880F30090B20E /* Supporting Files */, - ); - name = "ListerKit Framework (OS X)"; - path = ListerKitOSX; - sourceTree = ""; - }; - 3E745ECD190880F30090B20E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 3E745ECE190880F30090B20E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 3EBE027C198C9D130007E4AC /* Today Widget */ = { - isa = PBXGroup; - children = ( - 169DAF20192D1C1C007F738B /* Today.storyboard */, - 16040CFD190F3259006D75CA /* Views */, - 3EBE027D198C9D4C0007E4AC /* View Controllers */, - 1623E08219378BD600939745 /* Supporting Files */, - ); - name = "Today Widget"; - sourceTree = ""; - }; - 3EBE027D198C9D4C0007E4AC /* View Controllers */ = { - isa = PBXGroup; - children = ( - 169DAF1D192D1C1C007F738B /* AAPLTodayViewController.h */, - 169DAF1E192D1C1C007F738B /* AAPLTodayViewController.m */, - ); - name = "View Controllers"; - sourceTree = ""; - }; - 3EBE027E198C9D780007E4AC /* ListerKit Framework (iOS) */ = { - isa = PBXGroup; - children = ( - 3EBE027F198C9DBE0007E4AC /* Views */, - 3EBE0282198C9E3B0007E4AC /* iCloud & Local Storage */, - 1632762418AD468F00A97A9F /* Supporting Files */, - ); - name = "ListerKit Framework (iOS)"; - sourceTree = ""; - }; - 3EBE027F198C9DBE0007E4AC /* Views */ = { - isa = PBXGroup; - children = ( - 16E1FA02191DD200006AF95B /* AAPLCheckBox.h */, - 16E1FA03191DD200006AF95B /* AAPLCheckBox.m */, - ); - name = Views; - sourceTree = ""; - }; - 3EBE0282198C9E3B0007E4AC /* iCloud & Local Storage */ = { - isa = PBXGroup; - children = ( - 3EBE0283198C9E4D0007E4AC /* Document Architecture */, - 3EE49EEF198B3F0F002B78BC /* AAPLListInfo.h */, - 3EE49EF1198B3F18002B78BC /* AAPLListInfo.m */, - 3EE49EC7198B2D57002B78BC /* AAPLListsController.h */, - 3EE49EC8198B2D57002B78BC /* AAPLListsController.m */, - 3EE49ED9198B342B002B78BC /* AAPLListUtilities.h */, - 3EE49EDA198B342B002B78BC /* AAPLListUtilities.m */, - 3EE49ECC198B2DB1002B78BC /* AAPLListCoordinator.h */, - 3EE49ED0198B3350002B78BC /* List Coordinators */, - ); - name = "iCloud & Local Storage"; - sourceTree = ""; - }; - 3EBE0283198C9E4D0007E4AC /* Document Architecture */ = { - isa = PBXGroup; - children = ( - 163701C5190AC1A2003FF9D0 /* AAPLListDocument.h */, - 163701C6190AC1A2003FF9D0 /* AAPLListDocument.m */, - ); - name = "Document Architecture"; - sourceTree = ""; - }; - 3EBE0284198C9F560007E4AC /* UI */ = { - isa = PBXGroup; - children = ( - 3EBE02CF198CA78D0007E4AC /* NSColor+AppSpecific.h */, - 3EBE02D0198CA78D0007E4AC /* NSColor+AppSpecific.m */, - ); - name = UI; - sourceTree = ""; - }; - 3EBE0287198CA0B10007E4AC /* Models */ = { - isa = PBXGroup; - children = ( - 1633C76C19393EB200A9CC5E /* AAPLListRowRepresentedObject.h */, - 1633C76D19393EB200A9CC5E /* AAPLListRowRepresentedObject.m */, - 3EED110C19AFC1B600848265 /* AAPLTodayWidgetRowPurposeBox.h */, - 3EED110D19AFC1B600848265 /* AAPLTodayWidgetRowPurposeBox.m */, - ); - name = Models; - sourceTree = ""; - }; - 3EBE0288198CA0B50007E4AC /* View Controllers */ = { - isa = PBXGroup; - children = ( - 1633C77419393EB200A9CC5E /* AAPLTodayViewController.h */, - 1633C77519393EB200A9CC5E /* AAPLTodayViewController.m */, - 1633C77119393EB200A9CC5E /* AAPLOpenListerRowViewController.h */, - 1633C77219393EB200A9CC5E /* AAPLOpenListerRowViewController.m */, - 1633C76E19393EB200A9CC5E /* AAPLListRowViewController.h */, - 1633C76F19393EB200A9CC5E /* AAPLListRowViewController.m */, - 1608C4D919398CE400CC1E53 /* AAPLNoItemsRowViewController.h */, - 1608C4DA19398CE400CC1E53 /* AAPLNoItemsRowViewController.m */, - 3EED111019AFC30800848265 /* AAPLTodayWidgetRequiresCloudViewController.h */, - 3EED111119AFC30800848265 /* AAPLTodayWidgetRequiresCloudViewController.m */, - 1633C77619393EB200A9CC5E /* AAPLTodayViewController.xib */, - 1633C77319393EB200A9CC5E /* AAPLOpenListerRowViewController.xib */, - 1633C77019393EB200A9CC5E /* AAPLListRowViewController.xib */, - 1608C4DB19398CE400CC1E53 /* AAPLNoItemsRowViewController.xib */, - 3EED111219AFC30800848265 /* AAPLTodayWidgetRequiresCloudViewController.xib */, - ); - name = "View Controllers"; - sourceTree = ""; - }; - 3EBE0289198CA0F10007E4AC /* Document Architecture */ = { - isa = PBXGroup; - children = ( - 3E5C9F341936FE6500EE1526 /* AAPLListDocument.h */, - 3E5C9F351936FE6500EE1526 /* AAPLListDocument.m */, - ); - name = "Document Architecture"; - sourceTree = ""; - }; - 3EBE028A198CA1010007E4AC /* Views */ = { - isa = PBXGroup; - children = ( - 3EDE4F981919E50A00AA599C /* AAPLCheckBox.h */, - 3EDE4F991919E50A00AA599C /* AAPLCheckBox.m */, - ); - name = Views; - sourceTree = ""; - }; - 3EBE028B198CA11A0007E4AC /* Convenience */ = { - isa = PBXGroup; - children = ( - 16E330C8191EDAC400698F8C /* AAPLTodayListManager.h */, - 16E330C9191EDAC400698F8C /* AAPLTodayListManager.m */, - 3EC67B14190B56FB00290085 /* AAPLListFormatting.h */, - 3EC67B15190B56FB00290085 /* AAPLListFormatting.m */, - ); - name = Convenience; - sourceTree = ""; - }; - 3EBE028C198CA1390007E4AC /* Models */ = { - isa = PBXGroup; - children = ( - 16D4DA0A19082E2B0013342E /* AAPLList.h */, - 16D4DA0B19082E2B0013342E /* AAPLList.m */, - 16D4DA0C19082E2B0013342E /* AAPLListItem.h */, - 16D4DA0D19082E2B0013342E /* AAPLListItem.m */, - ); - name = Models; - sourceTree = ""; - }; - 3EBE028D198CA13C0007E4AC /* UI */ = { - isa = PBXGroup; - children = ( - 3EBE0296198CA4EB0007E4AC /* AAPLCheckBoxLayer.h */, - 3EBE0297198CA4EB0007E4AC /* AAPLCheckBoxLayer.m */, - 3EC72A2D1908B3F900AE5774 /* AAPLListColor+UI.h */, - 3EC72A2E1908B3F900AE5774 /* AAPLListColor+UI.m */, - ); - name = UI; - sourceTree = ""; - }; - 3EBE028E198CA13F0007E4AC /* Configuration */ = { - isa = PBXGroup; - children = ( - 3E5C9F2E1936FE3E00EE1526 /* AAPLAppConfiguration.h */, - 3E5C9F2F1936FE3E00EE1526 /* AAPLAppConfiguration.m */, - ); - name = Configuration; - sourceTree = ""; - }; - 3EBE028F198CA1430007E4AC /* Tests */ = { - isa = PBXGroup; - children = ( - 3E2517CB197F7D9700B8AF96 /* AAPLListTests.m */, - 3E95067C1985AA8A0030A9D1 /* AAPLListItemTests.m */, - 1623FD191A02FE7F00631A60 /* List Presenter Tests */, - 3E2517D3197F7DB100B8AF96 /* iOS Supporting Files */, - 3E2517E6197F7E1900B8AF96 /* OS X Supporting Files */, - ); - name = Tests; - sourceTree = ""; - }; - 3EDCB8ED193A551A003B5830 /* Window Controllers */ = { - isa = PBXGroup; - children = ( - 3E62245E1924623D00FFC808 /* AAPLListWindowController.h */, - 3E62245F1924623D00FFC808 /* AAPLListWindowController.m */, - ); - name = "Window Controllers"; - sourceTree = ""; - }; - 3EDCB8EE193A5529003B5830 /* View Controllers */ = { - isa = PBXGroup; - children = ( - 3E745EFB190887500090B20E /* AAPLListViewController.h */, - 3E745EFC190887500090B20E /* AAPLListViewController.m */, - 3E7DBC5919296BF200830E02 /* AAPLAddItemViewController.h */, - 3E7DBC5A19296BF200830E02 /* AAPLAddItemViewController.m */, - ); - name = "View Controllers"; - sourceTree = ""; - }; - 3EDCB8EF193A5535003B5830 /* Views */ = { - isa = PBXGroup; - children = ( - 3E3208BE19088F60003C9147 /* AAPLColorPaletteView.h */, - 3E3208BF19088F60003C9147 /* AAPLColorPaletteView.m */, - 3E97926319097A860062A433 /* AAPLListTableView.h */, - 3E97926419097A860062A433 /* AAPLListTableView.m */, - 3EC72A331908BA8A00AE5774 /* AAPLListItemView.h */, - 3EC72A341908BA8A00AE5774 /* AAPLListItemView.m */, - 3E185F6519104409007B95FB /* AAPLTableRowView.h */, - 3E185F6619104409007B95FB /* AAPLTableRowView.m */, - 3E9792671909807D0062A433 /* AAPLResizingTextField.h */, - 3E9792681909807D0062A433 /* AAPLResizingTextField.m */, - ); - name = Views; - sourceTree = ""; - }; - 3EE49ED0198B3350002B78BC /* List Coordinators */ = { - isa = PBXGroup; - children = ( - 3EE49ED1198B3366002B78BC /* AAPLCloudListCoordinator.h */, - 3EE49ED2198B3366002B78BC /* AAPLCloudListCoordinator.m */, - 3EE49ED5198B33C4002B78BC /* AAPLLocalListCoordinator.h */, - 3EE49ED6198B33C4002B78BC /* AAPLLocalListCoordinator.m */, - 16B1D9281A1A7847009EEBED /* Local Monitoring */, - ); - name = "List Coordinators"; - path = ListerKit; - sourceTree = ""; - }; - 3EFDD4D01A118CE900FDAFCE /* Helper Functions */ = { - isa = PBXGroup; - children = ( - 3E9053151A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h */, - 3E9053161A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m */, - 3E9053171A13289F006DCBA7 /* AAPLListPresenterUtilities.h */, - 3E9053181A13289F006DCBA7 /* AAPLListPresenterUtilities.m */, - ); - name = "Helper Functions"; - sourceTree = ""; - }; - 55EEFA861A1A5EAE00172D58 /* Lister WatchKit App */ = { - isa = PBXGroup; - children = ( - 16F60C5F1A8560470028B2D8 /* Lister WatchKit Extension */, - 16F60C701A8560470028B2D8 /* Lister WatchKit App */, - ); - name = "Lister WatchKit App"; - sourceTree = ""; - }; - 55EEFA871A1A5ED700172D58 /* Main App */ = { - isa = PBXGroup; - children = ( - 3E04D0E719D9FB7500C59A0F /* AAPLListsInterfaceController.h */, - 3E04D0E819D9FB7500C59A0F /* AAPLListsInterfaceController.m */, - 3E7FE73019DBB2AA0056487F /* AAPLListInterfaceController.h */, - 3E7FE73119DBB2AA0056487F /* AAPLListInterfaceController.m */, - ); - name = "Main App"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 1632761B18AD468F00A97A9F /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E90531D1A13289F006DCBA7 /* AAPLListPresenterUtilities.h in Headers */, - 3ED6CA7A1908D644003EB5C0 /* AAPLList.h in Headers */, - 160D914419380CE500373D47 /* AAPLCheckBox.h in Headers */, - 16D4DA1219082E2B0013342E /* AAPLListItem.h in Headers */, - 3E5C9F1F1936FCAC00EE1526 /* AAPLListDocument.h in Headers */, - 3EE49EF0198B3F0F002B78BC /* AAPLListInfo.h in Headers */, - 1623FD151A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h in Headers */, - 3EE49ECE198B2DB1002B78BC /* AAPLListCoordinator.h in Headers */, - 1623FD081A02FE6300631A60 /* AAPLListPresenting.h in Headers */, - 3E9053191A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h in Headers */, - 3E9053131A132884006DCBA7 /* AAPLListPresenterDelegate.h in Headers */, - 16B1D92B1A1A785E009EEBED /* AAPLDirectoryMonitor.h in Headers */, - 3E5C9F301936FE3E00EE1526 /* AAPLAppConfiguration.h in Headers */, - 3EE49ECA198B2D62002B78BC /* AAPLListsController.h in Headers */, - 3EBE02CB198CA5CB0007E4AC /* AAPLCheckBoxLayer.h in Headers */, - 3EC72A2F1908B3F900AE5774 /* AAPLListColor+UI.h in Headers */, - 3EE49ED7198B33C4002B78BC /* AAPLLocalListCoordinator.h in Headers */, - 3ED9B1B01A8583A4009D57A4 /* ListerKit.h in Headers */, - 3EE49EDB198B342B002B78BC /* AAPLListUtilities.h in Headers */, - 1623FD111A02FE7900631A60 /* AAPLAllListItemsPresenter.h in Headers */, - 3EE49ED3198B3366002B78BC /* AAPLCloudListCoordinator.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 163A6C9D1906ED4C008E1930 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E7DBC5B19296BF200830E02 /* AAPLAddItemViewController.h in Headers */, - 3E97926519097A860062A433 /* AAPLListTableView.h in Headers */, - 3EC72A351908BA8A00AE5774 /* AAPLListItemView.h in Headers */, - 3E3208C019088F60003C9147 /* AAPLColorPaletteView.h in Headers */, - 3E185F6719104409007B95FB /* AAPLTableRowView.h in Headers */, - 16ADF81A191AAC2E00CA9120 /* AAPLAppDelegate.h in Headers */, - 3E6224601924623D00FFC808 /* AAPLListWindowController.h in Headers */, - 3E9792691909807D0062A433 /* AAPLResizingTextField.h in Headers */, - 3E745EFD190887500090B20E /* AAPLListViewController.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 164346B21B0FE72200F81674 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 164346C71B0FE84D00F81674 /* AAPLListPresenting.h in Headers */, - 164346C61B0FE84D00F81674 /* AAPLListPresenterDelegate.h in Headers */, - 164346BF1B0FE7FE00F81674 /* AAPLListInfo.h in Headers */, - 164346C11B0FE80D00F81674 /* AAPLConnectivityListsController.h in Headers */, - 164346C41B0FE84D00F81674 /* AAPLList.h in Headers */, - 164346DC1B0FEE6C00F81674 /* AAPLListUtilities.h in Headers */, - 164346C31B0FE82200F81674 /* ListerKit.h in Headers */, - 164346C81B0FE84D00F81674 /* AAPLAllListItemsPresenter.h in Headers */, - 164346D41B0FEA0F00F81674 /* AAPLAppConfiguration.h in Headers */, - 164346C51B0FE84D00F81674 /* AAPLListItem.h in Headers */, - 164346CC1B0FE85500F81674 /* AAPLListPresenterUtilities.h in Headers */, - 164346C91B0FE84D00F81674 /* AAPLIncompleteListItemsPresenter.h in Headers */, - 164346CB1B0FE85500F81674 /* AAPLListPresenterAlgorithms.h in Headers */, - 164346D61B0FED2F00F81674 /* AAPLListColor+UI.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E745EC8190880F30090B20E /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E745ED0190880F30090B20E /* ListerKit.h in Headers */, - 3EBE02CA198CA5CA0007E4AC /* AAPLCheckBoxLayer.h in Headers */, - 1623FD161A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.h in Headers */, - 1623FD121A02FE7900631A60 /* AAPLAllListItemsPresenter.h in Headers */, - 3E5C9F311936FE3E00EE1526 /* AAPLAppConfiguration.h in Headers */, - 3E9053141A132884006DCBA7 /* AAPLListPresenterDelegate.h in Headers */, - 3E1E31CD1920AA6A00A9BB12 /* AAPLCheckBox.h in Headers */, - 3E1E31CC1920AA6100A9BB12 /* AAPLTodayListManager.h in Headers */, - 3E90531E1A13289F006DCBA7 /* AAPLListPresenterUtilities.h in Headers */, - 3E1E31C81920AA5600A9BB12 /* AAPLList.h in Headers */, - 3E1E31C91920AA5600A9BB12 /* AAPLListItem.h in Headers */, - 3E1E31CA1920AA5600A9BB12 /* AAPLListColor+UI.h in Headers */, - 3E90531A1A13289F006DCBA7 /* AAPLListPresenterAlgorithms.h in Headers */, - 3E5C9F371936FE6500EE1526 /* AAPLListDocument.h in Headers */, - 3E1E31CB1920AA5600A9BB12 /* AAPLListFormatting.h in Headers */, - 1623FD091A02FE6300631A60 /* AAPLListPresenting.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 1611C5F71A92A09100472891 /* Lister Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1611C6021A92A09100472891 /* Build configuration list for PBXNativeTarget "Lister Tests" */; - buildPhases = ( - 1611C5F41A92A09100472891 /* Sources */, - 1611C5F51A92A09100472891 /* Frameworks */, - 1611C5F61A92A09100472891 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1611C5FF1A92A09100472891 /* PBXTargetDependency */, - ); - name = "Lister Tests"; - productName = "Lister Tests"; - productReference = 1611C5F81A92A09100472891 /* Lister Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 163275F918AD468F00A97A9F /* Lister */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1632764218AD468F00A97A9F /* Build configuration list for PBXNativeTarget "Lister" */; - buildPhases = ( - 163275F618AD468F00A97A9F /* Sources */, - 163275F718AD468F00A97A9F /* Frameworks */, - 163275F818AD468F00A97A9F /* Resources */, - 1632764118AD468F00A97A9F /* Embed Frameworks */, - 16A1A28B1938266C00302EE4 /* Embed App Extensions */, - 16502FB71B06877E00EB83DF /* Embed Watch Content */, - ); - buildRules = ( - ); - dependencies = ( - 1632762018AD468F00A97A9F /* PBXTargetDependency */, - 16A1A28A1938266C00302EE4 /* PBXTargetDependency */, - 16CD55B41B12537500DB4F4F /* PBXTargetDependency */, - 16502FAE1B06877E00EB83DF /* PBXTargetDependency */, - 169A57241B1B7EBE006BC62A /* PBXTargetDependency */, - ); - name = Lister; - productName = Lister; - productReference = 163275FA18AD468F00A97A9F /* Lister.app */; - productType = "com.apple.product-type.application"; - }; - 1632761D18AD468F00A97A9F /* ListerKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1632763E18AD468F00A97A9F /* Build configuration list for PBXNativeTarget "ListerKit" */; - buildPhases = ( - 1632761918AD468F00A97A9F /* Sources */, - 1632761A18AD468F00A97A9F /* Frameworks */, - 1632761B18AD468F00A97A9F /* Headers */, - 1632761C18AD468F00A97A9F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ListerKit; - productName = ListerKit; - productReference = 1632761E18AD468F00A97A9F /* ListerKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 1633C7301939337F00A9CC5E /* Lister Today (OS X) */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1633C74A1939338000A9CC5E /* Build configuration list for PBXNativeTarget "Lister Today (OS X)" */; - buildPhases = ( - 1633C72D1939337F00A9CC5E /* Sources */, - 1633C72E1939337F00A9CC5E /* Frameworks */, - 1633C72F1939337F00A9CC5E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1633C7611939356E00A9CC5E /* PBXTargetDependency */, - ); - name = "Lister Today (OS X)"; - productName = ListerTodayOSX; - productReference = 1633C7311939337F00A9CC5E /* Lister.appex */; - productType = "com.apple.product-type.app-extension"; - }; - 163A6C9F1906ED4C008E1930 /* Lister (OS X) */ = { - isa = PBXNativeTarget; - buildConfigurationList = 163A6CC21906ED4D008E1930 /* Build configuration list for PBXNativeTarget "Lister (OS X)" */; - buildPhases = ( - 163A6C9B1906ED4C008E1930 /* Sources */, - 163A6C9C1906ED4C008E1930 /* Frameworks */, - 163A6C9D1906ED4C008E1930 /* Headers */, - 163A6C9E1906ED4C008E1930 /* Resources */, - 3ED603CE19384D630044A535 /* Embed Frameworks */, - 16B6ABAA1939573C00CA7E11 /* Embed App Extensions */, - ); - buildRules = ( - ); - dependencies = ( - 3E1E31B21920A94A00A9BB12 /* PBXTargetDependency */, - 3ED603CD19384D630044A535 /* PBXTargetDependency */, - 1633C7491939338000A9CC5E /* PBXTargetDependency */, - 16B6ABA91939573B00CA7E11 /* PBXTargetDependency */, - ); - name = "Lister (OS X)"; - productName = ListerOSX; - productReference = 163A6CA01906ED4C008E1930 /* Lister.app */; - productType = "com.apple.product-type.application"; - }; - 164346B41B0FE72200F81674 /* ListerKit (watchOS) */ = { - isa = PBXNativeTarget; - buildConfigurationList = 164346BA1B0FE72200F81674 /* Build configuration list for PBXNativeTarget "ListerKit (watchOS)" */; - buildPhases = ( - 164346B01B0FE72200F81674 /* Sources */, - 164346B11B0FE72200F81674 /* Frameworks */, - 164346B21B0FE72200F81674 /* Headers */, - 164346B31B0FE72200F81674 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "ListerKit (watchOS)"; - productName = "ListerKit (WatchOS)"; - productReference = 164346B51B0FE72200F81674 /* ListerKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 16502F8F1B06877E00EB83DF /* Lister Watch App */ = { - isa = PBXNativeTarget; - buildConfigurationList = 16502FB61B06877E00EB83DF /* Build configuration list for PBXNativeTarget "Lister Watch App" */; - buildPhases = ( - 16502F8E1B06877E00EB83DF /* Resources */, - 16502FB51B06877E00EB83DF /* Embed App Extensions */, - ); - buildRules = ( - ); - dependencies = ( - 16502F9F1B06877E00EB83DF /* PBXTargetDependency */, - ); - name = "Lister Watch App"; - productName = "Lister Watch App"; - productReference = 16502F901B06877E00EB83DF /* Lister Watch App.app */; - productType = "com.apple.product-type.application.watchapp2"; - }; - 16502F9B1B06877E00EB83DF /* Lister Watch Extension */ = { - isa = PBXNativeTarget; - buildConfigurationList = 16502FB41B06877E00EB83DF /* Build configuration list for PBXNativeTarget "Lister Watch Extension" */; - buildPhases = ( - 16502F981B06877E00EB83DF /* Sources */, - 16502F991B06877E00EB83DF /* Frameworks */, - 16502F9A1B06877E00EB83DF /* Resources */, - 16D1A4AD1B06C5D20027BF67 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 164346DB1B0FEE5500F81674 /* PBXTargetDependency */, - ); - name = "Lister Watch Extension"; - productName = "Lister Watch Extension"; - productReference = 16502F9C1B06877E00EB83DF /* Lister Watch Extension.appex */; - productType = "com.apple.product-type.watchkit2-extension"; - }; - 16EB5ECA1936D39400532A4B /* Lister Today */ = { - isa = PBXNativeTarget; - buildConfigurationList = 16EB5EDA1936D39400532A4B /* Build configuration list for PBXNativeTarget "Lister Today" */; - buildPhases = ( - 16EB5EC71936D39400532A4B /* Sources */, - 16EB5EC81936D39400532A4B /* Frameworks */, - 16EB5EC91936D39400532A4B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 3E1ACA051A85810600FF4AB3 /* PBXTargetDependency */, - ); - name = "Lister Today"; - productName = ListerToday; - productReference = 16EB5ECB1936D39400532A4B /* Lister.appex */; - productType = "com.apple.product-type.app-extension"; - }; - 16F60C5D1A8560470028B2D8 /* Lister WatchKit Extension */ = { - isa = PBXNativeTarget; - buildConfigurationList = 16F60C7E1A8560480028B2D8 /* Build configuration list for PBXNativeTarget "Lister WatchKit Extension" */; - buildPhases = ( - 16F60C5A1A8560470028B2D8 /* Sources */, - 16F60C5B1A8560470028B2D8 /* Frameworks */, - 16F60C5C1A8560470028B2D8 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 3E1ACA071A85810A00FF4AB3 /* PBXTargetDependency */, - 16F60C6F1A8560470028B2D8 /* PBXTargetDependency */, - ); - name = "Lister WatchKit Extension"; - productName = "Lister WatchKit Extension"; - productReference = 16F60C5E1A8560470028B2D8 /* Lister WatchKit Extension.appex */; - productType = "com.apple.product-type.watchkit-extension"; - }; - 16F60C6B1A8560470028B2D8 /* Lister WatchKit App */ = { - isa = PBXNativeTarget; - buildConfigurationList = 16F60C7B1A8560480028B2D8 /* Build configuration list for PBXNativeTarget "Lister WatchKit App" */; - buildPhases = ( - 16F60C6A1A8560470028B2D8 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Lister WatchKit App"; - productName = "Lister WatchKit App"; - productReference = 16F60C6C1A8560470028B2D8 /* Lister WatchKit App.app */; - productType = "com.apple.product-type.application.watchapp"; - }; - 3E2517C6197F7D9600B8AF96 /* ListerKit Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3E2517D0197F7D9700B8AF96 /* Build configuration list for PBXNativeTarget "ListerKit Tests" */; - buildPhases = ( - 3E2517C3197F7D9600B8AF96 /* Sources */, - 3E2517C4197F7D9600B8AF96 /* Frameworks */, - 3E2517C5197F7D9600B8AF96 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 3E2517CF197F7D9700B8AF96 /* PBXTargetDependency */, - 160D670F1B1E188600E923AB /* PBXTargetDependency */, - ); - name = "ListerKit Tests"; - productName = ListerKitTests; - productReference = 3E2517C7197F7D9600B8AF96 /* ListerKit Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 3E745ECA190880F30090B20E /* ListerKit (OS X) */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3E745EE8190880F30090B20E /* Build configuration list for PBXNativeTarget "ListerKit (OS X)" */; - buildPhases = ( - 3E745EC6190880F30090B20E /* Sources */, - 3E745EC7190880F30090B20E /* Frameworks */, - 3E745EC8190880F30090B20E /* Headers */, - 3E745EC9190880F30090B20E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "ListerKit (OS X)"; - productName = ListerKitOSX; - productReference = 3E745ECB190880F30090B20E /* ListerKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 3E95066F198575570030A9D1 /* ListerKit Tests (OS X) */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3E950676198575570030A9D1 /* Build configuration list for PBXNativeTarget "ListerKit Tests (OS X)" */; - buildPhases = ( - 3E95066C198575570030A9D1 /* Sources */, - 3E95066D198575570030A9D1 /* Frameworks */, - 3E95066E198575570030A9D1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 55C783461A19C782006B0C19 /* PBXTargetDependency */, - ); - name = "ListerKit Tests (OS X)"; - productName = ListerKitTestsOSX; - productReference = 3E950670198575570030A9D1 /* ListerKit Tests (OS X).xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 163275F218AD468F00A97A9F /* Project object */ = { - isa = PBXProject; - attributes = { - CLASSPREFIX = AAPL; - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = "Apple Inc."; - TargetAttributes = { - 1611C5F71A92A09100472891 = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 163275F918AD468F00A97A9F; - }; - 163275F918AD468F00A97A9F = { - SystemCapabilities = { - com.apple.ApplicationGroups.iOS = { - enabled = 1; - }; - com.apple.iCloud = { - enabled = 1; - }; - }; - }; - 1633C7301939337F00A9CC5E = { - CreatedOnToolsVersion = 6.0; - }; - 163A6C9F1906ED4C008E1930 = { - SystemCapabilities = { - com.apple.iCloud = { - enabled = 1; - }; - }; - }; - 164346B41B0FE72200F81674 = { - CreatedOnToolsVersion = 7.0; - DevelopmentTeam = A93A5CM278; - }; - 16502F8F1B06877E00EB83DF = { - CreatedOnToolsVersion = 7.0; - }; - 16502F9B1B06877E00EB83DF = { - CreatedOnToolsVersion = 7.0; - }; - 16EB5ECA1936D39400532A4B = { - CreatedOnToolsVersion = 6.0; - SystemCapabilities = { - com.apple.ApplicationGroups.iOS = { - enabled = 1; - }; - com.apple.iCloud = { - enabled = 1; - }; - }; - }; - 16F60C5D1A8560470028B2D8 = { - CreatedOnToolsVersion = 6.2; - }; - 16F60C6B1A8560470028B2D8 = { - CreatedOnToolsVersion = 6.2; - }; - 3E2517C6197F7D9600B8AF96 = { - CreatedOnToolsVersion = 6.0; - TestTargetID = 163275F918AD468F00A97A9F; - }; - 3E95066F198575570030A9D1 = { - CreatedOnToolsVersion = 6.0; - }; - }; - }; - buildConfigurationList = 163275F518AD468F00A97A9F /* Build configuration list for PBXProject "Lister" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 163275F118AD468F00A97A9F; - productRefGroup = 163275FB18AD468F00A97A9F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 163275F918AD468F00A97A9F /* Lister */, - 1611C5F71A92A09100472891 /* Lister Tests */, - 16EB5ECA1936D39400532A4B /* Lister Today */, - 16F60C5D1A8560470028B2D8 /* Lister WatchKit Extension */, - 16F60C6B1A8560470028B2D8 /* Lister WatchKit App */, - 1632761D18AD468F00A97A9F /* ListerKit */, - 3E2517C6197F7D9600B8AF96 /* ListerKit Tests */, - 16502F9B1B06877E00EB83DF /* Lister Watch Extension */, - 16502F8F1B06877E00EB83DF /* Lister Watch App */, - 164346B41B0FE72200F81674 /* ListerKit (watchOS) */, - 163A6C9F1906ED4C008E1930 /* Lister (OS X) */, - 1633C7301939337F00A9CC5E /* Lister Today (OS X) */, - 3E745ECA190880F30090B20E /* ListerKit (OS X) */, - 3E95066F198575570030A9D1 /* ListerKit Tests (OS X) */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1611C5F61A92A09100472891 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 163275F818AD468F00A97A9F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EBE02CD198CA5FD0007E4AC /* Today.list in Resources */, - 3EBE02C5198CA57B0007E4AC /* Groceries.list in Resources */, - 160D913E1937921E00373D47 /* Lister.entitlements in Resources */, - 16B9353F1909753F004E89E3 /* Main.storyboard in Resources */, - 3EBE02C6198CA57B0007E4AC /* Tech Toys.list in Resources */, - 1632760918AD468F00A97A9F /* Images.xcassets in Resources */, - 16CD55B21B124B5100DB4F4F /* Launch Screen.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1632761C18AD468F00A97A9F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1633C72F1939337F00A9CC5E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EED111919AFC55200848265 /* AAPLTodayWidgetRequiresCloudViewController.xib in Resources */, - 1608C4DD19398CE400CC1E53 /* AAPLNoItemsRowViewController.xib in Resources */, - 1633C7371939338000A9CC5E /* ListerTodayOSX.entitlements in Resources */, - 1633C77919393EB200A9CC5E /* AAPLListRowViewController.xib in Resources */, - 1633C77D19393EB200A9CC5E /* AAPLTodayViewController.xib in Resources */, - 1633C77B19393EB200A9CC5E /* AAPLOpenListerRowViewController.xib in Resources */, - 1633C73A1939338000A9CC5E /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 163A6C9E1906ED4C008E1930 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 168AF80B191AA89700D6BA5A /* ListerOSX.entitlements in Resources */, - 3E79958F19EC841D0077233E /* Main.storyboard in Resources */, - 3EBE029B198CA5280007E4AC /* ListerDocumentIcon.icns in Resources */, - 163A6CAE1906ED4C008E1930 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 164346B31B0FE72200F81674 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16502F8E1B06877E00EB83DF /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 167843BE1B092FEA009DEE8D /* checkbox-green-unchecked@2x.png in Resources */, - 167844121B092FFB009DEE8D /* glance-39@2x.png in Resources */, - 1678440F1B092FFB009DEE8D /* glance-36@2x.png in Resources */, - 167844151B092FFB009DEE8D /* glance-41@2x.png in Resources */, - 16030B431B079FF800BA8EEB /* Interface.storyboard in Resources */, - 167844001B092FFB009DEE8D /* glance-22@2x.png in Resources */, - 167844141B092FFB009DEE8D /* glance-40@2x.png in Resources */, - 167843BF1B092FEA009DEE8D /* checkbox-orange-checked@2x.png in Resources */, - 167844131B092FFB009DEE8D /* glance-3@2x.png in Resources */, - 167843F51B092FFB009DEE8D /* glance-12@2x.png in Resources */, - 167843B91B092FEA009DEE8D /* checkbox-blue-checked@2x.png in Resources */, - 167843C41B092FEA009DEE8D /* checkbox-yellow-unchecked@2x.png in Resources */, - 167844011B092FFB009DEE8D /* glance-23@2x.png in Resources */, - 167843F81B092FFB009DEE8D /* glance-15@2x.png in Resources */, - 167843F31B092FFB009DEE8D /* glance-10@2x.png in Resources */, - 167844171B092FFB009DEE8D /* glance-43@2x.png in Resources */, - 1678441C1B092FFB009DEE8D /* glance-7@2x.png in Resources */, - 167844161B092FFB009DEE8D /* glance-42@2x.png in Resources */, - 167843BA1B092FEA009DEE8D /* checkbox-blue-unchecked@2x.png in Resources */, - 1678440E1B092FFB009DEE8D /* glance-35@2x.png in Resources */, - 1678440C1B092FFB009DEE8D /* glance-33@2x.png in Resources */, - 167844031B092FFB009DEE8D /* glance-25@2x.png in Resources */, - 167843F91B092FFB009DEE8D /* glance-16@2x.png in Resources */, - 167843F41B092FFB009DEE8D /* glance-11@2x.png in Resources */, - 167843F71B092FFB009DEE8D /* glance-14@2x.png in Resources */, - 1678441F1B09300E009DEE8D /* check-all@2x.png in Resources */, - 167843C11B092FEA009DEE8D /* checkbox-red-checked@2x.png in Resources */, - 1678440D1B092FFB009DEE8D /* glance-34@2x.png in Resources */, - 167844201B09300E009DEE8D /* uncheck-all@2x.png in Resources */, - 167844041B092FFB009DEE8D /* glance-26@2x.png in Resources */, - 167843BD1B092FEA009DEE8D /* checkbox-green-checked@2x.png in Resources */, - 167844081B092FFB009DEE8D /* glance-2@2x.png in Resources */, - 167844091B092FFB009DEE8D /* glance-30@2x.png in Resources */, - 167843C01B092FEA009DEE8D /* checkbox-orange-unchecked@2x.png in Resources */, - 167844071B092FFB009DEE8D /* glance-29@2x.png in Resources */, - 167844021B092FFB009DEE8D /* glance-24@2x.png in Resources */, - 1678441B1B092FFB009DEE8D /* glance-6@2x.png in Resources */, - 167843FF1B092FFB009DEE8D /* glance-21@2x.png in Resources */, - 167844051B092FFB009DEE8D /* glance-27@2x.png in Resources */, - 1678440B1B092FFB009DEE8D /* glance-32@2x.png in Resources */, - 167844061B092FFB009DEE8D /* glance-28@2x.png in Resources */, - 167843C21B092FEA009DEE8D /* checkbox-red-unchecked@2x.png in Resources */, - 167843BC1B092FEA009DEE8D /* checkbox-gray-unchecked@2x.png in Resources */, - 167843C31B092FEA009DEE8D /* checkbox-yellow-checked@2x.png in Resources */, - 167843BB1B092FEA009DEE8D /* checkbox-gray-checked@2x.png in Resources */, - 1678441D1B092FFB009DEE8D /* glance-8@2x.png in Resources */, - 167844111B092FFB009DEE8D /* glance-38@2x.png in Resources */, - 167844181B092FFB009DEE8D /* glance-44@2x.png in Resources */, - 167844191B092FFB009DEE8D /* glance-4@2x.png in Resources */, - 167844101B092FFB009DEE8D /* glance-37@2x.png in Resources */, - 167843FE1B092FFB009DEE8D /* glance-20@2x.png in Resources */, - 167843F21B092FFB009DEE8D /* glance-0@2x.png in Resources */, - 167843FD1B092FFB009DEE8D /* glance-1@2x.png in Resources */, - 167843F61B092FFB009DEE8D /* glance-13@2x.png in Resources */, - 167843FB1B092FFB009DEE8D /* glance-18@2x.png in Resources */, - 167843FA1B092FFB009DEE8D /* glance-17@2x.png in Resources */, - 16502F961B06877E00EB83DF /* Images.xcassets in Resources */, - 1678441A1B092FFB009DEE8D /* glance-5@2x.png in Resources */, - 1678441E1B092FFB009DEE8D /* glance-9@2x.png in Resources */, - 167843FC1B092FFB009DEE8D /* glance-19@2x.png in Resources */, - 1678440A1B092FFB009DEE8D /* glance-31@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16502F9A1B06877E00EB83DF /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 16502FAB1B06877E00EB83DF /* Images.xcassets in Resources */, - 16F718971B1128B000EA8C90 /* Localizable.strings in Resources */, - 16F718981B1128B000EA8C90 /* Localizable.stringsdict in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16EB5EC91936D39400532A4B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 16A1A28C193836F900302EE4 /* Today.storyboard in Resources */, - 160D913F1937922F00373D47 /* ListerToday.entitlements in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16F60C5C1A8560470028B2D8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 16F60C691A8560470028B2D8 /* Images.xcassets in Resources */, - 16F60C891A8564460028B2D8 /* Localizable.stringsdict in Resources */, - 16F60C881A8564460028B2D8 /* Localizable.strings in Resources */, - 16F60C6D1A8560470028B2D8 /* Lister WatchKit App.app in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16F60C6A1A8560470028B2D8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 16F60CAE1A8564810028B2D8 /* glance-24@2x.png in Resources */, - 16F60CB91A8564810028B2D8 /* glance-35@2x.png in Resources */, - 16F60CBE1A8564810028B2D8 /* glance-40@2x.png in Resources */, - 16F60C8C1A8564790028B2D8 /* checkbox-gray-checked@2x.png in Resources */, - 168A23671A93F05000BB2495 /* Images.xcassets in Resources */, - 16F60CA41A8564810028B2D8 /* glance-14@2x.png in Resources */, - 16F60CB31A8564810028B2D8 /* glance-29@2x.png in Resources */, - 16F60CA21A8564810028B2D8 /* glance-12@2x.png in Resources */, - 16F60C8B1A8564790028B2D8 /* checkbox-blue-unchecked@2x.png in Resources */, - 16F60CBF1A8564810028B2D8 /* glance-41@2x.png in Resources */, - 16F60C991A8564810028B2D8 /* glance-3@2x.png in Resources */, - 16F60CA71A8564810028B2D8 /* glance-17@2x.png in Resources */, - 16F60C8F1A8564790028B2D8 /* checkbox-green-unchecked@2x.png in Resources */, - 16F60CB61A8564810028B2D8 /* glance-32@2x.png in Resources */, - 16F60CB21A8564810028B2D8 /* glance-28@2x.png in Resources */, - 16F60CB81A8564810028B2D8 /* glance-34@2x.png in Resources */, - 16F60C751A8560470028B2D8 /* Interface.storyboard in Resources */, - 16F60CAC1A8564810028B2D8 /* glance-22@2x.png in Resources */, - 16F60CA01A8564810028B2D8 /* glance-10@2x.png in Resources */, - 16F60C9C1A8564810028B2D8 /* glance-6@2x.png in Resources */, - 16F60CB51A8564810028B2D8 /* glance-31@2x.png in Resources */, - 16F60C931A8564790028B2D8 /* checkbox-red-unchecked@2x.png in Resources */, - 16F60C981A8564810028B2D8 /* glance-2@2x.png in Resources */, - 16F60CA61A8564810028B2D8 /* glance-16@2x.png in Resources */, - 16F60CB11A8564810028B2D8 /* glance-27@2x.png in Resources */, - 16F60CA81A8564810028B2D8 /* glance-18@2x.png in Resources */, - 16F60C9A1A8564810028B2D8 /* glance-4@2x.png in Resources */, - 16F60CAB1A8564810028B2D8 /* glance-21@2x.png in Resources */, - 16F60CB71A8564810028B2D8 /* glance-33@2x.png in Resources */, - 16F60CA31A8564810028B2D8 /* glance-13@2x.png in Resources */, - 16F60C9B1A8564810028B2D8 /* glance-5@2x.png in Resources */, - 16F60CB41A8564810028B2D8 /* glance-30@2x.png in Resources */, - 16F60CB01A8564810028B2D8 /* glance-26@2x.png in Resources */, - 16F60C8E1A8564790028B2D8 /* checkbox-green-checked@2x.png in Resources */, - 16F60CBC1A8564810028B2D8 /* glance-38@2x.png in Resources */, - 16F60CAA1A8564810028B2D8 /* glance-20@2x.png in Resources */, - 16F60C9E1A8564810028B2D8 /* glance-8@2x.png in Resources */, - 16F60C8A1A8564790028B2D8 /* checkbox-blue-checked@2x.png in Resources */, - 16F60CAD1A8564810028B2D8 /* glance-23@2x.png in Resources */, - 16F60CA91A8564810028B2D8 /* glance-19@2x.png in Resources */, - 16F60C961A8564810028B2D8 /* glance-0@2x.png in Resources */, - 16F60C911A8564790028B2D8 /* checkbox-orange-unchecked@2x.png in Resources */, - 16F60CC31A8564870028B2D8 /* check-all@2x.png in Resources */, - 16F60C951A8564790028B2D8 /* checkbox-yellow-unchecked@2x.png in Resources */, - 16F60CBA1A8564810028B2D8 /* glance-36@2x.png in Resources */, - 16F60CAF1A8564810028B2D8 /* glance-25@2x.png in Resources */, - 16F60C921A8564790028B2D8 /* checkbox-red-checked@2x.png in Resources */, - 16F60C971A8564810028B2D8 /* glance-1@2x.png in Resources */, - 16F60C8D1A8564790028B2D8 /* checkbox-gray-unchecked@2x.png in Resources */, - 16F60C901A8564790028B2D8 /* checkbox-orange-checked@2x.png in Resources */, - 16F60CC21A8564810028B2D8 /* glance-44@2x.png in Resources */, - 16F60CBD1A8564810028B2D8 /* glance-39@2x.png in Resources */, - 16F60CA11A8564810028B2D8 /* glance-11@2x.png in Resources */, - 16F60CC01A8564810028B2D8 /* glance-42@2x.png in Resources */, - 16F60C9D1A8564810028B2D8 /* glance-7@2x.png in Resources */, - 16F60CC41A8564870028B2D8 /* uncheck-all@2x.png in Resources */, - 16F60CBB1A8564810028B2D8 /* glance-37@2x.png in Resources */, - 16F60CA51A8564810028B2D8 /* glance-15@2x.png in Resources */, - 16F60C941A8564790028B2D8 /* checkbox-yellow-checked@2x.png in Resources */, - 16F60C9F1A8564810028B2D8 /* glance-9@2x.png in Resources */, - 16F60CC11A8564810028B2D8 /* glance-43@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E2517C5197F7D9600B8AF96 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E745EC9190880F30090B20E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E2095BD1A1A8BC300080AA0 /* Today.list in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E95066E198575570030A9D1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1611C5F41A92A09100472891 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1611C5FD1A92A09100472891 /* AAPLAppLaunchContextTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 163275F618AD468F00A97A9F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 16C1577218AD9B7100B21147 /* AAPLListViewController.m in Sources */, - 160868761A8EA54300A5A707 /* AAPLAppLaunchContext.m in Sources */, - 16C1577618ADC47F00B21147 /* AAPLListItemCell.m in Sources */, - 163701CE190AFD1D003FF9D0 /* AAPLNewListDocumentController.m in Sources */, - 169E922C18AD7EF100139723 /* AAPLListDocumentsViewController.m in Sources */, - 163AD5B219082124007D9A03 /* AAPLAppDelegate.m in Sources */, - 1632760318AD468F00A97A9F /* main.m in Sources */, - 16C89AAA1909AD4600752460 /* AAPLListCell.m in Sources */, - 163701CB190AD1F9003FF9D0 /* AAPLListColorCell.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1632761918AD468F00A97A9F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1623FD171A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m in Sources */, - 3EC72A301908B3F900AE5774 /* AAPLListColor+UI.m in Sources */, - 3EE49ED8198B33C4002B78BC /* AAPLLocalListCoordinator.m in Sources */, - 16B1D92C1A1A785E009EEBED /* AAPLDirectoryMonitor.m in Sources */, - 3E90531F1A13289F006DCBA7 /* AAPLListPresenterUtilities.m in Sources */, - 3EE49EF2198B3F18002B78BC /* AAPLListInfo.m in Sources */, - 16D4DA1119082E2B0013342E /* AAPLList.m in Sources */, - 3E5C9F321936FE3E00EE1526 /* AAPLAppConfiguration.m in Sources */, - 3E90531B1A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m in Sources */, - 3EE49ED4198B3366002B78BC /* AAPLCloudListCoordinator.m in Sources */, - 3EBE02C9198CA5C60007E4AC /* AAPLCheckBoxLayer.m in Sources */, - 3EE49ECB198B2D62002B78BC /* AAPLListsController.m in Sources */, - 1623FD131A02FE7900631A60 /* AAPLAllListItemsPresenter.m in Sources */, - 160D914519380CE500373D47 /* AAPLCheckBox.m in Sources */, - 3EE49EDC198B342B002B78BC /* AAPLListUtilities.m in Sources */, - 16D4DA1319082E2B0013342E /* AAPLListItem.m in Sources */, - 3E5C9F211936FD9100EE1526 /* AAPLListDocument.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1633C72D1939337F00A9CC5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EED111719AFC35C00848265 /* AAPLTodayWidgetRowPurposeBox.m in Sources */, - 3EED111819AFC35C00848265 /* AAPLTodayWidgetRequiresCloudViewController.m in Sources */, - 1633C77719393EB200A9CC5E /* AAPLListRowRepresentedObject.m in Sources */, - 1633C77A19393EB200A9CC5E /* AAPLOpenListerRowViewController.m in Sources */, - 1633C77C19393EB200A9CC5E /* AAPLTodayViewController.m in Sources */, - 1608C4DC19398CE400CC1E53 /* AAPLNoItemsRowViewController.m in Sources */, - 1633C77819393EB200A9CC5E /* AAPLListRowViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 163A6C9B1906ED4C008E1930 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E3208C119088F60003C9147 /* AAPLColorPaletteView.m in Sources */, - 3E6224611924623D00FFC808 /* AAPLListWindowController.m in Sources */, - 3EC72A361908BA8A00AE5774 /* AAPLListItemView.m in Sources */, - 3EFDBA0D198D435800DBDB93 /* NSColor+AppSpecific.m in Sources */, - 3E97926619097A860062A433 /* AAPLListTableView.m in Sources */, - 3E745EFE190887500090B20E /* AAPLListViewController.m in Sources */, - 16ADF81B191AAC2E00CA9120 /* AAPLAppDelegate.m in Sources */, - 3E97926A1909807D0062A433 /* AAPLResizingTextField.m in Sources */, - 3E185F6819104409007B95FB /* AAPLTableRowView.m in Sources */, - 163A6CA51906ED4C008E1930 /* main.m in Sources */, - 3E7DBC5C19296BF200830E02 /* AAPLAddItemViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 164346B01B0FE72200F81674 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 164346CD1B0FE86900F81674 /* AAPLList.m in Sources */, - 164346C21B0FE81400F81674 /* AAPLConnectivityListsController.m in Sources */, - 164346CE1B0FE86900F81674 /* AAPLListItem.m in Sources */, - 164346D71B0FED3800F81674 /* AAPLListColor+UI.m in Sources */, - 164346D01B0FE86900F81674 /* AAPLIncompleteListItemsPresenter.m in Sources */, - 164346CF1B0FE86900F81674 /* AAPLAllListItemsPresenter.m in Sources */, - 164346D51B0FEA1600F81674 /* AAPLAppConfiguration.m in Sources */, - 164346D21B0FE86900F81674 /* AAPLListPresenterUtilities.m in Sources */, - 164346DD1B0FEE7300F81674 /* AAPLListUtilities.m in Sources */, - 164346D11B0FE86900F81674 /* AAPLListPresenterAlgorithms.m in Sources */, - 164346C01B0FE80600F81674 /* AAPLListInfo.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16502F981B06877E00EB83DF /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 16533DB31B0921E3006A90C4 /* AAPLColoredTextRowController.m in Sources */, - 16D1A47E1B06B0670027BF67 /* AAPLWatchStoryboardConstants.m in Sources */, - 16502FA61B06877E00EB83DF /* AAPLExtensionDelegate.m in Sources */, - 16502FA31B06877E00EB83DF /* AAPLListsInterfaceController.m in Sources */, - 16502FA91B06877E00EB83DF /* AAPLGlanceInterfaceController.m in Sources */, - 16533DB41B0921E3006A90C4 /* AAPLListItemRowController.m in Sources */, - 167843B61B0927D6009DEE8D /* AAPLListInterfaceController.m in Sources */, - 16F718961B10F8C800EA8C90 /* AAPLGlanceBadge.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16EB5EC71936D39400532A4B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 16A1A287193819B900302EE4 /* AAPLTodayViewController.m in Sources */, - 16A1A286193818EE00302EE4 /* AAPLCheckBoxCell.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 16F60C5A1A8560470028B2D8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 16F60C841A8562160028B2D8 /* AAPLColoredTextRowController.m in Sources */, - 16F60C831A8562160028B2D8 /* AAPLListInterfaceController.m in Sources */, - 16F60C851A8562160028B2D8 /* AAPLListItemRowController.m in Sources */, - 16F60C861A8562160028B2D8 /* AAPLGlanceBadge.m in Sources */, - 16F60C871A8562160028B2D8 /* AAPLGlanceInterfaceController.m in Sources */, - 16F60C811A8562160028B2D8 /* AAPLWatchStoryboardConstants.m in Sources */, - 16F60C821A8562160028B2D8 /* AAPLListsInterfaceController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E2517C3197F7D9600B8AF96 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3E7C9AFE1A15003900909602 /* AAPLAllListItemsPresenterTests.m in Sources */, - 3EAA58C719870A5F003D955F /* AAPLListItemTests.m in Sources */, - 3E7C9B001A15004000909602 /* AAPLListPresenterTestHelper.m in Sources */, - 3E2517CC197F7D9700B8AF96 /* AAPLListTests.m in Sources */, - 3E0C2C321A154B0900976F0D /* AAPLIncompleteListItemsPresenterTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E745EC6190880F30090B20E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EC72A321908B73A00AE5774 /* AAPLListColor+UI.m in Sources */, - 16E330CC191EDAC400698F8C /* AAPLTodayListManager.m in Sources */, - 3EBE02C8198CA5C60007E4AC /* AAPLCheckBoxLayer.m in Sources */, - 3E5C9F391936FE6500EE1526 /* AAPLListDocument.m in Sources */, - 3E745EF61908833C0090B20E /* AAPLListItem.m in Sources */, - 3E9053201A13289F006DCBA7 /* AAPLListPresenterUtilities.m in Sources */, - 3E5C9F331936FE3E00EE1526 /* AAPLAppConfiguration.m in Sources */, - 3E745EF41908833C0090B20E /* AAPLList.m in Sources */, - 3EDE4F9B1919E50A00AA599C /* AAPLCheckBox.m in Sources */, - 1623FD181A02FE7900631A60 /* AAPLIncompleteListItemsPresenter.m in Sources */, - 3EC67B19190B58C600290085 /* AAPLListFormatting.m in Sources */, - 3E90531C1A13289F006DCBA7 /* AAPLListPresenterAlgorithms.m in Sources */, - 1623FD141A02FE7900631A60 /* AAPLAllListItemsPresenter.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3E95066C198575570030A9D1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EAA58C619870A5F003D955F /* AAPLListItemTests.m in Sources */, - 3EAA58C819870A62003D955F /* AAPLListTests.m in Sources */, - 3E0C2C2F1A153DD600976F0D /* AAPLAllListItemsPresenterTests.m in Sources */, - 3E7C9AFF1A15004000909602 /* AAPLListPresenterTestHelper.m in Sources */, - 3E0C2C331A154B0900976F0D /* AAPLIncompleteListItemsPresenterTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 160D670F1B1E188600E923AB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 163275F918AD468F00A97A9F /* Lister */; - targetProxy = 160D670E1B1E188600E923AB /* PBXContainerItemProxy */; - }; - 1611C5FF1A92A09100472891 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 163275F918AD468F00A97A9F /* Lister */; - targetProxy = 1611C5FE1A92A09100472891 /* PBXContainerItemProxy */; - }; - 1632762018AD468F00A97A9F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1632761D18AD468F00A97A9F /* ListerKit */; - targetProxy = 1632761F18AD468F00A97A9F /* PBXContainerItemProxy */; - }; - 1633C7491939338000A9CC5E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1633C7301939337F00A9CC5E /* Lister Today (OS X) */; - targetProxy = 1633C7481939338000A9CC5E /* PBXContainerItemProxy */; - }; - 1633C7611939356E00A9CC5E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3E745ECA190880F30090B20E /* ListerKit (OS X) */; - targetProxy = 1633C7601939356E00A9CC5E /* PBXContainerItemProxy */; - }; - 164346DB1B0FEE5500F81674 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 164346B41B0FE72200F81674 /* ListerKit (watchOS) */; - targetProxy = 164346DA1B0FEE5500F81674 /* PBXContainerItemProxy */; - }; - 16502F9F1B06877E00EB83DF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 16502F9B1B06877E00EB83DF /* Lister Watch Extension */; - targetProxy = 16502F9E1B06877E00EB83DF /* PBXContainerItemProxy */; - }; - 16502FAE1B06877E00EB83DF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 16502F8F1B06877E00EB83DF /* Lister Watch App */; - targetProxy = 16502FAD1B06877E00EB83DF /* PBXContainerItemProxy */; - }; - 169A57241B1B7EBE006BC62A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 16F60C5D1A8560470028B2D8 /* Lister WatchKit Extension */; - targetProxy = 169A57231B1B7EBE006BC62A /* PBXContainerItemProxy */; - }; - 16A1A28A1938266C00302EE4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 16EB5ECA1936D39400532A4B /* Lister Today */; - targetProxy = 16A1A2891938266C00302EE4 /* PBXContainerItemProxy */; - }; - 16B6ABA91939573B00CA7E11 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1633C7301939337F00A9CC5E /* Lister Today (OS X) */; - targetProxy = 16B6ABA81939573B00CA7E11 /* PBXContainerItemProxy */; - }; - 16CD55B41B12537500DB4F4F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 16F60C6B1A8560470028B2D8 /* Lister WatchKit App */; - targetProxy = 16CD55B31B12537500DB4F4F /* PBXContainerItemProxy */; - }; - 16F60C6F1A8560470028B2D8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 16F60C6B1A8560470028B2D8 /* Lister WatchKit App */; - targetProxy = 16F60C6E1A8560470028B2D8 /* PBXContainerItemProxy */; - }; - 3E1ACA051A85810600FF4AB3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1632761D18AD468F00A97A9F /* ListerKit */; - targetProxy = 3E1ACA041A85810600FF4AB3 /* PBXContainerItemProxy */; - }; - 3E1ACA071A85810A00FF4AB3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1632761D18AD468F00A97A9F /* ListerKit */; - targetProxy = 3E1ACA061A85810A00FF4AB3 /* PBXContainerItemProxy */; - }; - 3E1E31B21920A94A00A9BB12 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3E745ECA190880F30090B20E /* ListerKit (OS X) */; - targetProxy = 3E1E31B11920A94A00A9BB12 /* PBXContainerItemProxy */; - }; - 3E2517CF197F7D9700B8AF96 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1632761D18AD468F00A97A9F /* ListerKit */; - targetProxy = 3E2517CE197F7D9700B8AF96 /* PBXContainerItemProxy */; - }; - 3ED603CD19384D630044A535 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3E745ECA190880F30090B20E /* ListerKit (OS X) */; - targetProxy = 3ED603CC19384D630044A535 /* PBXContainerItemProxy */; - }; - 55C783461A19C782006B0C19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3E745ECA190880F30090B20E /* ListerKit (OS X) */; - targetProxy = 55C783451A19C782006B0C19 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 1633C7381939338000A9CC5E /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 1633C7391939338000A9CC5E /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 16892DE11B06E2F00001FF08 /* Interface.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 16892DE21B06E2F00001FF08 /* Base */, - ); - name = Interface.storyboard; - sourceTree = ""; - }; - 16B9353D1909753F004E89E3 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 16B9353E1909753F004E89E3 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 16CD55B01B124B5100DB4F4F /* Launch Screen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 16CD55B11B124B5100DB4F4F /* Base */, - ); - name = "Launch Screen.storyboard"; - sourceTree = ""; - }; - 16F60C731A8560470028B2D8 /* Interface.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 16F60C741A8560470028B2D8 /* Base */, - ); - name = Interface.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1611C6001A92A09100472891 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_WARN_UNREACHABLE_CODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "Lister Tests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Lister.app/Lister"; - }; - name = Debug; - }; - 1611C6011A92A09100472891 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_WARN_UNREACHABLE_CODE = YES; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = "Lister Tests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Lister.app/Lister"; - }; - name = Release; - }; - 1632763C18AD468F00A97A9F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "LISTER_BUNDLE_PREFIX_STRING=@\\\"${LISTER_BUNDLE_PREFIX}\\\"", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LISTER_BUNDLE_PREFIX = "com.example.apple-samplecode"; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - TOOLCHAINS = default; - }; - name = Debug; - }; - 1632763D18AD468F00A97A9F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = "LISTER_BUNDLE_PREFIX_STRING=@\\\"${LISTER_BUNDLE_PREFIX}\\\""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LISTER_BUNDLE_PREFIX = "com.example.apple-samplecode"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - TOOLCHAINS = default; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 1632763F18AD468F00A97A9F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - AXLE_ENABLE_DEBUG_INFO = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ListerKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 1632764018AD468F00A97A9F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - AXLE_ENABLE_DEBUG_INFO = NO; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = ListerKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 1632764318AD468F00A97A9F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Lister/Lister.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Lister/Lister-Prefix.pch"; - INFOPLIST_FILE = "$(SRCROOT)/Lister/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - }; - name = Debug; - }; - 1632764418AD468F00A97A9F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Lister/Lister.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Lister/Lister-Prefix.pch"; - INFOPLIST_FILE = "$(SRCROOT)/Lister/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - }; - name = Release; - }; - 1633C74B1939338000A9CC5E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = ListerTodayOSX/ListerTodayOSX.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; - COMBINE_HIDPI_IMAGES = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ListerTodayOSX/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; - METAL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).ListerOSX.$(PRODUCT_NAME:rfc1034identifier)TodayOSX"; - PRODUCT_NAME = Lister; - PROVISIONING_PROFILE = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 1633C74C1939338000A9CC5E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = ListerTodayOSX/ListerTodayOSX.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; - COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = ListerTodayOSX/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; - METAL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).ListerOSX.$(PRODUCT_NAME:rfc1034identifier)TodayOSX"; - PRODUCT_NAME = Lister; - PROVISIONING_PROFILE = ""; - SDKROOT = macosx; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 163A6CBE1906ED4D008E1930 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - AXLE_ENABLE_DEBUG_INFO = YES; - CLANG_WARN_ASSIGN_ENUM = NO; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = ListerOSX/ListerOSX.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; - COMBINE_HIDPI_IMAGES = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ListerOSX/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).$(PRODUCT_NAME:rfc1034identifier)OSX"; - PRODUCT_NAME = Lister; - PROVISIONING_PROFILE = ""; - SDKROOT = macosx; - }; - name = Debug; - }; - 163A6CBF1906ED4D008E1930 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - AXLE_ENABLE_DEBUG_INFO = NO; - CLANG_WARN_ASSIGN_ENUM = NO; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = ListerOSX/ListerOSX.entitlements; - CODE_SIGN_IDENTITY = "Mac Developer"; - "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; - COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = ListerOSX/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).$(PRODUCT_NAME:rfc1034identifier)OSX"; - PRODUCT_NAME = Lister; - PROVISIONING_PROFILE = ""; - SDKROOT = macosx; - }; - name = Release; - }; - 164346BB1B0FE72200F81674 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "ListerKit (WatchOS)/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).ListerKit--WatchOS-"; - PRODUCT_NAME = ListerKit; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 164346BC1B0FE72200F81674 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "ListerKit (WatchOS)/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).ListerKit--WatchOS-"; - PRODUCT_NAME = ListerKit; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 16502FB01B06877E00EB83DF /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - IBSC_MODULE = Lister_Watch_Extension; - INFOPLIST_FILE = "$(SRCROOT)/Lister Watch App/Info.plist"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).Lister.nativewatchkitapp"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - }; - name = Debug; - }; - 16502FB11B06877E00EB83DF /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - IBSC_MODULE = Lister_Watch_Extension; - INFOPLIST_FILE = "$(SRCROOT)/Lister Watch App/Info.plist"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).Lister.nativewatchkitapp"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - }; - name = Release; - }; - 16502FB21B06877E00EB83DF /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "$(SRCROOT)/Lister Watch Extension/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).Lister.nativewatchkitapp.nativewatchkitextension"; - PRODUCT_NAME = "${TARGET_NAME}"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - }; - name = Debug; - }; - 16502FB31B06877E00EB83DF /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "$(SRCROOT)/Lister Watch Extension/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).Lister.nativewatchkitapp.nativewatchkitextension"; - PRODUCT_NAME = "${TARGET_NAME}"; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - }; - name = Release; - }; - 16EB5EDB1936D39400532A4B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = ListerToday/ListerToday.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ListerToday/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - METAL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).Lister.$(PRODUCT_NAME:rfc1034identifier)Today"; - PRODUCT_NAME = Lister; - PROVISIONING_PROFILE = ""; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 16EB5EDC1936D39400532A4B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = ListerToday/ListerToday.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = ListerToday/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - METAL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).Lister.$(PRODUCT_NAME:rfc1034identifier)Today"; - PRODUCT_NAME = Lister; - PROVISIONING_PROFILE = ""; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 16F60C7C1A8560480028B2D8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - IBSC_MODULE = Lister_WatchKit_Extension; - INFOPLIST_FILE = "Lister WatchKit App/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.watchkitapp"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4"; - }; - name = Debug; - }; - 16F60C7D1A8560480028B2D8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - IBSC_MODULE = Lister_WatchKit_Extension; - INFOPLIST_FILE = "Lister WatchKit App/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.watchkitapp"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4"; - }; - name = Release; - }; - 16F60C7F1A8560480028B2D8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = "Lister WatchKit Extension/Lister WatchKit Extension.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "Lister WatchKit Extension/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.watchkitextension"; - PRODUCT_NAME = "${TARGET_NAME}"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 16F60C801A8560480028B2D8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_ENTITLEMENTS = "Lister WatchKit Extension/Lister WatchKit Extension.entitlements"; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = "Lister WatchKit Extension/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.Lister.watchkitextension"; - PRODUCT_NAME = "${TARGET_NAME}"; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 3E2517D1197F7D9700B8AF96 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "ListerKit Tests/iOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Lister.app/Lister"; - }; - name = Debug; - }; - 3E2517D2197F7D9700B8AF96 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = "ListerKit Tests/iOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Lister.app/Lister"; - }; - name = Release; - }; - 3E745EE4190880F30090B20E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - AXLE_ENABLE_DEBUG_INFO = YES; - CLANG_WARN_ASSIGN_ENUM = NO; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ListerKitOSX/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = ListerKit; - SDKROOT = macosx; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 3E745EE5190880F30090B20E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - AXLE_ENABLE_DEBUG_INFO = NO; - CLANG_WARN_ASSIGN_ENUM = NO; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; - COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_VERSION = A; - INFOPLIST_FILE = ListerKitOSX/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "$(LISTER_BUNDLE_PREFIX).$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = ListerKit; - SDKROOT = macosx; - SKIP_INSTALL = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 3E950677198575570030A9D1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; - COMBINE_HIDPI_IMAGES = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "ListerKit Tests/OS X/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Debug; - }; - 3E950678198575570030A9D1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "Mac Developer"; - COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - INFOPLIST_FILE = "ListerKit Tests/OS X/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "${LISTER_BUNDLE_PREFIX}.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1611C6021A92A09100472891 /* Build configuration list for PBXNativeTarget "Lister Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1611C6001A92A09100472891 /* Debug */, - 1611C6011A92A09100472891 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 163275F518AD468F00A97A9F /* Build configuration list for PBXProject "Lister" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1632763C18AD468F00A97A9F /* Debug */, - 1632763D18AD468F00A97A9F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1632763E18AD468F00A97A9F /* Build configuration list for PBXNativeTarget "ListerKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1632763F18AD468F00A97A9F /* Debug */, - 1632764018AD468F00A97A9F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1632764218AD468F00A97A9F /* Build configuration list for PBXNativeTarget "Lister" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1632764318AD468F00A97A9F /* Debug */, - 1632764418AD468F00A97A9F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1633C74A1939338000A9CC5E /* Build configuration list for PBXNativeTarget "Lister Today (OS X)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1633C74B1939338000A9CC5E /* Debug */, - 1633C74C1939338000A9CC5E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 163A6CC21906ED4D008E1930 /* Build configuration list for PBXNativeTarget "Lister (OS X)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 163A6CBE1906ED4D008E1930 /* Debug */, - 163A6CBF1906ED4D008E1930 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 164346BA1B0FE72200F81674 /* Build configuration list for PBXNativeTarget "ListerKit (watchOS)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 164346BB1B0FE72200F81674 /* Debug */, - 164346BC1B0FE72200F81674 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 16502FB41B06877E00EB83DF /* Build configuration list for PBXNativeTarget "Lister Watch Extension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 16502FB21B06877E00EB83DF /* Debug */, - 16502FB31B06877E00EB83DF /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 16502FB61B06877E00EB83DF /* Build configuration list for PBXNativeTarget "Lister Watch App" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 16502FB01B06877E00EB83DF /* Debug */, - 16502FB11B06877E00EB83DF /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 16EB5EDA1936D39400532A4B /* Build configuration list for PBXNativeTarget "Lister Today" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 16EB5EDB1936D39400532A4B /* Debug */, - 16EB5EDC1936D39400532A4B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 16F60C7B1A8560480028B2D8 /* Build configuration list for PBXNativeTarget "Lister WatchKit App" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 16F60C7C1A8560480028B2D8 /* Debug */, - 16F60C7D1A8560480028B2D8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 16F60C7E1A8560480028B2D8 /* Build configuration list for PBXNativeTarget "Lister WatchKit Extension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 16F60C7F1A8560480028B2D8 /* Debug */, - 16F60C801A8560480028B2D8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3E2517D0197F7D9700B8AF96 /* Build configuration list for PBXNativeTarget "ListerKit Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3E2517D1197F7D9700B8AF96 /* Debug */, - 3E2517D2197F7D9700B8AF96 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3E745EE8190880F30090B20E /* Build configuration list for PBXNativeTarget "ListerKit (OS X)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3E745EE4190880F30090B20E /* Debug */, - 3E745EE5190880F30090B20E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3E950676198575570030A9D1 /* Build configuration list for PBXNativeTarget "ListerKit Tests (OS X)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3E950677198575570030A9D1 /* Debug */, - 3E950678198575570030A9D1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 163275F218AD468F00A97A9F /* Project object */; -} diff --git a/Lister/Objective-C/Lister/AAPLAppDelegate.h b/Lister/Objective-C/Lister/AAPLAppDelegate.h deleted file mode 100644 index e557f134..00000000 --- a/Lister/Objective-C/Lister/AAPLAppDelegate.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The application delegate. -*/ - -@import UIKit; - -/*! - The identifier for an empty view controller defined in the main storyboard. - */ -extern NSString *const AAPLAppDelegateMainStoryboardEmptyViewControllerIdentifier; - -/*! - The identifier for a list view controller defined in the main storyboard. - */ -extern NSString *const AAPLAppDelegateMainStoryboardListViewControllerIdentifier; - -/*! - The identifier for a list navigation view controller defined in the main storyboard. - */ -extern NSString *const AAPLAppDelegateMainStoryboardListNavigationViewControllerIdentifier; - -/*! - The segue identifier for the transition between the \c ListDocumentsViewController and the - \c NewListDocumentController. - */ -extern NSString *const AAPLAppDelegateMainStoryboardListDocumentsViewControllerToNewListDocumentControllerSegueIdentifier; - -/*! - The segue identifier for the transition between the \c ListDocumentsViewController and the - \c ListViewController. - */ -extern NSString *const AAPLAppDelegateMainStoryboardListDocumentsViewControllerToListViewControllerSegueIdentifier; - -/*! - The segue identifier for the transition between the \c ListDocumentsViewController and the - \c ListViewController initiated by the resumption of a user activity. - */ -extern NSString *const AAPLAppDelegateMainStoryboardListDocumentsViewControllerContinueUserActivity; - -@interface AAPLAppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; - -@end diff --git a/Lister/Objective-C/Lister/AAPLAppDelegate.m b/Lister/Objective-C/Lister/AAPLAppDelegate.m deleted file mode 100644 index 2b13d9f5..00000000 --- a/Lister/Objective-C/Lister/AAPLAppDelegate.m +++ /dev/null @@ -1,353 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The application delegate. -*/ - -#import "AAPLAppDelegate.h" -#import "AAPLListDocumentsViewController.h" -#import "AAPLListViewController.h" -#import "AAPLAppLaunchContext.h" -@import ListerKit; - -// The main storyboard name. -NSString *const AAPLAppDelegateMainStoryboardName = @"Main"; - -// View controller storyboard identifiers. -NSString *const AAPLAppDelegateMainStoryboardEmptyViewControllerIdentifier = @"emptyViewController"; -NSString *const AAPLAppDelegateMainStoryboardListViewControllerIdentifier = @"listViewController"; -NSString *const AAPLAppDelegateMainStoryboardListNavigationViewControllerIdentifier = @"listViewNavigationController"; - -// View controller segue identifiers. -NSString *const AAPLAppDelegateMainStoryboardListDocumentsViewControllerToNewListDocumentControllerSegueIdentifier = @"showNewListDocument"; -NSString *const AAPLAppDelegateMainStoryboardListDocumentsViewControllerToListViewControllerSegueIdentifier = @"showListDocument"; -NSString *const AAPLAppDelegateMainStoryboardListDocumentsViewControllerContinueUserActivity = @"showListDocumentFromUserActivity"; - -@interface AAPLAppDelegate () - -@property (nonatomic, strong) AAPLListsController *listsController; - -/*! - The root view controller of the window will always be a UISplitViewController. This is setup in - the main storyboard. - */ -@property (nonatomic, readonly) UISplitViewController *splitViewController; - -/*! - The primary view controller of the split view controller defined in the main storyboard. - */ -@property (nonatomic, readonly) UINavigationController *primaryViewController; - -/*! - The view controller that displays the list of documents. If it's not visible, then this value is nil. - */ -@property (nonatomic, readonly) AAPLListDocumentsViewController *listDocumentsViewController; - -/*! - @return A private, local queue used to ensure serialized access to Cloud containers during application - startup. - */ -@property (nonatomic, strong) dispatch_queue_t appDelegateQueue; - -@end - -@implementation AAPLAppDelegate - -#pragma mark - Initialization - -- (instancetype)init { - self = [super init]; - - if (self) { - _appDelegateQueue = dispatch_queue_create("com.example.apple-samplecode.lister.appdelegate", DISPATCH_QUEUE_SERIAL); - } - - return self; -} - -#pragma mark - UIApplicationDelegate - -- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - AAPLAppConfiguration *appConfiguration = [AAPLAppConfiguration sharedAppConfiguration]; - - if (appConfiguration.isCloudAvailable) { - /* - Ensure the app sandbox is extended to include the default container. Perform this action on the - `AAPLAppDelegate`'s serial queue so that actions dependent on the extension always follow it. - */ - dispatch_async(self.appDelegateQueue, ^{ - // The initial call extends the sandbox. No need to capture the URL. - [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; - }); - } - - return YES; -} - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Observe changes to the user's iCloud account status (account changed, logged out, etc...). - [[NSNotificationCenter defaultCenter] addObserver: self selector:@selector(handleUbiquityIdentityDidChangeNotification:) name:NSUbiquityIdentityDidChangeNotification object: nil]; - - // Provide default lists from the app's bundle on first launch. - [[AAPLAppConfiguration sharedAppConfiguration] runHandlerOnFirstLaunch:^{ - [AAPLListUtilities copyInitialLists]; - }]; - - // Set ourselves as the split view controller's delegate. - self.splitViewController.delegate = self; - self.splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAllVisible; - - // Configure the detail controller in the `UISplitViewController` at the root of the view hierarchy. - UINavigationController *navigationController = self.splitViewController.viewControllers.lastObject; - navigationController.topViewController.navigationItem.leftBarButtonItem = [self.splitViewController displayModeButtonItem]; - navigationController.topViewController.navigationItem.leftItemsSupplementBackButton = YES; - - return YES; -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - // Make sure that user storage preferences are set up after the app sandbox is extended. See `application:willFinishLaunchingWithOptions:` above. - dispatch_async(self.appDelegateQueue, ^{ - [self setupUserStoragePreferences]; - }); -} - -- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler { - // Lister only supports a single user activity type; if you support more than one the type is available from the userActivity parameter. - if (restorationHandler && self.listDocumentsViewController) { - // Make sure that user activity continuation occurs after the app sandbox is extended. See `application:willFinishLaunchingWithOptions:` above. - dispatch_async(self.appDelegateQueue, ^{ - restorationHandler(@[self.listDocumentsViewController]); - }); - - return true; - } - - return false; -} - -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { - // Lister currently only opens URLs of the Lister scheme type. - if ([url.scheme isEqualToString:AAPLAppConfigurationListerSchemeName]) { - AAPLAppLaunchContext *launchContext = [[AAPLAppLaunchContext alloc] initWithListerURL: url]; - - // Only configure the view controller if a launch context was successfully created. - if (launchContext) { - // Make sure that URL opening is handled after the app sandbox is extended. See `application:willFinishLaunchingWithOptions:` above. - dispatch_async(self.appDelegateQueue, ^{ - [self.listDocumentsViewController configureViewControllerWithLaunchContext:launchContext]; - }); - - return YES; - } - } - - return NO; -} - -#pragma mark - Property Overrides - -- (UISplitViewController *)splitViewController { - return (UISplitViewController *)self.window.rootViewController; -} - -- (UINavigationController *)primaryViewController { - return self.splitViewController.viewControllers.firstObject; -} - -- (AAPLListDocumentsViewController *)listDocumentsViewController { - return (AAPLListDocumentsViewController *)self.primaryViewController.viewControllers.firstObject; -} - -#pragma mark - UISplitViewControllerDelegate - -- (BOOL)splitViewController:(UISplitViewController *)splitViewController collapseSecondaryViewController:(UIViewController *)secondaryViewController ontoPrimaryViewController:(UIViewController *)primaryViewController { - - /* - In a regular width size class, Lister displays a split view controller with a navigation controller - displayed in both the master and detail areas. - If there's a list that's currently selected, it should be on top of the stack when collapsed. - Ensuring that the navigation bar takes on the appearance of the selected list requires the - transfer of the configuration of the navigation controller that was shown in the detail area. - */ - if ([secondaryViewController isKindOfClass:[UINavigationController class]] && [((UINavigationController *)secondaryViewController).topViewController isKindOfClass:[AAPLListViewController class]]) { - // Obtain a reference to the navigation controller currently displayed in the detail area. - UINavigationController *secondaryNavigationController = (UINavigationController *)secondaryViewController; - - // Transfer the settings for the `navigationBar` and the `toolbar` to the main navigation controller. - self.primaryViewController.navigationBar.titleTextAttributes = secondaryNavigationController.navigationBar.titleTextAttributes; - self.primaryViewController.navigationBar.tintColor = secondaryNavigationController.navigationBar.tintColor; - self.primaryViewController.toolbar.tintColor = secondaryNavigationController.toolbar.tintColor; - - return NO; - } - - return YES; -} - -- (UIViewController *)splitViewController:(UISplitViewController *)splitViewController separateSecondaryViewControllerFromPrimaryViewController:(UIViewController *)primaryViewController { - - /* - In this delegate method, the reverse of the collapsing procedure described above needs to be - carried out if a list is being displayed. The appropriate controller to display in the detail area - should be returned. If not, the standard behavior is obtained by returning nil. - */ - if ([self.primaryViewController.topViewController isKindOfClass:[UINavigationController class]] && - [((UINavigationController *)self.primaryViewController.topViewController).topViewController isKindOfClass:[AAPLListViewController class]]) { - // Obtain a reference to the navigation controller containing the list controller to be separated. - UINavigationController *secondaryViewController = (UINavigationController *)[self.primaryViewController popViewControllerAnimated:NO]; - AAPLListViewController *listViewController = (AAPLListViewController *)secondaryViewController.topViewController; - - // Obtain the `textAttributes` and `tintColor` to setup the separated navigation controller. - NSDictionary *textAttributes = listViewController.textAttributes; - UIColor *tintColor = AAPLColorFromListColor(listViewController.document.listPresenter.color); - - // Transfer the settings for the `navigationBar` and the `toolbar` to the detail navigation controller. - secondaryViewController.navigationBar.titleTextAttributes = textAttributes; - secondaryViewController.navigationBar.tintColor = tintColor; - secondaryViewController.toolbar.tintColor = tintColor; - - // Display a bar button on the left to allow the user to expand or collapse the main area, similar to Mail. - secondaryViewController.topViewController.navigationItem.leftBarButtonItem = [splitViewController displayModeButtonItem]; - - return secondaryViewController; - } - - return nil; -} - -#pragma mark - Notifications - -- (void)handleUbiquityIdentityDidChangeNotification:(NSNotification *)notification { - [self.primaryViewController popToRootViewControllerAnimated:YES]; - - [self setupUserStoragePreferences]; -} - -#pragma mark - User Storage Preferences - -- (void)setupUserStoragePreferences { - AAPLAppStorageState storageState = [AAPLAppConfiguration sharedAppConfiguration].storageState; - - /* - Check to see if the account has changed since the last time the method was called. If it has, let the - user know that their documents have changed. If they've already chosen local storage (i.e. not iCloud), - don't notify them since there's no impact. - */ - if (storageState.accountDidChange) { - [self notifyUserOfAccountChange:storageState]; - - // Return early. State resolution will take place after the user acknowledges the change. - return; - } - - [self resolveStateForUserStorageState:storageState]; -} - -- (void)resolveStateForUserStorageState:(AAPLAppStorageState)storageState { - if (storageState.cloudAvailable) { - if (storageState.storageOption == AAPLAppStorageNotSet || (storageState.storageOption == AAPLAppStorageLocal && storageState.accountDidChange)) { - // iCloud is available, but we need to ask the user what they prefer. - [self promptUserForStorageOption]; - } - else { - /* - The user has already selected a specific storage option. Set up the lists controller to use that - storage option. - */ - [self configureListsController:storageState.accountDidChange storageOptionChangeHandler:nil]; - } - } - else { - /* - iCloud is not available, so we'll reset the storage option and configure the lists controller. The - next time that the user signs in with an iCloud account, he or she can change provide their desired - storage option. - */ - if (storageState.storageOption != AAPLAppStorageNotSet) { - [AAPLAppConfiguration sharedAppConfiguration].storageOption = AAPLAppStorageNotSet; - } - - [self configureListsController:storageState.accountDidChange storageOptionChangeHandler:nil]; - } -} - -#pragma mark - Alerts - -- (void)notifyUserOfAccountChange:(AAPLAppStorageState)storageState { - /* - Copy a 'Today' list from the bundle to the local documents directory if a 'Today' list doesn't exist. - This provides more context for the user than no lists and ensures the user always has a 'Today' list (a - design choice made in Lister). - */ - if (!storageState.cloudAvailable) { - [AAPLListUtilities copyTodayList]; - } - - NSString *title = NSLocalizedString(@"iCloud Sign Out", nil); - NSString *message = NSLocalizedString(@"You have signed out of the iCloud account previously used to store documents. Sign back in to access those documents.", nil); - NSString *okActionTitle = NSLocalizedString(@"OK", nil); - - UIAlertController *signedOutController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - - UIAlertAction *action = [UIAlertAction actionWithTitle:okActionTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { - [self resolveStateForUserStorageState:storageState]; - }]; - [signedOutController addAction:action]; - - [self.listDocumentsViewController presentViewController:signedOutController animated:YES completion:nil]; -} - -- (void)promptUserForStorageOption { - NSString *title = NSLocalizedString(@"Choose Storage Option", nil); - NSString *message = NSLocalizedString(@"Do you want to store documents in iCloud or only on this device?", nil); - NSString *localOnlyActionTitle = NSLocalizedString(@"Local Only", nil); - NSString *cloudActionTitle = NSLocalizedString(@"iCloud", nil); - - UIAlertController *storageController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - - UIAlertAction *localOption = [UIAlertAction actionWithTitle:localOnlyActionTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { - [AAPLAppConfiguration sharedAppConfiguration].storageOption = AAPLAppStorageLocal; - - [self configureListsController:YES storageOptionChangeHandler:nil]; - }]; - [storageController addAction:localOption]; - - UIAlertAction *cloudOption = [UIAlertAction actionWithTitle:cloudActionTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { - [AAPLAppConfiguration sharedAppConfiguration].storageOption = AAPLAppStorageCloud; - - [self configureListsController:YES storageOptionChangeHandler:^{ - [AAPLListUtilities migrateLocalListsToCloud]; - }]; - }]; - [storageController addAction:cloudOption]; - - [self.listDocumentsViewController presentViewController:storageController animated:YES completion:nil]; -} - -#pragma mark - Convenience - -- (void)configureListsController:(BOOL)accountChanged storageOptionChangeHandler:(void (^)(void))storageOptionChangeHandler { - if (self.listsController != nil && !accountChanged) { - // The current controller is correct. There is no need to reconfigure it. - return; - } - - if (!self.listsController) { - // There is currently no lists controller. Configure an appropriate one for the current configuration. - self.listsController = [[AAPLAppConfiguration sharedAppConfiguration] listsControllerForCurrentConfigurationWithPathExtension:AAPLAppConfigurationListerFileExtension firstQueryHandler:storageOptionChangeHandler]; - - // Ensure that this controller is passed along to the `AAPLListDocumentsViewController`. - self.listDocumentsViewController.listsController = self.listsController; - - [self.listsController startSearching]; - } - else if (accountChanged) { - // A lists controller is configured; however, it needs to have its coordinator updated based on the account change. - self.listsController.listCoordinator = [[AAPLAppConfiguration sharedAppConfiguration] listsCoordinatorForCurrentConfigurationWithPathExtension:AAPLAppConfigurationListerFileExtension firstQueryHandler:storageOptionChangeHandler]; - } -} - -@end diff --git a/Lister/Objective-C/Lister/AAPLAppLaunchContext.h b/Lister/Objective-C/Lister/AAPLAppLaunchContext.h deleted file mode 100644 index 6b65a3c9..00000000 --- a/Lister/Objective-C/Lister/AAPLAppLaunchContext.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A data object for storing context information relevant to how the app was launched. -*/ - -@import ListerKit; - -@interface AAPLAppLaunchContext : NSObject - -@property (nonatomic, strong, readonly) NSURL *listURL; -@property (nonatomic, readonly) AAPLListColor listColor; - -/*! - Initializes an \c AAPLAppLaunchContext instance with the color and URL designated by the user activity. - - \param userActivity - The userActivity providing the file URL and list color to launch to. -*/ -- (instancetype)initWithUserActivity:(NSUserActivity *)userActivity; - -/*! - Initializes an \c AAPLAppLaunchContext instance with the color and URL designated by the lister:// URL. - - \param listerURL - The URL adhering to the lister:// scheme providing the file URL and list color to launch to. -*/ -- (instancetype)initWithListerURL:(NSURL *)listerURL; - -@end diff --git a/Lister/Objective-C/Lister/AAPLAppLaunchContext.m b/Lister/Objective-C/Lister/AAPLAppLaunchContext.m deleted file mode 100644 index 29730a12..00000000 --- a/Lister/Objective-C/Lister/AAPLAppLaunchContext.m +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A data object for storing context information relevant to how the app was launched. -*/ - -#import "AAPLAppLaunchContext.h" - -@implementation AAPLAppLaunchContext - -- (instancetype)initWithUserActivity:(NSUserActivity *)userActivity { - self = [super init]; - - if (self) { - NSParameterAssert(userActivity.userInfo != nil); - /* - The URL may be provided as either a URL or a URL path via separate keys. Check first for - `NSUserActivityDocumentURLKey`, if not provided, obtain the path and create a file URL from it. - */ - _listURL = userActivity.userInfo[NSUserActivityDocumentURLKey]; - - if (!_listURL) { - NSString *listInfoFilePath = userActivity.userInfo[AAPLAppConfigurationUserActivityListURLPathUserInfoKey]; - - NSAssert(listInfoFilePath != nil, @"The `userInfo` dictionary provided did not contain a URL or a URL path."); - - _listURL = [NSURL fileURLWithPath:listInfoFilePath isDirectory:NO]; - } - - NSAssert(_listURL != nil, @"`listURL must not be `nil`."); - - NSNumber *listInfoColorNumber = userActivity.userInfo[AAPLAppConfigurationUserActivityListColorUserInfoKey]; - - NSAssert(listInfoColorNumber != nil && listInfoColorNumber.integerValue >= 0 && listInfoColorNumber.integerValue < 6, @"The `userInfo` dictionary provided contains an invalid entry for the list color."); - // Set the `listColor` by converting the `NSNumber` to an NSInteger and casting to `AAPLListColor`. - _listColor = (AAPLListColor)listInfoColorNumber.integerValue; - } - - return self; -} - -- (instancetype)initWithListerURL:(NSURL *)listerURL { - self = [super init]; - - if (self) { - NSParameterAssert(listerURL.scheme != nil && [listerURL.scheme isEqualToString:@"lister"]); - - NSParameterAssert(listerURL.path != nil); - // Construct a file URL from the path of the lister:// URL. - _listURL = [NSURL fileURLWithPath:listerURL.path isDirectory:NO]; - - NSAssert(_listURL != nil, @"`listURL must not be `nil`."); - - // Extract the query items to initialize the `listColor` property from the `color` query item. - NSURLComponents *urlComponents = [NSURLComponents componentsWithURL:listerURL resolvingAgainstBaseURL:NO]; - NSArray *queryItems = urlComponents.queryItems; - - // Construct a predicate to extract the `color` query item. - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name = %@", AAPLAppConfigurationListerColorQueryKey]; - NSArray *colorQueryItems = [queryItems filteredArrayUsingPredicate:predicate]; - - NSAssert(colorQueryItems.count == 1, @"URL provided should contain only one `color` query item."); - - NSURLQueryItem *colorQueryItem = colorQueryItems.firstObject; - - NSAssert(colorQueryItem.value != nil, @"URL provided contains an invalid value for `color`."); - // Set the `listColor` by converting the `NSString` value to an NSInteger and casting to `AAPLListColor`. - _listColor = colorQueryItem.value.integerValue; - } - - return self; -} - -@end diff --git a/Lister/Objective-C/Lister/AAPLListCell.h b/Lister/Objective-C/Lister/AAPLListCell.h deleted file mode 100644 index b08e724c..00000000 --- a/Lister/Objective-C/Lister/AAPLListCell.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A custom cell used to display a list in the \c AAPLListDocumentsViewController. -*/ - -@import UIKit; - -@interface AAPLListCell : UITableViewCell - -@property (weak, nonatomic) IBOutlet UILabel *label; -@property (weak, nonatomic) IBOutlet UIView *listColorView; - -@end diff --git a/Lister/Objective-C/Lister/AAPLListCell.m b/Lister/Objective-C/Lister/AAPLListCell.m deleted file mode 100644 index 796a9750..00000000 --- a/Lister/Objective-C/Lister/AAPLListCell.m +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A custom cell used to display a list in the \c AAPLListDocumentsViewController. -*/ - -#import "AAPLListCell.h" - -@implementation AAPLListCell - -- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated { - UIColor *color = self.listColorView.backgroundColor; - - [super setHighlighted:highlighted animated:animated]; - - // Reset the background color for the list color; the default implementation makes it clear. - self.listColorView.backgroundColor = color; -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - UIColor *color = self.listColorView.backgroundColor; - - [super setSelected:selected animated:animated]; - - // Reset the background color for the list color; the default implementation makes it clear. - self.listColorView.backgroundColor = color; - - // Ensure that tapping on a selected cell doesn't re-trigger the display of the document. - self.userInteractionEnabled = !selected; -} - -@end diff --git a/Lister/Objective-C/Lister/AAPLListColorCell.h b/Lister/Objective-C/Lister/AAPLListColorCell.h deleted file mode 100644 index de9006d4..00000000 --- a/Lister/Objective-C/Lister/AAPLListColorCell.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A custom cell that allows the user to select a color. -*/ - -@import UIKit; -@import ListerKit; - -@class AAPLListColorCell; - -// Delegate protocol to let other objects know that the cell's color has changed. -@protocol AAPLListColorCellDelegate -- (void)listColorCellDidChangeSelectedColor:(AAPLListColorCell *)listColorCell; -@end - -@interface AAPLListColorCell : UITableViewCell - -@property (weak) id delegate; - -@property AAPLListColor selectedColor; - -- (void)configure; - -@end diff --git a/Lister/Objective-C/Lister/AAPLListColorCell.m b/Lister/Objective-C/Lister/AAPLListColorCell.m deleted file mode 100644 index 189e5d7c..00000000 --- a/Lister/Objective-C/Lister/AAPLListColorCell.m +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A custom cell that allows the user to select a color. -*/ - -#import "AAPLListColorCell.h" - -/*! - A \c UIView subclass that's used to test whether or not a \c colorTap(_:) action occurs from a view that we - designate as color tappable (e.g. the "Color" label should not be tappable). - */ -@interface AAPLColorTappableView: UIView -@end - -@implementation AAPLColorTappableView -@end - -@interface AAPLListColorCell () - -@property (nonatomic, weak) IBOutlet UIView *gray; -@property (nonatomic, weak) IBOutlet UIView *blue; -@property (nonatomic, weak) IBOutlet UIView *green; -@property (nonatomic, weak) IBOutlet UIView *yellow; -@property (nonatomic, weak) IBOutlet UIView *orange; -@property (nonatomic, weak) IBOutlet UIView *red; - -@end - -@implementation AAPLListColorCell - -#pragma mark - Configuration - -- (void)configure { - UITapGestureRecognizer *colorTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(colorTap:)]; - - colorTapGestureRecognizer.numberOfTapsRequired = 1; - - colorTapGestureRecognizer.numberOfTouchesRequired = 1; - - [self addGestureRecognizer:colorTapGestureRecognizer]; -} - -#pragma mark - UITapGestureRecognizer Handling - -- (void)colorTap:(UITapGestureRecognizer *)tapGestureRecognizer { - if (tapGestureRecognizer.state != UIGestureRecognizerStateEnded) { - return; - } - - CGPoint tapLocation = [tapGestureRecognizer locationInView:self.contentView]; - UIView *view = [self.contentView hitTest:tapLocation withEvent:nil]; - - // If the user tapped on a color (identified by its tag), notify the delegate. - if ([view isKindOfClass:[AAPLColorTappableView class]]) { - AAPLListColor color = (AAPLListColor)view.tag; - - switch (color) { - case AAPLListColorGray: - case AAPLListColorBlue: - case AAPLListColorGreen: - case AAPLListColorYellow: - case AAPLListColorOrange: - case AAPLListColorRed: { - self.selectedColor = color; - - [self.delegate listColorCellDidChangeSelectedColor:self]; - - break; - } - } - } -} - -@end diff --git a/Lister/Objective-C/Lister/AAPLListDocumentsViewController.h b/Lister/Objective-C/Lister/AAPLListDocumentsViewController.h deleted file mode 100644 index 3184c3d4..00000000 --- a/Lister/Objective-C/Lister/AAPLListDocumentsViewController.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListDocumentsViewController displays a list of available documents for users to open. -*/ - -@import UIKit; -@import ListerKit; - -@class AAPLAppLaunchContext; - -@interface AAPLListDocumentsViewController : UITableViewController - -@property (nonatomic, strong) AAPLListsController *listsController; - -- (void)configureViewControllerWithLaunchContext:(AAPLAppLaunchContext *)launchContext; - -@end diff --git a/Lister/Objective-C/Lister/AAPLListDocumentsViewController.m b/Lister/Objective-C/Lister/AAPLListDocumentsViewController.m deleted file mode 100644 index 485fb256..00000000 --- a/Lister/Objective-C/Lister/AAPLListDocumentsViewController.m +++ /dev/null @@ -1,398 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListDocumentsViewController displays a list of available documents for users to open. -*/ - -@import ListerKit; -@import WatchConnectivity; - -#import "AAPLListDocumentsViewController.h" -#import "AAPLAppDelegate.h" -#import "AAPLAppLaunchContext.h" -#import "AAPLNewListDocumentController.h" -#import "AAPLListViewController.h" -#import "AAPLListCell.h" -#import "AAPLListInfo.h" - -// Table view cell identifiers. -NSString *const AAPLListDocumentsViewControllerListDocumentCellIdentifier = @"listDocumentCell"; - -@interface AAPLListDocumentsViewController () - -@property (nonatomic, strong) AAPLAppLaunchContext *pendingLaunchContext; - -@property (nonatomic) BOOL watchAppInstalledAtLastStateChange; - -@end - - -@implementation AAPLListDocumentsViewController - -#pragma mark - View Life Cycle - -- (void)viewDidLoad { - [super viewDidLoad]; - - if ([WCSession isSupported]) { - [WCSession defaultSession].delegate = self; - [[WCSession defaultSession] activateSession]; - } - - self.tableView.rowHeight = 44.0; - - self.navigationController.navigationBar.titleTextAttributes = @{ - NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline], - NSForegroundColorAttributeName: AAPLColorFromListColor(AAPLListColorGray) - }; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleContentSizeCategoryDidChangeNotification:) name:UIContentSizeCategoryDidChangeNotification object:nil]; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - self.navigationController.navigationBar.titleTextAttributes = @{ - NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline], - NSForegroundColorAttributeName: AAPLColorFromListColor(AAPLListColorGray) - }; - - UIColor *grayListColor = AAPLColorFromListColor(AAPLListColorGray); - self.navigationController.navigationBar.tintColor = grayListColor; - self.navigationController.toolbar.tintColor = grayListColor; - self.tableView.tintColor = grayListColor; -} - -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - - if (self.pendingLaunchContext) { - [self configureViewControllerWithLaunchContext:self.pendingLaunchContext]; - } - - self.pendingLaunchContext = nil; -} - -#pragma mark - Property Overrides - -- (void)setListsController:(AAPLListsController *)listsController { - if (listsController != _listsController) { - _listsController = listsController; - _listsController.delegate = self; - } -} - -#pragma mark - Lifetime - -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self name:UIContentSizeCategoryDidChangeNotification object:nil]; -} - -#pragma mark - UIResponder - -- (void)restoreUserActivityState:(NSUserActivity *)activity { - // Obtain an app launch context from the provided activity and configure the view controller with it. - AAPLAppLaunchContext *launchContext = [[AAPLAppLaunchContext alloc] initWithUserActivity:activity]; - - // Configure the view controller with the launch context. - [self configureViewControllerWithLaunchContext:launchContext]; -} - -#pragma mark - IBActions - -/*! - Note that the document picker requires that code signing, entitlements, and provisioning for - the project have been configured before you run Lister. If you run the app without configuring - entitlements correctly, an exception when this method is invoked (i.e. when the "+" button is - clicked). - */ -- (IBAction)pickDocument:(UIBarButtonItem *)barButtonItem { - UIDocumentMenuViewController *documentMenu = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[AAPLAppConfigurationListerFileUTI] inMode:UIDocumentPickerModeImport]; - documentMenu.delegate = self; - - NSString *newDocumentTitle = NSLocalizedString(@"New List", nil); - [documentMenu addOptionWithTitle:newDocumentTitle image:nil order:UIDocumentMenuOrderFirst handler:^{ - // Show the AAPLNewListDocumentController. - [self performSegueWithIdentifier:AAPLAppDelegateMainStoryboardListDocumentsViewControllerToNewListDocumentControllerSegueIdentifier sender:self]; - }]; - - documentMenu.modalInPopover = UIModalPresentationPopover; - documentMenu.popoverPresentationController.barButtonItem = barButtonItem; - - [self presentViewController:documentMenu animated:YES completion:nil]; -} - -#pragma mark - UIDocumentMenuDelegate - -- (void)documentMenu:(UIDocumentMenuViewController *)documentMenu didPickDocumentPicker:(UIDocumentPickerViewController *)documentPicker { - documentPicker.delegate = self; - - [self presentViewController:documentPicker animated:YES completion:nil]; -} - -- (void)documentMenuWasCancelled:(UIDocumentMenuViewController *)documentMenu { - // The user cancelled interacting with the document menu. In your own app, you may want to - // handle this with other logic. -} - -#pragma mark - UIPickerViewDelegate - -- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url { - // The user selected the document and it should be picked up by the \c AAPLListsController. -} - -- (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller { - // The user cancelled interacting with the document picker. In your own app, you may want to - // handle this with other logic. -} - -#pragma mark - AAPLListsControllerDelegate - -- (void)listsControllerWillChangeContent:(AAPLListsController *)listsController { - [self.tableView beginUpdates]; -} - -- (void)listsController:(AAPLListsController *)listsController didInsertListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:0]; - - [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; -} - -- (void)listsController:(AAPLListsController *)listsController didRemoveListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:0]; - - [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; -} - -- (void)listsController:(AAPLListsController *)listsController didUpdateListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:0]; - - [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; -} - -- (void)listsControllerDidChangeContent:(AAPLListsController *)listsController { - [self.tableView endUpdates]; - - // This method will handle interactions with the watch connectivity session on behalf of the app. - [self updateWatchConnectivitySessionApplicationContext]; -} - -- (void)listsController:(AAPLListsController *)listsController didFailCreatingListInfo:(AAPLListInfo *)listInfo withError:(NSError *)error { - NSString *title = NSLocalizedString(@"Failed to Create List", nil); - NSString *message = error.localizedDescription; - NSString *okActionTitle = NSLocalizedString(@"OK", nil); - - UIAlertController *errorOutController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - - [errorOutController addAction:[UIAlertAction actionWithTitle:okActionTitle style:UIAlertActionStyleCancel handler:nil]]; - - [self presentViewController:errorOutController animated:YES completion:nil]; -} - -- (void)listsController:(AAPLListsController *)listsController didFailRemovingListInfo:(AAPLListInfo *)listInfo withError:(NSError *)error { - NSString *title = NSLocalizedString(@"Failed to Delete List", nil); - NSString *message = error.localizedDescription; - NSString *okActionTitle = NSLocalizedString(@"OK", nil); - - UIAlertController *errorOutController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - - [errorOutController addAction:[UIAlertAction actionWithTitle:okActionTitle style:UIAlertActionStyleCancel handler:nil]]; - - [self presentViewController:errorOutController animated:YES completion:nil]; -} - -#pragma mark - UITableViewDataSource - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return self.listsController ? self.listsController.count : 0; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - return [tableView dequeueReusableCellWithIdentifier:AAPLListDocumentsViewControllerListDocumentCellIdentifier forIndexPath:indexPath]; -} - -#pragma mark - UITableViewDelegate - -- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - // Assert if attempting to configure an unknown or unsupported cell type. - NSParameterAssert([cell isKindOfClass:[AAPLListCell class]]); - - AAPLListCell *listCell = (AAPLListCell *)cell; - AAPLListInfo *listInfo = self.listsController[indexPath.row]; - - listCell.label.text = listInfo.name; - listCell.label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; - listCell.listColorView.backgroundColor = [UIColor clearColor]; - - // Once the list info has been loaded, update the associated cell's properties. - [listInfo fetchInfoWithCompletionHandler:^{ - /* - The fetchInfoWithCompletionHandler: method calls its completion handler on a background - queue, dispatch back to the main queue to make UI updates. - */ - dispatch_async(dispatch_get_main_queue(), ^{ - // Make sure that the list info is still visible once the color has been fetched. - if ([self.tableView.indexPathsForVisibleRows containsObject:indexPath]) { - listCell.listColorView.backgroundColor = AAPLColorFromListColor(listInfo.color); - } - }); - }]; -} - -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - return NO; -} - -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { - return NO; -} - -#pragma mark - WCSessionDelegate - -- (void)sessionWatchStateDidChange:(nonnull WCSession *)session { - if (!self.watchAppInstalledAtLastStateChange && session.watchAppInstalled) { - self.watchAppInstalledAtLastStateChange = session.watchAppInstalled; - [self updateWatchConnectivitySessionApplicationContext]; - } -} - -- (void)session:(nonnull WCSession *)session didFinishFileTransfer:(nonnull WCSessionFileTransfer *)fileTransfer error:(nullable NSError *)error { - if (error) { - NSLog(@"%s, file: %@, error: %@", __FUNCTION__, fileTransfer.file.fileURL.lastPathComponent, error.localizedDescription); - } -} - -- (void)session:(nonnull WCSession *)session didReceiveFile:(nonnull WCSessionFile *)file { - [self.listsController copyListFromURL:file.fileURL toListWithName:[file.fileURL.lastPathComponent stringByDeletingPathExtension]]; -} - -#pragma mark - UIStoryboardSegue Handling - -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - if ([segue.identifier isEqualToString:AAPLAppDelegateMainStoryboardListDocumentsViewControllerToNewListDocumentControllerSegueIdentifier]) { - AAPLNewListDocumentController *newListController = segue.destinationViewController; - - newListController.listsController = self.listsController; - } - else if ([segue.identifier isEqualToString:AAPLAppDelegateMainStoryboardListDocumentsViewControllerToListViewControllerSegueIdentifier] || - [segue.identifier isEqualToString:AAPLAppDelegateMainStoryboardListDocumentsViewControllerContinueUserActivity]) { - UINavigationController *listNavigationController = (UINavigationController *)segue.destinationViewController; - AAPLListViewController *listViewController = (AAPLListViewController *)listNavigationController.topViewController; - listViewController.listsController = self.listsController; - - listViewController.navigationItem.leftBarButtonItem = [self.splitViewController displayModeButtonItem]; - listViewController.navigationItem.leftItemsSupplementBackButton = YES; - - if ([segue.identifier isEqualToString:AAPLAppDelegateMainStoryboardListDocumentsViewControllerToListViewControllerSegueIdentifier]) { - NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; - [listViewController configureWithListInfo:self.listsController[indexPath.row]]; - } - else if ([segue.identifier isEqualToString:AAPLAppDelegateMainStoryboardListDocumentsViewControllerContinueUserActivity]) { - AAPLListInfo *userActivityListInfo = sender; - [listViewController configureWithListInfo:userActivityListInfo]; - } - } -} - -#pragma mark - Notifications - -- (void)handleContentSizeCategoryDidChangeNotification:(NSNotification *)notification { - [self.view setNeedsLayout]; -} - - -#pragma mark - Convenience - -- (void)configureViewControllerWithLaunchContext:(AAPLAppLaunchContext *)launchContext { - /** - If there is a list currently displayed; pop to the root view controller (this controller) and - continue configuration from there. Otherwise, configure the view controller directly. - */ - if ([self.navigationController.topViewController isKindOfClass:[UINavigationController class]]) { - [self.navigationController popToRootViewControllerAnimated:NO]; - self.pendingLaunchContext = launchContext; - - return; - } - - AAPLListInfo *activityListInfo = [[AAPLListInfo alloc] initWithURL:launchContext.listURL]; - activityListInfo.color = launchContext.listColor; - - [self performSegueWithIdentifier:AAPLAppDelegateMainStoryboardListDocumentsViewControllerContinueUserActivity sender:activityListInfo]; -} - -- (void)updateWatchConnectivitySessionApplicationContext { - // Do not proceed if `WCSession` is not supported on this iOS device. - if (![WCSession isSupported]) { return; } - - WCSession *session = [WCSession defaultSession]; - - // Do not proceed if the watch app is not installed on the paired watch. - if (!session.watchAppInstalled) { return; } - - // This array will be used to collect the data about the lists for the application context. - __block NSMutableArray *lists = [NSMutableArray array]; - // A background queue to execute operations on to fetch the information about the lists. - NSOperationQueue *queue = [[NSOperationQueue alloc] init]; - - // This operation will execute last and will actually update the application context. - NSBlockOperation *updateApplicationContextOperation = [NSBlockOperation blockOperationWithBlock:^{ - NSError *error; - if (![session updateApplicationContext:@{ AAPLApplicationActivityContextCurrentListsKey: [lists copy] } error:&error]) { - NSLog(@"Error updating context: %@", error.localizedDescription); - } - }]; - - // Loop through the available lists in order to accumulate contextual information about them. - for (int idx = 0; idx < self.listsController.count; idx++) { - // Obtain the list info object from the controller. - AAPLListInfo *info = self.listsController[idx]; - - // This operation will fetch the information for an individual list. - NSBlockOperation *listInfoOperation = [NSBlockOperation blockOperationWithBlock:^{ - // The `-fetchInfoWithCompletionHandler:` method executes asynchronously. Use a semaphore to wait. - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - [info fetchInfoWithCompletionHandler:^{ - // Now that the `info` object is fully populated. Add an entry to the `lists` dictionary. - [lists addObject:@{ - AAPLApplicationActivityContextListNameKey: info.name, - AAPLApplicationActivityContextListColorKey: @(info.color) - }]; - // Signal the semaphore indicating that it can stop waiting. - dispatch_semaphore_signal(semaphore); - }]; - // Wait on the semaphore to ensure the operation doesn't return until the fetch is complete. - dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); - }]; - - // Depending on `listInfoOperation` ensures it completes before `updateApplicationContextOperation` executes. - [updateApplicationContextOperation addDependency:listInfoOperation]; - [queue addOperation:listInfoOperation]; - - // Use file coordination to obtain exclusive access to read the file in order to initiate a transfer. - NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] init]; - NSFileAccessIntent *readingIntent = [NSFileAccessIntent readingIntentWithURL:info.URL options:0]; - [fileCoordinator coordinateAccessWithIntents:@[readingIntent] queue:[[NSOperationQueue alloc] init] byAccessor:^(NSError *accessError) { - if (accessError) { - return; - } - - // Iterate through outstanding transfers; and cancel any for the same URL as they are obsolete. - for (WCSessionFileTransfer *transfer in session.outstandingFileTransfers) { - if ([transfer.file.fileURL isEqual:readingIntent.URL]) { - [transfer cancel]; - break; - } - } - - // Initiate the new transfer. - [session transferFile:readingIntent.URL metadata:nil]; - }]; - } - - [queue addOperation:updateApplicationContextOperation]; -} - -@end diff --git a/Lister/Objective-C/Lister/AAPLListItemCell.h b/Lister/Objective-C/Lister/AAPLListItemCell.h deleted file mode 100644 index 49d7a854..00000000 --- a/Lister/Objective-C/Lister/AAPLListItemCell.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A custom cell used to display a list item or the row used to create a new item. -*/ - -@import UIKit; -@import ListerKit; - -@interface AAPLListItemCell : UITableViewCell - -@property (nonatomic, weak) IBOutlet AAPLCheckBox *checkBox; -@property (nonatomic, weak) IBOutlet UITextField *textField; - -@property (nonatomic, getter=isComplete) BOOL complete; - -@end diff --git a/Lister/Objective-C/Lister/AAPLListItemCell.m b/Lister/Objective-C/Lister/AAPLListItemCell.m deleted file mode 100644 index 09da35b8..00000000 --- a/Lister/Objective-C/Lister/AAPLListItemCell.m +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A custom cell used to display a list item or the row used to create a new item. -*/ - -#import "AAPLListItemCell.h" - -@implementation AAPLListItemCell - -#pragma mark - Setter Overrides - -- (void)setComplete:(BOOL)complete { - _complete = complete; - - self.textField.enabled = !complete; - self.checkBox.checked = complete; - - self.textField.textColor = complete ? [UIColor lightGrayColor] : [UIColor darkTextColor]; -} - -@end diff --git a/Lister/Objective-C/Lister/AAPLListViewController.h b/Lister/Objective-C/Lister/AAPLListViewController.h deleted file mode 100644 index c025327c..00000000 --- a/Lister/Objective-C/Lister/AAPLListViewController.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListViewController class displays the contents of a list document. It also allows the user to create, update, and delete items, change the color of the list, or delete the list. -*/ - -@import UIKit; -@import ListerKit; - -@interface AAPLListViewController : UITableViewController - -@property (nonatomic, strong) AAPLListsController *listsController; -@property (nonatomic, strong) AAPLListDocument *document; -@property (nonatomic, copy) NSDictionary *textAttributes; - -- (void)configureWithListInfo:(AAPLListInfo *)listInfo; - -@end diff --git a/Lister/Objective-C/Lister/AAPLListViewController.m b/Lister/Objective-C/Lister/AAPLListViewController.m deleted file mode 100644 index 6d284dc4..00000000 --- a/Lister/Objective-C/Lister/AAPLListViewController.m +++ /dev/null @@ -1,525 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListViewController class displays the contents of a list document. It also allows the user to create, update, and delete items, change the color of the list, or delete the list. -*/ - -@import NotificationCenter; -@import ListerKit; - -#import "AAPLAppDelegate.h" -#import "AAPLListViewController.h" -#import "AAPLListItemCell.h" -#import "AAPLListColorCell.h" -#import "AAPLList.h" - -// Table view cell identifiers. -NSString *const AAPLListViewControllerListItemCellIdentifier = @"listItemCell"; -NSString *const AAPLListViewControllerListColorCellIdentifier = @"listColorCell"; - - -@interface AAPLListViewController () - -// Set in \c textFieldDidBeginEditing:. \c nil otherwise. -@property (nonatomic, weak) UITextField *activeTextField; - -@property (nonatomic, strong) AAPLListInfo *listInfo; - -@property (nonatomic, readonly) NSURL *documentURL; - -@property (nonatomic, readonly) NSArray *listToolbarItems; - -@property (nonatomic, readonly) AAPLAllListItemsPresenter *listPresenter; - -@end - - -@implementation AAPLListViewController - -#pragma mark - View Life Cycle - -- (BOOL)canBecomeFirstResponder { - return true; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.tableView.rowHeight = 44.0; - - [self updateInterfaceWithTextAttributes]; - - // Use the edit button item provided by the table view controller. - self.navigationItem.rightBarButtonItem = [self editButtonItem]; -} - -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; - [self.document openWithCompletionHandler:^(BOOL success) { - if (!success) { - // In your app you should handle this gracefully. - NSLog(@"Couldn't open document: %@.", self.documentURL.absoluteString); - abort(); - } - - self.textAttributes = @{ - NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline], - NSForegroundColorAttributeName: AAPLColorFromListColor(self.listPresenter.color) - }; - - /* - When the document is opened, make sure that the document stores its extra metadata in the `userInfo` - dictionary. See `AAPLListDocument`'s -updateUserActivityState: method for more information. - */ - if (self.document.userActivity) { - [self.document updateUserActivityState:self.document.userActivity]; - } - - [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; - }]; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleDocumentStateChangedNotification:) name:UIDocumentStateChangedNotification object:self.document]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - [self resignFirstResponder]; - - self.document.delegate = nil; - [self.document closeWithCompletionHandler:nil]; - - [[NSNotificationCenter defaultCenter] removeObserver:self name:UIDocumentStateChangedNotification object:self.document]; - - // Hide the toolbar so the list can't be edited. - [self.navigationController setToolbarHidden:YES animated:animated]; -} - -#pragma mark - Property Overrides - -- (NSURL *)documentURL { - return self.document.fileURL; -} - -- (void)setDocument:(AAPLListDocument *)document { - _document = document; - - document.delegate = self; - - self.listPresenter.undoManager = document.undoManager; - self.listPresenter.delegate = self; -} - -- (NSUndoManager *)undoManager { - return self.document.undoManager; -} - -- (AAPLAllListItemsPresenter *)listPresenter { - return self.document.listPresenter; -} - -- (void)setTextAttributes:(NSDictionary *)textAttributes { - _textAttributes = [textAttributes copy]; - - if (self.isViewLoaded) { - [self updateInterfaceWithTextAttributes]; - } -} - -// Return the toolbar items since they are used in edit mode. -- (NSArray *)listToolbarItems { - UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; - - NSString *title = NSLocalizedString(@"Delete List", nil); - UIBarButtonItem *deleteList = [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStylePlain target:self action:@selector(deleteList:)]; - deleteList.tintColor = [UIColor redColor]; - - if ([self.documentURL.lastPathComponent isEqualToString:[AAPLAppConfiguration sharedAppConfiguration].localizedTodayDocumentNameAndExtension]) { - deleteList.enabled = false; - } - - return @[flexibleSpace, deleteList, flexibleSpace]; -} - -#pragma mark - Setup - -- (void)configureWithListInfo:(AAPLListInfo *)listInfo { - self.listInfo = listInfo; - - AAPLAllListItemsPresenter *listPresenter = [[AAPLAllListItemsPresenter alloc] init]; - self.document = [[AAPLListDocument alloc] initWithFileURL:listInfo.URL listPresenter:listPresenter]; - - self.navigationItem.title = listInfo.name; - - self.textAttributes = @{ - NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline], - NSForegroundColorAttributeName: AAPLColorFromListColor(listInfo.color) ?: AAPLColorFromListColor(AAPLListColorGray) - }; -} - -#pragma mark - Notifications - -- (void)handleDocumentStateChangedNotification:(NSNotification *)notification { - UIDocumentState state = self.document.documentState; - - if (state & UIDocumentStateInConflict) { - [self resolveConflicts]; - } - - // In order to update the UI, dispatch back to the main queue as there are no promises about the queue this will be called on. - dispatch_async(dispatch_get_main_queue(), ^{ - [self.tableView reloadData]; - }); -} - -#pragma mark - UIViewController Overrides - -- (void)setEditing:(BOOL)editing animated:(BOOL)animated { - [super setEditing:editing animated:animated]; - - // Prevent navigating back in edit mode. - [self.navigationItem setHidesBackButton:editing animated:animated]; - - // Make sure to resign first responder on the active text field if needed. - [self.activeTextField endEditing:NO]; - - // Reload the first row to switch from "Add Item" to "Change Color". - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; - [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; - - // If moving out of edit mode, notify observers about the list color and trigger a save. - if (!editing) { - // If the list info doesn't already exist (but it should), then create a new one. - self.listInfo = self.listInfo ?: [[AAPLListInfo alloc] initWithURL:self.documentURL]; - self.listInfo.color = self.listPresenter.color; - [self.listsController setListInfoHasNewContents:self.listInfo]; - - [self triggerNewDataForWidget]; - } - - [self.navigationController setToolbarHidden:!editing animated:animated]; - [self.navigationController.toolbar setItems:self.listToolbarItems animated:animated]; -} - -#pragma mark - UITableViewDataSource - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - if (!self.document) { - // Don't show anything if the document hasn't been loaded. - return 0; - } - - // Show the items in a list, plus a separate row that lets users enter a new item. - return self.listPresenter.count + 1; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - NSString *identifier; - - if (self.editing && indexPath.row == 0) { - identifier = AAPLListViewControllerListColorCellIdentifier; - } - else { - identifier = AAPLListViewControllerListItemCellIdentifier; - } - - return [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath]; -} - -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - // The initial row is reserved for adding new items so it can't be deleted or edited. - if (indexPath.row == 0) { - return NO; - } - - return YES; -} - -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { - // The initial row is reserved for adding new items so it can't be moved. - if (indexPath.row == 0) { - return NO; - } - - return YES; -} - -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { - if (editingStyle != UITableViewCellEditingStyleDelete) { - return; - } - - AAPLListItem *listItem = self.listPresenter.presentedListItems[indexPath.row - 1]; - [self.listPresenter removeListItem:listItem]; -} - -- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { - AAPLListItem *item = self.listPresenter.presentedListItems[fromIndexPath.row - 1]; - - // `toIndexPath.row` will never be `0` since we don't allow moving to the zeroth row (it's the color selection row). - [self.listPresenter moveListItem:item toIndex:toIndexPath.row - 1]; -} - -#pragma mark - UITableViewDelegate - -- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - // Make sure the cell is one of the classes we've specified. - NSParameterAssert([cell isKindOfClass:[AAPLListColorCell class]] || [cell isKindOfClass:[AAPLListItemCell class]]); - - if ([cell isKindOfClass:[AAPLListColorCell class]]) { - AAPLListColorCell *colorCell = (AAPLListColorCell *)cell; - [colorCell configure]; - colorCell.selectedColor = self.listPresenter.color; - colorCell.delegate = self; - } - else if ([cell isKindOfClass:[AAPLListItemCell class]]) { - [self configureListItemCell:(AAPLListItemCell *)cell forRow:indexPath.row]; - } -} - -- (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath { - /* - When the user swipes to show the delete confirmation, don't enter editing mode. - `UITableViewController` enters editing mode by default so we override without calling super. - */ -} - -- (void)tableView:(UITableView *)tableView didEndEditingRowAtIndexPath:(NSIndexPath *)indexPath { - /* - When the user swipes to hide the delete confirmation, no need to exit edit mode because we didn't enter it. - `UITableViewController` enters editing mode by default so we override without calling super. - */ -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - [tableView deselectRowAtIndexPath:indexPath animated:YES]; -} - -- (NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)fromIndexPath toProposedIndexPath:(NSIndexPath *)proposedIndexPath { - AAPLListItem *listItem = self.listPresenter.presentedListItems[fromIndexPath.row - 1]; - - if (proposedIndexPath.row == 0) { - return fromIndexPath; - } - else if ([self.listPresenter canMoveListItem:listItem toIndex:proposedIndexPath.row - 1]) { - return proposedIndexPath; - } - - return fromIndexPath; -} - -#pragma mark - UITextFieldDelegate - -- (void)textFieldDidBeginEditing:(UITextField *)textField { - self.activeTextField = textField; -} - -- (void)textFieldDidEndEditing:(UITextField *)textField { - NSIndexPath *indexPath = [self indexPathForView:textField]; - - if (indexPath != nil && indexPath.row > 0) { - AAPLListItem *listItem = self.listPresenter.presentedListItems[indexPath.row - 1]; - - [self.listPresenter updateListItem:listItem withText:textField.text]; - } - else if (textField.text.length > 0) { - AAPLListItem *listItem = [[AAPLListItem alloc] initWithText:textField.text]; - - [self.listPresenter insertListItem:listItem]; - } - - self.activeTextField = nil; -} - -- (BOOL)textFieldShouldReturn:(UITextField *)textField { - NSIndexPath *indexPath = [self indexPathForView:textField]; - - if (textField.text.length == 0 || indexPath.row == 0) { - [textField resignFirstResponder]; - - return YES; - } - - return NO; -} - -#pragma mark - AAPLListColorCellDelegate - -- (void)listColorCellDidChangeSelectedColor:(AAPLListColorCell *)listColorCell { - self.listPresenter.color = listColorCell.selectedColor; -} - -# pragma mark - IBActions - -- (IBAction)deleteList:(id)sender { - [self.listsController removeListInfo:self.listInfo]; - - [self hideViewControllerAfterListWasDeleted]; -} - -- (IBAction)checkBoxTapped:(AAPLCheckBox *)sender { - NSIndexPath *indexPath = [self indexPathForView:sender]; - - // Check to see if the tapped row is within the list item rows. - if (indexPath.row >= 1 && indexPath.row <= self.listPresenter.count) { - AAPLListItem *listItem = self.listPresenter.presentedListItems[indexPath.row - 1]; - - [self.listPresenter toggleListItem:listItem]; - } -} - -#pragma mark - AAPLListDocumentDelegate - -- (void)listDocumentWasDeleted:(AAPLListDocument *)document { - [self hideViewControllerAfterListWasDeleted]; -} - -#pragma mark - AAPLListPresenterDelegate - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - self.textAttributes = @{ - NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline], - NSForegroundColorAttributeName: AAPLColorFromListColor(self.listPresenter.color) - }; - - [self.tableView reloadData]; -} - -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - [self.tableView beginUpdates]; -} - -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSArray *indexPathsForInsertion = @[[NSIndexPath indexPathForRow:index + 1 inSection:0]]; - - [self.tableView insertRowsAtIndexPaths:indexPathsForInsertion withRowAnimation:UITableViewRowAnimationFade]; - - // Reload the ListItemCell to be configured for the row to create a new list item. - if (index == 0) { - NSArray *indexPathsForReloading = @[[NSIndexPath indexPathForRow:0 inSection:0]]; - - [self.tableView reloadRowsAtIndexPaths:indexPathsForReloading withRowAnimation:UITableViewRowAnimationAutomatic]; - } -} - -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSArray *indexPathsForRemoval = @[[NSIndexPath indexPathForRow:index + 1 inSection:0]]; - - [self.tableView deleteRowsAtIndexPaths:indexPathsForRemoval withRowAnimation:UITableViewRowAnimationAutomatic]; -} - -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - [self.tableView endUpdates]; - - [self.tableView beginUpdates]; - - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index + 1 inSection:0]; - - AAPLListItemCell *listItemCell = (AAPLListItemCell *)[self.tableView cellForRowAtIndexPath:indexPath]; - [self configureListItemCell:listItemCell forRow:index + 1]; -} - -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex { - NSIndexPath *fromIndexPath = [NSIndexPath indexPathForRow:fromIndex + 1 inSection:0]; - NSIndexPath *toIndexPath = [NSIndexPath indexPathForRow:toIndex + 1 inSection:0]; - - [self.tableView moveRowAtIndexPath:fromIndexPath toIndexPath:toIndexPath]; -} - -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color { - self.textAttributes = @{ - NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline], - NSForegroundColorAttributeName: AAPLColorFromListColor(color) - }; - - // The document infrastructure needs to be updated to capture the list's color when it changes. - if (self.document.userActivity) { - [self.document updateUserActivityState:self.document.userActivity]; - } -} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - [self.tableView endUpdates]; -} - -#pragma mark - Convenience - -- (void)updateInterfaceWithTextAttributes { - UINavigationController *controller = self.navigationController.navigationController ?: self.navigationController; - - controller.navigationBar.titleTextAttributes = self.textAttributes; - controller.navigationBar.tintColor = self.textAttributes[NSForegroundColorAttributeName]; - controller.toolbar.tintColor = self.textAttributes[NSForegroundColorAttributeName]; - - self.tableView.tintColor = self.textAttributes[NSForegroundColorAttributeName]; -} - -- (void)hideViewControllerAfterListWasDeleted { - if (self.splitViewController && self.splitViewController.isCollapsed) { - UINavigationController *controller = self.navigationController.navigationController ?: self.navigationController; - [controller popViewControllerAnimated:YES]; - } - else { - UINavigationController *emptyViewController = (UINavigationController *)[self.storyboard instantiateViewControllerWithIdentifier:AAPLAppDelegateMainStoryboardEmptyViewControllerIdentifier]; - emptyViewController.topViewController.navigationItem.leftBarButtonItem = [self.splitViewController displayModeButtonItem]; - - self.splitViewController.viewControllers = @[self.splitViewController.viewControllers.firstObject, emptyViewController]; - } -} - -- (void)configureListItemCell:(AAPLListItemCell *)listItemCell forRow:(NSInteger)row { - listItemCell.checkBox.checked = NO; - listItemCell.checkBox.hidden = NO; - - listItemCell.textField.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; - listItemCell.textField.delegate = self; - listItemCell.textField.textColor = [UIColor darkTextColor]; - listItemCell.textField.enabled = YES; - - if (row == 0) { - // Configure an "Add Item" list item cell. - listItemCell.textField.placeholder = NSLocalizedString(@"Add Item", nil); - listItemCell.textField.text = @""; - listItemCell.checkBox.hidden = YES; - } - else { - AAPLListItem *listItem = self.listPresenter.presentedListItems[row - 1]; - - listItemCell.complete = listItem.isComplete; - listItemCell.textField.text = listItem.text; - } -} - -- (void)triggerNewDataForWidget { - NSString *localizedTodayDocumentName = [AAPLAppConfiguration sharedAppConfiguration].localizedTodayDocumentName; - - if ([self.document.localizedName isEqualToString:localizedTodayDocumentName]) { - [[NCWidgetController widgetController] setHasContent:YES forWidgetWithBundleIdentifier:AAPLAppConfigurationWidgetBundleIdentifier]; - } -} - - -- (void)resolveConflicts { - // Any automatic merging logic or presentation of conflict resolution UI should go here. - // For this sample, just pick the current version and mark the conflict versions as resolved. - [NSFileVersion removeOtherVersionsOfItemAtURL:self.documentURL error:nil]; - - NSArray *conflictVersions = [NSFileVersion unresolvedConflictVersionsOfItemAtURL:self.documentURL]; - for (NSFileVersion *fileVersion in conflictVersions) { - fileVersion.resolved = YES; - } -} - -- (NSIndexPath *)indexPathForView:(UIView *)view { - CGPoint viewOrigin = view.bounds.origin; - - CGPoint viewLocation = [self.tableView convertPoint:viewOrigin fromView:view]; - - return [self.tableView indexPathForRowAtPoint:viewLocation]; -} - -@end diff --git a/Lister/Objective-C/Lister/AAPLNewListDocumentController.h b/Lister/Objective-C/Lister/AAPLNewListDocumentController.h deleted file mode 100644 index 091515de..00000000 --- a/Lister/Objective-C/Lister/AAPLNewListDocumentController.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLNewListDocumentController class allows users to create a new list document with a name and preferred color. -*/ - -@import UIKit; -@import ListerKit; - -@class AAPLListInfo; - -@interface AAPLNewListDocumentController : UIViewController - -@property (nonatomic, strong) AAPLListsController *listsController; - -@end diff --git a/Lister/Objective-C/Lister/AAPLNewListDocumentController.m b/Lister/Objective-C/Lister/AAPLNewListDocumentController.m deleted file mode 100644 index b4bf9715..00000000 --- a/Lister/Objective-C/Lister/AAPLNewListDocumentController.m +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLNewListDocumentController class allows users to create a new list document with a name and preferred color. -*/ - -#import "AAPLNewListDocumentController.h" -#import "AAPLListInfo.h" -@import ListerKit; - -@interface AAPLNewListDocumentController () - -@property (nonatomic, weak) IBOutlet UIButton *grayButton; -@property (nonatomic, weak) IBOutlet UIButton *blueButton; -@property (nonatomic, weak) IBOutlet UIButton *greenButton; -@property (nonatomic, weak) IBOutlet UIButton *yellowButton; -@property (nonatomic, weak) IBOutlet UIButton *orangeButton; -@property (nonatomic, weak) IBOutlet UIButton *redButton; - -@property (nonatomic, weak) IBOutlet UIBarButtonItem *saveButton; - -@property (nonatomic, weak) IBOutlet UIToolbar *toolbar; - -@property (nonatomic, weak) IBOutlet UILabel *titleLabel; - -@property (nonatomic, weak) IBOutlet UITextField *nameField; - -@property (nonatomic, weak) UIButton *selectedButton; -@property (nonatomic) AAPLListColor selectedColor; -@property (nonatomic, strong) NSString *selectedTitle; - -@end - -@implementation AAPLNewListDocumentController - -#pragma mark - IBActions - -- (IBAction)pickColor:(UIButton *)sender { - // The user is choosing a color, resign first responder on the text field, if necessary. - if ([self.nameField isFirstResponder]) { - [self.nameField resignFirstResponder]; - } - - // Use the button's tag to determine the color. - self.selectedColor = (AAPLListColor)sender.tag; - - // Clear out the previously selected button's border. - self.selectedButton.layer.borderWidth = 0.f; - - sender.layer.borderWidth = 5.f; - sender.layer.borderColor = [UIColor lightGrayColor].CGColor; - self.selectedButton = sender; - - self.titleLabel.textColor = AAPLColorFromListColor(self.selectedColor); - self.toolbar.tintColor = AAPLColorFromListColor(self.selectedColor); -} - -- (IBAction)saveAction:(id)sender { - AAPLList *list = [[AAPLList alloc] initWithColor:self.selectedColor items:@[]]; - - [self.listsController createListInfoForList:list withName:self.selectedTitle]; - - [self dismissViewControllerAnimated:YES completion:nil]; -} - -- (IBAction)cancelAction:(id)sender { - [self dismissViewControllerAnimated:YES completion:nil]; -} - -#pragma mark - Touch Handling - -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - [super touchesBegan:touches withEvent:event]; - - UITouch *touch = [[event allTouches] anyObject]; - - // The user has tapped outside the text field, resign first responder, if necessary. - if ([self.nameField isFirstResponder] && [touch view] != self.nameField) { - [self.nameField resignFirstResponder]; - } -} - -#pragma mark - UITextFieldDelegate - -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { - NSString *updatedText = [textField.text stringByReplacingCharactersInRange:range withString:string]; - [self updateForProposedListName:updatedText]; - - return YES; -} - -- (void)textFieldDidEndEditing:(UITextField *)textField { - [self updateForProposedListName:textField.text]; -} - -- (BOOL)textFieldShouldReturn:(UITextField *)textField { - [textField resignFirstResponder]; - - return YES; -} - -#pragma mark - Convenience - -- (void)updateForProposedListName:(NSString *)name { - if ([self.listsController canCreateListInfoWithName:name]) { - self.saveButton.enabled = YES; - self.selectedTitle = name; - } - else { - self.saveButton.enabled = NO; - } -} - -@end diff --git a/Lister/Objective-C/Lister/Base.lproj/Main.storyboard b/Lister/Objective-C/Lister/Base.lproj/Main.storyboard deleted file mode 100644 index c0da4196..00000000 --- a/Lister/Objective-C/Lister/Base.lproj/Main.storyboard +++ /dev/null @@ -1,532 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Lister/Objective-C/Lister/Info.plist b/Lister/Objective-C/Lister/Info.plist deleted file mode 100644 index 5683059e..00000000 --- a/Lister/Objective-C/Lister/Info.plist +++ /dev/null @@ -1,106 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDocumentTypes - - - CFBundleTypeIconFiles - - CFBundleTypeName - List Document - CFBundleTypeRole - Editor - LSHandlerRank - Owner - LSItemContentTypes - - com.example.apple-samplecode.Lister - - LSTypeIsPackage - - NSUbiquitousDocumentUserActivityType - com.example.apple-samplecode.Lister.editing - - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleURLName - com.example.apple-samplecode.Lister.ListerURLScheme - CFBundleURLSchemes - - lister - - - - CFBundleVersion - 6 - LSRequiresIPhoneOS - - NSUserActivityTypes - - com.example.apple-samplecode.Lister.editing - com.example.apple-samplecode.Lister.watch - - UILaunchStoryboardName - Launch Screen - UIMainStoryboardFile - Main - UIMainStoryboardFile~ipad - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UTExportedTypeDeclarations - - - UTTypeConformsTo - - public.data - - UTTypeDescription - List Document - UTTypeIdentifier - com.example.apple-samplecode.Lister - UTTypeTagSpecification - - public.filename-extension - - list - - - - - - diff --git a/Lister/Objective-C/Lister/Lister-Prefix.pch b/Lister/Objective-C/Lister/Lister-Prefix.pch deleted file mode 100644 index 33c1074a..00000000 --- a/Lister/Objective-C/Lister/Lister-Prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Lister's precompiled header file. -*/ - -#ifdef __OBJC__ - @import UIKit; - @import Foundation; -#endif diff --git a/Lister/Objective-C/Lister/main.m b/Lister/Objective-C/Lister/main.m deleted file mode 100644 index 563d4218..00000000 --- a/Lister/Objective-C/Lister/main.m +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The main entry point for the application. -*/ - -@import UIKit; -#import "AAPLAppDelegate.h" - -int main(int argc, char *argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AAPLAppDelegate class])); - } -} diff --git a/Lister/Objective-C/ListerKit (WatchOS)/AAPLConnectivityListsController.h b/Lister/Objective-C/ListerKit (WatchOS)/AAPLConnectivityListsController.h deleted file mode 100644 index 684c8f7a..00000000 --- a/Lister/Objective-C/ListerKit (WatchOS)/AAPLConnectivityListsController.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLConnectivityListsController and \c AAPLConnectivityListsControllerDelegate infrastructure provide a mechanism for other objects within the application to be notified of inserts, removes, and updates to \c AAPLListInfo objects. -*/ - -@import Foundation; - -@class AAPLListInfo, AAPLConnectivityListsController; - -/*! - The \c AAPLConnectivityListsControllerDelegate protocol enables an \c AAPLConnectivityListsController - object to notify other objects of changes to available \c AAPLListInfo objects. This includes - "will change content" events, "did change content" events, inserts, removes, updates, and errors. Note - that the \c AAPLListsController can call these methods on an aribitrary queue. If the implementation in - these methods require UI manipulations, you should respond to the changes on the main queue. - */ -@protocol AAPLConnectivityListsControllerDelegate - -@optional - -/*! - Notifies the receiver of this method that the lists controller will change it's contents in some - form. This method is *always* called before any insert, remove, or update is received. In this method, - you should prepare your UI for making any changes related to the changes that you will need to reflect - once they are received. Once all of the updates are performed, your \c -listsControllerDidChangeContent: - method will be called. - - @param listsController The \c AAPLConnectivityListsController instance that will change its content. - */ -- (void)listsControllerWillChangeContent:(AAPLConnectivityListsController *)listsController; - -/*! - Notifies the receiver of this method that the lists controller is tracking a new \c AAPLListInfo - object. Receivers of this method should update their UI accordingly. - - @param listsController The \c AAPLConnectivityListsController instance that inserted the new \c AAPLListInfo. - @param listInfo The new \c AAPLListInfo object that has been inserted at \c index. - @param index The index that \c listInfo was inserted at. - */ -- (void)listsController:(AAPLConnectivityListsController *)listsController didInsertListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index; - -/*! - Notifies the receiver of this method that the lists controller is no longer tracking \c listInfo. - Receivers of this method should update their UI accordingly. - - @param listsController The \c AAPLConnectivityListsController instance that removed \c listInfo. - @param listInfo The removed \c AAPLListInfo object. - @param index The index that \c listInfo was removed at. - */ -- (void)listsController:(AAPLConnectivityListsController *)listsController didRemoveListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index; - -/*! - Notifies the receiver of this method that the lists controller received a message that \c listInfo - has updated its content. Receivers of this method should update their UI accordingly. - - @param listsController The \c AAPLConnectivityListsController instance that was notified that \c listInfo has - been updated. - @param listInfo The \c AAPLListInfo object that has been updated. - @param index The index of \c listInfo, the updated \c AAPLListInfo. - */ -- (void)listsController:(AAPLConnectivityListsController *)listsController didUpdateListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index; - -/*! - Notifies the receiver of this method that the lists controller did change it's contents in some form. - This method is *always* called after any insert, remove, or update is received. In this method, you - should finish off changes to your UI that were related to any insert, remove, or update. - - @param listsController The \c AAPLConnectivityListsController instance that did change its content. - */ -- (void)listsControllerDidChangeContent:(AAPLConnectivityListsController *)listsController; - -@end - -/*! - The \c AAPLConnectivityListsController class is responsible for tracking \c AAPLListInfo objects that are - found through lists controller's \c WCSession object. \c WCSession is responsible for informing watchOS - applications of changes occurring in their counterpart application. It also allows the rest of the - application to deal with \c AAPLListInfo objects rather than the various types that \c WCSession may directly - vend instances of. In essence, the work of a lists controller is to "front" the device's default WCSession. - */ -@interface AAPLConnectivityListsController : NSObject - -/*! - The \c AAPLConnectivityListsController object's delegate who is responsible for responding to \c AAPLListsController - changes. - */ -@property (nonatomic, weak) id delegate; - -/*! - @return The number of tracked \c AAPLListInfo objects. - */ -@property (nonatomic, readonly) NSInteger count; - -/*! - Initializes an \c AAPLConnectivityListsController instance and configures it to interact with the default - \c WCSession. - */ -- (instancetype)init; - -/*! - Initializes an \c AAPLConnectivityListsController instance and configures it to interact with the default - \c WCSession. The list name is used to focus the controller on changes to a single list. - - @param listName A \c NSString matching the name of the single list to be monitored. - */ -- (instancetype)initWithListName:(NSString *)listName; - -/*! - Begin listening for changes to the tracked \c AAPLListInfo objects. Be sure to balance each call to - \c -startSearching with a call to \c -stopSearching. - */ -- (void)startSearching; - -/*! - Stop listening for changes to the tracked \c AAPLListInfo objects. Each call to \c -startSearching should - be balanced with a call to this method. - */ -- (void)stopSearching; - -/*! - @return The \c AAPLListInfo instance at a specific index. This method traps if the index is out - of bounds. - */ -- (AAPLListInfo *)objectAtIndexedSubscript:(NSInteger)index; - -@end diff --git a/Lister/Objective-C/ListerKit (WatchOS)/AAPLConnectivityListsController.m b/Lister/Objective-C/ListerKit (WatchOS)/AAPLConnectivityListsController.m deleted file mode 100644 index d2c3fe1a..00000000 --- a/Lister/Objective-C/ListerKit (WatchOS)/AAPLConnectivityListsController.m +++ /dev/null @@ -1,215 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLConnectivityListsController and \c AAPLConnectivityListsControllerDelegate infrastructure provide a mechanism for other objects within the application to be notified of inserts, removes, and updates to \c AAPLListInfo objects. -*/ - -#import "AAPLConnectivityListsController.h" - -#import "AAPLListInfo.h" -#import "AAPLAppConfiguration.h" -#import "AAPLListUtilities.h" - - -@import WatchConnectivity; - -@interface AAPLConnectivityListsController () - -@property (nonatomic, strong) NSMutableArray *listInfos; - -@property (nonatomic, strong) dispatch_queue_t listInfoQueue; - -@property (nonatomic, strong) NSPredicate *predicate; - -@end - -@implementation AAPLConnectivityListsController - -#pragma mark - Initialization - -- (instancetype)init { - self = [super init]; - - if (self) { - _listInfos = [NSMutableArray array]; - - _listInfoQueue = dispatch_queue_create("com.example.apple-samplecode.lister.listcontroller", DISPATCH_QUEUE_SERIAL); - - if ([WCSession isSupported]) { - [WCSession defaultSession].delegate = self; - [[WCSession defaultSession] activateSession]; - } - } - - return self; -} - -- (instancetype)initWithListName:(NSString *)listName { - self = [super init]; - - if (self) { - _listInfos = [NSMutableArray array]; - - _listInfoQueue = dispatch_queue_create("com.example.apple-samplecode.lister.listcontroller", DISPATCH_QUEUE_SERIAL); - - _predicate = [NSPredicate predicateWithFormat:@"(name = %@)", listName]; - - if ([WCSession isSupported]) { - [WCSession defaultSession].delegate = self; - [[WCSession defaultSession] activateSession]; - } - } - - return self; -} - -- (void)startSearching { - if ([WCSession defaultSession].receivedApplicationContext != nil) { - [self processApplicationContext:[WCSession defaultSession].receivedApplicationContext]; - } -} - -- (void)stopSearching { - // Once the session has been started, stop receiving updates by setting the delegate to nil. - self.delegate = nil; -} - -#pragma mark - Property Overrides - -- (NSInteger)count { - return self.listInfos.count; -} - -#pragma mark - Subscripting - -- (AAPLListInfo *)objectAtIndexedSubscript:(NSInteger)index { - // Fetch the appropriate list info protected by listInfoQueue. - __block AAPLListInfo *listInfo = nil; - - dispatch_sync(self.listInfoQueue, ^{ - listInfo = self.listInfos[index]; - }); - - return listInfo; -} - -#pragma - WCSessionDelegate - -- (void)session:(nonnull WCSession *)session didReceiveApplicationContext:(nonnull NSDictionary *)applicationContext { - [self processApplicationContext:applicationContext]; -} - -- (void)processApplicationContext:(nonnull NSDictionary *)applicationContext { - NSArray *> *lists = applicationContext[AAPLApplicationActivityContextCurrentListsKey]; - - NSInteger numberOfLists = lists.count; - - NSMutableArray *changedListInfos = [NSMutableArray array]; - for (int idx = 0; idx < numberOfLists; idx++) { - AAPLListInfo *info = [[AAPLListInfo alloc] init]; - info.name = lists[idx][AAPLApplicationActivityContextListNameKey]; - info.color = [lists[idx][AAPLApplicationActivityContextListColorKey] integerValue]; - - [changedListInfos addObject:info]; - } - - // If a filter predicate has been supplied, apply it. - if (self.predicate) { - [changedListInfos filterUsingPredicate:self.predicate]; - } - - if ([self.delegate respondsToSelector:@selector(listsControllerWillChangeContent:)]) { - [self.delegate listsControllerWillChangeContent:self]; - } - - NSArray *removed = [self removedListInfosToChangedListInfos:changedListInfos]; - NSArray *inserted = [self insertedListInfosToChangedListInfos:changedListInfos]; - NSArray *updated = [self updatedListInfosToChangedListInfos:changedListInfos]; - - for (AAPLListInfo *listInfoToRemove in removed) { - NSInteger indexOfListInfoToRemove = [self.listInfos indexOfObject:listInfoToRemove]; - - [self.listInfos removeObjectAtIndex:indexOfListInfoToRemove]; - - if ([self.delegate respondsToSelector:@selector(listsController:didRemoveListInfo:atIndex:)]) { - [self.delegate listsController:self didRemoveListInfo:listInfoToRemove atIndex:indexOfListInfoToRemove]; - } - } - - [inserted enumerateObjectsUsingBlock:^(AAPLListInfo * __nonnull listInfoToInsert, NSUInteger idx, BOOL * __nonnull stop) { - [self.listInfos insertObject:listInfoToInsert atIndex:idx]; - - if ([self.delegate respondsToSelector:@selector(listsController:didInsertListInfo:atIndex:)]) { - [self.delegate listsController:self didInsertListInfo:listInfoToInsert atIndex:idx]; - } - }]; - - for (AAPLListInfo *listInfoToUpdate in updated) { - NSInteger indexOfListInfoToUpdate = [self.listInfos indexOfObject:listInfoToUpdate]; - - self.listInfos[indexOfListInfoToUpdate] = listInfoToUpdate; - - if ([self.delegate respondsToSelector:@selector(listsController:didUpdateListInfo:atIndex:)]) { - [self.delegate listsController:self didUpdateListInfo:listInfoToUpdate atIndex:indexOfListInfoToUpdate]; - } - } - - if ([self.delegate respondsToSelector:@selector(listsControllerDidChangeContent:)]) { - [self.delegate listsControllerDidChangeContent:self]; - } -} - -- (void)session:(nonnull WCSession *)session didReceiveFile:(nonnull WCSessionFile *)file { - [self copyURLToDocumentsDirectory:file.fileURL]; -} - -- (void)session:(nonnull WCSession *)session didFinishFileTransfer:(nonnull WCSessionFileTransfer *)fileTransfer error:(nullable NSError *)error { - if (error) { - NSLog(@"%s, file: %@, error: %@", __FUNCTION__, fileTransfer.file.fileURL.lastPathComponent, error.localizedDescription); - } -} - -#pragma mark - Convenience - -- (void)copyURLToDocumentsDirectory:(NSURL *)url { - NSURL *documentsURL = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].firstObject; - NSURL *toURL = [documentsURL URLByAppendingPathComponent:url.lastPathComponent]; - - [AAPLListUtilities copyFromURL:url toURL:toURL]; -} - -#pragma mark - List Differencing - -- (NSArray *)removedListInfosToChangedListInfos:(NSArray *)changedListInfos { - NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"!(self in %@)", changedListInfos]; - - return [[self.listInfos copy] filteredArrayUsingPredicate:filterPredicate]; -} - -- (NSArray *)insertedListInfosToChangedListInfos:(NSArray *)changedListInfos { - NSPredicate *containmentPredicate = [NSPredicate predicateWithFormat:@"!(self in %@)", [self.listInfos copy]]; - - return [changedListInfos filteredArrayUsingPredicate:containmentPredicate]; -} - -- (NSArray *)updatedListInfosToChangedListInfos:(NSArray *)changedListInfos { - NSArray *initialListInfos = [self.listInfos copy]; - - NSPredicate *filterPredicate = [NSPredicate predicateWithBlock:^BOOL(AAPLListInfo *changedListInfo, NSDictionary *bindings) { - NSInteger indexOfChangedListInfoInInitialListInfos = [initialListInfos indexOfObject:changedListInfo]; - - if (indexOfChangedListInfoInInitialListInfos == NSNotFound) { - return NO; - } - - AAPLListInfo *initialListInfo = initialListInfos[indexOfChangedListInfoInInitialListInfos]; - - return initialListInfo.color != changedListInfo.color; - }]; - - return [changedListInfos filteredArrayUsingPredicate:filterPredicate]; -} - -@end diff --git a/Lister/Objective-C/ListerKit (WatchOS)/AAPLListInfo.h b/Lister/Objective-C/ListerKit (WatchOS)/AAPLListInfo.h deleted file mode 100644 index fb1feac9..00000000 --- a/Lister/Objective-C/ListerKit (WatchOS)/AAPLListInfo.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInfo class is a caching abstraction over an \c AAPLList object that contains information about lists (e.g. color and name). This object is distinct from the one used by the iOS application. -*/ - -@import Foundation; -#import "AAPLList.h" - -@interface AAPLListInfo : NSObject - -@property (nonatomic, copy) NSString *name; -@property AAPLListColor color; - -@end diff --git a/Lister/Objective-C/ListerKit (WatchOS)/AAPLListInfo.m b/Lister/Objective-C/ListerKit (WatchOS)/AAPLListInfo.m deleted file mode 100644 index d8e0bba1..00000000 --- a/Lister/Objective-C/ListerKit (WatchOS)/AAPLListInfo.m +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInfo class is a caching abstraction over an \c AAPLList object that contains information about lists (e.g. color and name). This object is distinct from the one used by the iOS application. -*/ - -#import "AAPLListInfo.h" - -@implementation AAPLListInfo - -#pragma mark - NSObject - -- (BOOL)isEqual:(id)object { - if (![object isKindOfClass:[AAPLListInfo class]]) { - return NO; - } - - return [self.name isEqualToString:[object name]]; -} - -@end diff --git a/Lister/Objective-C/ListerKit Tests/AAPLAllListItemsPresenterTests.m b/Lister/Objective-C/ListerKit Tests/AAPLAllListItemsPresenterTests.m deleted file mode 100644 index e5d8386e..00000000 --- a/Lister/Objective-C/ListerKit Tests/AAPLAllListItemsPresenterTests.m +++ /dev/null @@ -1,780 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The test case class for the \c AAPLAllListItemsPresenter class. -*/ - -@import ListerKit; -@import XCTest; - -#import "AAPLListPresenterTestHelper.h" - -@interface AAPLAllListItemsPresenterTests : XCTestCase - -@property AAPLAllListItemsPresenter *presenter; - -@property AAPLList *list; - -@property (copy) NSArray *initiallyIncompleteListItems; - -@property (copy) NSArray *initiallyCompleteListItems; - -@property (copy) NSArray *presentedListItems; - -@property NSInteger initialListItemCount; - -@property AAPLListPresenterTestHelper *testHelper; - -@property (readonly) NSUndoManager *undoManager; - -@end - - -@implementation AAPLAllListItemsPresenterTests - -#pragma mark - XCTest Life Time - -- (void)setUp { - [super setUp]; - - self.initiallyIncompleteListItems = @[ - [[AAPLListItem alloc] initWithText:@"1" complete: NO], - [[AAPLListItem alloc] initWithText:@"3" complete: NO] - ]; - - self.initiallyCompleteListItems = @[ - [[AAPLListItem alloc] initWithText:@"0" complete:YES], - [[AAPLListItem alloc] initWithText:@"2" complete:YES], - [[AAPLListItem alloc] initWithText:@"4" complete:YES] - ]; - - self.presentedListItems = [self.initiallyIncompleteListItems arrayByAddingObjectsFromArray:self.initiallyCompleteListItems]; - - NSArray *unorderedListItems = @[ - self.initiallyCompleteListItems[0], - self.initiallyIncompleteListItems[0], - self.initiallyCompleteListItems[1], - self.initiallyIncompleteListItems[1], - self.initiallyCompleteListItems[2] - ]; - - self.list = [[AAPLList alloc] initWithColor:AAPLListColorGreen items:unorderedListItems]; - - // Create the presenter. - self.presenter = [[AAPLAllListItemsPresenter alloc] init]; - - [self.presenter setList:self.list]; - - self.initialListItemCount = self.presenter.count; - - self.presenter.undoManager = [[NSUndoManager alloc] init]; - - self.testHelper = [[AAPLListPresenterTestHelper alloc] init]; - - self.presenter.delegate = self.testHelper; -} - -#pragma mark - Property Accessors - -- (NSUndoManager *)undoManager { - return self.presenter.undoManager; -} - -#pragma mark - Test Initializers - -- (void)testItemInitializationReshufflingWithOutOfOrderItems { - XCTAssertEqualObjects(self.presenter.presentedListItems, self.presentedListItems, @"Incomplete items should be followed by complete items once the presenter is instantiated."); -} - -- (void)testItemInitializationNoReshufflingCaseWhenItemsAreAlreadyInOrder { - NSMutableArray *incompleteListItems = [NSMutableArray array]; - NSMutableArray *completeListItems = [NSMutableArray array]; - - for (NSInteger idx = 0; idx < 5; idx++) { - NSString *text = [NSString stringWithFormat:@"%ld", idx]; - - AAPLListItem *incompleteListItem = [[AAPLListItem alloc] initWithText:text complete:NO]; - [incompleteListItems addObject:incompleteListItem]; - - AAPLListItem *completeListItem = [[AAPLListItem alloc] initWithText:text complete:YES]; - [completeListItems addObject:completeListItem]; - } - - AAPLList *incompleteList = [[AAPLList alloc] initWithColor:AAPLListColorGreen items:incompleteListItems]; - AAPLAllListItemsPresenter *incompletePresenter = [[AAPLAllListItemsPresenter alloc] init]; - [incompletePresenter setList:incompleteList]; - - AAPLList *completeList = [[AAPLList alloc] initWithColor:AAPLListColorGreen items:completeListItems]; - AAPLAllListItemsPresenter *completePresenter = [[AAPLAllListItemsPresenter alloc] init]; - [completePresenter setList:completeList]; - - NSArray *orderedCombinedListItems = [incompleteListItems arrayByAddingObjectsFromArray:completeListItems]; - AAPLList *orderedCombinedList = [[AAPLList alloc] initWithColor:AAPLListColorGreen items:orderedCombinedListItems]; - AAPLAllListItemsPresenter *orderedCombinedPresenter = [[AAPLAllListItemsPresenter alloc] init]; - [orderedCombinedPresenter setList:orderedCombinedList]; - - XCTAssertEqualObjects(incompleteListItems, incompletePresenter.presentedListItems, @"Items that are all incomplete should not be reconfigured after the presenter is instantiated."); - - XCTAssertEqualObjects(completeListItems, completePresenter.presentedListItems, @"Items that are all complete should not be reconfigured after the presenter is instantiated."); - - XCTAssertEqualObjects(orderedCombinedListItems, orderedCombinedPresenter.presentedListItems, @"Incomplete items followed by complete items should not be reconfigured after the presenter is instantiated."); -} - -#pragma mark - color - -- (void)testSetColorWithDifferentColor { - AAPLListColor newColor = AAPLListColorOrange; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - XCTAssertEqual(self.presenter.color, newColor, @"The getter for the color should return the new color."); - - NSInteger didUpdateListColorCallbackCount = self.testHelper.didUpdateListColorCallbacks.count; - - XCTAssertEqual(didUpdateListColorCallbackCount, 1, @"There should be one \"list color update\" callback."); - - if (didUpdateListColorCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *updateColorInfo = self.testHelper.didUpdateListColorCallbacks.firstObject; - XCTAssertEqual(updateColorInfo.color, newColor, @"The delegate callback should provide the new color."); - }]; - - self.presenter.color = newColor; -} - -- (void)testSetColorWithDifferentColorAfterUndo { - AAPLListColor initialListColor = self.presenter.color; - - self.presenter.color = AAPLListColorOrange; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - XCTAssertEqual(self.presenter.color, initialListColor, @"The getter for the color should return the initial color."); - - NSInteger didUpdateListColorCallbackCount = self.testHelper.didUpdateListColorCallbacks.count; - XCTAssertEqual(didUpdateListColorCallbackCount, 1, @"There should be one \"list color update\" callback."); - - if (didUpdateListColorCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *newColorInfo = self.testHelper.didUpdateListColorCallbacks.firstObject; - XCTAssertEqual(newColorInfo.color, initialListColor, @"The delegate callback should provide the initial color."); - }]; - - [self.undoManager undo]; -} - -#pragma mark - -insertListItem: - -- (void)testInsertIncompleteListItem { - AAPLListItem *incompleteListItem = [[AAPLListItem alloc] initWithText:@"foo" complete: NO]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didInsertListItemCallbackCount = self.testHelper.didInsertListItemCallbacks.count; - - XCTAssertEqual(didInsertListItemCallbackCount, 1, @"Only one item should be inserted."); - - if (didInsertListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *insertInfo = self.testHelper.didInsertListItemCallbacks.firstObject; - - XCTAssertEqualObjects(incompleteListItem, insertInfo.listItem, @"The inserted item should be the same as the item the delegate receives."); - - XCTAssertEqual(insertInfo.index, 0, @"The incomplete item should be inserted at the top of the list."); - }]; - - [self.presenter insertListItem:incompleteListItem]; -} - -- (void)testInsertCompleteListItem { - AAPLListItem *completeListItem = [[AAPLListItem alloc] initWithText:@"foo" complete:YES]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didInsertListItemCallbackCount = self.testHelper.didInsertListItemCallbacks.count; - - XCTAssertEqual(didInsertListItemCallbackCount, 1, "Only one item should be inserted."); - - if (didInsertListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *insertInfo = self.testHelper.didInsertListItemCallbacks.firstObject; - - XCTAssertEqualObjects(completeListItem, insertInfo.listItem, @"The inserted item should be the same as the item the delegate receives."); - - XCTAssertEqual(insertInfo.index, self.initialListItemCount, @"The complete item should be inserted at the bottom of the list."); - }]; - - [self.presenter insertListItem:completeListItem]; -} - -- (void)testInsertListItemAfterUndo { - AAPLListItem *listItemToInsert = [[AAPLListItem alloc] initWithText:@"foo" complete:NO]; - - [self.presenter insertListItem:listItemToInsert]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Make sure the underlying list is back to its initial state. - XCTAssertEqualObjects(self.presentedListItems, self.presenter.presentedListItems, @"The list should be the same after a change + undo."); - - NSInteger didRemoveListItemCallbackCount = self.testHelper.didRemoveListItemCallbacks.count; - - XCTAssertEqual(didRemoveListItemCallbackCount, 1, @"Only one item should be removed."); - - if (didRemoveListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *removeInfo = self.testHelper.didRemoveListItemCallbacks.firstObject; - - XCTAssertEqualObjects(removeInfo.listItem, listItemToInsert, @"The removed item should be the item we initially inserted."); - }]; - - [self.undoManager undo]; -} - -#pragma mark - -insertListItems: - -- (void)testInsertListItems { - NSArray *listItemsToInsert = @[ - [[AAPLListItem alloc] initWithText:@"0" complete:NO], - [[AAPLListItem alloc] initWithText:@"1" complete:YES], - [[AAPLListItem alloc] initWithText:@"2" complete:NO] - ]; - - NSDictionary *listItemsToInsertWithExpectedInsertedIndexes = @{ - listItemsToInsert[0]: @0, - listItemsToInsert[1]: @(self.initialListItemCount + 1), - listItemsToInsert[2]: @0 - }; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didInsertListItemCallbackCount = self.testHelper.didInsertListItemCallbacks.count; - - XCTAssertEqual(didInsertListItemCallbackCount, listItemsToInsert.count, @"Only one item should be inserted."); - - if (didInsertListItemCallbackCount != listItemsToInsert.count) { - return; - } - - for (AAPLListPresenterCallbackInfo *insertInfo in self.testHelper.didInsertListItemCallbacks) { - XCTAssertTrue([listItemsToInsert containsObject:insertInfo.listItem], @"The inserted item should be one of the items we wanted to insert."); - - NSNumber *expectedInsertedIndexNumber = listItemsToInsertWithExpectedInsertedIndexes[insertInfo.listItem]; - if (expectedInsertedIndexNumber != nil) { - XCTAssertEqual(expectedInsertedIndexNumber.integerValue, insertInfo.index, @"The items should be inserted at the expected indexes."); - } - } - }]; - - [self.presenter insertListItems:listItemsToInsert]; -} - -- (void)testInsertListItemsAfterUndo { - NSArray *listItemsToInsert = @[ - [[AAPLListItem alloc] initWithText:@"0" complete:NO], - [[AAPLListItem alloc] initWithText:@"1" complete:YES], - [[AAPLListItem alloc] initWithText:@"2" complete:NO] - ]; - - [self.presenter insertListItems:listItemsToInsert]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Make sure the underlying list is back to its initial state. - XCTAssertEqualObjects(self.presentedListItems, self.presenter.presentedListItems, @"The list should be the same after a change + undo."); - - NSInteger didRemoveListItemCallbackCount = self.testHelper.didRemoveListItemCallbacks.count; - - XCTAssertEqual(didRemoveListItemCallbackCount, listItemsToInsert.count, @"Only one item should be removed."); - - if (didRemoveListItemCallbackCount != listItemsToInsert.count) { - return; - } - - for (AAPLListPresenterCallbackInfo *removeInfo in self.testHelper.didRemoveListItemCallbacks) { - XCTAssertTrue([listItemsToInsert containsObject:removeInfo.listItem], @"The removed item should one of the items we initially inserted."); - } - }]; - - [self.undoManager undo]; -} - -#pragma mark - -removeListItem: - -- (void)testRemoveListItem { - AAPLListItem *listItemToRemove = self.presentedListItems[2]; - NSInteger indexOfItemToRemove = [self.presenter.presentedListItems indexOfObject:listItemToRemove]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didRemoveListItemCallbackCount = self.testHelper.didRemoveListItemCallbacks.count; - XCTAssertEqual(didRemoveListItemCallbackCount, 1, @"Only one item should be removed."); - - if (didRemoveListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *removeInfo = self.testHelper.didRemoveListItemCallbacks.firstObject; - - XCTAssertEqualObjects(listItemToRemove, removeInfo.listItem, @"The removed item should be the same as the item the delegate receives."); - - XCTAssertEqual(removeInfo.index, indexOfItemToRemove, @"The incomplete item should be removed at the index it was before removal."); - }]; - - [self.presenter removeListItem:listItemToRemove]; -} - -- (void)testRemoveListItemAfterUndo { - AAPLListItem *listItemToRemove = self.presentedListItems[2]; - - NSInteger indexOfItemToRemove = [self.presenter.presentedListItems indexOfObject:listItemToRemove]; - - [self.presenter removeListItem:listItemToRemove]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Make sure the underlying list is back to its initial state. - XCTAssertEqualObjects(self.presentedListItems, self.presenter.presentedListItems, @"The list should be the same after a change + undo."); - - NSInteger didInsertListItemCallbackCount = self.testHelper.didInsertListItemCallbacks.count; - - XCTAssertEqual(didInsertListItemCallbackCount, 1, @"Only one item should be inserted."); - - if (didInsertListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *insertInfo = self.testHelper.didInsertListItemCallbacks.firstObject; - - XCTAssertEqualObjects(insertInfo.listItem, listItemToRemove, @"The inserted item should be the item we initially removed."); - - XCTAssertEqual(insertInfo.index, indexOfItemToRemove, "The inserted index should be the same as the list item's initial index."); - }]; - - [self.undoManager undo]; -} - -#pragma mark - -removeListItems: - -- (void)testRemoveListItems { - NSArray *listItemsToRemove = @[ - self.presentedListItems[0], - self.presentedListItems[3], - self.presentedListItems[2] - ]; - - NSDictionary *listItemsToRemoveWithExpectedRemovedIndex = @{ - listItemsToRemove[0]: @0, - listItemsToRemove[1]: @2, - listItemsToRemove[2]: @1 - }; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didRemoveListItemsCallbackCount = self.testHelper.didRemoveListItemCallbacks.count; - - XCTAssertEqual(didRemoveListItemsCallbackCount, listItemsToRemove.count, @"There should be \(listItemsToRemove.count) elements removed."); - - if (didRemoveListItemsCallbackCount != listItemsToRemove.count) { - return; - } - - for (AAPLListPresenterCallbackInfo *removeInfo in self.testHelper.didRemoveListItemCallbacks) { - XCTAssertTrue([listItemsToRemove containsObject:removeInfo.listItem], @"The removed item should be one of the items we wanted to remove."); - - NSNumber *expectedRemovedIndexNumber = listItemsToRemoveWithExpectedRemovedIndex[removeInfo.listItem]; - if (expectedRemovedIndexNumber != nil) { - XCTAssertEqual(removeInfo.index, expectedRemovedIndexNumber.integerValue, @"The items should be removed at the expected indexes."); - } - } - }]; - - [self.presenter removeListItems:listItemsToRemove]; -} - -#pragma mark - -removeListItems: - -- (void)testRemoveListItemsAfterUndo { - NSArray *listItemsToRemove = @[ - self.presentedListItems[0], - self.presentedListItems[3], - self.presentedListItems[2] - ]; - - [self.presenter removeListItems:listItemsToRemove]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Make sure the underlying list is back to its initial state. - XCTAssertEqualObjects(self.presentedListItems, self.presenter.presentedListItems, @"The list should be the same after a change + undo."); - - NSInteger didInsertListItemCallbackCount = self.testHelper.didInsertListItemCallbacks.count; - - XCTAssertEqual(didInsertListItemCallbackCount, listItemsToRemove.count, @"Only one item should be inserted."); - - if (didInsertListItemCallbackCount != listItemsToRemove.count) { - return; - } - - for (AAPLListPresenterCallbackInfo *removeInfo in self.testHelper.didRemoveListItemCallbacks) { - XCTAssertTrue([listItemsToRemove containsObject:removeInfo.listItem], @"The inserted item should one of the items we initially removed."); - } - }]; - - [self.undoManager undo]; -} - -#pragma mark - -canMoveListItem:toIndex: - -- (void)testCanMoveIncompleteListItem { - AAPLListItem *incompleteListItem = self.presentedListItems[1]; - - BOOL canMoveWithinIncomplete = [self.presenter canMoveListItem:incompleteListItem toIndex:0]; - BOOL canMoveToComplete = [self.presenter canMoveListItem:incompleteListItem toIndex:4]; - BOOL canMoveToBoundary = [self.presenter canMoveListItem:incompleteListItem toIndex:2]; - - XCTAssertTrue(canMoveWithinIncomplete, @"An incomplete item can move within the incomplete items."); - XCTAssertFalse(canMoveToComplete, @"An incomplete item cannot move to the complete items."); - XCTAssertFalse(canMoveToBoundary, "An incomplete item cannot move to the complete side of the boundary between complete and incomplete."); -} - -- (void)testCanMoveCompleteListItem { - AAPLListItem *completeListItem = self.presentedListItems[4]; - - BOOL canMoveWithinComplete = [self.presenter canMoveListItem:completeListItem toIndex:3]; - BOOL canMoveToIncomplete = [self.presenter canMoveListItem:completeListItem toIndex:0]; - BOOL canMoveToBoundary = [self.presenter canMoveListItem:completeListItem toIndex:1]; - - XCTAssertTrue(canMoveWithinComplete, @"A complete item can move within the complete items."); - XCTAssertFalse(canMoveToIncomplete, @"A complete item cannot move to the incomplete items."); - XCTAssertFalse(canMoveToBoundary, "A complete item cannot move to the incomplete side of the boundary between complete and incomplete."); -} - -#pragma mark - -moveListItem:toIndex: - -- (void)testMoveListItemAboveListItem { - NSInteger listItemToRemoveIndex = 1; - NSInteger listItemDestinationIndex = 0; - AAPLListItem *listItemToRemove = self.presentedListItems[listItemToRemoveIndex]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didMoveListItemsCallbackCount = self.testHelper.didMoveListItemCallbacks.count; - - XCTAssertEqual(didMoveListItemsCallbackCount, 1, @"There should one elements moved."); - - AAPLListPresenterCallbackInfo *moveInfo = self.testHelper.didMoveListItemCallbacks.firstObject; - - XCTAssertEqualObjects(moveInfo.listItem, listItemToRemove, @"The moved item should be the item we wanted to move."); - - XCTAssertEqual(moveInfo.fromIndex, listItemToRemoveIndex, @"The item should be moved at the item's initial index."); - - XCTAssertEqual(moveInfo.toIndex, listItemDestinationIndex, @"The item should be moved to the destination index."); - }]; - - [self.presenter moveListItem:listItemToRemove toIndex:listItemDestinationIndex]; -} - -- (void)testMoveListItemAboveListItemAfterUndo { - NSInteger listItemToRemoveIndex = 1; - NSInteger listItemDestinationIndex = 0; - AAPLListItem *listItemToRemove = self.presentedListItems[listItemToRemoveIndex]; - - [self.presenter moveListItem:listItemToRemove toIndex:listItemDestinationIndex]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Make sure the underlying list is back to its initial state. - XCTAssertEqualObjects(self.presentedListItems, self.presenter.presentedListItems, @"The list should be the same after a change + undo."); - - NSInteger didMoveListItemCallbackCount = self.testHelper.didMoveListItemCallbacks.count; - - XCTAssertEqual(didMoveListItemCallbackCount, 1, @"One move should occur the undo."); - - if (didMoveListItemCallbackCount != 2) { - return; - } - - AAPLListPresenterCallbackInfo *moveInfo = self.testHelper.didMoveListItemCallbacks[1]; - - XCTAssertEqualObjects(moveInfo.listItem, listItemToRemove, @"The moved item should be the item we initially moved."); - - XCTAssertEqual(moveInfo.fromIndex, listItemDestinationIndex, @"`fromIndex` should be the same as the list item's initial destination index."); - - XCTAssertEqual(moveInfo.toIndex, listItemToRemoveIndex + 1, @"`toIndex` should be the same as the list item's initial index."); - }]; - - [self.undoManager undo]; -} - -- (void)testMoveListItemBelowListItem { - NSInteger listItemToMoveIndex = 3; - NSInteger listItemDestinationIndex = 4; - AAPLListItem *listItemToMove = self.presentedListItems[listItemToMoveIndex]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didMoveListItemsCallbackCount = self.testHelper.didMoveListItemCallbacks.count; - - XCTAssertEqual(didMoveListItemsCallbackCount, 1, @"There should one elements moved."); - - AAPLListPresenterCallbackInfo *moveInfo = self.testHelper.didMoveListItemCallbacks.firstObject; - - XCTAssertEqual(moveInfo.listItem, listItemToMove, @"The moved item should be the item we wanted to move."); - - XCTAssertEqual(moveInfo.fromIndex, listItemToMoveIndex, @"The item should be moved at the item's initial index."); - - XCTAssertEqual(moveInfo.toIndex, listItemDestinationIndex, @"The item should be moved to the destination index."); - }]; - - [self.presenter moveListItem:listItemToMove toIndex:listItemDestinationIndex]; -} - -- (void)testMoveListItemBelowListItemAfterUndo { - NSInteger listItemToRemoveIndex = 3; - NSInteger listItemDestinationIndex = 4; - AAPLListItem *listItemToRemove = self.presentedListItems[listItemToRemoveIndex]; - - [self.presenter moveListItem:listItemToRemove toIndex:listItemDestinationIndex]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Make sure the underlying list is back to its initial state. - XCTAssertEqualObjects(self.presentedListItems, self.presenter.presentedListItems, @"The list should be the same after a change + undo."); - - NSInteger didMoveListItemCallbackCount = self.testHelper.didMoveListItemCallbacks.count; - - XCTAssertEqual(didMoveListItemCallbackCount, 1, @"One move should occur after the undo."); - - if (didMoveListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *moveInfo = self.testHelper.didMoveListItemCallbacks.firstObject; - - XCTAssertEqualObjects(moveInfo.listItem, listItemToRemove, @"The moved item should be the item we initially moved."); - XCTAssertEqual(moveInfo.fromIndex, listItemDestinationIndex, @"`fromIndex` should be the same as the list item's initial destination index."); - XCTAssertEqual(moveInfo.toIndex, listItemToRemoveIndex, @"`toIndex` should be the same as the list item's initial index."); - }]; - - [self.undoManager undo]; -} - -#pragma mark - -toggleListItem: - -- (void)testToggleIncompleteListItem { - AAPLListItem *incompleteListItem = self.initiallyIncompleteListItems[1]; - NSInteger expectedFromIndex = 1; - NSInteger expectedToIndex = self.initialListItemCount - 1; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Test for item toggling. - NSInteger didMoveListItemCallbackCount = self.testHelper.didMoveListItemCallbacks.count; - XCTAssertEqual(didMoveListItemCallbackCount, 1, @"There should be one \"move\" callback."); - - if (didMoveListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *moveInfo = self.testHelper.didMoveListItemCallbacks.firstObject; - - XCTAssertEqualObjects(moveInfo.listItem, incompleteListItem, @"The delegate should receive the \"move\" callback with the toggled list item."); - XCTAssertEqual(moveInfo.fromIndex, expectedFromIndex, @"The delegate should move the item from the right start index."); - XCTAssertEqual(moveInfo.toIndex, expectedToIndex, @"The delegate should move the item to the right end index."); - - // Test for item updating. - NSInteger didUpdateListItemCallbackCount = self.testHelper.didUpdateListItemCallbacks.count; - XCTAssertEqual(didUpdateListItemCallbackCount, 1, @"There should be one \"update\" callback."); - - if (didUpdateListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *updateInfo = self.testHelper.didUpdateListItemCallbacks.firstObject; - - XCTAssertEqualObjects(updateInfo.listItem, incompleteListItem, @"The delegate should receive the \"update\" callback with the toggled list item."); - - XCTAssertTrue(incompleteListItem.isComplete, @"The item should be complete after the toggle."); - XCTAssertEqual(updateInfo.index, expectedToIndex, @"The item should be updated in place."); - }]; - - [self.presenter toggleListItem:incompleteListItem]; -} - -- (void)testToggleCompleteListItem { - AAPLListItem *completeListItem = self.initiallyCompleteListItems[2]; - - NSInteger expectedFromIndex = [self.presentedListItems indexOfObject:completeListItem]; - NSInteger expectedToIndex = 0; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Test for item moving. - NSInteger didMoveListItemCallbackCount = self.testHelper.didMoveListItemCallbacks.count; - XCTAssertEqual(didMoveListItemCallbackCount, 1, @"There should be one \"move\" callback."); - - if (didMoveListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *moveInfo = self.testHelper.didMoveListItemCallbacks.firstObject; - - XCTAssertEqualObjects(moveInfo.listItem, completeListItem, @"The delegate should receive the \"move\" callback with the toggled list item."); - XCTAssertEqual(moveInfo.fromIndex, expectedFromIndex, @"The delegate should move the item from the right start index."); - XCTAssertEqual(moveInfo.toIndex, expectedToIndex, @"The delegate should move the item to the right end index."); - - // Test for item updating. - NSInteger didUpdateListItemCallbackCount = self.testHelper.didUpdateListItemCallbacks.count; - XCTAssertEqual(didUpdateListItemCallbackCount, 1, @"There should be one \"update\" callback."); - - if (didUpdateListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *updateInfo = self.testHelper.didUpdateListItemCallbacks.firstObject; - - XCTAssertEqual(updateInfo.listItem, completeListItem, @"The delegate should receive the \"update\" callback with the toggled list item."); - XCTAssertFalse(completeListItem.isComplete, @"The item should be incomplete after the toggle."); - XCTAssertEqual(updateInfo.index, expectedToIndex, "@The item should be updated in place."); - }]; - - [self.presenter toggleListItem:completeListItem]; -} - -- (void)testToggleListItemAfterUndo { - AAPLListItem *listItem = self.presentedListItems[2]; - - NSInteger expectedFromIndex = [self.presentedListItems indexOfObject:listItem]; - NSInteger expectedToIndex = 0; - - [self.presenter toggleListItem:listItem]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Test for item moving. - NSInteger didMoveListItemCallbackCount = self.testHelper.didMoveListItemCallbacks.count; - XCTAssertEqual(didMoveListItemCallbackCount, 1, @"There should be one \"move\" callback."); - - if (didMoveListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *moveInfo = self.testHelper.didMoveListItemCallbacks.firstObject; - - XCTAssertEqualObjects(moveInfo.listItem, listItem, @"The delegate should receive the \"move\" callback with the toggled list item."); - XCTAssertEqual(moveInfo.fromIndex, expectedToIndex, @"The delegate should move the item from the right start index."); - XCTAssertEqual(moveInfo.toIndex, expectedFromIndex, @"The delegate should move the item to the right end index."); - - // Test for item updating. - NSInteger didUpdateListItemCallbackCount = self.testHelper.didUpdateListItemCallbacks.count; - XCTAssertEqual(didUpdateListItemCallbackCount, 1, "There should be one \"update\" callback."); - - if (didUpdateListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *updateInfo = self.testHelper.didUpdateListItemCallbacks.firstObject; - - XCTAssertEqualObjects(updateInfo.listItem, listItem, @"The delegate should receive the \"update\" callback with the toggled list item."); - XCTAssertTrue(listItem.isComplete, @"The item should be complete after the toggle."); - XCTAssertEqual(updateInfo.index, expectedFromIndex, @"The item should be updated in place."); - }]; - - [self.undoManager undo]; -} - -#pragma mark - -updateListItem:withText: - -- (void)testUpdateListItemWithText { - NSInteger listItemIndex = 2; - AAPLListItem *listItem = self.presentedListItems[listItemIndex]; - - NSString *newText = @"foo bar baz qux"; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didUpdateListItemCallbackCount = self.testHelper.didUpdateListItemCallbacks.count; - XCTAssertEqual(didUpdateListItemCallbackCount, 1, @"There should be one \"update\" callback."); - - if (didUpdateListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *updateInfo = self.testHelper.didUpdateListItemCallbacks.firstObject; - - XCTAssertEqualObjects(updateInfo.listItem, listItem, @"The update list item should be the same as our provided list item."); - XCTAssertEqual(updateInfo.index, listItemIndex, @"The update should be an in-place update."); - XCTAssertEqual(listItem.text, newText, @"The text should be updated."); - }]; - - [self.presenter updateListItem:listItem withText:newText]; -} - -- (void)testUpdateListItemWithTextAfterUndo { - NSInteger listItemIndex = 2; - AAPLListItem *listItem = self.presentedListItems[listItemIndex]; - NSString *initialListItemText = listItem.text; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSInteger didUpdateListItemCallbackCount = self.testHelper.didUpdateListItemCallbacks.count; - XCTAssertEqual(didUpdateListItemCallbackCount, 1, "There should be one \"update\" callback."); - - if (didUpdateListItemCallbackCount != 2) { - return; - } - - AAPLListPresenterCallbackInfo *updateInfo = self.testHelper.didUpdateListItemCallbacks[1]; - - XCTAssertEqualObjects(updateInfo.listItem, listItem, @"The update list item should be the same as our provided list item."); - XCTAssertEqual(updateInfo.index, listItemIndex, @"The update should be an in-place update."); - XCTAssertEqual(listItem.text, initialListItemText, @"The text should be updated to its initial value."); - }]; - - [self.undoManager undo]; -} - -#pragma mark - -updatePresentedListItemsToCompletionState: - -- (void)testUpdatePresentedListItemsToCompletionState { - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - XCTAssertEqual(self.testHelper.didUpdateListItemCallbacks.count, self.initiallyIncompleteListItems.count, @"There should be one \"event\" per incomplete, presented item."); - - for (AAPLListPresenterCallbackInfo *updateInfo in self.testHelper.didUpdateListItemCallbacks) { - NSInteger indexOfUpdatedListItem = [self.presentedListItems indexOfObject:updateInfo.listItem]; - - if (indexOfUpdatedListItem == NSNotFound) { - XCTFail(@"One of the updated list items was never supposed to be in the list."); - } - else { - XCTAssertEqual(updateInfo.index, indexOfUpdatedListItem, @"The updated index should be the same as the initial index."); - - XCTAssertTrue(updateInfo.listItem.isComplete, @"The item should be complete after the update."); - } - } - }]; - - [self.presenter updatePresentedListItemsToCompletionState:YES]; -} - -- (void)testUpdatePresentedListItemsToCompletionStateAfterUndo { - [self.presenter updatePresentedListItemsToCompletionState:YES]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - NSArray *presentedListItemsCopy = [[NSArray alloc] initWithArray:self.presentedListItems copyItems:YES]; - - XCTAssertEqual(self.testHelper.didUpdateListItemCallbacks.count, self.initiallyIncompleteListItems.count, @"The undo should perform \(self.presentedListItems.count) updates to revert the previous update for each modified item."); - - for (AAPLListPresenterCallbackInfo *updateInfo in self.testHelper.didUpdateListItemCallbacks) { - NSInteger indexOfUpdatedListItem = [presentedListItemsCopy indexOfObject:updateInfo.listItem]; - - if (indexOfUpdatedListItem == NSNotFound) { - XCTFail(@"One of the updated list items was never supposed to be in the list."); - } - else { - AAPLListItem *listItemCopy = presentedListItemsCopy[indexOfUpdatedListItem]; - - XCTAssertEqual(updateInfo.index, indexOfUpdatedListItem, @"The updated index should be the same as the initial index."); - - XCTAssertEqualObjects(updateInfo.listItem, listItemCopy, @"The item should be the same as the initial item after the update."); - } - } - }]; - - [self.undoManager undo]; -} - -@end diff --git a/Lister/Objective-C/ListerKit Tests/AAPLIncompleteListItemsPresenterTests.m b/Lister/Objective-C/ListerKit Tests/AAPLIncompleteListItemsPresenterTests.m deleted file mode 100644 index bb4c3daf..00000000 --- a/Lister/Objective-C/ListerKit Tests/AAPLIncompleteListItemsPresenterTests.m +++ /dev/null @@ -1,194 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The test case class for the \c AAPLIncompleteListItemsPresenter class. -*/ - -@import ListerKit; -@import XCTest; - -#import "AAPLListPresenterTestHelper.h" - -@interface AAPLIncompleteListItemsPresenterTests : XCTestCase - -@property AAPLIncompleteListItemsPresenter *presenter; - -@property AAPLList *list; - -@property (copy) NSArray *initiallyIncompleteListItems; - -@property (copy) NSArray *initiallyCompleteListItems; - -@property (readonly, copy) NSArray *presentedListItems; - -@property AAPLListPresenterTestHelper *testHelper; - -@end - - -@implementation AAPLIncompleteListItemsPresenterTests - -#pragma mark - Property Accessors - -- (NSArray *)presentedListItems { - NSArray *allListItems = [self.initiallyIncompleteListItems arrayByAddingObjectsFromArray:self.initiallyCompleteListItems]; - - NSPredicate *filterPredicate = [NSPredicate predicateWithFormat:@"isComplete == NO"]; - - return [allListItems filteredArrayUsingPredicate:filterPredicate]; -} - -#pragma mark - XCTest Life Time - -- (void)setUp { - self.initiallyIncompleteListItems = @[ - [[AAPLListItem alloc] initWithText:@"0" complete:NO], - [[AAPLListItem alloc] initWithText:@"1" complete:NO], - [[AAPLListItem alloc] initWithText:@"2" complete:NO], - [[AAPLListItem alloc] initWithText:@"3" complete:NO] - ]; - - self.initiallyCompleteListItems = @[ - [[AAPLListItem alloc] initWithText:@"4" complete:YES], - [[AAPLListItem alloc] initWithText:@"5" complete:YES], - [[AAPLListItem alloc] initWithText:@"6" complete:YES], - ]; - - self.list = [[AAPLList alloc] initWithColor:AAPLListColorGreen items:self.presentedListItems]; - - self.presenter = [[AAPLIncompleteListItemsPresenter alloc] init]; - - [self.presenter setList:self.list]; - - self.testHelper = [[AAPLListPresenterTestHelper alloc] init]; - - self.presenter.delegate = self.testHelper; -} - -#pragma mark - Test Initializers - -- (void)testItemInitializationWithIncompleteAndCompleteListItems { - XCTAssertEqualObjects(self.presenter.presentedListItems, self.initiallyIncompleteListItems, @"Only the incomplete items should be presented."); -} - -#pragma mark - archiveableList - -- (void)testArchiveableListWithIncompleteAndCompleteItemsAfterToggle { - NSInteger indexOfListItemToToggle = 2; - AAPLListItem *listItemToToggle = self.presenter.presentedListItems[indexOfListItemToToggle]; - - /** - Create a list that represents what should be the final archiveable list. We will compare this list - against the presenter's `archiveableList`. - */ - AAPLList *expectedList = [self.list copy]; - AAPLListItem *expectedChangeListItem = expectedList.items[indexOfListItemToToggle]; - expectedChangeListItem.complete = !expectedChangeListItem.isComplete; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Check the archiveable list against the expected list we created. - XCTAssertEqualObjects(self.presenter.archiveableList, expectedList, @"The `archiveableList` from the presenter should match our expected list."); - }]; - - // Perform the toggle. No need to worry about the side affects of the toggle. - [self.presenter toggleListItem:listItemToToggle]; -} - -#pragma mark - color - -- (void)testSetColorWithDifferentColor { - AAPLListColor newColor = AAPLListColorOrange; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - XCTAssertEqual(self.presenter.color, newColor, @"The getter for the color should return the new color."); - - NSInteger didUpdateListColorCallbackCount = self.testHelper.didUpdateListColorCallbacks.count; - XCTAssertEqual(didUpdateListColorCallbackCount, 1, @"There should be one \"list color update\" callback."); - - if (didUpdateListColorCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *updatedColorInfo = self.testHelper.didUpdateListColorCallbacks.firstObject; - XCTAssertEqual(updatedColorInfo.color, newColor, @"The delegate callback should provide the new color."); - }]; - - self.presenter.color = newColor; -} - -#pragma mark - -toggleListItem: - -- (void)testToggleIncompleteListItem { - AAPLListItem *incompleteListItem = self.initiallyIncompleteListItems[1]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Test for item updating. - NSInteger didUpdateListItemCallbackCount = self.testHelper.didUpdateListItemCallbacks.count; - XCTAssertEqual(didUpdateListItemCallbackCount, 1, @"There should be one \"update\" callback."); - - if (didUpdateListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *updateInfo = self.testHelper.didUpdateListItemCallbacks.firstObject; - - XCTAssertEqualObjects(updateInfo.listItem, incompleteListItem, @"The delegate should receive the \"update\" callback with the toggled list item."); - - XCTAssertTrue(incompleteListItem.isComplete, @"The item should be complete after the toggle."); - XCTAssertEqual(updateInfo.index, 1, @"The item should be updated in place."); - }]; - - [self.presenter toggleListItem:incompleteListItem]; -} - -- (void)testToggleCompleteListItem { - [self.presenter updatePresentedListItemsToCompletionState:NO]; - - NSInteger completeListItemIndex = 1; - AAPLListItem *completeListItem = self.presenter.presentedListItems[completeListItemIndex]; - - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - // Test for item updating. - NSInteger didUpdateListItemCallbackCount = self.testHelper.didUpdateListItemCallbacks.count; - XCTAssertEqual(didUpdateListItemCallbackCount, 1, "There should be one \"update\" callback."); - - if (didUpdateListItemCallbackCount != 1) { - return; - } - - AAPLListPresenterCallbackInfo *updateInfo = self.testHelper.didUpdateListItemCallbacks.firstObject; - - XCTAssertEqualObjects(updateInfo.listItem, completeListItem, @"The delegate should receive the \"update\" callback with the toggled list item."); - XCTAssertTrue(completeListItem.isComplete, "The item should be complete after the toggle."); - XCTAssertEqual(updateInfo.index, completeListItemIndex, "The item should be updated in place."); - }]; - - [self.presenter toggleListItem:completeListItem]; -} - -#pragma mark - -updatePresentedListItemsToCompletionState: - -- (void)testUpdatePresentedListItemsToCompletionState { - [self.testHelper whenNextChangeOccursPerformAssertions:^{ - XCTAssertEqual(self.testHelper.didUpdateListItemCallbacks.count, self.initiallyIncompleteListItems.count, @"There should be one \"event\" per incomplete, presented item."); - - for (AAPLListPresenterCallbackInfo *updateInfo in self.testHelper.didUpdateListItemCallbacks) { - NSInteger indexOfUpdatedListItem = [self.presentedListItems indexOfObject:updateInfo.listItem]; - - if (indexOfUpdatedListItem == NSNotFound) { - XCTFail(@"One of the updated list items was never supposed to be in the list."); - } - else { - XCTAssertEqual(updateInfo.index, indexOfUpdatedListItem, @"The updated index should be the same as the initial index."); - - XCTAssertTrue(updateInfo.listItem.isComplete, @"The item should be complete after the update."); - } - } - }]; - - [self.presenter updatePresentedListItemsToCompletionState:YES]; -} - -@end diff --git a/Lister/Objective-C/ListerKit Tests/AAPLListItemTests.m b/Lister/Objective-C/ListerKit Tests/AAPLListItemTests.m deleted file mode 100644 index 0f3956ac..00000000 --- a/Lister/Objective-C/ListerKit Tests/AAPLListItemTests.m +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The test case class for the \c AAPLListItem class. -*/ - -@import ListerKit; -@import XCTest; - -@interface AAPLListItemTests : XCTestCase - -@property (nonatomic, strong) AAPLListItem *item; - -@end - -@implementation AAPLListItemTests - -#pragma mark - Setup - -- (void)setUp { - [super setUp]; - - self.item = [[AAPLListItem alloc] initWithText:@"foo"]; -} - -#pragma mark - Initialization - -- (void)testConvenienceTextAndCompleteInit { - NSString *text = @"foo"; - BOOL complete = YES; - - AAPLListItem *item = [[AAPLListItem alloc] initWithText:text complete:complete]; - - XCTAssertEqualObjects(item.text, text); - XCTAssertEqual(item.isComplete, complete); -} - -- (void)testConvenienceTextInit { - NSString *text = @"foo"; - - AAPLListItem *item = [[AAPLListItem alloc] initWithText:text]; - - XCTAssertEqualObjects(item.text, text); - - // The default value for the complete state should be false. - XCTAssertFalse(item.isComplete); -} - -#pragma mark - NSCopying - -- (void)testCopyingListItems { - AAPLListItem *itemCopy = [self.item copy]; - - XCTAssertEqualObjects(self.item, itemCopy); -} - -#pragma mark - NSCoding - -- (void)testEncodingListItems { - NSData *archivedListItemData = [NSKeyedArchiver archivedDataWithRootObject:self.item]; - - XCTAssertTrue(archivedListItemData.length > 0); -} - -- (void)testDecodingListItems { - NSData *archivedListItemData = [NSKeyedArchiver archivedDataWithRootObject:self.item]; - - AAPLListItem *unarchivedListItem = [NSKeyedUnarchiver unarchiveObjectWithData:archivedListItemData]; - - XCTAssertEqualObjects(unarchivedListItem, self.item); -} - -#pragma mark - -refereshIdentity - -- (void)testRefreshIdentity { - AAPLListItem *itemCopy = [self.item copy]; - - XCTAssertEqualObjects(itemCopy, self.item); - - [self.item refreshIdentity]; - - XCTAssertNotEqualObjects(itemCopy, self.item); -} - -#pragma mark - -isEqual: - -- (void)testIsEqual { - // -isEqual: should be strictly based of the underlying UUID of the list item. - - AAPLListItem *itemTwo = [[AAPLListItem alloc] initWithText:@"foo"]; - - XCTAssertNotEqualObjects(self.item, nil); - XCTAssertEqualObjects(self.item, self.item); - XCTAssertNotEqualObjects(self.item, itemTwo); -} - -@end diff --git a/Lister/Objective-C/ListerKit Tests/AAPLListPresenterTestHelper.h b/Lister/Objective-C/ListerKit Tests/AAPLListPresenterTestHelper.h deleted file mode 100644 index a9f33b81..00000000 --- a/Lister/Objective-C/ListerKit Tests/AAPLListPresenterTestHelper.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A class that makes it easier to test \c AAPLListPresenting instance implementations. -*/ - -@import Foundation; -#import "AAPLList.h" -#import "AAPLListPresenterDelegate.h" - -@interface AAPLListPresenterTestHelper : NSObject - -/// An array of \c AAPLListPresenterCallbackInfo objects of the inserted list items. -@property (copy) NSArray *didInsertListItemCallbacks; - -/// An array of \c AAPLListPresenterCallbackInfo objects of the removed list items. -@property (copy) NSArray *didRemoveListItemCallbacks; - -/// An array of \c AAPLListPresenterCallbackInfo objects of the updated list items. -@property (copy) NSArray *didUpdateListItemCallbacks; - -/// An array of \c AAPLListPresenterCallbackInfo objects of the moved list items. -@property (copy) NSArray *didMoveListItemCallbacks; - -/// An array of \c AAPLListPresenterCallbackInfo objects of the updates to the list presenter's color. -@property (copy) NSArray *didUpdateListColorCallbacks; - -/// A helper method run \c assertions once a batch of changes has occured to the list presenter. -- (void)whenNextChangeOccursPerformAssertions:(void (^)(void))assertions; - -@end - -/// A model class that contains information provided by the \c AAPLListPresenterTestHelper object. -@interface AAPLListPresenterCallbackInfo : NSObject - -@property AAPLListItem *listItem; - -@property NSInteger index; - -@property NSInteger fromIndex; -@property NSInteger toIndex; - -@property AAPLListColor color; - -@end diff --git a/Lister/Objective-C/ListerKit Tests/AAPLListPresenterTestHelper.m b/Lister/Objective-C/ListerKit Tests/AAPLListPresenterTestHelper.m deleted file mode 100644 index 5b02dba2..00000000 --- a/Lister/Objective-C/ListerKit Tests/AAPLListPresenterTestHelper.m +++ /dev/null @@ -1,204 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A class that makes it easier to test \c AAPLListPresenting instance implementations. -*/ - -#import "AAPLListPresenterTestHelper.h" - -@implementation AAPLListPresenterCallbackInfo - -- (instancetype)initWithListItem:(AAPLListItem *)listItem index:(NSInteger)index { - self = [super init]; - - if (self) { - _listItem = listItem; - - _index = index; - - _fromIndex = NSNotFound; - - _toIndex = NSNotFound; - } - - return self; -} - -- (instancetype)initWithListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex { - self = [super init]; - - if (self) { - _listItem = listItem; - - _fromIndex = fromIndex; - - _toIndex = toIndex; - - _index = NSNotFound; - } - - return self; -} - -- (instancetype)initWithColor:(AAPLListColor)color { - self = [super init]; - - if (self) { - _color = color; - - _index = NSNotFound; - _fromIndex = NSNotFound; - _toIndex = NSNotFound; - } - - return self; -} - -@end - -@interface AAPLListPresenterTestHelper () - -@property NSInteger remainingExpectedWillChanges; -@property NSInteger remainingExpectedDidChanges; - -@property NSInteger willChangeCallbackCount; -@property NSInteger didChangeCallbackCount; - -@property (copy) void (^assertions)(void); - -@property (getter=isTesting) BOOL testing; - -@end - -@implementation AAPLListPresenterTestHelper - -- (instancetype)init { - self = [super init]; - - if (self) { - _testing = NO; - - _willChangeCallbackCount = NSNotFound; - _didChangeCallbackCount = NSNotFound; - - _remainingExpectedWillChanges = NSNotFound; - _remainingExpectedDidChanges = NSNotFound; - - _didInsertListItemCallbacks = [NSArray array]; - _didRemoveListItemCallbacks = [NSArray array]; - _didUpdateListItemCallbacks = [NSArray array]; - _didMoveListItemCallbacks = [NSArray array]; - _didUpdateListColorCallbacks = [NSArray array]; - } - - return self; -} - -#pragma mark - AAPLListPresenterDelegate - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - // Lister's tests currently do not support testing and `-listPresenterDidRefreshCompleteLayout:` calls. -} - -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - if (!self.isTesting) { - return; - } - - if (self.remainingExpectedWillChanges != NSNotFound) { - self.remainingExpectedWillChanges--; - } - - self.willChangeCallbackCount--; -} - -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - if (!self.isTesting) { - return; - } - - AAPLListPresenterCallbackInfo *didInsertListItemCallback = [[AAPLListPresenterCallbackInfo alloc] initWithListItem:listItem index:index]; - - [[self mutableArrayValueForKey:@"didInsertListItemCallbacks"] addObject:didInsertListItemCallback]; -} - -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - if (!self.isTesting) { - return; - } - - AAPLListPresenterCallbackInfo *didRemoveListItemCallback = [[AAPLListPresenterCallbackInfo alloc] initWithListItem:listItem index:index]; - - [[self mutableArrayValueForKey:@"didRemoveListItemCallbacks"] addObject:didRemoveListItemCallback]; -} - -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - if (!self.isTesting) { - return; - } - - AAPLListPresenterCallbackInfo *didUpdateListItemCallback = [[AAPLListPresenterCallbackInfo alloc] initWithListItem:listItem index:index]; - - [[self mutableArrayValueForKey:@"didUpdateListItemCallbacks"] addObject:didUpdateListItemCallback]; -} - -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex { - if (!self.isTesting) { - return; - } - - AAPLListPresenterCallbackInfo *didMoveListItemCallback = [[AAPLListPresenterCallbackInfo alloc] initWithListItem:listItem fromIndex:fromIndex toIndex:toIndex]; - - [[self mutableArrayValueForKey:@"didMoveListItemCallbacks"] addObject:didMoveListItemCallback]; -} - -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color { - if (!self.isTesting) { - return; - } - - AAPLListPresenterCallbackInfo *didUpdateListColorCallback = [[AAPLListPresenterCallbackInfo alloc] initWithColor:color]; - - [[self mutableArrayValueForKey:@"didUpdateListColorCallbacks"] addObject:didUpdateListColorCallback]; -} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - if (!self.isTesting) { - return; - } - - if (self.remainingExpectedWillChanges != NSNotFound) { - self.remainingExpectedWillChanges--; - } - - self.didChangeCallbackCount++; - - if (self.remainingExpectedDidChanges == 0) { - self.assertions(); - - self.testing = NO; - } -} - -- (void)whenNextChangeOccursPerformAssertions:(void (^)(void))assertions { - self.testing = YES; - - self.assertions = assertions; - - self.willChangeCallbackCount = 0; - - self.didInsertListItemCallbacks = @[]; - self.didRemoveListItemCallbacks = @[]; - self.didUpdateListColorCallbacks = @[]; - self.didMoveListItemCallbacks = @[]; - self.didUpdateListColorCallbacks = @[]; - self.didChangeCallbackCount = 0; - self.remainingExpectedDidChanges = 0; - - self.remainingExpectedWillChanges = 0; - self.remainingExpectedDidChanges = 0; -} - -@end diff --git a/Lister/Objective-C/ListerKit Tests/AAPLListTests.m b/Lister/Objective-C/ListerKit Tests/AAPLListTests.m deleted file mode 100644 index 782ec3c1..00000000 --- a/Lister/Objective-C/ListerKit Tests/AAPLListTests.m +++ /dev/null @@ -1,105 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The test case class for the \c AAPLList class. -*/ - -@import ListerKit; -@import XCTest; - -@interface AAPLListTests : XCTestCase - -/// \c items is initialized in \c -setUp. -@property (nonatomic, copy) NSArray *items; - -/// \c color is initialized in \c -setUp. -@property AAPLListColor color; - -/// Initialized in \c -setUp. -@property (nonatomic, strong) AAPLList *list; - -@end - -@implementation AAPLListTests - -#pragma mark - Setup - -- (void)setUp { - [super setUp]; - - self.color = AAPLListColorGreen; - - self.items = @[ - [[AAPLListItem alloc] initWithText:@"zero" complete:NO], - [[AAPLListItem alloc] initWithText:@"one" complete:NO], - [[AAPLListItem alloc] initWithText:@"two" complete:NO], - [[AAPLListItem alloc] initWithText:@"three" complete:YES], - [[AAPLListItem alloc] initWithText:@"four" complete:YES], - [[AAPLListItem alloc] initWithText:@"five" complete:YES] - ]; - - self.list = [[AAPLList alloc] initWithColor:self.color items:self.items]; -} - -#pragma mark - Initialization - -- (void)testDefautInitializer { - AAPLList *list = [[AAPLList alloc] initWithColor:AAPLListColorGray items:@[]]; - - XCTAssertEqual(list.color, AAPLListColorGray); - XCTAssertTrue(list.items.count == 0); -} - -- (void)testColorAndItemsDesignatedInitializer { - XCTAssertEqual(self.list.color, self.color); - XCTAssertTrue([self.list.items isEqualToArray:self.items]); -} - -- (void)testColorAndItemsDesignatedInitializerCopiesItems { - [self.list.items enumerateObjectsUsingBlock:^(AAPLListItem *item, NSUInteger idx, BOOL *stop) { - XCTAssertEqualObjects(item, self.items[idx]); - }]; -} - -#pragma mark - NSCopying - -- (void)testCopyingLists { - AAPLList *listCopy = [self.list copy]; - - XCTAssertNotNil(listCopy); - XCTAssertEqualObjects(self.list, listCopy); -} - -#pragma mark - NSCoding - -- (void)testEncodingLists { - NSData *archivedListData = [NSKeyedArchiver archivedDataWithRootObject:self.list]; - - XCTAssertTrue(archivedListData.length > 0); -} - -- (void)testDecodingLists { - NSData *archivedListData = [NSKeyedArchiver archivedDataWithRootObject:self.list]; - - AAPLList *unarchivedList = [NSKeyedUnarchiver unarchiveObjectWithData:archivedListData]; - - XCTAssertNotNil(unarchivedList); - XCTAssertEqualObjects(self.list, unarchivedList); -} - -#pragma mark - Equality - -- (void)testIsEqual { - AAPLList *listOne = [[AAPLList alloc] initWithColor:AAPLListColorGray items:self.items]; - AAPLList *listTwo = [[AAPLList alloc] initWithColor:AAPLListColorGray items:self.items]; - AAPLList *listThree = [[AAPLList alloc] initWithColor:AAPLListColorGreen items:self.items]; - AAPLList *listFour = [[AAPLList alloc] initWithColor:AAPLListColorGray items:@[]]; - - XCTAssertEqualObjects(listOne, listTwo); - XCTAssertNotEqualObjects(listTwo, listThree); - XCTAssertNotEqualObjects(listTwo, listFour); -} - -@end diff --git a/Lister/Objective-C/ListerKit Tests/OS X/Info.plist b/Lister/Objective-C/ListerKit Tests/OS X/Info.plist deleted file mode 100644 index 6d32c15c..00000000 --- a/Lister/Objective-C/ListerKit Tests/OS X/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Lister/Objective-C/ListerKit Tests/iOS/Info.plist b/Lister/Objective-C/ListerKit Tests/iOS/Info.plist deleted file mode 100644 index 6d32c15c..00000000 --- a/Lister/Objective-C/ListerKit Tests/iOS/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Lister/Objective-C/ListerKit/AAPLCheckBox.h b/Lister/Objective-C/ListerKit/AAPLCheckBox.h deleted file mode 100644 index de4c7673..00000000 --- a/Lister/Objective-C/ListerKit/AAPLCheckBox.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A custom check box used in the lists. It supports designing live in Interface Builder. -*/ - -@import UIKit; - -IB_DESIGNABLE -@interface AAPLCheckBox : UIControl - -@property (nonatomic, getter=isChecked) IBInspectable BOOL checked; - -@property (nonatomic) IBInspectable CGFloat strokeFactor; -@property (nonatomic) IBInspectable CGFloat insetFactor; -@property (nonatomic) IBInspectable CGFloat markInsetFactor; - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLCheckBox.m b/Lister/Objective-C/ListerKit/AAPLCheckBox.m deleted file mode 100644 index f5d11ddd..00000000 --- a/Lister/Objective-C/ListerKit/AAPLCheckBox.m +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A custom check box for use in the lists, it supports designing live in IB. -*/ - -#import "AAPLCheckbox.h" -#import "AAPLCheckBoxLayer.h" - -@interface AAPLCheckBox() - -@property (readonly) AAPLCheckBoxLayer *checkBoxLayer; - -@end - -@implementation AAPLCheckBox - -#pragma mark - Overrides - -+ (Class)layerClass { - return [AAPLCheckBoxLayer class]; -} - -- (void)tintColorDidChange { - [super tintColorDidChange]; - - self.checkBoxLayer.tintColor = self.tintColor.CGColor; -} - -#pragma mark - Property Overrides - -- (void)didMoveToWindow { - if (self.window != nil) { - self.contentScaleFactor = self.window.screen.scale; - } -} - -- (void)setChecked:(BOOL)checked { - self.checkBoxLayer.checked = checked; -} - -- (BOOL)isChecked { - return self.checkBoxLayer.isChecked; -} - -- (void)setStrokeFactor:(CGFloat)strokeFactor { - self.checkBoxLayer.strokeFactor = strokeFactor; -} - -- (CGFloat)strokeFactor { - return self.checkBoxLayer.strokeFactor; -} - -- (void)setInsetFactor:(CGFloat)insetFactor { - self.checkBoxLayer.insetFactor = insetFactor; -} - -- (CGFloat)insetFactor { - return self.insetFactor; -} - -- (void)setMarkInsetFactor:(CGFloat)markInsetFactor { - self.checkBoxLayer.markInsetFactor = markInsetFactor; -} - -- (CGFloat)markInsetFactor { - return self.checkBoxLayer.markInsetFactor; -} - -#pragma mark - Convenience - -- (AAPLCheckBoxLayer *)checkBoxLayer { - return (AAPLCheckBoxLayer *)self.layer; -} - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLCloudListCoordinator.h b/Lister/Objective-C/ListerKit/AAPLCloudListCoordinator.h deleted file mode 100644 index 72c2f1a8..00000000 --- a/Lister/Objective-C/ListerKit/AAPLCloudListCoordinator.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLCloudListCoordinator class handles querying for and interacting with lists stored as files in iCloud Drive. -*/ - -@import Foundation; -#import "AAPLListCoordinator.h" - -/*! - An object that conforms to the \c AAPLListCoordinator protocol and is responsible for implementing - entry points in order to communicate with an \c AAPLListCoordinatorDelegate. In the case of Lister, - this is the \c AAPLListsController instance. The main responsibility of a \c AAPLListCoordinator is - to track different \c NSURL instances that are important. The iCloud coordinator is responsible for - making sure that the \c AAPLListsController knows about the current set of iCloud documents that are - available. - - There are also other responsibilities that an \c AAPLListCoordinator must have that are specific - to the underlying storage mechanism of the coordinator. An \c AAPLListCoordinator determines whether - or not a new list can be created with a specific name, it removes URLs tied to a specific list, and - it is also responsible for listening for updates to any changes that occur at a specific URL - (e.g. a list document is updated on another device, etc.). - - Instances of \c AAPLListCoordinator can search for URLs in an asynchronous way. When a new \c NSURL - instance is found, removed, or updated, the \c AAPLListCoordinator instance must make its delegate - aware of the updates. If a failure occured in removing or creating an \c NSURL for a given list, - it must make its delegate aware by calling one of the appropriate error methods defined in the - \c AAPLListCoordinatorDelegate protocol. - */ -@interface AAPLCloudListCoordinator : NSObject - -/*! - Initializes an \c AAPLCloudListCoordinator based on a path extension used to identify files that can be - managed by the app. Also provides a block parameter that can be used to provide actions to be executed - when the coordinator returns its first set of documents. This coordinator monitors the app's iCloud Drive - container. - - @param pathExtension The extension that should be used to identify documents of interest to this coordinator. - @param firstQueryUpdateHandler The handler that is executed once the first results are returned. - */ -- (instancetype)initWithPathExtension:(NSString *)pathExtension firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler; - -/*! - Initializes an \c AAPLCloudListCoordinator based on a single document used to identify a file that should - be monitored. Also provides a block parameter that can be used to provide actions to be executed when the - coordinator returns its initial result. This coordinator monitors the app's iCloud Drive container. - - @param lastPathComponent The file name that should be monitored by this coordinator. - @param firstQueryUpdateHandler The handler that is executed once the first results are returned. - */ -- (instancetype)initWithLastPathComponent:(NSString *)lastPathComponent firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler; - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLCloudListCoordinator.m b/Lister/Objective-C/ListerKit/AAPLCloudListCoordinator.m deleted file mode 100644 index 12495ee1..00000000 --- a/Lister/Objective-C/ListerKit/AAPLCloudListCoordinator.m +++ /dev/null @@ -1,247 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLCloudListCoordinator class handles querying for and interacting with lists stored as files in iCloud Drive. -*/ - -#import "AAPLCloudListCoordinator.h" -#import "AAPLListUtilities.h" -#import "AAPLAppConfiguration.h" - -@interface AAPLCloudListCoordinator () - -@property (nonatomic, strong) NSMetadataQuery *metadataQuery; -@property (nonatomic, strong) dispatch_queue_t documentsDirectoryQueue; - -@property (nonatomic, strong) NSURL *documentsDirectory; - -/// Closure executed after the first update provided by the coordinator regarding tracked URLs. -@property (nonatomic, strong) void (^firstQueryUpdateHandler)(void); - -@end - -@implementation AAPLCloudListCoordinator -@synthesize delegate = _delegate; -@synthesize documentsDirectory = _documentsDirectory; - -#pragma mark - Initialization - -- (instancetype)initWithPredicate:(NSPredicate *)predicate firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler { - self = [super init]; - - if (self) { - _firstQueryUpdateHandler = firstQueryUpdateHandler; - _documentsDirectoryQueue = dispatch_queue_create("com.example.apple-samplecode.lister.cloudlistcoordinator.documentsDirectory", DISPATCH_QUEUE_SERIAL); - - _metadataQuery = [[NSMetadataQuery alloc] init]; - _metadataQuery.searchScopes = @[NSMetadataQueryUbiquitousDocumentsScope, NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope]; - - _metadataQuery.predicate = predicate; - _metadataQuery.operationQueue = [[NSOperationQueue alloc] init]; - _metadataQuery.operationQueue.name = @"com.example.apple-samplecode.lister.cloudlistcoordinator.metadataQuery"; - - dispatch_barrier_async(_documentsDirectoryQueue, ^{ - NSURL *cloudContainerURL = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; - - _documentsDirectory = [cloudContainerURL URLByAppendingPathComponent:@"Documents"]; - }); - - // Observe the query. - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - - [notificationCenter addObserver:self selector:@selector(metadataQueryDidFinishGathering:) name:NSMetadataQueryDidFinishGatheringNotification object:_metadataQuery]; - - [notificationCenter addObserver:self selector:@selector(metadataQueryDidUpdate:) name:NSMetadataQueryDidUpdateNotification object:_metadataQuery]; - } - - return self; -} - -- (instancetype)initWithPathExtension:(NSString *)pathExtension firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler { - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(%K.pathExtension = %@)", NSMetadataItemURLKey, pathExtension]; - - self = [self initWithPredicate:predicate firstQueryUpdateHandler:firstQueryUpdateHandler]; - - if (self) { - // No need for additional initialization. - } - - return self; -} - -- (instancetype)initWithLastPathComponent:(NSString *)lastPathComponent firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler { - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(%K.lastPathComponent = %@)", NSMetadataItemURLKey, lastPathComponent]; - - self = [self initWithPredicate:predicate firstQueryUpdateHandler:firstQueryUpdateHandler]; - - if (self) { - // No need for additional initialization. - } - - return self; -} - -#pragma mark - Lifetime - -- (void)dealloc { - // Stop observing the query. - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter removeObserver:self name:NSMetadataQueryDidFinishGatheringNotification object:self.metadataQuery]; - [notificationCenter removeObserver:self name:NSMetadataQueryDidUpdateNotification object:self.metadataQuery]; -} - -#pragma mark - Property Overrides - -- (NSURL *)documentsDirectory { - __block NSURL *documentsDirectory; - - dispatch_sync(self.documentsDirectoryQueue, ^{ - documentsDirectory = _documentsDirectory; - }); - - return documentsDirectory; -} - -#pragma mark - AAPLListCoordinator - -- (void)startQuery { - // \c NSMetadataQuery should always be started on the main thread. - dispatch_async(dispatch_get_main_queue(), ^{ - [self.metadataQuery startQuery]; - }); -} - -- (void)stopQuery { - // \c NSMetadataQuery should always be stopped on the main thread. - dispatch_async(dispatch_get_main_queue(), ^{ - [self.metadataQuery stopQuery]; - }); -} - -- (void)createURLForList:(AAPLList *)list withName:(NSString *)name { - NSURL *documentURL = [self documentURLForName:name]; - - [AAPLListUtilities createList:list atURL:documentURL withCompletionHandler:^(NSError *error) { - if (error) { - [self.delegate listCoordinatorDidFailCreatingListAtURL:documentURL withError:error]; - } - else { - [self.delegate listCoordinatorDidUpdateContentsWithInsertedURLs:@[documentURL] removedURLs:@[] updatedURLs:@[]]; - } - }]; -} - -- (BOOL)canCreateListWithName:(NSString *)name { - if (name.length <= 0) { - return NO; - } - - NSURL *documentURL = [self documentURLForName:name]; - - return ![[NSFileManager defaultManager] fileExistsAtPath:documentURL.path]; -} - -- (void)copyListFromURL:(NSURL *)URL toListWithName:(NSString *)name { - NSURL *documentURL = [self documentURLForName:name]; - - [AAPLListUtilities copyFromURL:URL toURL:documentURL]; -} - -- (void)removeListAtURL:(NSURL *)URL { - [AAPLListUtilities removeListAtURL:URL withCompletionHandler:^(NSError *error) { - if (error) { - [self.delegate listCoordinatorDidFailRemovingListAtURL:URL withError:error]; - } - else { - [self.delegate listCoordinatorDidUpdateContentsWithInsertedURLs:@[] removedURLs:@[URL] updatedURLs:@[]]; - } - }]; -} - -#pragma mark - NSMetadataQuery Notifications - -- (void)metadataQueryDidFinishGathering:(NSNotification *)notification { - [self.metadataQuery disableUpdates]; - - NSMutableArray *insertedURLs = [NSMutableArray arrayWithCapacity:self.metadataQuery.results.count]; - for (NSMetadataItem *metadataItem in self.metadataQuery.results) { - NSURL *insertedURL = [metadataItem valueForAttribute:NSMetadataItemURLKey]; - - [insertedURLs addObject:insertedURL]; - } - - [self.delegate listCoordinatorDidUpdateContentsWithInsertedURLs:insertedURLs removedURLs:@[] updatedURLs:@[]]; - - [self.metadataQuery enableUpdates]; - - if (self.firstQueryUpdateHandler) { - // Execute the `firstQueryUpdateHandler`, it will contain the closure from initialization on first update. - self.firstQueryUpdateHandler(); - - // Set `firstQueryUpdateHandler` to an empty closure so that the handler provided is only run on first update. - self.firstQueryUpdateHandler = nil; - } -} - -- (void)metadataQueryDidUpdate:(NSNotification *)notification { - [self.metadataQuery disableUpdates]; - - NSArray *insertedURLs; - NSArray *removedURLs; - NSArray *updatedURLs; - - NSArray *insertedMetadataItemsOrNil = notification.userInfo[NSMetadataQueryUpdateAddedItemsKey]; - if (insertedMetadataItemsOrNil) { - insertedURLs = [self URLsByMappingMetadataItems:insertedMetadataItemsOrNil]; - } - - NSArray *removedMetadataItemsOrNil = notification.userInfo[NSMetadataQueryUpdateRemovedItemsKey]; - if (removedMetadataItemsOrNil) { - removedURLs = [self URLsByMappingMetadataItems:removedMetadataItemsOrNil]; - } - - NSArray *updatedMetadataItemsOrNil = notification.userInfo[NSMetadataQueryUpdateChangedItemsKey]; - if (updatedMetadataItemsOrNil) { - NSIndexSet *indexesOfCompletelyDownloadedUpdatedMetadataItems = [updatedMetadataItemsOrNil indexesOfObjectsPassingTest:^BOOL(NSMetadataItem *updatedMetadataItem, NSUInteger idx, BOOL *stop) { - NSString *downloadStatus = [updatedMetadataItem valueForAttribute:NSMetadataUbiquitousItemDownloadingStatusKey]; - - return [downloadStatus isEqualToString:NSMetadataUbiquitousItemDownloadingStatusCurrent]; - }]; - - NSArray *completelyDownloadedUpdatedMetadataItems = [updatedMetadataItemsOrNil objectsAtIndexes:indexesOfCompletelyDownloadedUpdatedMetadataItems]; - - updatedURLs = [self URLsByMappingMetadataItems:completelyDownloadedUpdatedMetadataItems]; - } - - // Make sure that the arrays are all initialized before calling the didUpdateContents method. - insertedURLs = insertedURLs ?: @[]; - removedURLs = removedURLs ?: @[]; - updatedURLs = updatedURLs ?: @[]; - - [self.delegate listCoordinatorDidUpdateContentsWithInsertedURLs:insertedURLs removedURLs:removedURLs updatedURLs:updatedURLs]; - - [self.metadataQuery enableUpdates]; -} - -#pragma mark - Convenience - -- (NSURL *)documentURLForName:(NSString *)name { - NSURL *documentURLWithoutExtension = [self.documentsDirectory URLByAppendingPathComponent:name]; - - return [documentURLWithoutExtension URLByAppendingPathExtension:AAPLAppConfigurationListerFileExtension]; -} - -- (NSArray *)URLsByMappingMetadataItems:(NSArray *)metadataItems { - NSMutableArray *URLs = [NSMutableArray arrayWithCapacity:metadataItems.count]; - - for (NSMetadataItem *metadataItem in metadataItems) { - NSURL *URL = [metadataItem valueForAttribute:NSMetadataItemURLKey]; - - [URLs addObject:URL]; - } - - return URLs; -} -@end diff --git a/Lister/Objective-C/ListerKit/AAPLDirectoryMonitor.h b/Lister/Objective-C/ListerKit/AAPLDirectoryMonitor.h deleted file mode 100644 index 1bd2dbc8..00000000 --- a/Lister/Objective-C/ListerKit/AAPLDirectoryMonitor.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - \c AAPLDirectoryMonitor is used to monitor the contents of the provided directory by using a GCD dispatch source. -*/ - -@import Foundation; - -@class AAPLDirectoryMonitor; - -/// A protocol that allows delegates of \c AAPLDirectoryMonitor to respond to changes in a directory. -@protocol AAPLDirectoryMonitorDelegate - -- (void)directoryMonitorDidObserveChange:(AAPLDirectoryMonitor *)directoryMonitor; - -@end - -@interface AAPLDirectoryMonitor: NSObject - -/// The AAPLDirectoryMonitor's delegate who is responsible for responding to AAPLDirectoryMonitor updates. -@property (nonatomic, weak) id delegate; - -- (instancetype)initWithURL:(NSURL *)URL; - -- (void)startMonitoring; -- (void)stopMonitoring; - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLDirectoryMonitor.m b/Lister/Objective-C/ListerKit/AAPLDirectoryMonitor.m deleted file mode 100644 index 1c27d75a..00000000 --- a/Lister/Objective-C/ListerKit/AAPLDirectoryMonitor.m +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - \c AAPLDirectoryMonitor is used to monitor the contents of the provided directory by using a GCD dispatch source. -*/ - -#import "AAPLDirectoryMonitor.h" - -@interface AAPLDirectoryMonitor () - -/// A file descriptor for the monitored directory. -@property (nonatomic) int monitoredDirectoryFileDescriptor; - -/// A dispatch queue used for sending file changes in the directory. -@property (nonatomic, strong) dispatch_queue_t directoryMonitorQueue; - -/// A dispatch source to monitor a file descriptor created from the directory. -@property (nonatomic, strong) dispatch_source_t directoryMonitorSource; - -/// URL for the directory being monitored. -@property (nonatomic, strong) NSURL *URL; - -@end - -@implementation AAPLDirectoryMonitor -#pragma mark - Initializers - -- (instancetype)initWithURL:(NSURL *)URL { - self = [super init]; - - if (self) { - _URL = URL; - - _monitoredDirectoryFileDescriptor = -1; - } - - return self; -} - -#pragma mark - Monitoring - -- (void)startMonitoring { - // Listen for changes to the directory (if we are not already). - if (self.directoryMonitorSource == nil && self.monitoredDirectoryFileDescriptor == -1) { - // Open the directory referenced by URL for monitoring only. - self.monitoredDirectoryFileDescriptor = open([self.URL.path cStringUsingEncoding:NSUTF8StringEncoding], O_EVTONLY); - - // Create the monitor queue for handling monitoring events. - self.directoryMonitorQueue = dispatch_queue_create("com.example.apple-samplecode.lister.directorymonitor", DISPATCH_QUEUE_CONCURRENT); - - // Define a dispatch source monitoring the directory for additions, deletions, and renamings. - self.directoryMonitorSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_VNODE, self.monitoredDirectoryFileDescriptor, DISPATCH_VNODE_WRITE, self.directoryMonitorQueue); - - // Define the block to call when a file change is detected. - dispatch_source_set_event_handler(self.directoryMonitorSource, ^{ - // Call out to the `AAPLDirectoryMonitorDelegate` so that it can react appropriately to the change. - [self.delegate directoryMonitorDidObserveChange:self]; - }); - - // Define a cancel handler to ensure the directory is closed when the source is cancelled. - dispatch_source_set_cancel_handler(self.directoryMonitorSource, ^{ - close(self.monitoredDirectoryFileDescriptor); - - self.monitoredDirectoryFileDescriptor = -1; - - self.directoryMonitorSource = nil; - }); - - // Start monitoring the directory via the source. - dispatch_resume(self.directoryMonitorSource); - } -} - -- (void)stopMonitoring { - // Stop listening for changes to the directory, if the source has been created. - if (self.directoryMonitorSource != nil) { - // Stop monitoring the directory via the source. - dispatch_source_cancel(self.directoryMonitorSource); - } -} - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLListCoordinator.h b/Lister/Objective-C/ListerKit/AAPLListCoordinator.h deleted file mode 100644 index 838adda5..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListCoordinator.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListCoordinator and \c AAPLListCoordinatorDelegate protocols provide the infrastructure to send updates to an \c AAPLListsController object, abstracting away the need to worry about the underlying storage mechanism. -*/ - -@import Foundation; - -@class AAPLList; -@protocol AAPLListCoordinatorDelegate; - -/*! - An instance that conforms to the \c AAPLListCoordinator protocol is responsible for implementing - entry points in order to communicate with an \c AAPLListCoordinatorDelegate. In the case of Lister, - this is the \c AAPLListsController instance. The main responsibility of a \c AAPLListCoordinator is - to track different \c NSURL instances that are important. For example, in Lister there are two types - of storage mechanisms: local and iCloud based storage. The iCloud coordinator is responsible for - making sure that the \c AAPLListsController knows about the current set of iCloud documents that are - available. - - There are also other responsibilities that an \c AAPLListCoordinator must have that are specific - to the underlying storage mechanism of the coordinator. An \c AAPLListCoordinator determines whether - or not a new list can be created with a specific name, it removes URLs tied to a specific list, and - it is also responsible for listening for updates to any changes that occur at a specific URL - (e.g. a list document is updated on another device, etc.). - - Instances of \c AAPLListCoordinator can search for URLs in an asynchronous way. When a new \c NSURL - instance is found, removed, or updated, the \c AAPLListCoordinator instance must make its delegate - aware of the updates. If a failure occured in removing or creating an \c NSURL for a given list, - it must make its delegate aware by calling one of the appropriate error methods defined in the - \c AAPLListCoordinatorDelegate protocol. - */ -@protocol AAPLListCoordinator - -/*! - The delegate responsible for handling inserts, removes, updates, and errors when the \c AAPLListCoordinator - instance determines such events occured. - */ -@property (nonatomic, weak) id delegate; - -/*! - Starts observing changes to the important \c NSURL instances. For example, if an \c AAPLListCoordinator - conforming class has the responsibility to manage iCloud documents, the \c -startQuery method - would start observing an \c NSMetadataQuery. This method is called on the \c AAPLListCoordinator - once the coordinator is set on the \c AAPLListsController. - */ -- (void)startQuery; - -/*! - Stops observing changes to the important \c NSURL instances. For example, if a \c AAPLListCoordinator - conforming class has the responsibility to manage iCloud documents, the \c -stopQuery method - would stop observing changes to the \c NSMetadataQuery. This method is called on the \c AAPLListCoordinator - once a new \c AAPLListCoordinator has been set on the \c AAPLListsController. - */ -- (void)stopQuery; - -/*! - Removes \c URL from the list of tracked \c NSURL instances. For example, an iCloud-specific - \c AAPLListCoordinator would implement this method by deleting the underlying document that \c URL - represents. When \c URL is removed, the coordinator object is responsible for informing the delegate - by calling \c -listCoordinatorDidUpdateContentsWithInsertedURLs:removedURLs:updatedURLs: with the - removed \c NSURL. If a failure occurs when removing \c URL, the coordinator object is responsible - for informing the delegate by calling the \c -listCoordinatorDidFailRemovingListAtURL:withError: - method. The \c AAPLListsController is the only object that should be calling this method directly. - The "remove" is intended to be called on the \c AAPLListsController instance with an \c AAPLListInfo - object whose URL would be forwarded down to the coordinator through this method. - - @param URL The \c NSURL instance to remove from the list of important instances. - */ -- (void)removeListAtURL:(NSURL *)URL; - -/*! - Creates an \c NSURL object representing \c list with the provided name. Callers of this method - (which should only be the \c APPLListController object) should first check to see if a list can be - created with the provided name via the \c -canCreateListWithName: method. If the creation was - successful, then this method should call the delegate's update method that passes the newly tracked - \c NSURL as an inserted URL. If the creation was not successful, this method should inform the delegate - of the failure by calling its \c -listCoordinatorDidFailCreatingListAtURL:withError: method. The - "create" is intended to be called on the \c AAPLListsController instance with an \c AAPLListInfo - object whose URL would be forwarded down to the coordinator through this method. - - @param list The list to create a backing \c NSURL for. - @param name The new name for the list. - */ -- (void)createURLForList:(AAPLList *)list withName:(NSString *)name; - -/*! - Checks to see if a list can be created with a given name. As an example, if an \c AAPLListCoordinator - instance was responsible for storing its lists locally as a document, the coordinator would check - to see if there are any other documents on the file system that have the same name. If they do, the - method would return false. Otherwise, it would return true. This method should only be called by - the \c AAPLListsController instance. Normally you would call the users will call the \c -canCreateListWithName: - method on \c AAPLListsController, which will forward down to the current \c AAPLListCoordinator - instance. - - @param name The name to use when checking to see if a list can be created. - - @return \c YES if the list can be created with the given name, \c NO otherwise. - */ -- (BOOL)canCreateListWithName:(NSString *)name; - -/*! - Attempts to copy a \c list at a given \c URL to the appropriate location in the documents directory. - - @param URL The \c NSURL object representing the list to be copied. - @param name The name of the \c list to be overwritten. - */ -- (void)copyListFromURL:(NSURL *)URL toListWithName:(NSString *)name; - -@end - - -/*! - The \c AAPLListCoordinatorDelegate protocol exists to allow \c AAPLListCoordinator instances to forward - events. These events include a \c AAPLListCoordinator removing, inserting, and updating their important, - tracked \c NSURL instances. The \c AAPLListCoordinatorDelegate also allows a \c AAPLListCoordinator - to notify its delegate of any errors that occured when removing or creating a list for a given URL. - */ -@protocol AAPLListCoordinatorDelegate - -/*! - Notifies the \c AAPLListCoordinatorDelegate instance of any changes to the tracked URLs of the - \c AAPLListCoordinator. For more information about when this method should be called, see the - description for the other \c AAPLListCoordinator methods mentioned above that manipulate the tracked - \c NSURL instances. - - @param insertedURLs The \c NSURL instances that are newly tracked. - @param removedURLs The \c NSURL instances that have just been untracked. - @param updatedURLs The \c NSURL instances that have had their underlying model updated. - */ -- (void)listCoordinatorDidUpdateContentsWithInsertedURLs:(NSArray *)insertedURLs removedURLs:(NSArray *)removedURLs updatedURLs:(NSArray *)updatedURLs; - -/*! - Notifies an \c AAPLListCoordinatorDelegate instance of an error that occured when a coordinator - tried to remove a specific URL from the tracked \c NSURL instances. For more information about when - this method should be called, see the description for \c -[AAPLListCoordinator removeListAtURL:]. - - @param URL The \c NSURL instance that failed to be removed. - @param error The error that describes why the remove failed. - */ -- (void)listCoordinatorDidFailRemovingListAtURL:(NSURL *)URL withError:(NSError *)error; - -/*! - Notifies a \c AAPLListCoordinatorDelegate instance of an error that occured when a coordinator tried - to create a list at a given URL. For more information about when this method should be called, see - the description for \c -[AAPLListCoordinator createURLForList:withName:]. - - @param URL The \c NSURL instance that couldn't be created for a list. - @param error The error the describes why the create failed. - */ -- (void)listCoordinatorDidFailCreatingListAtURL:(NSURL *)URL withError:(NSError *)error; - -@end \ No newline at end of file diff --git a/Lister/Objective-C/ListerKit/AAPLListDocument.h b/Lister/Objective-C/ListerKit/AAPLListDocument.h deleted file mode 100644 index 1f736844..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListDocument.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListDocument class is a \c UIDocument subclass that represents a list. \c AAPLListDocument also manages the serialization / deserialization of the list object. -*/ - -@import UIKit; - -@protocol AAPLListPresenting; -@class AAPLListDocument; - -/// Protocol that allows a list document to notify other objects of it being deleted. -@protocol AAPLListDocumentDelegate - -- (void)listDocumentWasDeleted:(AAPLListDocument *)document; - -@end - - -@interface AAPLListDocument : UIDocument - -@property (nonatomic) id listPresenter; -@property (weak) id delegate; - -- (instancetype)initWithFileURL:(NSURL *)url listPresenter:(id)listPresenter; - -@end - diff --git a/Lister/Objective-C/ListerKit/AAPLListDocument.m b/Lister/Objective-C/ListerKit/AAPLListDocument.m deleted file mode 100644 index a2b2e545..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListDocument.m +++ /dev/null @@ -1,120 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListDocument class is a \c UIDocument subclass that represents a list. \c AAPLListDocument also manages the serialization / deserialization of the list object. -*/ - -#import "AAPLListDocument.h" -#import "AAPLAppConfiguration.h" -#import "AAPLListPresenting.h" -#import "AAPLList.h" -#import "AAPLListColor+UI.h" - -@import WatchConnectivity; - -@implementation AAPLListDocument - -#pragma mark - Initialization - -- (instancetype)initWithFileURL:(NSURL *)url listPresenter:(id)listPresenter { - self = [super initWithFileURL:url]; - - if (self) { - _listPresenter = listPresenter; - } - - return self; -} - -#pragma mark - Serialization / Deserialization - -- (BOOL)loadFromContents:(id)contents ofType:(NSString *)typeName error:(NSError *__autoreleasing *)outError { - AAPLList *unarchivedList = [NSKeyedUnarchiver unarchiveObjectWithData:contents]; - - if (unarchivedList) { - /* - This method is called on the queue that the openWithCompletionHandler: method was called - on (typically, the main queue). List presenter operations are main queue only, so explicitly - call on the main queue. - */ - dispatch_async(dispatch_get_main_queue(), ^{ - [self.listPresenter setList:unarchivedList]; - }); - - return YES; - } - - if (outError) { - *outError = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadCorruptFileError userInfo:@{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not read file", @"Read error description"), - NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"File was in an invalid format", @"Read failure reason") - }]; - } - - return NO; -} - -- (id)contentsForType:(NSString *)typeName error:(NSError *__autoreleasing *)outError { - AAPLList *archiveableList = self.listPresenter.archiveableList; - - if (archiveableList) { - return [NSKeyedArchiver archivedDataWithRootObject:archiveableList]; - } - else { - return nil; - } -} - -#pragma mark - Saving - -- (void)saveToURL:(nonnull NSURL *)url forSaveOperation:(UIDocumentSaveOperation)saveOperation completionHandler:(void (^ __nullable)(BOOL))completionHandler { - [super saveToURL:url forSaveOperation:saveOperation completionHandler:^(BOOL success) { - // On a successful save, transfer the file to the paired watch if appropriate. - if ([WCSession isSupported] && [WCSession defaultSession].isWatchAppInstalled && success) { - NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] init]; - NSFileAccessIntent *readingIntent = [NSFileAccessIntent readingIntentWithURL:self.fileURL options:0]; - [fileCoordinator coordinateAccessWithIntents:@[readingIntent] queue:[[NSOperationQueue alloc] init] byAccessor:^(NSError *accessError) { - if (accessError) { - return; - } - - WCSession *session = [WCSession defaultSession]; - - for (WCSessionFileTransfer *transfer in session.outstandingFileTransfers) { - if ([transfer.file.fileURL isEqual:readingIntent.URL]) { - [transfer cancel]; - break; - } - } - - [session transferFile:readingIntent.URL metadata:nil]; - }]; - } - - if (completionHandler) { - completionHandler(success); - } - }]; -} - -#pragma mark - Deletion - -- (void)accommodatePresentedItemDeletionWithCompletionHandler:(void (^)(NSError *errorOrNil))completionHandler { - [super accommodatePresentedItemDeletionWithCompletionHandler:completionHandler]; - - [self.delegate listDocumentWasDeleted:self]; -} - -#pragma mark - Handoff - -- (void)updateUserActivityState:(NSUserActivity *)userActivity { - [super updateUserActivityState:userActivity]; - - [userActivity addUserInfoEntriesFromDictionary:@{ - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.listPresenter.color) - }]; -} - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLListInfo.h b/Lister/Objective-C/ListerKit/AAPLListInfo.h deleted file mode 100644 index 55727b3a..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListInfo.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInfo class is a caching abstraction over an \c AAPLList object that contains information about lists (e.g. color and name). -*/ - -@import Foundation; -#import "AAPLList.h" - -@interface AAPLListInfo : NSObject - -- (instancetype)initWithURL:(NSURL *)URL; - -@property (nonatomic, strong, readonly) NSURL *URL; - -@property (nonatomic, copy, readonly) NSString *name; - -@property AAPLListColor color; - -- (void)fetchInfoWithCompletionHandler:(void (^)(void))completionHandler; - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLListInfo.m b/Lister/Objective-C/ListerKit/AAPLListInfo.m deleted file mode 100644 index 8b49d55a..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListInfo.m +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListInfo class is a caching abstraction over an \c AAPLList object that contains information about lists (e.g. color and name). -*/ - -#import "AAPLListInfo.h" -#import "AAPLListUtilities.h" - -#define AAPLListColorUndefined ((AAPLListColor)-1) - -@interface AAPLListInfo () - -@property (nonatomic, strong) dispatch_queue_t fetchQueue; - -@end - -@implementation AAPLListInfo - -#pragma mark - Initialization - -- (instancetype)initWithURL:(NSURL *)URL { - self = [super init]; - - if (self) { - _color = AAPLListColorUndefined; - - _fetchQueue = dispatch_queue_create("com.example.apple-samplecode.listinfo", DISPATCH_QUEUE_SERIAL); - _URL = URL; - } - - return self; -} - -#pragma mark - Fetch Methods - -- (void)fetchInfoWithCompletionHandler:(void (^)(void))completionHandler { - dispatch_async(self.fetchQueue, ^{ - // If the color hasn't been set yet, the info hasn't been fetched. - if (self.color != AAPLListColorUndefined) { - completionHandler(); - - return; - } - - [AAPLListUtilities readListAtURL:self.URL withCompletionHandler:^(AAPLList *list, NSError *error) { - dispatch_async(self.fetchQueue, ^{ - if (list) { - self.color = list.color; - } - else { - self.color = AAPLListColorGray; - } - - completionHandler(); - }); - }]; - }); -} - -#pragma mark - Property Overrides - -- (NSString *)name { - NSString *displayName = [[NSFileManager defaultManager] displayNameAtPath:self.URL.path]; - - return displayName.stringByDeletingPathExtension; -} - -#pragma mark - NSObject - -- (BOOL)isEqual:(id)object { - if (![object isKindOfClass:[AAPLListInfo class]]) { - return NO; - } - - return [self.URL isEqual:[object URL]]; -} - -@end - -#undef AAPLListColorUndefined diff --git a/Lister/Objective-C/ListerKit/AAPLListUtilities.h b/Lister/Objective-C/ListerKit/AAPLListUtilities.h deleted file mode 100644 index 0f032662..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListUtilities.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListUtilities class provides a suite of convenience methods for interacting with \c AAPLList objects and their associated files. -*/ - -@import Foundation; - -@class AAPLList; - -@interface AAPLListUtilities : NSObject - -+ (NSURL *)localDocumentsDirectory; - -+ (void)copyInitialLists; - -+ (void)copyTodayList; - -+ (void)migrateLocalListsToCloud; - -+ (void)readListAtURL:(NSURL *)url withCompletionHandler:(void (^)(AAPLList *list, NSError *error))completionHandler; - -+ (void)createList:(AAPLList *)list atURL:(NSURL *)url withCompletionHandler:(void (^)(NSError *error))completionHandler; - -+ (void)removeListAtURL:(NSURL *)url withCompletionHandler:(void (^)(NSError *error))completionHandler; - -+ (void)copyFromURL:(NSURL *)fromURL toURL:(NSURL *)toURL; - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLListUtilities.m b/Lister/Objective-C/ListerKit/AAPLListUtilities.m deleted file mode 100644 index b15c343c..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListUtilities.m +++ /dev/null @@ -1,286 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListUtilities class provides a suite of convenience methods for interacting with \c AAPLList objects and their associated files. -*/ - -#import "AAPLListUtilities.h" -#import "AAPLAppConfiguration.h" - -@implementation AAPLListUtilities - -+ (NSURL *)localDocumentsDirectory { - NSURL *documentsURL = [[self sharedApplicationGroupContainer] URLByAppendingPathComponent:@"Documents" isDirectory:YES]; - - NSError *error; - // This will return `YES` for success if the directory is successfully created, or already exists. - BOOL success = [[NSFileManager defaultManager] createDirectoryAtURL:documentsURL withIntermediateDirectories:YES attributes:nil error:&error]; - - if (success) { - return documentsURL; - } - else { - NSLog(@"The shared application group documents directory doesn't exist and could not be created. Error: %@", error.localizedDescription); - abort(); - } -} - -+ (NSURL *)sharedApplicationGroupContainer { - NSURL *containerURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:AAPLAppConfigurationApplicationGroupsPrimary]; - - NSAssert(containerURL != nil, @"The shared application group container is unavailable. Check your entitlements and provisioning profiles for this target. Details on proper setup can be found in the PDFs referenced from the README."); - - return containerURL; -} - -+ (void)copyInitialLists { - NSArray *defaultListURLs = [[NSBundle mainBundle] URLsForResourcesWithExtension:AAPLAppConfigurationListerFileExtension subdirectory:@""]; - - for (NSURL *url in defaultListURLs) { - [self copyURLToDocumentsDirectory:url]; - } -} - -+ (void)copyTodayList { - NSString *localizedTodayListName = [AAPLAppConfiguration sharedAppConfiguration].localizedTodayDocumentName; - NSURL *url = [[NSBundle mainBundle] URLForResource:localizedTodayListName withExtension:AAPLAppConfigurationListerFileExtension]; - [self copyURLToDocumentsDirectory:url]; -} - -+ (void)migrateLocalListsToCloud { - dispatch_queue_t defaultQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul); - - dispatch_async(defaultQueue, ^{ - NSFileManager *fileManager = [NSFileManager defaultManager]; - - // Note the call to -URLForUbiquityContainerIdentifier: should be on a background queue. - NSURL *cloudDirectoryURL = [fileManager URLForUbiquityContainerIdentifier:nil]; - - NSURL *documentsDirectoryURL = [cloudDirectoryURL URLByAppendingPathComponent:@"Documents"]; - - NSArray *localDocumentURLs = [fileManager contentsOfDirectoryAtURL:[self localDocumentsDirectory] includingPropertiesForKeys:nil options:0 error:nil]; - - for (NSURL *URL in localDocumentURLs) { - if ([URL.pathExtension isEqualToString:AAPLAppConfigurationListerFileExtension]) { - [self makeItemUbiquitousAtURL:URL documentsDirectoryURL:documentsDirectoryURL]; - } - } - }); -} - -+ (void)makeItemUbiquitousAtURL:(NSURL *)sourceURL documentsDirectoryURL:(NSURL *)documentsDirectoryURL { - NSString *destinationFileName = sourceURL.lastPathComponent; - - NSFileManager *fileManager = [[NSFileManager alloc] init]; - NSURL *destinationURL = [documentsDirectoryURL URLByAppendingPathComponent:destinationFileName]; - - if ([fileManager isUbiquitousItemAtURL:destinationURL] || - [fileManager fileExistsAtPath:destinationURL.path]) { - // If the file already exists in the cloud, remove the local version and return. - [self removeListAtURL:sourceURL withCompletionHandler:nil]; - return; - } - - dispatch_queue_t defaultQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul); - dispatch_async(defaultQueue, ^{ - [fileManager setUbiquitous:YES itemAtURL:sourceURL destinationURL:destinationURL error:nil]; - }); -} - -+ (void)readListAtURL:(NSURL *)url withCompletionHandler:(void (^)(AAPLList *list, NSError *error))completionHandler { - NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] init]; - - // `url` may be a security scoped resource. - BOOL successfulSecurityScopedResourceAccess = [url startAccessingSecurityScopedResource]; - - NSFileAccessIntent *readingIntent = [NSFileAccessIntent readingIntentWithURL:url options:NSFileCoordinatorReadingWithoutChanges]; - [fileCoordinator coordinateAccessWithIntents:@[readingIntent] queue:[self queue] byAccessor:^(NSError *accessError) { - if (accessError) { - if (successfulSecurityScopedResourceAccess) { - [url stopAccessingSecurityScopedResource]; - } - - if (completionHandler) { - completionHandler(nil, accessError); - } - - return; - } - - // Local variables that will be used as parameters to `completionHandler`. - NSError *readError; - AAPLList *deserializedList; - - NSData *contents = [NSData dataWithContentsOfURL:readingIntent.URL options:NSDataReadingUncached error:&readError]; - - if (contents) { - deserializedList = [NSKeyedUnarchiver unarchiveObjectWithData:contents]; - - NSAssert(deserializedList != nil, @"The provided URL must correspond to an AAPLList object."); - } - - if (successfulSecurityScopedResourceAccess) { - [url stopAccessingSecurityScopedResource]; - } - - if (completionHandler) { - completionHandler(deserializedList, readError); - } - }]; -} - -+ (void)createList:(AAPLList *)list atURL:(NSURL *)url withCompletionHandler:(void (^)(NSError *))completionHandler { - NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] init]; - - NSFileAccessIntent *writingIntent = [NSFileAccessIntent writingIntentWithURL:url options:NSFileCoordinatorWritingForReplacing]; - [fileCoordinator coordinateAccessWithIntents:@[writingIntent] queue:[self queue] byAccessor:^(NSError *accessError) { - if (accessError) { - if (completionHandler) { - completionHandler(accessError); - } - - return; - } - - NSError *error; - - NSData *serializedListData = [NSKeyedArchiver archivedDataWithRootObject:list]; - - BOOL success = [serializedListData writeToURL:writingIntent.URL options:NSDataWritingAtomic error:&error]; - - if (success) { - NSDictionary *fileAttributes = @{ NSFileExtensionHidden: @YES }; - - [[NSFileManager defaultManager] setAttributes:fileAttributes ofItemAtPath:writingIntent.URL.path error:nil]; - } - - if (completionHandler) { - completionHandler(error); - } - }]; -} - -+ (void)removeListAtURL:(NSURL *)url withCompletionHandler:(void (^)(NSError *error))completionHandler { - NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] init]; - - // `url` may be a security scoped resource. - BOOL successfulSecurityScopedResourceAccess = [url startAccessingSecurityScopedResource]; - - NSFileAccessIntent *writingIntent = [NSFileAccessIntent writingIntentWithURL:url options:NSFileCoordinatorWritingForDeleting]; - [fileCoordinator coordinateAccessWithIntents:@[writingIntent] queue:[self queue] byAccessor:^(NSError *accessError) { - if (accessError) { - if (completionHandler) { - completionHandler(accessError); - } - - return; - } - - NSFileManager *fileManager = [[NSFileManager alloc] init]; - - NSError *error; - - [fileManager removeItemAtURL:writingIntent.URL error:&error]; - - if (successfulSecurityScopedResourceAccess) { - [url stopAccessingSecurityScopedResource]; - } - - if (completionHandler) { - completionHandler(error); - } - }]; -} - -#pragma mark - Convenience - -+ (void)copyURLToDocumentsDirectory:(NSURL *)url { - NSURL *toURL = [[AAPLListUtilities localDocumentsDirectory] URLByAppendingPathComponent:url.lastPathComponent]; - - // If the file already exists, don't attempt to copy the version from the bundle. - if ([[NSFileManager defaultManager] fileExistsAtPath:toURL.path]) { - return; - } - - [self copyFromURL:url toURL:toURL]; -} - -+ (void)copyFromURL:(NSURL *)fromURL toURL:(NSURL *)toURL { - NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] init]; - __block NSError *error; - - BOOL successfulSecurityScopedResourceAccess = [fromURL startAccessingSecurityScopedResource]; - - NSFileManager *fileManager = [[NSFileManager alloc] init]; - - // First copy the source file into a temporary location where the replace can be carried out. - NSURL *tempDirectory = [fileManager URLForDirectory:NSItemReplacementDirectory - inDomain:NSUserDomainMask - appropriateForURL:toURL - create:YES - error:&error]; - NSURL *tempURL = [tempDirectory URLByAppendingPathComponent:[toURL lastPathComponent]]; - BOOL success = [fileManager copyItemAtURL:fromURL toURL:tempURL error:&error]; - - if (!success) { - // An error occured when moving URL to toURL. In your app, handle this gracefully. - NSLog(@"Couldn't create temp file from: %@ at: %@ error: %@.", fromURL.absoluteString, tempURL.absoluteString, error.localizedDescription); - NSLog(@"Error\nCode: %ld\nDomain: %@\nDescription: %@\nReason: %@\nUser Info: %@\n", (long)error.code, error.domain, error.localizedDescription, error.localizedFailureReason, error.userInfo); - - return; - } - - // Now perform a coordinated replace to move the file from the temporary location to its final destination. - NSFileAccessIntent *movingIntent = [NSFileAccessIntent writingIntentWithURL:tempURL options:NSFileCoordinatorWritingForMoving]; - NSFileAccessIntent *mergingIntent = [NSFileAccessIntent writingIntentWithURL:toURL options:NSFileCoordinatorWritingForMerging]; - [fileCoordinator coordinateAccessWithIntents:@[movingIntent, mergingIntent] queue:[self queue] byAccessor:^(NSError *accessError) { - if (accessError) { - // An error occured when trying to coordinate moving URL to toURL. In your app, handle this gracefully. - NSLog(@"Couldn't move file: %@ to: %@ error: %@.", fromURL.absoluteString, toURL.absoluteString, accessError.localizedDescription); - - return; - } - - BOOL success = NO; - - NSFileManager *fileManager = [[NSFileManager alloc] init]; - - success = [[NSData dataWithContentsOfURL:movingIntent.URL] writeToURL:mergingIntent.URL atomically:YES]; - - if (success) { - NSDictionary *fileAttributes = @{ NSFileExtensionHidden: @YES }; - - [[NSFileManager defaultManager] setAttributes:fileAttributes ofItemAtPath:mergingIntent.URL.path error:&error]; - } - - if (successfulSecurityScopedResourceAccess) { - [fromURL stopAccessingSecurityScopedResource]; - } - - if (!success) { - // An error occured when moving URL to toURL. In your app, handle this gracefully. - NSLog(@"Couldn't move file: %@ to: %@ error: %@.", fromURL.absoluteString, toURL.absoluteString, error.localizedDescription); - NSLog(@"Error\nCode: %ld\nDomain: %@\nDescription: %@\nReason: %@\nUser Info: %@\n", (long)error.code, error.domain, error.localizedDescription, error.localizedFailureReason, error.userInfo); - } - - // Cleanup - [fileManager removeItemAtURL:tempDirectory error:&error]; - }]; -} - -/// An internal queue to the \c AAPLListUtilities class that is used for \c NSFileCoordinator callbacks. -+ (NSOperationQueue *)queue { - static NSOperationQueue *queue; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - queue = [[NSOperationQueue alloc] init]; - queue.maxConcurrentOperationCount = 1; - }); - - return queue; -} - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLListsController.h b/Lister/Objective-C/ListerKit/AAPLListsController.h deleted file mode 100644 index 6247a5f2..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListsController.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListsController and \c AAPLListsControllerDelegate infrastructure provide a mechanism for other objects within the application to be notified of inserts, removes, and updates to \c AAPLListInfo objects. In addition, it also provides a way for parts of the application to present errors that occured when creating or removing lists. -*/ - -@import Foundation; - -@class AAPLListsController, AAPLListInfo, AAPLList; -@protocol AAPLListCoordinator; - -/*! - The \c AAPLListsControllerDelegate protocol enables an \c AAPLListsController object to notify other - objects of changes to available \c AAPLListInfo objects. This includes "will change content" events, - "did change content" events, inserts, removes, updates, and errors. Note that the \c AAPLListsController - can call these methods on an aribitrary queue. If the implementation in these methods require UI - manipulations, you should respond to the changes on the main queue. - */ -@protocol AAPLListsControllerDelegate - -@optional - -/*! - Notifies the receiver of this method that the lists controller will change it's contents in some - form. This method is *always* called before any insert, remove, or update is received. In this method, - you should prepare your UI for making any changes related to the changes that you will need to reflect - once they are received. For example, if you have a table view in your UI that needs to respond to - changes to a newly inserted \c AAPLListInfo object, you would want to call your table view's - \c -beginUpdates method. Once all of the updates are performed, your \c -listsControllerDidChangeContent: - method will be called. This is where you would to call your table view's \c -endUpdates method. - - @param listsController The \c AAPLListsController instance that will change its content. - */ -- (void)listsControllerWillChangeContent:(AAPLListsController *)listsController; - -/*! - Notifies the receiver of this method that the lists controller is tracking a new \c AAPLListInfo - object. Receivers of this method should update their UI accordingly. - - @param listsController The \c AAPLListsController instance that inserted the new \c AAPLListInfo. - @param listInfo The new \c AAPLListInfo object that has been inserted at \c index. - @param index The index that \c listInfo was inserted at. - */ -- (void)listsController:(AAPLListsController *)listsController didInsertListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index; - -/*! - Notifies the receiver of this method that the lists controller is no longer tracking \c listInfo. - Receivers of this method should update their UI accordingly. - - @param listsController The \c AAPLListsController instance that removed \c listInfo. - @param listInfo The removed \c AAPLListInfo object. - @param index The index that \c listInfo was removed at. - */ -- (void)listsController:(AAPLListsController *)listsController didRemoveListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index; - -/*! - Notifies the receiver of this method that the lists controller received a message that \c listInfo - has updated its content. Receivers of this method should update their UI accordingly. - - @param listsController The \c AAPLListsController instance that was notified that \c listInfo has - been updated. - @param listInfo The \c AAPLListInfo object that has been updated. - @param index The index of \c listInfo, the updated \c AAPLListInfo. - */ -- (void)listsController:(AAPLListsController *)listsController didUpdateListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index; - -/*! - Notifies the receiver of this method that the lists controller did change it's contents in some form. - This method is *always* called after any insert, remove, or update is received. In this method, you - should finish off changes to your UI that were related to any insert, remove, or update. For an example - of how you might handle a "did change" contents call, see the discussion for \c -listsControllerWillChangeContent:. - - @param listsController The \c AAPLListsController instance that did change its content. - */ -- (void)listsControllerDidChangeContent:(AAPLListsController *)listsController; - -/*! - Notifies the receiver of this method that an error occured when creating a new \c AAPLListInfo object. - In implementing this method, you should present the error to the user. Do not rely on the \c AAPLListInfo - instance to be valid since an error occured in creating the object. - - @param listsController The \c AAPLListsController that is notifying that a failure occured. - @param listInfo The \c AAPLListInfo that represents the list that couldn't be created. - @param error The error that occured. - */ -- (void)listsController:(AAPLListsController *)listsController didFailCreatingListInfo:(AAPLListInfo *)listInfo withError:(NSError *)error; - -/*! - Notifies the receiver of this method that an error occured when removing an existing \c AAPLListInfo - object. In implementing this method, you should present the error to the user. - - @param listsController The \c AAPLListsController that is notifying that a failure occured. - @param listInfo The \c AAPLListInfo that represents the list that couldn't be removed. - @param error The error that occured. - */ -- (void)listsController:(AAPLListsController *)listsController didFailRemovingListInfo:(AAPLListInfo *)listInfo withError:(NSError *)error; - -@end - -/*! - The \c AAPLListsController class is responsible for tracking \c AAPLListInfo objects that are found through - lists controller's \c AAPLListCoordinator object. \c AAPLListCoordinator objects are responsible for - notifying the lists controller of inserts, removes, updates, and errors when interacting with a list's - URL. Since the work of searching, removing, inserting, and updating \c AAPLListInfo objects is done - by the lists controller's coordinator, the lists controller serves as a way to avoid the need to interact - with a single \c AAPLListCoordinator directly throughout the application. It also allows the rest - of the application to deal with \c AAPLListInfo objects rather than dealing with their \c NSURL - instances directly. In essence, the work of a lists controller is to "front" its current coordinator. - All changes that the coordinator relays to the \c AAPLListsController object will be relayed to the - lists controller's delegate. This ability to front another object is particularly useful when the - underlying coordinator changes. As an example, this could happen when the user changes their storage - option from using local documents to using cloud documents. If the coordinator property of the list - controller changes, other objects throughout the application are unaffected since the lists controller - will notify them of the appropriate changes (removes, inserts, etc.). - */ -@interface AAPLListsController : NSObject - -/*! - Initializes an \c AAPLListsController instance with an initial \c AAPLListCoordinator object and a - sort comparator (if any). If sort comparator is nil, the controller ignores sort order. - - @param listCoordinator The \c AAPLListsController object's initial \c AAPLListCoordinator. - @param delegateQueue The queue in which the \c AAPLListsController object invokes delegate messages. If - \c nil, the main operation queue is used. - @param sortComparator The predicate that determines the strict sort ordering of the \c AAPLlistInfos - array. - */ -- (instancetype)initWithListCoordinator:(id)listCoordinator delegateQueue:(NSOperationQueue *)delegateQueue sortComparator:(NSComparisonResult (^)(AAPLListInfo *lhs, AAPLListInfo *rhs))sortComparator; - -/*! - The \c AAPLListsController object's delegate who is responsible for responding to \c AAPLListsController - changes. - */ -@property (nonatomic, weak) id delegate; - -/*! - @return The number of tracked \c AAPLListInfo objects. - */ -@property (nonatomic, readonly) NSInteger count; - -/*! - The current \c AAPLListCoordinator that the lists controller manages. - */ -@property (nonatomic, strong) id listCoordinator; - -/*! - Begin listening for changes to the tracked \c AAPLListInfo objects. This is managed by the \c listCoordinator - object. Be sure to balance each call to \c -startSearching with a call to \c -stopSearching. - */ -- (void)startSearching; - -/*! - Stop listening for changes to the tracked \c AAPLListInfo objects. This is managed by the \c listCoordinator - object. Each call to \c -startSearching should be balanced with a call to this method. - */ -- (void)stopSearching; - -/*! - @return The \c AAPLListInfo instance at a specific index. This method traps if the index is out - of bounds. - */ -- (AAPLListInfo *)objectAtIndexedSubscript:(NSInteger)index; - -/*! - Removes \c listInfo from the tracked \c ListInfo instances. This method forwards the remove operation - directly to the list coordinator. The operation can be performed asynchronously so long as the - underlying \c AAPLListCoordinator instance sends the \c AAPLListsController the correct delegate - messages: either a \c -listCoordinatorDidUpdateContentsWithInsertedURLs:removedURLs:updatedURLs: - call with the removed \c AAPLListInfo object, or with an error callback. - - @param listInfo The \c AAPLListInfo object to remove from the list of tracked \c AAPLListInfo - instances. - */ -- (void)removeListInfo:(AAPLListInfo *)listInfo; - -/*! - Attempts to create \c AAPLListInfo representing \c list with the given name. If the method is succesful, - the lists controller adds it to the list of tracked \c AAPLListInfo instances. This method forwards - the create operation directly to the list coordinator. The operation can be performed asynchronously - so long as the underlying \c AAPLListCoordinator instance sends the \c AAPLListsController the correct - delegate messages: either a \c -listCoordinatorDidUpdateContentsWithInsertedURLs:removedURLs:updatedURLs: - call with the newly inserted \c AAPLListInfo, or with an error callback. - - Note: it's important that before calling this method, a call to \c -canCreateListWithName: is - performed to make sure that the name is a valid list name. Doing so will decrease the errors that - you see when you actually create a list. - - @param list The \c AAPLList object that should be used to save the initial list. - @param name The name of the new list. - */ -- (void)createListInfoForList:(AAPLList *)list withName:(NSString *)name; - -/*! - Determines whether or not a list can be created with a given name. This method delegates to - \c listCoordinator to actually check to see if the list can be created with the given name. This - method should be called before \c -createListInfoForList:withName: is called to ensure to minimize - the number of errors that can occur when creating a list. - - @param name The name to check to see if it's valid or not. - - @return \c YES if the list can be created with the given name, \c NO otherwise. - */ -- (BOOL)canCreateListInfoWithName:(NSString *)name; - -/*! - Attempts to copy a \c list at a given \c URL to the appropriate location in the documents directory. - This method forwards to \c listCoordinator to actually perform the document copy. - - @param URL The \c NSURL object representing the list to be copied. - @param name The name of the \c list to be overwritten. - */ -- (void)copyListFromURL:(NSURL *)URL toListWithName:(NSString *)name; - -/*! - Lets the \c AAPLListsController know that \c listInfo has been udpdated. Once the change is reflected - in \c listInfos array, a didUpdateListInfo message is sent. - - @param listInfo The \c AAPLListInfo instance that has new content. - */ -- (void)setListInfoHasNewContents:(AAPLListInfo *)listInfo; - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLListsController.m b/Lister/Objective-C/ListerKit/AAPLListsController.m deleted file mode 100644 index 87bd4910..00000000 --- a/Lister/Objective-C/ListerKit/AAPLListsController.m +++ /dev/null @@ -1,291 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListsController and \c AAPLListsControllerDelegate infrastructure provide a mechanism for other objects within the application to be notified of inserts, removes, and updates to \c AAPLListInfo objects. In addition, it also provides a way for parts of the application to present errors that occured when creating or removing lists. -*/ - -#import "AAPLListsController.h" -#import "AAPLListCoordinator.h" -#import "AAPLListInfo.h" - -@interface AAPLListsController () - -/*! - The \c AAPLListInfo objects that are cached by the \c AAPLListsController to allow for users of the - \c AAPLListsController class to easily subscript the controller. - */ -@property (nonatomic, strong) NSMutableArray *listInfos; - -/*! - @return A private, local queue to the \c AAPLListsController that is used to perform updates on - \c listInfos. - */ -@property (nonatomic, strong) dispatch_queue_t listInfoQueue; - -/*! - The sort comparator that's set in initialization. The sort predicate ensures a strict sort ordering - of the \c listInfos array. If \c sortComparator is nil, the sort order is ignored. - */ -@property (nonatomic, copy) NSComparisonResult (^sortComparator)(AAPLListInfo *lhs, AAPLListInfo *rhs); - -/*! - The queue in which the \c AAPLListsController object invokes delegate messages. - */ -@property (nonatomic, strong) NSOperationQueue *delegateQueue; - -@end - - -@implementation AAPLListsController -@synthesize listCoordinator = _listCoordinator; -@synthesize delegateQueue = _delegateQueue; - -#pragma mark - Initialization - -- (instancetype)initWithListCoordinator:(id)listCoordinator delegateQueue:(NSOperationQueue *)delegateQueue sortComparator:(NSComparisonResult (^)(AAPLListInfo *lhs, AAPLListInfo *rhs))sortComparator { - self = [super init]; - - if (self) { - _listCoordinator = listCoordinator; - _sortComparator = sortComparator; - - _delegateQueue = delegateQueue ?: [NSOperationQueue mainQueue]; - - _listInfoQueue = dispatch_queue_create("com.example.apple-samplecode.lister.listcontroller", DISPATCH_QUEUE_SERIAL); - _listInfos = [NSMutableArray array]; - - _listCoordinator.delegate = self; - } - - return self; -} - -- (void)startSearching { - [self.listCoordinator startQuery]; -} - -- (void)stopSearching { - [self.listCoordinator stopQuery]; -} - -#pragma mark - Property Overrides - -- (NSInteger)count { - return self.listInfos.count; -} - -- (void)setListCoordinator:(id)listCoordinator { - if (![_listCoordinator isEqual:listCoordinator]) { - id oldListCoordinator = _listCoordinator; - _listCoordinator = listCoordinator; - - [oldListCoordinator stopQuery]; - - // Map the listInfo objects protected by listInfoQueue. - __block NSArray *allURLs; - dispatch_sync(self.listInfoQueue, ^{ - allURLs = [self.listInfos valueForKey:@"URL"]; - }); - [self processContentChangesWithInsertedURLs:@[] removedURLs:allURLs updatedURLs:@[]]; - - _listCoordinator.delegate = self; - oldListCoordinator.delegate = nil; - - [_listCoordinator startQuery]; - } -} - -#pragma mark - Subscripting - -- (AAPLListInfo *)objectAtIndexedSubscript:(NSInteger)index { - // Fetch the appropriate list info protected by listInfoQueue. - __block AAPLListInfo *listInfo = nil; - - dispatch_sync(self.listInfoQueue, ^{ - listInfo = self.listInfos[index]; - }); - - return listInfo; -} - -#pragma mark - Inserting / Removing / Managing / Updating AAPLListInfo Objects - -- (void)removeListInfo:(AAPLListInfo *)listInfo { - [self.listCoordinator removeListAtURL:listInfo.URL]; -} - -- (void)createListInfoForList:(AAPLList *)list withName:(NSString *)name { - [self.listCoordinator createURLForList:list withName:name]; -} - -- (BOOL)canCreateListInfoWithName:(NSString *)name { - return [self.listCoordinator canCreateListWithName:name]; -} - -- (void)copyListFromURL:(NSURL *)URL toListWithName:(NSString *)name { - [self.listCoordinator copyListFromURL:URL toListWithName:name]; -} - -- (void)setListInfoHasNewContents:(AAPLListInfo *)listInfo { - dispatch_async(self.listInfoQueue, ^{ - // Remove the old list info and replace it with the new one. - NSInteger indexOfListInfo = [self.listInfos indexOfObject:listInfo]; - self.listInfos[indexOfListInfo] = listInfo; - - [self.delegateQueue addOperationWithBlock:^{ - if ([self.delegate respondsToSelector:@selector(listsControllerWillChangeContent:)]) { - [self.delegate listsControllerWillChangeContent:self]; - } - - if ([self.delegate respondsToSelector:@selector(listsController:didUpdateListInfo:atIndex:)]) { - [self.delegate listsController:self didUpdateListInfo:listInfo atIndex:indexOfListInfo]; - } - - if ([self.delegate respondsToSelector:@selector(listsControllerDidChangeContent:)]) { - [self.delegate listsControllerDidChangeContent:self]; - } - }]; - }); -} - -- (void)listCoordinatorDidUpdateContentsWithInsertedURLs:(NSArray *)insertedURLs removedURLs:(NSArray *)removedURLs updatedURLs:(NSArray *)updatedURLs { - [self processContentChangesWithInsertedURLs:insertedURLs removedURLs:removedURLs updatedURLs:updatedURLs]; -} - -- (void)listCoordinatorDidFailCreatingListAtURL:(NSURL *)URL withError:(NSError *)error { - AAPLListInfo *listInfo = [[AAPLListInfo alloc] initWithURL:URL]; - - [self.delegateQueue addOperationWithBlock:^{ - if ([self.delegate respondsToSelector:@selector(listsController:didFailCreatingListInfo:withError:)]) { - [self.delegate listsController:self didFailCreatingListInfo:listInfo withError:error]; - } - }]; -} - -- (void)listCoordinatorDidFailRemovingListAtURL:(NSURL *)URL withError:(NSError *)error { - AAPLListInfo *listInfo = [[AAPLListInfo alloc] initWithURL:URL]; - - [self.delegateQueue addOperationWithBlock:^{ - if ([self.delegate respondsToSelector:@selector(listsController:didFailRemovingListInfo:withError:)]) { - [self.delegate listsController:self didFailRemovingListInfo:listInfo withError:error]; - } - }]; -} - -#pragma mark - Change Processing - -/*! - Processes changes to the \c AAPLListsController object's \c AAPLListInfo collection. This - implementation performs the updates and determines where each of these URLs were located so that - the controller can forward the new / removed / updated indexes as well. - - @param insertedURLs The \c NSURL instances that are newly tracked. - @param removedURLs The \c NSURL instances that have just been untracked. - @param updatedURLs The \c NSURL instances that have had their underlying model updated. - */ -- (void)processContentChangesWithInsertedURLs:(NSArray *)insertedURLs removedURLs:(NSArray *)removedURLs updatedURLs:(NSArray *)updatedURLs { - NSArray *insertedListInfos = [self listInfosByMappingURLs:insertedURLs]; - NSArray *removedListInfos = [self listInfosByMappingURLs:removedURLs]; - NSArray *updatedListInfos = [self listInfosByMappingURLs:updatedURLs]; - - [self.delegateQueue addOperationWithBlock:^{ - // Filter out all lists that are already included in the tracked lists. - __block NSArray *trackedRemovedListInfos; - __block NSArray *untrackedInsertedListInfos; - - dispatch_sync(self.listInfoQueue, ^{ - NSPredicate *containPredicate = [NSPredicate predicateWithFormat:@"self in %@", self.listInfos]; - trackedRemovedListInfos = [removedListInfos filteredArrayUsingPredicate:containPredicate]; - - NSPredicate *doesntContainPredicate = [NSCompoundPredicate notPredicateWithSubpredicate:containPredicate]; - untrackedInsertedListInfos = [insertedListInfos filteredArrayUsingPredicate:doesntContainPredicate]; - }); - - if (untrackedInsertedListInfos.count == 0 && trackedRemovedListInfos.count == 0 && updatedListInfos.count == 0) { - return; - } - - if ([self.delegate respondsToSelector:@selector(listsControllerWillChangeContent:)]) { - [self.delegate listsControllerWillChangeContent:self]; - } - - // Remove - for (AAPLListInfo *trackedRemovedListInfo in trackedRemovedListInfos) { - __block NSInteger trackedRemovedListInfoIndex; - - dispatch_sync(self.listInfoQueue, ^{ - trackedRemovedListInfoIndex = [self.listInfos indexOfObject:trackedRemovedListInfo]; - - [self.listInfos removeObjectAtIndex:trackedRemovedListInfoIndex]; - }); - - if ([self.delegate respondsToSelector:@selector(listsController:didRemoveListInfo:atIndex:)]) { - [self.delegate listsController:self didRemoveListInfo:trackedRemovedListInfo atIndex:trackedRemovedListInfoIndex]; - } - } - - // Sort the untracked inserted list infos - if (self.sortComparator) { - untrackedInsertedListInfos = [untrackedInsertedListInfos sortedArrayUsingComparator:self.sortComparator]; - } - - // Insert - for (AAPLListInfo *untrackedInsertedListInfo in untrackedInsertedListInfos) { - __block NSInteger untrackedInsertedListInfoIndex; - - dispatch_sync(self.listInfoQueue, ^{ - [self.listInfos addObject:untrackedInsertedListInfo]; - - if (self.sortComparator) { - [self.listInfos sortUsingComparator:self.sortComparator]; - } - - untrackedInsertedListInfoIndex = [self.listInfos indexOfObject:untrackedInsertedListInfo]; - }); - - if ([self.delegate respondsToSelector:@selector(listsController:didInsertListInfo:atIndex:)]) { - [self.delegate listsController:self didInsertListInfo:untrackedInsertedListInfo atIndex:untrackedInsertedListInfoIndex]; - } - } - - // Update - for (AAPLListInfo *updatedListInfo in updatedListInfos) { - __block NSInteger updatedListInfoIndex; - - dispatch_sync(self.listInfoQueue, ^{ - updatedListInfoIndex = [self.listInfos indexOfObject:updatedListInfo]; - - // Track the new list info instead of the old one. - if (updatedListInfoIndex != NSNotFound) { - self.listInfos[updatedListInfoIndex] = updatedListInfo; - } - }); - - if (updatedListInfoIndex != NSNotFound && [self.delegate respondsToSelector:@selector(listsController:didUpdateListInfo:atIndex:)]) { - [self.delegate listsController:self didUpdateListInfo:updatedListInfo atIndex:updatedListInfoIndex]; - } - } - - if ([self.delegate respondsToSelector:@selector(listsControllerDidChangeContent:)]) { - [self.delegate listsControllerDidChangeContent:self]; - } - }]; -} - -#pragma mark - Convenience - -- (NSArray *)listInfosByMappingURLs:(NSArray *)URLs { - NSMutableArray *listInfos = [NSMutableArray arrayWithCapacity:URLs.count]; - - for (NSURL *URL in URLs) { - AAPLListInfo *listInfo = [[AAPLListInfo alloc] initWithURL:URL]; - - [listInfos addObject:listInfo]; - } - - return listInfos; -} - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLLocalListCoordinator.h b/Lister/Objective-C/ListerKit/AAPLLocalListCoordinator.h deleted file mode 100644 index b5350350..00000000 --- a/Lister/Objective-C/ListerKit/AAPLLocalListCoordinator.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLLocalListCoordinator class handles querying for and interacting with lists stored as local files. -*/ - -@import Foundation; -#import "AAPLListCoordinator.h" - -/*! - An object that conforms to the \c AAPLListCoordinator protocol and is responsible for implementing - entry points in order to communicate with an \c AAPLListCoordinatorDelegate. In the case of Lister, - this is the \c AAPLListsController instance. The main responsibility of a \c AAPLListCoordinator is - to track different \c NSURL instances that are important. The local coordinator is responsible for - making sure that the \c AAPLListsController knows about the current set of documents that are available - in the app's local container. - - There are also other responsibilities that an \c AAPLListCoordinator must have that are specific - to the underlying storage mechanism of the coordinator. An \c AAPLListCoordinator determines whether - or not a new list can be created with a specific name, it removes URLs tied to a specific list, and - it is also responsible for listening for updates to any changes that occur at a specific URL - (e.g. a list document is updated on another device, etc.). - - Instances of \c AAPLListCoordinator can search for URLs in an asynchronous way. When a new \c NSURL - instance is found, removed, or updated, the \c AAPLListCoordinator instance must make its delegate - aware of the updates. If a failure occured in removing or creating an \c NSURL for a given list, - it must make its delegate aware by calling one of the appropriate error methods defined in the - \c AAPLListCoordinatorDelegate protocol. - */ -@interface AAPLLocalListCoordinator : NSObject - -/*! - Initializes an \c AAPLLocalListCoordinator based on a path extension used to identify files that can be - managed by the app. Also provides a block parameter that can be used to provide actions to be executed - when the coordinator returns its first set of documents. This coordinator monitors the app's local - container. - - @param pathExtension The extension that should be used to identify documents of interest to this coordinator. - @param firstQueryUpdateHandler The handler that is executed once the first results are returned. - */ -- (instancetype)initWithPathExtension:(NSString *)pathExtension firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler; - -/*! - Initializes an \c AAPLLocalListCoordinator based on a single document used to identify a file that should - be monitored. Also provides a block parameter that can be used to provide actions to be executed when the - coordinator returns its initial result. This coordinator monitors the app's local container. - - @param lastPathComponent The file name that should be monitored by this coordinator. - @param firstQueryUpdateHandler The handler that is executed once the first results are returned. - */ -- (instancetype)initWithLastPathComponent:(NSString *)lastPathComponent firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler; - -@end diff --git a/Lister/Objective-C/ListerKit/AAPLLocalListCoordinator.m b/Lister/Objective-C/ListerKit/AAPLLocalListCoordinator.m deleted file mode 100644 index 081958d1..00000000 --- a/Lister/Objective-C/ListerKit/AAPLLocalListCoordinator.m +++ /dev/null @@ -1,175 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLLocalListCoordinator class handles querying for and interacting with lists stored as local files. -*/ - -#import "AAPLLocalListCoordinator.h" -#import "AAPLDirectoryMonitor.h" -#import "AAPLListUtilities.h" -#import "AAPLAppConfiguration.h" - -@interface AAPLLocalListCoordinator () - -@property (nonatomic, strong) NSPredicate *predicate; - -/// Closure executed after the first update provided by the coordinator regarding tracked URLs. -@property (nonatomic, strong) void (^firstQueryUpdateHandler)(void); - -/// A GCD based monitor used to observe changes to the local documents directory. -@property (nonatomic, strong) AAPLDirectoryMonitor *directoryMonitor; - -@property (nonatomic, copy) NSArray *currentLocalContents; - -@end - -@implementation AAPLLocalListCoordinator -@synthesize delegate = _delegate; - -#pragma mark - Initialization - -- (instancetype)initWithPredicate:(NSPredicate *)predicate firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler { - self = [super init]; - - if (self) { - _predicate = predicate; - _firstQueryUpdateHandler = firstQueryUpdateHandler; - - _directoryMonitor = [[AAPLDirectoryMonitor alloc] initWithURL:[AAPLListUtilities localDocumentsDirectory]]; - _directoryMonitor.delegate = self; - - _currentLocalContents = [NSArray array]; - } - - return self; -} - -- (instancetype)initWithPathExtension:(NSString *)pathExtension firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler { - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(pathExtension = %@)", pathExtension]; - - self = [self initWithPredicate:predicate firstQueryUpdateHandler:firstQueryUpdateHandler]; - - if (self) { - // No need for additional initialization. - } - - return self; -} - -- (instancetype)initWithLastPathComponent:(NSString *)lastPathComponent firstQueryUpdateHandler:(void (^)(void))firstQueryUpdateHandler { - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(lastPathComponent = %@)", lastPathComponent]; - - self = [self initWithPredicate:predicate firstQueryUpdateHandler:firstQueryUpdateHandler]; - - if (self) { - // No need for additional initialization. - } - - return self; -} - -#pragma mark - AAPLListCoordinator - -- (void)startQuery { - [self processChangeToLocalDocumentsDirectory]; - - [self.directoryMonitor startMonitoring]; -} - -- (void)stopQuery { - [self.directoryMonitor stopMonitoring]; -} - -- (void)removeListAtURL:(NSURL *)URL { - [AAPLListUtilities removeListAtURL:URL withCompletionHandler:^(NSError *error) { - if (error) { - [self.delegate listCoordinatorDidFailRemovingListAtURL:URL withError:error]; - } - else { - [self.delegate listCoordinatorDidUpdateContentsWithInsertedURLs:@[] removedURLs:@[URL] updatedURLs:@[]]; - } - }]; -} - -- (void)createURLForList:(AAPLList *)list withName:(NSString *)name { - NSURL *documentURL = [self documentURLForName:name]; - - [AAPLListUtilities createList:list atURL:documentURL withCompletionHandler:^(NSError *error) { - if (error) { - [self.delegate listCoordinatorDidFailCreatingListAtURL:documentURL withError:error]; - } - else { - [self.delegate listCoordinatorDidUpdateContentsWithInsertedURLs:@[documentURL] removedURLs:@[] updatedURLs:@[]]; - } - }]; -} - -- (BOOL)canCreateListWithName:(NSString *)name { - if (name.length <= 0) { - return NO; - } - - NSURL *documentURL = [self documentURLForName:name]; - - return ![[NSFileManager defaultManager] fileExistsAtPath:documentURL.path]; -} - -- (void)copyListFromURL:(NSURL *)URL toListWithName:(NSString *)name { - NSURL *documentURL = [self documentURLForName:name]; - - [AAPLListUtilities copyFromURL:URL toURL:documentURL]; -} - -#pragma mark - AAPLDirectoryMonitorDelegate - -- (void)directoryMonitorDidObserveChange:(AAPLDirectoryMonitor *)directoryMonitor { - [self processChangeToLocalDocumentsDirectory]; -} - -#pragma mark - Convenience - -- (void)processChangeToLocalDocumentsDirectory { - dispatch_queue_t defaultQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul); - - dispatch_async(defaultQueue, ^{ - NSFileManager *fileManager = [NSFileManager defaultManager]; - - // Fetch the list documents from container documents directory. - NSArray *localDocumentURLs = [fileManager contentsOfDirectoryAtURL:[AAPLListUtilities localDocumentsDirectory] includingPropertiesForKeys:nil options:NSDirectoryEnumerationSkipsPackageDescendants error:nil]; - - NSArray *localListURLs = [localDocumentURLs filteredArrayUsingPredicate:self.predicate]; - - if (localListURLs.count > 0) { - NSPredicate *containPredicate = [NSPredicate predicateWithFormat:@"self in %@", self.currentLocalContents]; - NSPredicate *doesntContainPredicate = [NSCompoundPredicate notPredicateWithSubpredicate:containPredicate]; - - NSArray *insertedURLs = [localListURLs filteredArrayUsingPredicate:doesntContainPredicate]; - - containPredicate = [NSPredicate predicateWithFormat:@"self in %@", localListURLs]; - doesntContainPredicate = [NSCompoundPredicate notPredicateWithSubpredicate:containPredicate]; - - NSArray *removedURLs = [self.currentLocalContents filteredArrayUsingPredicate:doesntContainPredicate]; - - [self.delegate listCoordinatorDidUpdateContentsWithInsertedURLs:insertedURLs removedURLs:removedURLs updatedURLs:@[]]; - - self.currentLocalContents = localListURLs; - } - - if (self.firstQueryUpdateHandler) { - // Execute the `firstQueryUpdateHandler`, it will contain the closure from initialization on first update. - self.firstQueryUpdateHandler(); - // Set `firstQueryUpdateHandler` to an empty closure so that the handler provided is only run on first update. - self.firstQueryUpdateHandler = nil; - } - }); -} - -- (NSURL *)documentURLForName:(NSString *)name { - NSURL *documentURLWithoutExtension = [[AAPLListUtilities localDocumentsDirectory] URLByAppendingPathComponent:name]; - - return [documentURLWithoutExtension URLByAppendingPathExtension:AAPLAppConfigurationListerFileExtension]; -} - -@end diff --git a/Lister/Objective-C/ListerKit/Info.plist b/Lister/Objective-C/ListerKit/Info.plist deleted file mode 100644 index d2035fbf..00000000 --- a/Lister/Objective-C/ListerKit/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Lister/Objective-C/ListerKitOSX/AAPLCheckBox.h b/Lister/Objective-C/ListerKitOSX/AAPLCheckBox.h deleted file mode 100644 index 1e90f7c7..00000000 --- a/Lister/Objective-C/ListerKitOSX/AAPLCheckBox.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A layer-backed custom check box that is IBDesignable and IBInspectable. -*/ - -@import Cocoa; - -IB_DESIGNABLE -@interface AAPLCheckBox : NSButton - -@property IBInspectable NSColor *tintColor; - -@property (nonatomic, getter=isChecked) IBInspectable BOOL checked; - -@end diff --git a/Lister/Objective-C/ListerKitOSX/AAPLCheckBox.m b/Lister/Objective-C/ListerKitOSX/AAPLCheckBox.m deleted file mode 100644 index a63ebe9a..00000000 --- a/Lister/Objective-C/ListerKitOSX/AAPLCheckBox.m +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A layer-backed custom check box that is IBDesignable and IBInspectable. -*/ - -#import "AAPLCheckBox.h" -#import "AAPLCheckBoxLayer.h" - -@interface AAPLCheckBox() - -@property (readonly) AAPLCheckBoxLayer *checkBoxLayer; - -@end - -@implementation AAPLCheckBox -@synthesize checked = _checked; -@synthesize tintColor = _tintColor; - -#pragma mark - View Life Cycle - -- (void)awakeFromNib { - [super awakeFromNib]; - - self.wantsLayer = YES; - - self.layer = [AAPLCheckBoxLayer layer]; - - [self.layer setNeedsDisplay]; -} - -- (AAPLCheckBoxLayer *)checkBoxLayer { - return (AAPLCheckBoxLayer *)self.layer; -} - -- (NSSize)intrinsicContentSize { - return NSMakeSize(40, 40); -} - -#pragma mark - Events - -- (void)mouseDown:(NSEvent *)event { - self.checked = !self.checked; - - [self.cell performClick:self]; -} - -- (void)viewDidChangeBackingProperties { - [super viewDidChangeBackingProperties]; - - if (self.window) { - self.layer.contentsScale = self.window.backingScaleFactor; - } -} - -#pragma mark - AAPLCheckBox Property Overrides - -- (void)setChecked:(BOOL)checked { - self.checkBoxLayer.checked = checked; -} - -- (BOOL)isChecked { - return self.checkBoxLayer.checked; -} - -- (void)setTintColor:(NSColor *)tintColor { - self.checkBoxLayer.tintColor = tintColor.CGColor; -} - -- (NSColor *)tintColor { - return [NSColor colorWithCGColor:self.checkBoxLayer.tintColor]; -} - -@end diff --git a/Lister/Objective-C/ListerKitOSX/AAPLListDocument.h b/Lister/Objective-C/ListerKitOSX/AAPLListDocument.h deleted file mode 100644 index 47ed997b..00000000 --- a/Lister/Objective-C/ListerKitOSX/AAPLListDocument.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListDocument class is an \c NSDocument subclass that represents a list. It manages the serialization / deserialization of the list object, presentation of window controllers, a list presenter, and more. -*/ - -@import Cocoa; - -@class AAPLList; -@protocol AAPLListPresenting; - -@interface AAPLListDocument : NSDocument - -- (instancetype)initWithContentsOfURL:(NSURL *)url listPresenter:(id)listPresenter makesCustomWindowControllers:(BOOL)makesCustomWindowControllers error:(NSError *__autoreleasing *)error; - -@property (nonatomic) id listPresenter; - -@end diff --git a/Lister/Objective-C/ListerKitOSX/AAPLListDocument.m b/Lister/Objective-C/ListerKitOSX/AAPLListDocument.m deleted file mode 100644 index 8b2eef46..00000000 --- a/Lister/Objective-C/ListerKitOSX/AAPLListDocument.m +++ /dev/null @@ -1,122 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListDocument class is an \c NSDocument subclass that represents a list. It manages the serialization / deserialization of the list object, presentation of window controllers, a list presenter, and more. -*/ - -#import "AAPLListDocument.h" -#import "AAPlAppConfiguration.h" -#import "AAPLList.h" -#import "AAPLListPresenting.h" - -NSString *const AAPLListWindowControllerStoryboardIdentifier = @"AAPLListWindowControllerStoryboardIdentifier"; - -@interface AAPLListDocument () - -@property (nonatomic) BOOL makesCustomWindowControllers; - -@property AAPLList *unarchivedList; - -@end - -@implementation AAPLListDocument -@synthesize listPresenter = _listPresenter; - -#pragma mark - Initialization - -- (instancetype)initWithContentsOfURL:(NSURL *)url listPresenter:(id)listPresenter makesCustomWindowControllers:(BOOL)makesCustomWindowControllers error:(NSError *__autoreleasing *)error { - self = [super initWithContentsOfURL:url ofType:AAPLAppConfigurationListerFileExtension error:error]; - - if (self) { - _listPresenter = listPresenter; - _makesCustomWindowControllers = makesCustomWindowControllers; - } - - return self; -} - -- (instancetype)init { - self = [super init]; - - if (self) { - _makesCustomWindowControllers = YES; - } - - return self; -} - -#pragma mark - Auto Save and Versions - -+ (BOOL)autosavesInPlace { - return YES; -} - -#pragma mark - Property Overrides - -- (void)setListPresenter:(id)listPresenter { - _listPresenter = listPresenter; - - if (self.unarchivedList) { - [_listPresenter setList:self.unarchivedList]; - } -} - -#pragma mark - NSDocument Overrides - -/*! - Create window controllers from a storyboard, if desired (based on -makesWindowControllers). - The window controller that's used is the initial controller set in the storyboard. - */ -- (void)makeWindowControllers { - [super makeWindowControllers]; - - if (self.makesCustomWindowControllers) { - NSStoryboard *storyboard = [NSStoryboard storyboardWithName:@"Main" bundle:nil]; - - NSWindowController *windowController = [storyboard instantiateControllerWithIdentifier:AAPLListWindowControllerStoryboardIdentifier]; - - [self addWindowController:windowController]; - } -} - -- (NSString *)defaultDraftName { - return [AAPLAppConfiguration sharedAppConfiguration].defaultListerDraftName; -} - -- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError *__autoreleasing *)outError { - self.unarchivedList = [NSKeyedUnarchiver unarchiveObjectWithData:data]; - - if (self.unarchivedList != nil) { - [self.listPresenter setList:self.unarchivedList]; - - return YES; - } - - if (outError) { - *outError = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadCorruptFileError userInfo:@{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Could not read file.", nil), - NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"File was in an invalid format.", nil) - }]; - } - - return NO; -} - -- (NSData *)dataOfType:(NSString *)typeName error:(NSError *__autoreleasing *)outError { - return [NSKeyedArchiver archivedDataWithRootObject:self.listPresenter.archiveableList]; -} - -#pragma mark - Handoff - -- (void)updateUserActivityState:(NSUserActivity *)userActivity { - [super updateUserActivityState:userActivity]; - - // Store the list's color in the user activity to be able to quickly present a list when it's viewed. - [userActivity addUserInfoEntriesFromDictionary:@{ - AAPLAppConfigurationUserActivityListColorUserInfoKey: @(self.listPresenter.color) - }]; -} - -@end diff --git a/Lister/Objective-C/ListerKitOSX/AAPLListFormatting.h b/Lister/Objective-C/ListerKitOSX/AAPLListFormatting.h deleted file mode 100644 index 1451bd51..00000000 --- a/Lister/Objective-C/ListerKitOSX/AAPLListFormatting.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListFormatting class has two purposes: one for transforming AAPLListItem objects into a string representation, and one for transforming a string representation of a list into an array of \c AAPLListItem objects. It is used for copying and pasting \c AAPLListItem objects into and out of the app via \c NSPasteboard. -*/ - -@import Foundation; - -@class AAPLListItem; - -@interface AAPLListFormatting : NSObject - -/// Construct an \c AAPLListItem array from a string. -+ (NSArray *)listItemsFromString:(NSString *)string; - -/// Concatenate all item's \c text property together. -+ (NSString *)stringFromListItems:(NSArray *)items; - -@end diff --git a/Lister/Objective-C/ListerKitOSX/AAPLListFormatting.m b/Lister/Objective-C/ListerKitOSX/AAPLListFormatting.m deleted file mode 100644 index eae08281..00000000 --- a/Lister/Objective-C/ListerKitOSX/AAPLListFormatting.m +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListFormatting class has two purposes: one for transforming \c AAPLListItem objects into a string representation, and one for transforming a string representation of a list into an array of \c AAPLListItem objects. It is used for copying and pasting \c AAPLListItem objects into and out of the app via \c NSPasteboard. -*/ - -#import "AAPLListFormatting.h" -#import "AAPLListItem.h" - -@implementation AAPLListFormatting - -+ (NSArray *)listItemsFromString:(NSString *)string { - NSMutableArray *listItems = [NSMutableArray array]; - - NSRange range = NSMakeRange(0, string.length); - NSStringEnumerationOptions enumerationOptions = NSStringEnumerationBySentences | NSStringEnumerationByLines; - - NSCharacterSet *characterSet = [NSCharacterSet whitespaceAndNewlineCharacterSet]; - - [string enumerateSubstringsInRange:range options:enumerationOptions usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { - NSString *trimmedString = [substring stringByTrimmingCharactersInSet:characterSet]; - - if (trimmedString.length > 0) { - AAPLListItem *listItem = [[AAPLListItem alloc] initWithText:trimmedString]; - - [listItems addObject:listItem]; - } - }]; - - return listItems; -} - -+ (NSString *)stringFromListItems:(NSArray *)listItems { - NSArray *itemTextValues = [listItems valueForKey:@"text"]; - - return [itemTextValues componentsJoinedByString:@"\n"]; -} - -@end diff --git a/Lister/Objective-C/ListerKitOSX/AAPLTodayListManager.h b/Lister/Objective-C/ListerKitOSX/AAPLTodayListManager.h deleted file mode 100644 index 64033930..00000000 --- a/Lister/Objective-C/ListerKitOSX/AAPLTodayListManager.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayListManager class implements convenience methods to create and retrieve the Today list document from the user's ubiquity container. -*/ - -@import Foundation; - -@interface AAPLTodayListManager : NSObject - -+ (AAPLTodayListManager *)sharedTodayListManager; - -/*! - Fetches the ubiquity container URL for the Today list document. If one isn't found, the block is invoked - with a nil value. - */ -- (void)fetchTodayDocumentURLWithCompletionHandler:(void (^)(NSURL *url))completionHandler; - -@end diff --git a/Lister/Objective-C/ListerKitOSX/AAPLTodayListManager.m b/Lister/Objective-C/ListerKitOSX/AAPLTodayListManager.m deleted file mode 100644 index 8fcb3086..00000000 --- a/Lister/Objective-C/ListerKitOSX/AAPLTodayListManager.m +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayListManager class implements convenience methods to create and retrieve the Today list document from the user's ubiquity container. -*/ - -#import "AAPLTodayListManager.h" -#import "AAPLAppConfiguration.h" - -@interface AAPLTodayListManager() -@property (readonly) NSURL *todayDocumentFolderURL; -@end - -@implementation AAPLTodayListManager - -+ (AAPLTodayListManager *)sharedTodayListManager { - static AAPLTodayListManager *sharedTodayListManager; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedTodayListManager = [[AAPLTodayListManager alloc] init]; - }); - - return sharedTodayListManager; -} - -- (void)fetchTodayDocumentURLWithCompletionHandler:(void (^)(NSURL *url))completionHandler { - dispatch_queue_t defaultQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - - dispatch_async(defaultQueue, ^{ - NSURL *url = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; - - if (url) { - NSURL *successURL = [self createTodayDocumentURLWithContainerURL:url]; - - completionHandler(successURL); - } - else { - completionHandler(nil); - } - }); -} - -- (NSURL *)createTodayDocumentURLWithContainerURL:(NSURL *)containerURL { - NSURL *todayDocumentFolderURL = [containerURL URLByAppendingPathComponent:@"Documents"]; - - NSString *localizedTodayDocumentName = [AAPLAppConfiguration sharedAppConfiguration].localizedTodayDocumentName; - NSURL *todayDocumentURL = [todayDocumentFolderURL URLByAppendingPathComponent:localizedTodayDocumentName]; - todayDocumentURL = [todayDocumentURL URLByAppendingPathExtension:AAPLAppConfigurationListerFileExtension]; - - NSFileManager *fileManager = [NSFileManager defaultManager]; - - if ([fileManager fileExistsAtPath:todayDocumentURL.path]) { - return todayDocumentURL; - } - - if (![fileManager createDirectoryAtURL:todayDocumentFolderURL withIntermediateDirectories:YES attributes:nil error:nil]) { - return nil; - } - - NSBundle *bundle = [NSBundle bundleForClass:[self class]]; - NSURL *sampleTodayDocumentURL = [bundle URLForResource:@"Today" withExtension:AAPLAppConfigurationListerFileExtension]; - - if ([fileManager copyItemAtURL:sampleTodayDocumentURL toURL:todayDocumentURL error:nil]) { - // Make the file's extension hidden. - [fileManager setAttributes:@{ NSFileExtensionHidden : @YES } ofItemAtPath:todayDocumentURL.path error:nil]; - - return todayDocumentURL; - } - - return nil; -} - -@end diff --git a/Lister/Objective-C/ListerKitOSX/Info.plist b/Lister/Objective-C/ListerKitOSX/Info.plist deleted file mode 100644 index e85a6fba..00000000 --- a/Lister/Objective-C/ListerKitOSX/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSHumanReadableCopyright - Copyright © 2014 Apple Inc. All rights reserved. - NSPrincipalClass - - - diff --git a/Lister/Objective-C/ListerOSX/AAPLAddItemViewController.h b/Lister/Objective-C/ListerOSX/AAPLAddItemViewController.h deleted file mode 100644 index 8b136174..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLAddItemViewController.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Controls the logic for displaying the UI for creating a new list item for the table view. -*/ - -@import Cocoa; - -@class AAPLAddItemViewController; - -// A protocol that allows a delegate of AddItemViewController to be aware of any new items that should be created. -@protocol AAPLAddItemViewControllerDelegate -- (void)addItemViewController:(AAPLAddItemViewController *)addItemViewController didCreateNewItemWithText:(NSString *)text; -@end - -@interface AAPLAddItemViewController : NSViewController - -@property (weak) id delegate; - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLAddItemViewController.m b/Lister/Objective-C/ListerOSX/AAPLAddItemViewController.m deleted file mode 100644 index 5faa9764..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLAddItemViewController.m +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Controls the logic for displaying the UI for creating a new list item for the table view. -*/ - -#import "AAPLAddItemViewController.h" -@import ListerKit; - -@implementation AAPLAddItemViewController - -#pragma mark - IBActions - -- (IBAction)textChanged:(NSTextField *)textField { - NSString *cleansedString = [textField.stringValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - - if (cleansedString.length > 0) { - [self.delegate addItemViewController:self didCreateNewItemWithText:cleansedString]; - } - - // Tell the presenting view controller to dismiss the popover. - [self.presentingViewController dismissViewController:self]; -} - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLAppDelegate.h b/Lister/Objective-C/ListerOSX/AAPLAppDelegate.h deleted file mode 100644 index 5355f42d..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLAppDelegate.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The application delegate. -*/ - -@import Cocoa; - -@interface AAPLAppDelegate : NSObject -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLAppDelegate.m b/Lister/Objective-C/ListerOSX/AAPLAppDelegate.m deleted file mode 100644 index 9ad75656..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLAppDelegate.m +++ /dev/null @@ -1,71 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The application delegate. -*/ - -#import "AAPLAppDelegate.h" -@import ListerKit; - -@interface AAPLAppDelegate() - -@property (weak) IBOutlet NSMenuItem *todayListMenuItem; - -@property (readonly, getter=isCloudEnabled) BOOL cloudEnabled; - -@end - - -@implementation AAPLAppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)notification { - [[AAPLAppConfiguration sharedAppConfiguration] runHandlerOnFirstLaunch:^{ - - // If iCloud is enabled and it's the first launch, we'll show the Today document initially. - if ([AAPLAppConfiguration sharedAppConfiguration].isCloudAvailable) { - - // Make sure that no other documents are visible except for the Today document. - [[NSDocumentController sharedDocumentController] closeAllDocumentsWithDelegate:nil didCloseAllSelector:NULL contextInfo:NULL]; - - [self openTodayDocument:nil]; - } - }]; - - [self handleUbiquityIdentityDidChangeNotification:nil]; - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleUbiquityIdentityDidChangeNotification:) name:NSUbiquityIdentityDidChangeNotification object:nil]; -} - -/*! - Note that there are two possibile callers for this method. The first is the application delegate if it's - the first launch. The other possibility is if you use the keyboard shortcut (Command-T) to open your Today - document. - */ -- (IBAction)openTodayDocument:(id)sender { - [[AAPLTodayListManager sharedTodayListManager] fetchTodayDocumentURLWithCompletionHandler:^(NSURL *url) { - if (!url) { - return; - } - - dispatch_async(dispatch_get_main_queue(), ^{ - [[NSDocumentController sharedDocumentController] openDocumentWithContentsOfURL:url display:true completionHandler:^(NSDocument *document, BOOL documentWasAlreadyOpen, NSError *error) { - // Configuration of the document can go here... - }]; - }); - }]; -} - -- (void)handleUbiquityIdentityDidChangeNotification:(NSNotification *)notification { - if ([AAPLAppConfiguration sharedAppConfiguration].isCloudAvailable) { - self.todayListMenuItem.action = @selector(openTodayDocument:); - self.todayListMenuItem.target = self; - } - else { - self.todayListMenuItem.action = NULL; - self.todayListMenuItem.target = nil; - } -} - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLColorPaletteView.h b/Lister/Objective-C/ListerOSX/AAPLColorPaletteView.h deleted file mode 100644 index ab489b41..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLColorPaletteView.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A color palette view that allows the user to select a color defined in the \c AAPLListColor enumeration. -*/ - -@import Cocoa; -@import ListerKit; - -@class AAPLColorPaletteView; - -// Delegate protocol to let other objects know about changes to the selected color. -@protocol AAPLColorPaletteViewDelegate -- (void)colorPaletteViewDidChangeSelectedColor:(AAPLColorPaletteView *)colorPaletteView; -@end - -@interface AAPLColorPaletteView : NSView - -@property (weak) IBOutlet id delegate; - -@property (nonatomic) AAPLListColor selectedColor; - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLColorPaletteView.m b/Lister/Objective-C/ListerOSX/AAPLColorPaletteView.m deleted file mode 100644 index 31ed79b1..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLColorPaletteView.m +++ /dev/null @@ -1,141 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A color palette view that allows the user to select a color defined in the \c AAPLListColor enumeration. -*/ - -#import "AAPLColorPaletteView.h" -@import QuartzCore; - -@interface AAPLColorPaletteView() - -@property (weak) IBOutlet NSButton *grayButton; -@property (weak) IBOutlet NSButton *blueButton; -@property (weak) IBOutlet NSButton *greenButton; -@property (weak) IBOutlet NSButton *yellowButton; -@property (weak) IBOutlet NSButton *orangeButton; -@property (weak) IBOutlet NSButton *redButton; - -@property (weak) IBOutlet NSButton *overlayButton; - -@property (weak) IBOutlet NSView *overlayView; -@property (weak) IBOutlet NSLayoutConstraint *overlayLayoutConstraint; - -// Set in IB and saved to use for showing / hiding the overlay. -@property CGFloat initialLayoutConstraintConstant; - -// The overlay is expanded initially in the storyboard. -@property (getter=isOverlayExpanded) BOOL overlayExpanded; - - -@end - -@implementation AAPLColorPaletteView -@synthesize selectedColor = _selectedColor; - -#pragma mark - View Life Cycle - -- (void)awakeFromNib { - [super awakeFromNib]; - - // Make the background of the color palette view white. - self.layer = [CALayer layer]; - self.layer.backgroundColor = [NSColor whiteColor].CGColor; - - // Make the overlay view color (i.e. selectedColor gray by default. - self.overlayView.layer = [CALayer layer]; - self.selectedColor = AAPLListColorGray; - - self.initialLayoutConstraintConstant = self.overlayLayoutConstraint.constant; - - [self hideOverlayWithSelectedColor:self.selectedColor animated:NO]; - - // Set the background color for each button. - NSArray *buttons = @[self.grayButton, self.blueButton, self.greenButton, self.yellowButton, self.orangeButton, self.redButton]; - [buttons enumerateObjectsUsingBlock:^(NSButton *button, NSUInteger idx, BOOL *stop) { - button.layer = [CALayer layer]; - - AAPLListColor listColor = (AAPLListColor)button.tag; - button.layer.backgroundColor = AAPLColorFromListColor(listColor).CGColor; - }]; -} - -#pragma mark - IBActions - -- (IBAction)colorButtonClicked:(NSButton *)sender { - AAPLListColor listColor = (AAPLListColor)sender.tag; - - [self hideOverlayWithSelectedColor:listColor animated:YES]; -} - -- (IBAction)colorToggleButtonClicked:(NSButton *)sender { - if (self.overlayExpanded) { - [self hideOverlayWithSelectedColor:self.selectedColor animated:YES]; - } - else { - [self showOverlayAnimated:YES]; - } -} - -#pragma mark - Property Overrides - -- (void)setSelectedColor:(AAPLListColor)selectedColor { - _selectedColor = selectedColor; - - self.overlayView.layer.backgroundColor = AAPLColorFromListColor(selectedColor).CGColor; -} - -#pragma mark - Convenience - -- (void)showOverlayAnimated:(BOOL)animated { - [self setOverlayConstant:self.initialLayoutConstraintConstant buttonTitle:self.expandedTitle newSelectedColor:self.selectedColor animated:animated expanded:YES]; -} - -- (void)hideOverlayWithSelectedColor:(AAPLListColor)selectedColor animated:(BOOL)animated { - [self setOverlayConstant:0 buttonTitle:[self unexpandedTitle] newSelectedColor:selectedColor animated:animated expanded:NO]; -} - -- (void)setOverlayConstant:(CGFloat)layoutConstant buttonTitle:(NSString *)buttonTitle newSelectedColor:(AAPLListColor)newSelectedColor animated:(BOOL)animated expanded:(BOOL)expanded { - // Check to see if the selected colors are different. We only want to trigger the -colorPaletteViewDidChangeSelectedColor: - // delegate call if the colors have changed. - BOOL colorsAreDifferent = newSelectedColor != self.selectedColor; - - self.overlayExpanded = expanded; - - if (animated) { - [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) { - // Customize the animation parameters. - context.duration = 0.25; - context.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; - - self.overlayLayoutConstraint.animator.constant = layoutConstant; - self.overlayButton.animator.title = buttonTitle; - self.selectedColor = newSelectedColor; - } completionHandler:^{ - if (colorsAreDifferent) { - [self.delegate colorPaletteViewDidChangeSelectedColor:self]; - } - }]; - } - else { - self.overlayLayoutConstraint.constant = layoutConstant; - self.overlayButton.title = buttonTitle; - self.selectedColor = newSelectedColor; - - if (colorsAreDifferent) { - [self.delegate colorPaletteViewDidChangeSelectedColor:self]; - } - } -} - -- (NSString *)expandedTitle { - return @"▶"; -} - -- (NSString *)unexpandedTitle { - return @"◀"; -} - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLListItemView.h b/Lister/Objective-C/ListerOSX/AAPLListItemView.h deleted file mode 100644 index f30b6b1d..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLListItemView.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - An \c NSTableCellView subclass that has a few controls that represent the state of a \c AAPLListItem object. -*/ - -@import Cocoa; - -@class AAPLListItemView; - -@protocol AAPLListItemViewDelegate -- (void)listItemViewDidToggleCompletionState:(AAPLListItemView *)listItemView; -- (void)listItemViewTextDidEndEditing:(AAPLListItemView *)listItemView; -@end - - -@interface AAPLListItemView : NSTableCellView - -@property (weak) id delegate; - -@property (getter=isComplete) BOOL complete; - -@property NSColor *tintColor; - -@property (copy) NSString *stringValue; - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLListItemView.m b/Lister/Objective-C/ListerOSX/AAPLListItemView.m deleted file mode 100644 index 8b20e3a8..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLListItemView.m +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - An \c NSTableCellView subclass that has a few controls that represent the state of a \c AAPLListItem object. -*/ - -#import "AAPLListItemView.h" -#import "NSColor+AppSpecific.h" -@import ListerKit; - -@interface AAPLListItemView() - -@property (weak) IBOutlet AAPLCheckBox *statusCheckBox; -@property (weak) IBOutlet NSTextField *textField; - -@end - -@implementation AAPLListItemView -@synthesize complete = _complete; -@dynamic textField; - -#pragma mark - View Life Cycle - -- (void)awakeFromNib { - [super awakeFromNib]; - - // Listen for the NSControlTextDidEndEditingNotification notification to notify the delegate of any - // updates it has to do its underlying model. - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleControlTextDidEndEditingNotification:) name:NSControlTextDidEndEditingNotification object:self.textField]; -} - -#pragma mark - Lifetime - -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self name:NSControlTextDidEndEditingNotification object:self.textField]; -} - - -#pragma mark - IBActions - -- (IBAction)statusCheckBoxButtonClicked:(NSButton *)sender { - [self.delegate listItemViewDidToggleCompletionState:self]; -} - -#pragma mark - Notifications - -- (void)handleControlTextDidEndEditingNotification:(NSNotification *)notification { - [self.delegate listItemViewTextDidEndEditing:self]; -} - -#pragma mark - Setter Overrides - - -- (NSString *)stringValue { - return self.textField.stringValue; -} - -- (void)setStringValue:(NSString *)textValue { - self.textField.stringValue = textValue; -} - -- (void)setComplete:(BOOL)complete { - if (_complete != complete) { - _complete = complete; - - self.statusCheckBox.checked = complete; - self.textField.textColor = complete ? [NSColor aapl_completeItemTextColor] : [NSColor aapl_incompleteItemTextColor]; - self.textField.enabled = !complete; - } -} - -- (BOOL)isComplete { - return _complete; -} - -- (void)setTintColor:(NSColor *)tintColor { - self.statusCheckBox.tintColor = tintColor; -} - -- (NSColor *)tintColor { - return self.statusCheckBox.tintColor; -} - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLListTableView.h b/Lister/Objective-C/ListerOSX/AAPLListTableView.h deleted file mode 100644 index 50aa6cae..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLListTableView.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - An \c NSTableView subclass that ensures that the text field is always the first responder for an event. -*/ - -@import Cocoa; - -@interface AAPLListTableView : NSTableView -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLListTableView.m b/Lister/Objective-C/ListerOSX/AAPLListTableView.m deleted file mode 100644 index 1724dc9c..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLListTableView.m +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - An \c NSTableView subclass that ensures that the text field is always the first responder for an event. -*/ - -#import "AAPLListTableView.h" - -@implementation AAPLListTableView - -- (BOOL)validateProposedFirstResponder:(NSResponder *)responder forEvent:(NSEvent *)event { - if ([responder isKindOfClass:[NSTextField class]]) { - return YES; - } - - return [super validateProposedFirstResponder:responder forEvent:event]; -} - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLListViewController.h b/Lister/Objective-C/ListerOSX/AAPLListViewController.h deleted file mode 100644 index 252ddf43..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLListViewController.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The view controller responsible for displaying the contents of a list document. -*/ - -@import Cocoa; -#import "AAPLAddItemViewController.h" - -@class AAPLListItem, AAPLListDocument; - -@interface AAPLListViewController : NSViewController - -@property (nonatomic, weak) AAPLListDocument *document; - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLListViewController.m b/Lister/Objective-C/ListerOSX/AAPLListViewController.m deleted file mode 100644 index 42cfd61f..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLListViewController.m +++ /dev/null @@ -1,427 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The view controller responsible for displaying the contents of a list document. -*/ - -#import "AAPLListViewController.h" -#import "AAPLAddItemViewController.h" -#import "AAPLColorPaletteView.h" -#import "AAPLListItemView.h" -#import "AAPLTableRowView.h" -@import ListerKit; -@import NotificationCenter; - -// View identifiers. -NSString *const AAPLListViewControllerListItemViewIdentifier = @"AAPLListViewControllerListItemViewIdentifier"; -NSString *const AAPLListViewControllerNoListItemViewIdentifier = @"AAPLListViewControllerNoListItemViewIdentifier"; - -// List table view. -NSString *const AAPLListViewControllerDragType = @"AAPLListViewControllerDragType"; -NSString *const AAPLListViewControllerPasteboardType = @"public.item.list"; - -@interface AAPLListViewController() - -@property (weak) IBOutlet NSTableView *tableView; -@property (weak) IBOutlet AAPLColorPaletteView *colorPaletteView; - -// Convenience -@property (readonly) AAPLAllListItemsPresenter *listPresenter; - -@end - - -@implementation AAPLListViewController - -#pragma mark - Convenience - -- (void)setDocument:(AAPLListDocument *)document { - _document = document; - - AAPLAllListItemsPresenter *listPresenter = [[AAPLAllListItemsPresenter alloc] init]; - listPresenter.delegate = self; - - document.listPresenter = listPresenter; - - listPresenter.undoManager = self.document.undoManager; -} - -- (AAPLAllListItemsPresenter *)listPresenter { - return [self.document listPresenter]; -} - -- (NSUndoManager *)undoManager { - return [self.document undoManager]; -} - -#pragma mark - View Life Cycle - -- (void)viewDidAppear { - [super viewDidAppear]; - - // Load the current data for the table view. - [self.tableView reloadData]; - - // Enable dragging for the list items of our specific type. - [self.tableView registerForDraggedTypes:@[AAPLListViewControllerDragType, NSPasteboardTypeString]]; - [self.tableView setDraggingSourceOperationMask:NSDragOperationMove forLocal:YES]; -} - - -#pragma mark - NSTableViewDelegate - -- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { - if (!self.document) { - return 0; - } - - return self.listPresenter.isEmpty ? 1 : self.listPresenter.count; -} - -- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { - if (self.listPresenter.isEmpty) { - return [tableView makeViewWithIdentifier:AAPLListViewControllerNoListItemViewIdentifier owner:nil]; - } - - AAPLListItemView *listItemView = [tableView makeViewWithIdentifier:AAPLListViewControllerListItemViewIdentifier owner:nil]; - - AAPLListItem *listItem = self.listPresenter.presentedListItems[row]; - - [self configureListItemView:listItemView forListItem:listItem]; - - return listItemView; -} - -// Only allow rows to be selectable if there are items in the list. -- (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)row { - return !self.listPresenter.isEmpty; -} - -- (NSDragOperation)tableView:(NSTableView *)tableView validateDrop:(id)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)dropOperation { - // Don't allow moving/copying the empty list item. - NSPasteboard *pasteboard = [info draggingPasteboard]; - - NSDragOperation result = NSDragOperationNone; - - // Only allow drops above. - if (dropOperation == NSTableViewDropAbove) { - // If the drag source is our table view, it's a move. - if ([info draggingSource] == tableView) { - NSArray *listItems = [self listItemsWithListerPasteboardType:pasteboard refreshesItemIdentities:NO]; - - // Only allow a move if there's a single item being moved, and the list allows it. - if (listItems.count == 1 && [self.listPresenter canMoveListItem:listItems.firstObject toIndex:row]) { - result = NSDragOperationMove; - } - } - else { - if ([self listItemsWithListerPasteboardType:pasteboard refreshesItemIdentities:NO] || [self listItemsWithStringPasteboardType:pasteboard]) { - result = NSDragOperationCopy; - } - } - } - - return result; -} - -- (BOOL)tableView:(NSTableView *)tableView acceptDrop:(id)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)dropOperation { - NSPasteboard *pasteboard = [info draggingPasteboard]; - - if (info.draggingSource == self.tableView) { - NSArray *listItems = [self listItemsWithListerPasteboardType:pasteboard refreshesItemIdentities:NO]; - - NSAssert(listItems.count == 1, @"There must be exactly one moved item."); - NSAssert(dropOperation == NSTableViewDropAbove, @"Only NSTableViewDropAbove operations are allowed."); - - AAPLListItem *listItem = listItems.firstObject; - - NSInteger fromIndex = [self.listPresenter.presentedListItems indexOfObject:listItem]; - - NSInteger normalizedToIndex = row; - if (fromIndex < row) { - normalizedToIndex--; - } - - [self.listPresenter moveListItem:listItem toIndex:normalizedToIndex]; - } - else { - NSArray *listItems = [self listItemsWithStringPasteboardType:pasteboard]; - - NSAssert(listItems, @"`listItems` must not be nil"); - - [self.listPresenter insertListItems:listItems]; - } - - return YES; -} - -- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pasteboard { - if (self.listPresenter.empty) { - return NO; - } - - NSArray *items = [self.listPresenter.presentedListItems objectsAtIndexes:rowIndexes]; - - [self writeListItems:items toPasteboard:pasteboard]; - - return YES; -} - -#pragma mark - NSPasteboard Convenience - -- (NSArray *)listItemsWithListerPasteboardType:(NSPasteboard *)pasteboard refreshesItemIdentities:(BOOL)refreshesItemIdentities { - if ([pasteboard canReadItemWithDataConformingToTypes:@[AAPLListViewControllerPasteboardType]]) { - NSMutableArray *listItems = [NSMutableArray array]; - - for (NSPasteboardItem *pasteboardItem in pasteboard.pasteboardItems) { - NSData *itemsData = [pasteboardItem dataForType:AAPLListViewControllerPasteboardType]; - - NSArray *pasteboardsListItems = [NSKeyedUnarchiver unarchiveObjectWithData:itemsData]; - - if (refreshesItemIdentities) { - for (AAPLListItem *listItem in pasteboardsListItems) { - [listItem refreshIdentity]; - } - } - - [listItems addObjectsFromArray:pasteboardsListItems]; - } - - return listItems; - } - - return nil; -} - -- (NSArray *)listItemsWithStringPasteboardType:(NSPasteboard *)pasteboard { - if ([pasteboard canReadItemWithDataConformingToTypes:@[NSPasteboardTypeString]]) { - NSMutableArray *listItems = [NSMutableArray array]; - - for (NSPasteboardItem *pasteboardItem in pasteboard.pasteboardItems) { - NSString *targetType = [pasteboardItem availableTypeFromArray:@[NSPasteboardTypeString]]; - - NSString *pasteboardString = [pasteboardItem stringForType:targetType]; - - NSArray *formattedListItems = [AAPLListFormatting listItemsFromString:pasteboardString]; - [listItems addObjectsFromArray:formattedListItems]; - } - - return listItems; - } - - return nil; -} - -- (void)writeListItems:(NSArray *)listItems toPasteboard:(NSPasteboard *)pasteboard { - [pasteboard declareTypes:@[AAPLListViewControllerDragType, NSPasteboardTypeString] owner:nil]; - - // Save the items as data. - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:listItems]; - [pasteboard setData:data forType:AAPLListViewControllerPasteboardType]; - - // Save the items as a string. - NSString *listItemsString = [AAPLListFormatting stringFromListItems:listItems]; - [pasteboard setString:listItemsString forType:NSPasteboardTypeString]; -} - -#pragma mark - Cut / Copy / Paste / Delete - -- (void)cut:(id)sender { - NSIndexSet *selectedRowIndexes = self.tableView.selectedRowIndexes; - - if (selectedRowIndexes.count > 0) { - NSArray *listItems = [self.listPresenter.presentedListItems objectsAtIndexes:selectedRowIndexes]; - - [self writeListItems:listItems toPasteboard:[NSPasteboard generalPasteboard]]; - - [self.listPresenter removeListItems:listItems]; - } -} - -- (void)copy:(id)sender { - NSIndexSet *selectedRowIndexes = self.tableView.selectedRowIndexes; - - if (selectedRowIndexes.count > 0) { - NSArray *items = [self.listPresenter.presentedListItems objectsAtIndexes:selectedRowIndexes]; - - [self writeListItems:items toPasteboard:[NSPasteboard generalPasteboard]]; - } -} - -- (void)paste:(id)sender { - // First check if the items were serialized as data, then check for text. - NSArray *listItems = [self listItemsWithListerPasteboardType:[NSPasteboard generalPasteboard] refreshesItemIdentities:YES]; - - if (!listItems) { - listItems = [self listItemsWithStringPasteboardType:[NSPasteboard generalPasteboard]]; - } - - if (listItems.count > 0) { - [self.listPresenter insertListItems:listItems]; - } -} - -- (void)keyDown:(NSEvent *)event { - unichar character = [event.charactersIgnoringModifiers characterAtIndex:0]; - - // Only handle delete keyboard event. - if (character == NSDeleteCharacter) { - NSArray *listItems = [self.listPresenter.presentedListItems objectsAtIndexes:self.tableView.selectedRowIndexes]; - - [self.listPresenter removeListItems:listItems]; - } -} - -#pragma mark - IBActions - -- (IBAction)markAllListItemsAsComplete:(id)sender { - [self.listPresenter updatePresentedListItemsToCompletionState:YES]; -} - -- (IBAction)markAllListItemsAsIncomplete:(id)sender { - [self.listPresenter updatePresentedListItemsToCompletionState:NO]; -} - -#pragma mark - AAPLListItemViewDelegate - -- (void)listItemViewDidToggleCompletionState:(AAPLListItemView *)listItemView { - NSInteger row = [self.tableView rowForView:listItemView]; - - AAPLListItem *listItem = self.listPresenter.presentedListItems[row]; - - [self.listPresenter toggleListItem:listItem]; -} - -- (void)listItemViewTextDidEndEditing:(AAPLListItemView *)listItemView { - NSInteger row = [self.tableView rowForView:listItemView]; - - if (row == -1) { - return; - } - - NSString *cleansedString = [listItemView.stringValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - - AAPLListItem *listItem = self.listPresenter.presentedListItems[row]; - - // If a list item's text is empty after editing, delete it. - if (cleansedString.length <= 0) { - [self.listPresenter removeListItem:listItem]; - } - else { - [self.listPresenter updateListItem:listItem withText:listItemView.stringValue]; - } -} - -#pragma mark - AAPLAddItemViewControllerDelegate - -- (void)addItemViewController:(AAPLAddItemViewController *)addItemViewController didCreateNewItemWithText:(NSString *)text { - AAPLListItem *newListItem = [[AAPLListItem alloc] initWithText:text]; - - [self.listPresenter insertListItem:newListItem]; -} - -#pragma mark - AAPLColorPaletteViewDelegate - -- (void)colorPaletteViewDidChangeSelectedColor:(AAPLColorPaletteView *)colorPaletteView { - self.listPresenter.color = colorPaletteView.selectedColor; -} - -#pragma mark - AAPLListPresenterDelegate - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - [self.tableView reloadData]; - - self.colorPaletteView.selectedColor = listPresenter.color; -} - -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - [self.tableView beginUpdates]; -} - -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - // Hide the "No items in list" row. - if (index == 0 && listPresenter.count == 1) { - [self.tableView removeRowsAtIndexes:indexSet withAnimation:NSTableViewAnimationSlideUp]; - } - - [self.tableView insertRowsAtIndexes:indexSet withAnimation:NSTableViewAnimationSlideDown]; -} - -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:index]; - - [self.tableView removeRowsAtIndexes:indexSet withAnimation:NSTableViewAnimationSlideUp]; - - // Show the "No items in list" row. - if (index == 0 && listPresenter.isEmpty) { - [self.tableView insertRowsAtIndexes:indexSet withAnimation:NSTableViewAnimationSlideDown]; - } -} - -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - AAPLListItemView *listItemView = [self.tableView viewAtColumn:0 row:index makeIfNecessary:NO]; - - [self configureListItemView:listItemView forListItem:listItem]; -} - -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex { - [self.tableView moveRowAtIndex:fromIndex toIndex:toIndex]; -} - -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color { - self.colorPaletteView.selectedColor = color; - - /** - Update the list item views with the newly selected color. Only update the `AAPLListItemView` subclasses - since they only have a tint color. - */ - [self.tableView enumerateAvailableRowViewsUsingBlock:^(NSTableRowView *rowView, NSInteger row) { - id listItemView = [rowView viewAtColumn:0]; - - if ([listItemView isKindOfClass:[AAPLListItemView class]]) { - [listItemView setTintColor:AAPLColorFromListColor(self.listPresenter.color)]; - } - }]; -} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - [self.tableView endUpdates]; - - if (!isInitialLayout) { - [self updateWidget]; - } -} - -#pragma mark - NCWidget Support - -- (void)updateWidget { - [[AAPLTodayListManager sharedTodayListManager] fetchTodayDocumentURLWithCompletionHandler:^(NSURL *todayDocumentURL) { - if (!todayDocumentURL) { - return; - } - - NSURL *currentDocumentURL = [self.document fileURL]; - - if ([currentDocumentURL isEqual:todayDocumentURL]) { - [[NCWidgetController widgetController] setHasContent:YES forWidgetWithBundleIdentifier:AAPLAppConfigurationWidgetBundleIdentifier]; - } - }]; -} - -#pragma mark - Convenience - -- (void)configureListItemView:(AAPLListItemView *)listItemView forListItem:(AAPLListItem *)listItem { - listItemView.complete = listItem.isComplete; - - listItemView.tintColor = AAPLColorFromListColor(self.listPresenter.color); - - listItemView.stringValue = listItem.text; - - listItemView.delegate = self; -} - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLListWindowController.h b/Lister/Objective-C/ListerOSX/AAPLListWindowController.h deleted file mode 100644 index 6dda169a..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLListWindowController.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A window controller that displays a single list document. Handles interaction with the "share" button and the "plus" button (for creating a new item). -*/ - -@import Cocoa; - -@interface AAPLListWindowController : NSWindowController -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLListWindowController.m b/Lister/Objective-C/ListerOSX/AAPLListWindowController.m deleted file mode 100644 index 703aa49a..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLListWindowController.m +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A window controller that displays a single list document. Handles interaction with the "share" button and the "plus" button (for creating a new item). -*/ - -#import "AAPLListWindowController.h" -#import "AAPLListViewController.h" -#import "AAPLAddItemViewController.h" -@import ListerKit; - -@interface AAPLListWindowController() - -@property (weak) IBOutlet NSButton *shareButton; - -@end - -NSString *const AAPLListWindowControllerShowAddItemViewControllerSegueIdentifier = @"showAddItem"; - -@implementation AAPLListWindowController - -#pragma mark - Overrides - -- (void)awakeFromNib { - [super awakeFromNib]; - - [self.shareButton sendActionOn:NSLeftMouseDownMask]; -} - -/// Ensure that the content view controller actually knows about the document. -- (void)setDocument:(AAPLListDocument *)document { - [super setDocument:document]; - - AAPLListViewController *listViewController = (AAPLListViewController *)self.window.contentViewController; - listViewController.document = document; -} - -#pragma mark - Keyboard Shortcuts - -/// Allow the user to create a new list item with a keyboard shortcut (command-N). -- (IBAction)showAddItemViewController:(id)sender { - [self performSegueWithIdentifier:AAPLListWindowControllerShowAddItemViewControllerSegueIdentifier sender:sender]; -} - -#pragma mark - IBActions - -- (IBAction)shareDocument:(NSButton *)sender { - AAPLListDocument *document = self.document; - NSString *listContents = [AAPLListFormatting stringFromListItems:document.listPresenter.presentedListItems]; - - NSSharingServicePicker *sharingServicePicker = [[NSSharingServicePicker alloc] initWithItems:@[listContents]]; - - [sharingServicePicker showRelativeToRect:NSZeroRect ofView:sender preferredEdge:NSMinYEdge]; -} - -- (void)prepareForSegue:(NSStoryboardSegue *)segue sender:(id)sender { - if ([segue.identifier isEqualToString:AAPLListWindowControllerShowAddItemViewControllerSegueIdentifier]) { - AAPLListViewController *listViewController = (AAPLListViewController *)self.window.contentViewController; - - AAPLAddItemViewController *addItemViewController = segue.destinationController; - - addItemViewController.delegate = listViewController; - } -} - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLResizingTextField.h b/Lister/Objective-C/ListerOSX/AAPLResizingTextField.h deleted file mode 100644 index e7b35d89..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLResizingTextField.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A subclass of \c NSTextField that maintains its \c intrinsicContentSize property based on the size of its text. -*/ - -@import Cocoa; - -@interface AAPLResizingTextField : NSTextField -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLResizingTextField.m b/Lister/Objective-C/ListerOSX/AAPLResizingTextField.m deleted file mode 100644 index 1683d0a5..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLResizingTextField.m +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A subclass of \c NSTextField that maintains its \c intrinsicContentSize property based on the size of its text. - */ - -#import "AAPLResizingTextField.h" - -@implementation AAPLResizingTextField - -- (void)textDidChange:(NSNotification *)notification { - [super textDidChange:notification]; - - [self invalidateIntrinsicContentSize]; -} - -- (NSSize)intrinsicContentSize { - NSSize maximumSize = NSMakeSize(CGFLOAT_MAX, NSHeight(self.frame)); - - NSRect boundingSize = [self.stringValue boundingRectWithSize:maximumSize options:0 attributes:@{ NSFontAttributeName: self.font }]; - - CGFloat roundedWidth = (CGFloat)((NSInteger)NSWidth(boundingSize) + 10); - - return NSMakeSize(roundedWidth, NSHeight(self.frame)); -} - -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLTableRowView.h b/Lister/Objective-C/ListerOSX/AAPLTableRowView.h deleted file mode 100644 index 5d52faf2..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLTableRowView.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - An \c NSTableRowView subclass that draws a specific background color. The table view creates these row views automatically because the \c NSTableViewRowViewKey key is set on one of the \c AAPLListViewController object's rows in the storyboard. -*/ - -@import Cocoa; - -@interface AAPLTableRowView : NSTableRowView -@end diff --git a/Lister/Objective-C/ListerOSX/AAPLTableRowView.m b/Lister/Objective-C/ListerOSX/AAPLTableRowView.m deleted file mode 100644 index 4fa88418..00000000 --- a/Lister/Objective-C/ListerOSX/AAPLTableRowView.m +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - An \c NSTableRowView subclass that draws a specific background color. The table view creates these row views automatically because the \c NSTableViewRowViewKey key is set on one of the \c AAPLListViewController object's rows in the storyboard. -*/ - -#import "AAPLTableRowView.h" - -@implementation AAPLTableRowView - -- (void)drawSelectionInRect:(NSRect)dirtyRect { - [super drawSelectionInRect:dirtyRect]; - - NSColor *selectionColor = [NSColor colorWithRed:0.76 green:0.82 blue:0.92 alpha:1]; - [selectionColor setFill]; - - NSRectFill(dirtyRect); -} - -@end diff --git a/Lister/Objective-C/ListerOSX/Info.plist b/Lister/Objective-C/ListerOSX/Info.plist deleted file mode 100644 index 45b4e0cc..00000000 --- a/Lister/Objective-C/ListerOSX/Info.plist +++ /dev/null @@ -1,83 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - $(PRODUCT_NAME) - CFBundleDocumentTypes - - - CFBundleTypeIconFile - ListerDocumentIcon - CFBundleTypeName - List Document - CFBundleTypeRole - Editor - LSHandlerRank - Owner - LSItemContentTypes - - com.example.apple-samplecode.Lister - - LSTypeIsPackage - - NSDocumentClass - AAPLListDocument - NSUbiquitousDocumentUserActivityType - com.example.apple-samplecode.Lister.editing - - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2014 Apple Inc. All rights reserved. - NSMainStoryboardFile - Main - NSPrincipalClass - NSApplication - NSUserActivityTypes - - com.example.apple-samplecode.Lister.editing - - UTExportedTypeDeclarations - - - UTTypeConformsTo - - public.data - - UTTypeDescription - List Document - UTTypeIdentifier - com.example.apple-samplecode.Lister - UTTypeTagSpecification - - public.filename-extension - - list - - - - - - diff --git a/Lister/Objective-C/ListerOSX/Main.storyboard b/Lister/Objective-C/ListerOSX/Main.storyboard deleted file mode 100644 index 8d1d1061..00000000 --- a/Lister/Objective-C/ListerOSX/Main.storyboard +++ /dev/null @@ -1,1088 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -YnBsaXN0MDDUAQIDBAUGQUJYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK8QEAcI -ER0eHyAmJy0yMwoLOTxVJG51bGzUCQoLDA0ODxBWJGNsYXNzVmZpbHRlclR0eXBlXxASX19DQUNvZGlu -Z0NvbnRlbnRzgA+AAoAKgAvWEhMUFRYJFxgZGhscWUNJRW5hYmxlZFxDSV9pbnB1dFRpbWVfEBRDSV9p -bnB1dFNoYWRvd1JhZGl1c18QFENJX2lucHV0U2hhZG93T2Zmc2V0XxAVQ0lfaW5wdXRTaGFkb3dEZW5z -aXR5CYADgASABoAFgAkjAAAAAAAAAAAjQCAAAAAAAAAjP+TMzMzMzM3TISIJIyQlV0NJQ291bnRYQ0lW -ZWN0b3IQAoAHgAhfEBJ7ezAsIC0xMH0sIHswLCAwfX3SKCkqK1okY2xhc3NuYW1lWCRjbGFzc2VzWENJ -VmVjdG9yoiosWE5TT2JqZWN00igpLi9fECBDSURpc2ludGVncmF0ZVdpdGhNYXNrVHJhbnNpdGlvbqMw -MSxfECBDSURpc2ludGVncmF0ZVdpdGhNYXNrVHJhbnNpdGlvblhDSUZpbHRlclRmYWRl0jQJNThaTlMu -b2JqZWN0c6I2N4AMgA2ADtIoKTo7V05TQXJyYXmiOizSKCk9PlxDQVRyYW5zaXRpb26jP0AsXENBVHJh -bnNpdGlvbltDQUFuaW1hdGlvbl8QD05TS2V5ZWRBcmNoaXZlctFDRFRyb290gAEACAARABoAIwAtADIA -NwBKAFAAWQBgAGcAbACBAIMAhQCHAIkAlgCgAK0AxADbAPMA9AD2APgA+gD8AP4BBwEQARkBIAEoATEB -MwE1ATcBTAFRAVwBZQFuAXEBegF/AaIBpgHJAdIB1wHcAecB6gHsAe4B8AH1Af0CAAIFAhICFgIjAi8C -QQJEAkkAAAAAAAACAQAAAAAAAABFAAAAAAAAAAAAAAAAAAACSw - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Lister/Objective-C/ListerOSX/NSColor+AppSpecific.h b/Lister/Objective-C/ListerOSX/NSColor+AppSpecific.h deleted file mode 100644 index 22e7d17d..00000000 --- a/Lister/Objective-C/ListerOSX/NSColor+AppSpecific.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Adds a category to \c NSColor to provide predefined incomplete and complete item text color. -*/ - -@import Cocoa; - -@interface NSColor (AAPLAppSpecific) - -+ (NSColor *)aapl_completeItemTextColor; -+ (NSColor *)aapl_incompleteItemTextColor; - -@end \ No newline at end of file diff --git a/Lister/Objective-C/ListerOSX/NSColor+AppSpecific.m b/Lister/Objective-C/ListerOSX/NSColor+AppSpecific.m deleted file mode 100644 index 3cef7730..00000000 --- a/Lister/Objective-C/ListerOSX/NSColor+AppSpecific.m +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Adds a category to \c NSColor to provide predefined incomplete and complete item text color. -*/ - -@import Cocoa; - -@implementation NSColor (AAPLAppSpecific) - -+ (NSColor *)aapl_completeItemTextColor { - static NSColor *completeItemTextColor; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - completeItemTextColor = [NSColor colorWithRed:0.70 green:0.70 blue:0.70 alpha:1]; - }); - - return completeItemTextColor; -} - -+ (NSColor *)aapl_incompleteItemTextColor { - return [NSColor blackColor]; -} - -@end diff --git a/Lister/Objective-C/ListerOSX/main.m b/Lister/Objective-C/ListerOSX/main.m deleted file mode 100644 index 59c06e98..00000000 --- a/Lister/Objective-C/ListerOSX/main.m +++ /dev/null @@ -1,13 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The main entry point to the application. -*/ - -@import Cocoa; - -int main(int argc, const char *argv[]) { - return NSApplicationMain(argc, argv); -} diff --git a/Lister/Objective-C/ListerToday/AAPLCheckBoxCell.h b/Lister/Objective-C/ListerToday/AAPLCheckBoxCell.h deleted file mode 100644 index bf94e9d2..00000000 --- a/Lister/Objective-C/ListerToday/AAPLCheckBoxCell.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A check box cell for the Today view. -*/ - -@import UIKit; -@import ListerKit; - -@interface AAPLCheckBoxCell : UITableViewCell - -@property (weak) IBOutlet UILabel *label; -@property (weak) IBOutlet AAPLCheckBox *checkBox; - -@end diff --git a/Lister/Objective-C/ListerToday/AAPLCheckBoxCell.m b/Lister/Objective-C/ListerToday/AAPLCheckBoxCell.m deleted file mode 100644 index 573af905..00000000 --- a/Lister/Objective-C/ListerToday/AAPLCheckBoxCell.m +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A check box cell for the Today view. -*/ - -#import "AAPLCheckboxCell.h" - -@implementation AAPLCheckBoxCell -@end diff --git a/Lister/Objective-C/ListerToday/AAPLTodayViewController.h b/Lister/Objective-C/ListerToday/AAPLTodayViewController.h deleted file mode 100644 index d0e8be1e..00000000 --- a/Lister/Objective-C/ListerToday/AAPLTodayViewController.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayViewController class displays the Today view containing the contents of the Today list. -*/ - -@import UIKit; - -@interface AAPLTodayViewController : UITableViewController -@end diff --git a/Lister/Objective-C/ListerToday/AAPLTodayViewController.m b/Lister/Objective-C/ListerToday/AAPLTodayViewController.m deleted file mode 100644 index 464f522d..00000000 --- a/Lister/Objective-C/ListerToday/AAPLTodayViewController.m +++ /dev/null @@ -1,349 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayViewController class displays the Today view containing the contents of the Today list. -*/ - -@import NotificationCenter; -@import ListerKit; -#import "AAPLTodayViewController.h" -#import "AAPLCheckBoxCell.h" -#import "AAPLListCoordinator.h" -#import "AAPLLocalListCoordinator.h" -#import "AAPLCloudListCoordinator.h" - -const CGFloat AAPLTodayRowHeight = 44.f; -const NSInteger AAPLTodayBaseRowCount = 5; - -NSString *AAPLTodayViewControllerContentCellIdentifier = @"todayViewCell"; -NSString *AAPLTodayViewControllerMessageCellIdentifier = @"messageCell"; - - -@interface AAPLTodayViewController () - -@property (nonatomic, strong) AAPLListDocument *document; -@property (nonatomic, getter=isShowingAll) BOOL showingAll; -@property (nonatomic, readonly, getter=isTodayAvailable) BOOL todayAvailable; -@property (nonatomic, strong) AAPLListsController *listsController; -@property (nonatomic, readonly) AAPLIncompleteListItemsPresenter *listPresenter; -@property (nonatomic, readonly) CGFloat preferredViewHeight; - -@end - -@implementation AAPLTodayViewController - -#pragma mark = Properties - -- (void)setDocument:(AAPLListDocument *)document { - _document = document; - - document.listPresenter.delegate = self; -} - -- (AAPLIncompleteListItemsPresenter *)listPresenter { - return self.document.listPresenter; -} - -- (void)setShowingAll:(BOOL)showingAll { - if (showingAll != _showingAll) { - _showingAll = showingAll; - - // Now that all items will be shown, resize the content area for the additional rows. - [self resetContentSize]; - } -} - -- (BOOL)isTodayAvailable { - return self.document && self.listPresenter; -} - -- (CGFloat)preferredViewHeight { - // Determine the total number of items available for presentation. - NSInteger itemCount = self.isTodayAvailable && !self.listPresenter.isEmpty ? self.listPresenter.count : 1; - - /* - On first launch only display up to `AAPLTodayBaseRowCount + 1` rows. An additional row is used to display - the "Show All" row. - */ - NSInteger rowCount = self.isShowingAll ? itemCount : MIN(itemCount, AAPLTodayBaseRowCount + 1); - - return rowCount * AAPLTodayRowHeight; -} - -#pragma mark - View Life Cycle - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.tableView.backgroundColor = [UIColor clearColor]; - - NSString *localizedTodayListName = [AAPLAppConfiguration sharedAppConfiguration].localizedTodayDocumentNameAndExtension; - - self.listsController = [[AAPLAppConfiguration sharedAppConfiguration] listsControllerForCurrentConfigurationWithLastPathComponent:localizedTodayListName firstQueryHandler:nil]; - - self.listsController.delegate = self; - [self.listsController startSearching]; - - [self resetContentSize]; -} - -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - [self.document closeWithCompletionHandler:nil]; -} - -#pragma mark - NCWidgetProviding - -- (UIEdgeInsets)widgetMarginInsetsForProposedMarginInsets:(UIEdgeInsets)defaultMarginInsets { - return UIEdgeInsetsMake(defaultMarginInsets.top, 27.f, defaultMarginInsets.bottom, defaultMarginInsets.right); -} - -- (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler { - if (completionHandler) { - completionHandler(NCUpdateResultNewData); - } -} - -#pragma mark - AAPLListsControllerDelegate - -- (void)listsController:(AAPLListsController *)listsController didInsertListInfo:(AAPLListInfo *)listInfo atIndex:(NSInteger)index { - // Once we've found the Today list, we'll hand off ownership of listening to udpates to the list presenter. - [self.listsController stopSearching]; - - self.listsController = nil; - - // Update the Today widget with the Today list info. - [self processListInfoAsTodayDocument:listInfo]; -} - -#pragma mark - UITableViewDataSource - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - if (!self.isTodayAvailable) { - // Make sure to allow for a row to note that the widget is unavailable. - return 1; - } - - if (self.listPresenter.isEmpty) { - // Make sure to allow for a row to note that no incomplete items remain. - return 1; - } - - return self.isShowingAll ? self.listPresenter.count : MIN(self.listPresenter.count, AAPLTodayBaseRowCount + 1); -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - if (self.listPresenter) { - if (self.listPresenter.isEmpty) { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:AAPLTodayViewControllerMessageCellIdentifier forIndexPath:indexPath]; - cell.textLabel.text = NSLocalizedString(@"No incomplete items in today's list.", @""); - - return cell; - } - else { - NSInteger itemCount = self.listPresenter.count; - - /* - Check to determine what to show at the row at index `AAPLTodayBaseRowCount`. If not showing - all rows (explicitly) and the item count is less than `AAPLTodayBaseRowCount` + 1 diplay a - message cell allowing the user to disclose all rows. - */ - if (!self.showingAll && indexPath.row == AAPLTodayBaseRowCount && itemCount != AAPLTodayBaseRowCount + 1) { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:AAPLTodayViewControllerMessageCellIdentifier forIndexPath:indexPath]; - - cell.textLabel.text = NSLocalizedString(@"Show All...", @""); - - return cell; - } - else { - AAPLCheckBoxCell *checkBoxCell = [tableView dequeueReusableCellWithIdentifier:AAPLTodayViewControllerContentCellIdentifier forIndexPath:indexPath]; - - AAPLListItem *item = self.listPresenter.presentedListItems[indexPath.row]; - - [self configureCheckBoxCell:checkBoxCell forListItem:item]; - - return checkBoxCell; - } - } - } - else { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:AAPLTodayViewControllerMessageCellIdentifier forIndexPath:indexPath]; - - cell.textLabel.text = NSLocalizedString(@"Lister's Today widget is currently unavailable.", @""); - - return cell; - } -} - -- (void)configureCheckBoxCell:(AAPLCheckBoxCell *)checkBoxCell forListItem:(AAPLListItem *)listItem { - checkBoxCell.checkBox.tintColor = AAPLColorFromListColorForNotificationCenter(self.listPresenter.color); - checkBoxCell.checkBox.checked = listItem.isComplete; - checkBoxCell.checkBox.hidden = NO; - - checkBoxCell.label.text = listItem.text; - - checkBoxCell.label.textColor = listItem.isComplete ? [UIColor lightGrayColor] : [UIColor whiteColor]; -} - -#pragma mark - UITableViewDelegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - // Show all of the cells if the user taps the "Show All..." row. - if (self.todayAvailable && !self.showingAll && indexPath.row == AAPLTodayBaseRowCount) { - self.showingAll = YES; - - [self.tableView beginUpdates]; - - NSIndexPath *indexPathForRemoval = [NSIndexPath indexPathForRow:AAPLTodayBaseRowCount inSection:0]; - - [self.tableView deleteRowsAtIndexPaths:@[indexPathForRemoval] withRowAnimation:UITableViewRowAnimationFade]; - - NSMutableArray *insertedIndexPaths = [NSMutableArray array]; - - for (NSInteger idx = AAPLTodayBaseRowCount; idx < self.listPresenter.count; idx++) { - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:idx inSection:0]; - [insertedIndexPaths addObject:indexPath]; - } - - [self.tableView insertRowsAtIndexPaths:insertedIndexPaths withRowAnimation:UITableViewRowAnimationFade]; - - [self.tableView endUpdates]; - - return; - } - - // Construct a URL with the lister scheme and the file path of the document. - NSURLComponents *urlComponents = [[NSURLComponents alloc] init]; - urlComponents.scheme = AAPLAppConfigurationListerSchemeName; - urlComponents.path = self.document.fileURL.path; - - // Add a query item to encode the color associated with the list. - NSString *colorQueryValue = [NSString stringWithFormat:@"%ld", (long)self.listPresenter.color]; - NSURLQueryItem *colorQueryItem = [NSURLQueryItem queryItemWithName:AAPLAppConfigurationListerColorQueryKey value:colorQueryValue]; - urlComponents.queryItems = @[colorQueryItem]; - - // Use the `extensionContext`'s ability to open a URL to trigger the containing app. - [self.extensionContext openURL:urlComponents.URL completionHandler:nil]; -} - -#pragma mark - IBActions - -- (IBAction)checkBoxTapped:(AAPLCheckBox *)sender { - NSIndexPath *indexPath = [self indexPathForView:sender]; - - AAPLListItem *item = self.listPresenter.presentedListItems[indexPath.row]; - [self.listPresenter toggleListItem:item]; -} - -#pragma mark - ListPresenterDelegate - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - /** - Note when we reload the data, the color of the list will automatically change because the list's color - is only shown in each list item in the iOS Today widget. - */ - [self.tableView reloadData]; -} - -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - [self.tableView beginUpdates]; -} - -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSArray *indexPaths = @[[NSIndexPath indexPathForRow:index inSection:0]]; - - // Hide the "No items in list" row. - if (index == 0 && self.listPresenter.count == 1) { - [self.tableView deleteRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationAutomatic]; - } - - [self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationAutomatic]; -} - -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSArray *indexPaths = @[[NSIndexPath indexPathForRow:index inSection:0]]; - - [self.tableView deleteRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationAutomatic]; - - // Show the "No items in list" row. - if (index == 0 && self.listPresenter.isEmpty) { - [self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationAutomatic]; - } -} - -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index { - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:0]; - - AAPLCheckBoxCell *checkBoxCell = (AAPLCheckBoxCell *)[self.tableView cellForRowAtIndexPath:indexPath]; - [self configureCheckBoxCell:checkBoxCell forListItem:self.listPresenter.presentedListItems[indexPath.row]]; -} - -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex { - NSIndexPath *fromIndexPath = [NSIndexPath indexPathForRow:fromIndex inSection:0]; - NSIndexPath *toIndexPath = [NSIndexPath indexPathForRow:toIndex inSection:0]; - - [self.tableView moveRowAtIndexPath:fromIndexPath toIndexPath:toIndexPath]; -} - -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color { - for (NSInteger idx = 0; idx < self.listPresenter.presentedListItems.count; idx++) { - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:idx inSection:0]; - - AAPLCheckBoxCell *checkBoxCell = (AAPLCheckBoxCell *)[self.tableView cellForRowAtIndexPath:indexPath]; - checkBoxCell.checkBox.tintColor = AAPLColorFromListColorForNotificationCenter(color); - } -} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - [self resetContentSize]; - - [self.tableView endUpdates]; - - /* - The underlying document changed because of user interaction (this event only occurs if the list - presenter's underlying list presentation changes based on user interaction). - */ - if (!isInitialLayout) { - [self.document updateChangeCount:UIDocumentChangeDone]; - } -} - -#pragma mark - Convenience - -- (void)processListInfoAsTodayDocument:(AAPLListInfo *)listInfo { - // Ignore any updates if we already have the Today document. - if (self.document) { - return; - } - - AAPLIncompleteListItemsPresenter *incompleteListItemsPresenter = [[AAPLIncompleteListItemsPresenter alloc] init]; - self.document = [[AAPLListDocument alloc] initWithFileURL:listInfo.URL listPresenter:incompleteListItemsPresenter]; - - [self.document openWithCompletionHandler:^(BOOL success) { - if (!success) { - NSLog(@"Couldn't open document: %@.", self.document.fileURL); - } - - [self resetContentSize]; - }]; -} - -- (NSIndexPath *)indexPathForView:(UIView *)view { - CGPoint viewOrigin = view.bounds.origin; - CGPoint viewLocation = [self.tableView convertPoint:viewOrigin fromView:view]; - - return [self.tableView indexPathForRowAtPoint:viewLocation]; -} - -- (void)resetContentSize { - CGSize preferredSize = self.preferredContentSize; - - preferredSize.height = self.preferredViewHeight; - - self.preferredContentSize = preferredSize; -} - -@end diff --git a/Lister/Objective-C/ListerToday/Info.plist b/Lister/Objective-C/ListerToday/Info.plist deleted file mode 100644 index fa6f0c79..00000000 --- a/Lister/Objective-C/ListerToday/Info.plist +++ /dev/null @@ -1,33 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Lister - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - XPC! - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - 6 - NSExtension - - NSExtensionMainStoryboard - Today - NSExtensionPointIdentifier - com.apple.widget-extension - - - diff --git a/Lister/Objective-C/ListerToday/Today.storyboard b/Lister/Objective-C/ListerToday/Today.storyboard deleted file mode 100644 index 36b9d8a2..00000000 --- a/Lister/Objective-C/ListerToday/Today.storyboard +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLListRowRepresentedObject.h b/Lister/Objective-C/ListerTodayOSX/AAPLListRowRepresentedObject.h deleted file mode 100644 index 26e55087..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLListRowRepresentedObject.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Provides an abstraction suitable for adapting the details of a list item to the requirements of \c NCWidgetListViewController. It is composed of an item's text and list color. -*/ - -@import Foundation; -@import ListerKit; - -@interface AAPLListRowRepresentedObject : NSObject - -@property AAPLListItem *listItem; -@property NSColor *color; - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLListRowRepresentedObject.m b/Lister/Objective-C/ListerTodayOSX/AAPLListRowRepresentedObject.m deleted file mode 100644 index d6629ce1..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLListRowRepresentedObject.m +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - Provides an abstraction suitable for adapting the details of a list item to the requirements of \c NCWidgetListViewController. It is composed of an item's text and list color. -*/ - -#import "AAPLListRowRepresentedObject.h" - -@implementation AAPLListRowRepresentedObject -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.h b/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.h deleted file mode 100644 index a686e155..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListRowViewController class is an \c NSViewController subclass that displays list items in a \c NCWidgetListViewController. Bindings are used to link the represented object to the view controller. -*/ - -@import Cocoa; - -@class AAPLListRowRepresentedObject; -@class AAPLListRowViewController; - -/// Protocol that enables notifying other objects of changes to the represented object. -@protocol AAPLListRowViewControllerDelegate - -- (void)listRowViewControllerDidChangeRepresentedObjectState:(AAPLListRowViewController *)listRowViewController; - -@end - -@interface AAPLListRowViewController : NSViewController - -@property (strong) AAPLListRowRepresentedObject *representedObject; -@property (weak) id delegate; - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.m b/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.m deleted file mode 100644 index 5afa9eb6..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.m +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLListRowViewController class is an \c NSViewController subclass that displays list items in a \c NCWidgetListViewController. Bindings are used to link the represented object to the view controller. -*/ - -#import "AAPLListRowViewController.h" -@import ListerKit; - -@interface AAPLListRowViewController() - -@property (weak) IBOutlet AAPLCheckBox *checkBox; - -@end - -@implementation AAPLListRowViewController - -@dynamic representedObject; - -#pragma mark - View Life Cycle - -- (void)viewDidLoad { - [super viewDidLoad]; - - // -representedObject is an AAPLListRowRepresentedObject instance. - [self.checkBox bind:@"checked" toObject:self withKeyPath:@"self.representedObject.listItem.isComplete" options:nil]; - [self.checkBox bind:@"tintColor" toObject:self withKeyPath:@"self.representedObject.color" options:nil]; -} - -#pragma mark - IBActions - -- (IBAction)checkBoxClicked:(AAPLCheckBox *)sender { - [self.delegate listRowViewControllerDidChangeRepresentedObjectState:self]; -} - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.xib b/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.xib deleted file mode 100644 index e9075d6c..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLListRowViewController.xib +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - hello - - - - - - - - - - - - - - - - - - diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.h b/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.h deleted file mode 100644 index 350d6a54..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - An \c NSViewController subclass responsible for displaying the "No Items" row in the app extension. -*/ - -@import Cocoa; - -@class AAPLListRowRepresentedObject; - -@interface AAPLNoItemsRowViewController : NSViewController - -@property (strong) AAPLListRowRepresentedObject *representedObject; - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.m b/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.m deleted file mode 100644 index a073b049..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.m +++ /dev/null @@ -1,15 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLNoItemsRowViewController class is an \c NSViewController subclass that displays the "No Items" row in the app extension. -*/ - -#import "AAPLNoItemsRowViewController.h" - -@implementation AAPLNoItemsRowViewController - -@dynamic representedObject; - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.xib b/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.xib deleted file mode 100644 index 987b0e13..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLNoItemsRowViewController.xib +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.h b/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.h deleted file mode 100644 index 82585ae0..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLOpenListerRowViewController class is an \c NSViewController subclass that provides a row in the \c NCWidgetListViewController to allow the user to open the Today document in Lister. -*/ - -@import Cocoa; - -@interface AAPLOpenListerRowViewController : NSViewController - -@property NSColor *representedObject; - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.m b/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.m deleted file mode 100644 index f5d84c63..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.m +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLOpenListerRowViewController class is an \c NSViewController subclass that provides a row in the \c NCWidgetListViewController to allow the user to open the Today document in Lister. -*/ - -#import "AAPLOpenListerRowViewController.h" -@import ListerKit; - -@implementation AAPLOpenListerRowViewController - -@dynamic representedObject; - -#pragma mark - IBActions - -- (IBAction)openInLister:(NSButton *)sender { - [[AAPLTodayListManager sharedTodayListManager] fetchTodayDocumentURLWithCompletionHandler:^(NSURL *todayDocumentURL) { - if (todayDocumentURL) { - [[NSWorkspace sharedWorkspace] openURLs:@[todayDocumentURL] withAppBundleIdentifier:AAPLAppConfigurationListerOSXBundleIdentifier options:NSWorkspaceLaunchAsync additionalEventParamDescriptor:NULL launchIdentifiers:NULL]; - } - }]; -} - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.xib b/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.xib deleted file mode 100644 index 47431b29..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLOpenListerRowViewController.xib +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.h b/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.h deleted file mode 100644 index 0e7eaf1e..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayViewController class displays the Today view containing the contents of the Today list. -*/ - -@import Cocoa; - -@interface AAPLTodayViewController : NSViewController -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.m b/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.m deleted file mode 100644 index ed6ecfac..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.m +++ /dev/null @@ -1,196 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayViewController class displays the Today view containing the contents of the Today list. -*/ - -#import "AAPLTodayViewController.h" -#import "AAPLListRowViewController.h" -#import "AAPLOpenListerRowViewController.h" -#import "AAPLTodayWidgetRequiresCloudViewController.h" -#import "AAPLNoItemsRowViewController.h" -#import "AAPLListRowRepresentedObject.h" -#import "AAPLTodayWidgetRowPurposeBox.h" -@import NotificationCenter; -@import ListerKit; - -@interface AAPLTodayViewController () - -@property (strong) IBOutlet NCWidgetListViewController *widgetListViewController; - -@property AAPLListDocument *document; -@property (readonly) AAPLIncompleteListItemsPresenter *listPresenter; - -@end - -const NSUInteger AAPLTodayViewControllerOpenListerRow = 0; - - -@implementation AAPLTodayViewController - -#pragma mark - NCWidgetProviding - -- (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult result))completionHandler { - [[AAPLTodayListManager sharedTodayListManager] fetchTodayDocumentURLWithCompletionHandler:^(NSURL *todayDocumentURL) { - dispatch_async(dispatch_get_main_queue(), ^{ - if (todayDocumentURL == nil) { - AAPLTodayWidgetRowPurposeBox *requiresCloudPurposeBox = [[AAPLTodayWidgetRowPurposeBox alloc] initWithPurpose:AAPLTodayWidgetRowPurposeRequiresCloud userInfo:nil]; - - self.widgetListViewController.contents = @[requiresCloudPurposeBox]; - - completionHandler(NCUpdateResultFailed); - - return; - } - - NSError *error; - - AAPLListDocument *newDocument = [[AAPLListDocument alloc] initWithContentsOfURL:todayDocumentURL listPresenter:nil makesCustomWindowControllers:NO error:&error]; - - if (newDocument) { - BOOL existingDocumentIsUpToDate = [self.document.listPresenter.archiveableList isEqualToList:newDocument.listPresenter.archiveableList]; - - if (existingDocumentIsUpToDate) { - completionHandler(NCUpdateResultNoData); - } - else { - self.document = newDocument; - - AAPLIncompleteListItemsPresenter *listPresenter = [[AAPLIncompleteListItemsPresenter alloc] init]; - listPresenter.delegate = self; - - self.document.listPresenter = listPresenter; - - completionHandler(NCUpdateResultNewData); - } - } - else { - completionHandler(NCUpdateResultFailed); - } - }); - }]; -} - -- (NSEdgeInsets)widgetMarginInsetsForProposedMarginInsets:(NSEdgeInsets)defaultMarginInset { - return (NSEdgeInsets){ - .left = 0, - .right = 0, - .top = 0, - .bottom = 0 - }; -} - -- (BOOL)widgetAllowsEditing { - return NO; -} - -#pragma mark - NCWidgetListViewDelegate - -- (NSViewController *)widgetList:(NCWidgetListViewController *)listViewController viewControllerForRow:(NSUInteger)row { - id representedObjectForRow = self.widgetListViewController.contents[row]; - - if ([representedObjectForRow isKindOfClass:[AAPLTodayWidgetRowPurposeBox class]]) { - switch ([representedObjectForRow purpose]) { - case AAPLTodayWidgetRowPurposeOpenLister: - return [[AAPLOpenListerRowViewController alloc] init]; - break; - - case AAPLTodayWidgetRowPurposeNoItemsInList: - return [[AAPLNoItemsRowViewController alloc] init]; - break; - - case AAPLTodayWidgetRowPurposeRequiresCloud: - return [[AAPLTodayWidgetRequiresCloudViewController alloc] init]; - break; - } - } - - AAPLListRowViewController *listRowViewController = [[AAPLListRowViewController alloc] init]; - - listRowViewController.representedObject = representedObjectForRow; - - listRowViewController.delegate = self; - - return listRowViewController; - -// return [[AAPLTodayWidgetRequiresCloudViewController alloc] init]; -} - -#pragma mark - AAPLListRowViewControllerDelegate - -- (void)listRowViewControllerDidChangeRepresentedObjectState:(AAPLListRowViewController *)listRowViewController { - NSInteger indexOfListRowViewController = [self.widgetListViewController rowForViewController:listRowViewController]; - - AAPLListItem *listItem = self.listPresenter.presentedListItems[indexOfListRowViewController - 1]; - [self.listPresenter toggleListItem:listItem]; -} - -#pragma mark - AAPLListPresenting - -- (void)listPresenterDidRefreshCompleteLayout:(id)listPresenter { - // Refresh the display for all of the rows. - [self setListRowRepresentedObjects]; -} - -/*! - The following methods are not necessary to implement for the \c AAPLTodayViewController because the rows for - \c widgetListViewController are set in both -listPresenterDidRefreshCompleteLayout: and in the - \c -listPresenterDidChangeListLayout:isInitialLayout: method. - */ -- (void)listPresenterWillChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout {} -- (void)listPresenter:(id)listPresenter didInsertListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didRemoveListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didUpdateListItem:(AAPLListItem *)listItem atIndex:(NSInteger)index {} -- (void)listPresenter:(id)listPresenter didMoveListItem:(AAPLListItem *)listItem fromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex {} -- (void)listPresenter:(id)listPresenter didUpdateListColorWithColor:(AAPLListColor)color {} - -- (void)listPresenterDidChangeListLayout:(id)listPresenter isInitialLayout:(BOOL)isInitialLayout { - if (isInitialLayout) { - [self setListRowRepresentedObjects]; - } - else { - [self.document updateChangeCount:NSChangeDone]; - - [self.document saveDocumentWithDelegate:nil didSaveSelector:NULL contextInfo:NULL]; - - [[NCWidgetController widgetController] setHasContent:YES forWidgetWithBundleIdentifier:AAPLAppConfigurationWidgetBundleIdentifier]; - } -} - -#pragma mark - Convenience - -- (AAPLIncompleteListItemsPresenter *)listPresenter { - return self.document.listPresenter; -} - -- (void)setListRowRepresentedObjects { - NSMutableArray *representedObjects = [NSMutableArray array]; - - // The "Open in Lister" has a `representedObject` as an `NSColor`, representing the text color. - NSColor *listColor = AAPLColorFromListColorForNotificationCenter(self.listPresenter.color); - AAPLTodayWidgetRowPurposeBox *openInListerPurposeBox = [[AAPLTodayWidgetRowPurposeBox alloc] initWithPurpose:AAPLTodayWidgetRowPurposeOpenLister userInfo:listColor]; - - [representedObjects addObject:openInListerPurposeBox]; - - for (AAPLListItem *listItem in self.listPresenter.presentedListItems) { - AAPLListRowRepresentedObject *representedObject = [[AAPLListRowRepresentedObject alloc] init]; - - representedObject.listItem = listItem; - representedObject.color = listColor; - - [representedObjects addObject:representedObject]; - } - - // Add an `AAPLTodayWidgetRowPurposeNoItemsInList` box to represent the "No Items" represented object. - if (self.listPresenter.isEmpty) { - AAPLTodayWidgetRowPurposeBox *noItemsInListPurposeBox = [[AAPLTodayWidgetRowPurposeBox alloc] initWithPurpose:AAPLTodayWidgetRowPurposeNoItemsInList userInfo:nil]; - - [representedObjects addObject:noItemsInListPurposeBox]; - } - - self.widgetListViewController.contents = representedObjects; -} - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.xib b/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.xib deleted file mode 100644 index 62c06766..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLTodayViewController.xib +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.h b/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.h deleted file mode 100644 index 6d96cdbf..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayWidgetRequiresCloudViewController class is an \c NSViewController subclass that displays the "The Lister Today widget requires iCloud." row in the app extension. -*/ - -@import Cocoa; - -@interface AAPLTodayWidgetRequiresCloudViewController : NSViewController -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.m b/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.m deleted file mode 100644 index a666fcc3..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.m +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayWidgetRequiresCloudViewController class is an \c NSViewController subclass that displays the "The Lister Today widget requires iCloud." row in the app extension. -*/ - -#import "AAPLTodayWidgetRequiresCloudViewController.h" - -@implementation AAPLTodayWidgetRequiresCloudViewController -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.xib b/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.xib deleted file mode 100644 index 4daae606..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRequiresCloudViewController.xib +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRowPurposeBox.h b/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRowPurposeBox.h deleted file mode 100644 index b1233b88..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRowPurposeBox.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayWidgetRowPurpose enumeration and \c AAPLTodayWidgetRowPurposeBox class provide a way to represent the reason why a row is being displayed. The \c AAPLTodayWidgetRowPurposeBox class boxes an \c AAPLTodayWidgetRowPurpose enum to be represented as an object. The \c userInfo property of \c AAPLTodayWidgetRowPurposeBox is meant for binding to different properties (e.g. color) that is defined at initialization of the instance. -*/ - -@import Foundation; - -/// An enumeration of the different kinds of rows that can be displayed in Lister's OS X Today widget. -typedef NS_ENUM(NSInteger, AAPLTodayWidgetRowPurpose) { - AAPLTodayWidgetRowPurposeOpenLister, - AAPLTodayWidgetRowPurposeRequiresCloud, - AAPLTodayWidgetRowPurposeNoItemsInList -}; - -/*! - A wrapper around a \c AAPLTodayWidgetRowPurpose that is used to bind to different objects in the - \c AAPLTodayViewController widget list view controller's row row views. - */ -@interface AAPLTodayWidgetRowPurposeBox : NSObject - -- (instancetype)initWithPurpose:(AAPLTodayWidgetRowPurpose)purpose userInfo:(id)userInfo; - -@property (nonatomic) AAPLTodayWidgetRowPurpose purpose; -@property (nonatomic, strong) id userInfo; - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRowPurposeBox.m b/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRowPurposeBox.m deleted file mode 100644 index 5fd01d29..00000000 --- a/Lister/Objective-C/ListerTodayOSX/AAPLTodayWidgetRowPurposeBox.m +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - The \c AAPLTodayWidgetRowPurpose enumeration and \c AAPLTodayWidgetRowPurposeBox class provide a way to represent the reason why a row is being displayed. The \c AAPLTodayWidgetRowPurposeBox class boxes an \c AAPLTodayWidgetRowPurpose enum to be represented as an object. The \c userInfo property of \c AAPLTodayWidgetRowPurposeBox is meant for binding to different properties (e.g. color) that is defined at initialization of the instance. -*/ - -#import "AAPLTodayWidgetRowPurposeBox.h" - -@implementation AAPLTodayWidgetRowPurposeBox - -- (instancetype)initWithPurpose:(AAPLTodayWidgetRowPurpose)purpose userInfo:(id)userInfo { - self = [super init]; - - if (self) { - _purpose = purpose; - _userInfo = userInfo; - } - - return self; -} - -@end diff --git a/Lister/Objective-C/ListerTodayOSX/Info.plist b/Lister/Objective-C/ListerTodayOSX/Info.plist deleted file mode 100644 index f3a529de..00000000 --- a/Lister/Objective-C/ListerTodayOSX/Info.plist +++ /dev/null @@ -1,37 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Lister - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - XPC! - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSExtension - - NSExtensionPointIdentifier - com.apple.widget-extension - NSExtensionPrincipalClass - AAPLTodayViewController - com.apple.notificationcenter.widget.description - Lister - - NSHumanReadableCopyright - Copyright © 2014 Apple Inc. All rights reserved. - - diff --git a/Lister/README.md b/Lister/README.md index 838cd061..536e2050 100644 --- a/Lister/README.md +++ b/Lister/README.md @@ -1,19 +1,21 @@ -# Lister +# Lister (for watchOS, iOS, and OS X) ## Version -2.0 +3.3 ## Build Requirements -+ Xcode 6.3 or later -+ iOS 8.2 SDK or later -+ OS X 10.10 SDK or later ++ Xcode 7.3 or later ++ iOS 9.3 SDK or later ++ OS X 10.11 SDK or later ++ watchOS 2.2 SDK or later + iCloud–enabled provisioning profile + App Groups–enabled provisioning profile ## Runtime Requirements -+ iOS 8.0 or later (iOS 8.2 or later required for Apple Watch) -+ OS X 10.10 or later ++ iOS 9.1 or later ++ OS X 10.11 or later ++ watchOS 2.2 or later ## About Lister @@ -29,19 +31,11 @@ on a single device. + Create App Extensions to provide Today Widgets and Watch Apps. + Define a framework to share common code between multiple targets. -The Lister Xcode project is provided in both Swift and Objective-C. - Because Lister supports iCloud Documents and App Groups, the Lister Xcode project requires a small amount of setup before it can be built and run. It also requires a paid iOS and / or Mac Developer Program account. + If you have an iOS Developer Program account, follow the instructions in *iOS and Watch Quick Start*. + If you have a Mac Developer Program account, follow the instructions in *Mac Quick Start*. -## Written in Objective-C and Swift - -This sample is provided in both Objective-C and Swift. Both versions of the sample are at the top level directory of this project in folders named "Objective-C" and "Swift". Both versions of the application have the exact same visual appearance; however, the code and structure may be different depending on the choice of language. - -Note: The "List" class in Swift is conceptually equivalent to the "AAPLList" class in Objective C. The same applies to other classes mentioned in this README. This documentation refers to class names for both languages without the "AAPL" prefix, for brevity. - ## Application Architecture The Lister project includes iOS and OS X app targets, iOS and OS X app extensions, and frameworks containing shared code. @@ -82,7 +76,7 @@ Lister Today widgets are available on both iOS and OS X. Lister shares much of t ## Swift Features -The Swift version of the Lister sample makes use of many features unique to Swift, including: +The Lister sample makes use of many features unique to Swift, including: #### Nested types @@ -112,4 +106,4 @@ Lister has unit tests written for the List and ListItem classes. These tests are Lister does not currently support configuring a storage option before the iOS app is launched. Please launch the iOS app first. In your own projects, you should provide for the watch app being run prior to the iOS app that hosts it. -Copyright (C) 2014-2015 Apple Inc. All rights reserved. +Copyright (C) 2014-2016 Apple Inc. All rights reserved. diff --git a/Lister/Objective-C/Resources/Groceries.list b/Lister/Resources/Groceries.list similarity index 100% rename from Lister/Objective-C/Resources/Groceries.list rename to Lister/Resources/Groceries.list diff --git a/Lister/Objective-C/Resources/ListerDocumentIcon.icns b/Lister/Resources/ListerDocumentIcon.icns similarity index 100% rename from Lister/Objective-C/Resources/ListerDocumentIcon.icns rename to Lister/Resources/ListerDocumentIcon.icns diff --git a/Lister/Objective-C/Resources/Tech Toys.list b/Lister/Resources/Tech Toys.list similarity index 100% rename from Lister/Objective-C/Resources/Tech Toys.list rename to Lister/Resources/Tech Toys.list diff --git a/Lister/Objective-C/Resources/Today.list b/Lister/Resources/Today.list similarity index 100% rename from Lister/Objective-C/Resources/Today.list rename to Lister/Resources/Today.list diff --git a/Lister/Swift/Lister Tests/Info.plist b/Lister/Swift/Lister Tests/Info.plist deleted file mode 100644 index ba72822e..00000000 --- a/Lister/Swift/Lister Tests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-0@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-0@2x.png deleted file mode 100644 index 036b0867..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-0@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-10@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-10@2x.png deleted file mode 100644 index b112bffb..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-10@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-11@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-11@2x.png deleted file mode 100644 index f3a0b6c9..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-11@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-12@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-12@2x.png deleted file mode 100644 index 5e9c9ed5..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-12@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-13@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-13@2x.png deleted file mode 100644 index 555c66fc..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-13@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-14@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-14@2x.png deleted file mode 100644 index 120c7e29..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-14@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-15@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-15@2x.png deleted file mode 100644 index 0b406213..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-15@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-16@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-16@2x.png deleted file mode 100644 index 05f27c84..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-16@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-17@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-17@2x.png deleted file mode 100644 index cbcb165e..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-17@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-18@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-18@2x.png deleted file mode 100644 index 040af68a..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-18@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-19@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-19@2x.png deleted file mode 100644 index 6ad1c04c..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-19@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-1@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-1@2x.png deleted file mode 100644 index 93a5c2b1..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-1@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-20@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-20@2x.png deleted file mode 100644 index cfe45bc8..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-20@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-21@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-21@2x.png deleted file mode 100644 index 212ab273..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-21@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-22@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-22@2x.png deleted file mode 100644 index 7840adc2..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-22@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-23@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-23@2x.png deleted file mode 100644 index 51db29a8..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-23@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-24@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-24@2x.png deleted file mode 100644 index f0ff7367..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-24@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-25@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-25@2x.png deleted file mode 100644 index fc2bf5ff..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-25@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-26@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-26@2x.png deleted file mode 100644 index 7ace1078..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-26@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-27@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-27@2x.png deleted file mode 100644 index b9a7828f..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-27@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-28@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-28@2x.png deleted file mode 100644 index 433c501d..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-28@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-29@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-29@2x.png deleted file mode 100644 index 793db4de..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-29@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-2@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-2@2x.png deleted file mode 100644 index f59017a2..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-2@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-30@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-30@2x.png deleted file mode 100644 index 6aa4aab6..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-30@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-31@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-31@2x.png deleted file mode 100644 index 08438d90..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-31@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-32@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-32@2x.png deleted file mode 100644 index 3fbc889f..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-32@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-33@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-33@2x.png deleted file mode 100644 index c1d11e6e..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-33@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-34@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-34@2x.png deleted file mode 100644 index b9522c1b..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-34@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-35@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-35@2x.png deleted file mode 100644 index e07834fb..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-35@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-36@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-36@2x.png deleted file mode 100644 index 18007170..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-36@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-37@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-37@2x.png deleted file mode 100644 index eca60771..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-37@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-38@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-38@2x.png deleted file mode 100644 index c60e8957..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-38@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-39@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-39@2x.png deleted file mode 100644 index 424df21d..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-39@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-3@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-3@2x.png deleted file mode 100644 index 9836a502..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-3@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-40@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-40@2x.png deleted file mode 100644 index 720ed222..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-40@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-41@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-41@2x.png deleted file mode 100644 index 3d9dd96e..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-41@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-42@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-42@2x.png deleted file mode 100644 index 709d7742..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-42@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-43@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-43@2x.png deleted file mode 100644 index 4d9141f8..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-43@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-44@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-44@2x.png deleted file mode 100644 index 585dbabc..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-44@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-4@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-4@2x.png deleted file mode 100644 index f9e38874..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-4@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-5@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-5@2x.png deleted file mode 100644 index 87d0caf0..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-5@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-6@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-6@2x.png deleted file mode 100644 index 784ec450..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-6@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-7@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-7@2x.png deleted file mode 100644 index ca1efc14..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-7@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-8@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-8@2x.png deleted file mode 100644 index 7444735f..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-8@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Badge/glance-9@2x.png b/Lister/Swift/Lister Watch App/Assets/Badge/glance-9@2x.png deleted file mode 100644 index 71bcadb8..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Badge/glance-9@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-blue-checked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-blue-checked@2x.png deleted file mode 100644 index 8cd61220..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-blue-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-blue-unchecked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-blue-unchecked@2x.png deleted file mode 100644 index 72ff93bd..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-blue-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-gray-checked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-gray-checked@2x.png deleted file mode 100644 index 59f10b71..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-gray-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-gray-unchecked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-gray-unchecked@2x.png deleted file mode 100644 index e5c7f9f5..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-gray-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-green-checked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-green-checked@2x.png deleted file mode 100644 index a3fb267f..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-green-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-green-unchecked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-green-unchecked@2x.png deleted file mode 100644 index 9c79c61d..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-green-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-orange-checked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-orange-checked@2x.png deleted file mode 100644 index ead43d2b..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-orange-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-orange-unchecked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-orange-unchecked@2x.png deleted file mode 100644 index 5ddd7d9a..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-orange-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-red-checked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-red-checked@2x.png deleted file mode 100644 index f740cb39..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-red-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-red-unchecked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-red-unchecked@2x.png deleted file mode 100644 index 8503dc76..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-red-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-yellow-checked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-yellow-checked@2x.png deleted file mode 100644 index b94bd2d1..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-yellow-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png b/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png deleted file mode 100644 index 0eadbeef..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Menus/check-all@2x.png b/Lister/Swift/Lister Watch App/Assets/Menus/check-all@2x.png deleted file mode 100644 index 6f384ca7..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Menus/check-all@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Assets/Menus/uncheck-all@2x.png b/Lister/Swift/Lister Watch App/Assets/Menus/uncheck-all@2x.png deleted file mode 100644 index bfa20db8..00000000 Binary files a/Lister/Swift/Lister Watch App/Assets/Menus/uncheck-all@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister172.png b/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister172.png deleted file mode 100644 index 2998d762..00000000 Binary files a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister172.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister196.png b/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister196.png deleted file mode 100644 index c13547c7..00000000 Binary files a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister196.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister58.png b/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister58.png deleted file mode 100644 index e808e1fc..00000000 Binary files a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister58.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister80.png b/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister80.png deleted file mode 100644 index 040300fd..00000000 Binary files a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister80.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister87.png b/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister87.png deleted file mode 100644 index 30d8f1b0..00000000 Binary files a/Lister/Swift/Lister Watch App/Images.xcassets/AppIcon.appiconset/Lister87.png and /dev/null differ diff --git a/Lister/Swift/Lister Watch Extension/Localizable.strings b/Lister/Swift/Lister Watch Extension/Localizable.strings deleted file mode 100644 index fc2177d3..00000000 --- a/Lister/Swift/Lister Watch Extension/Localizable.strings +++ /dev/null @@ -1,7 +0,0 @@ -/* - - - Localizable strings for the Glance. - - -*/ \ No newline at end of file diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-0@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-0@2x.png deleted file mode 100644 index 036b0867..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-0@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-10@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-10@2x.png deleted file mode 100644 index b112bffb..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-10@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-11@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-11@2x.png deleted file mode 100644 index f3a0b6c9..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-11@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-12@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-12@2x.png deleted file mode 100644 index 5e9c9ed5..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-12@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-13@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-13@2x.png deleted file mode 100644 index 555c66fc..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-13@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-14@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-14@2x.png deleted file mode 100644 index 120c7e29..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-14@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-15@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-15@2x.png deleted file mode 100644 index 0b406213..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-15@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-16@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-16@2x.png deleted file mode 100644 index 05f27c84..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-16@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-17@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-17@2x.png deleted file mode 100644 index cbcb165e..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-17@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-18@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-18@2x.png deleted file mode 100644 index 040af68a..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-18@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-19@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-19@2x.png deleted file mode 100644 index 6ad1c04c..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-19@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-1@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-1@2x.png deleted file mode 100644 index 93a5c2b1..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-1@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-20@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-20@2x.png deleted file mode 100644 index cfe45bc8..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-20@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-21@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-21@2x.png deleted file mode 100644 index 212ab273..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-21@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-22@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-22@2x.png deleted file mode 100644 index 7840adc2..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-22@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-23@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-23@2x.png deleted file mode 100644 index 51db29a8..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-23@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-24@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-24@2x.png deleted file mode 100644 index f0ff7367..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-24@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-25@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-25@2x.png deleted file mode 100644 index fc2bf5ff..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-25@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-26@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-26@2x.png deleted file mode 100644 index 7ace1078..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-26@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-27@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-27@2x.png deleted file mode 100644 index b9a7828f..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-27@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-28@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-28@2x.png deleted file mode 100644 index 433c501d..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-28@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-29@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-29@2x.png deleted file mode 100644 index 793db4de..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-29@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-2@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-2@2x.png deleted file mode 100644 index f59017a2..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-2@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-30@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-30@2x.png deleted file mode 100644 index 6aa4aab6..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-30@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-31@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-31@2x.png deleted file mode 100644 index 08438d90..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-31@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-32@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-32@2x.png deleted file mode 100644 index 3fbc889f..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-32@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-33@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-33@2x.png deleted file mode 100644 index c1d11e6e..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-33@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-34@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-34@2x.png deleted file mode 100644 index b9522c1b..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-34@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-35@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-35@2x.png deleted file mode 100644 index e07834fb..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-35@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-36@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-36@2x.png deleted file mode 100644 index 18007170..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-36@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-37@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-37@2x.png deleted file mode 100644 index eca60771..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-37@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-38@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-38@2x.png deleted file mode 100644 index c60e8957..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-38@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-39@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-39@2x.png deleted file mode 100644 index 424df21d..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-39@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-3@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-3@2x.png deleted file mode 100644 index 9836a502..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-3@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-40@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-40@2x.png deleted file mode 100644 index 720ed222..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-40@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-41@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-41@2x.png deleted file mode 100644 index 3d9dd96e..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-41@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-42@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-42@2x.png deleted file mode 100644 index 709d7742..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-42@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-43@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-43@2x.png deleted file mode 100644 index 4d9141f8..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-43@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-44@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-44@2x.png deleted file mode 100644 index 585dbabc..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-44@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-4@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-4@2x.png deleted file mode 100644 index f9e38874..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-4@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-5@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-5@2x.png deleted file mode 100644 index 87d0caf0..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-5@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-6@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-6@2x.png deleted file mode 100644 index 784ec450..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-6@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-7@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-7@2x.png deleted file mode 100644 index ca1efc14..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-7@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-8@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-8@2x.png deleted file mode 100644 index 7444735f..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-8@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-9@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-9@2x.png deleted file mode 100644 index 71bcadb8..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Badge/glance-9@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-blue-checked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-blue-checked@2x.png deleted file mode 100644 index 8cd61220..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-blue-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-blue-unchecked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-blue-unchecked@2x.png deleted file mode 100644 index 72ff93bd..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-blue-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-gray-checked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-gray-checked@2x.png deleted file mode 100644 index 59f10b71..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-gray-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-gray-unchecked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-gray-unchecked@2x.png deleted file mode 100644 index e5c7f9f5..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-gray-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-green-checked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-green-checked@2x.png deleted file mode 100644 index a3fb267f..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-green-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-green-unchecked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-green-unchecked@2x.png deleted file mode 100644 index 9c79c61d..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-green-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-orange-checked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-orange-checked@2x.png deleted file mode 100644 index ead43d2b..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-orange-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-orange-unchecked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-orange-unchecked@2x.png deleted file mode 100644 index 5ddd7d9a..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-orange-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-red-checked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-red-checked@2x.png deleted file mode 100644 index f740cb39..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-red-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-red-unchecked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-red-unchecked@2x.png deleted file mode 100644 index 8503dc76..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-red-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-checked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-checked@2x.png deleted file mode 100644 index b94bd2d1..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-checked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png b/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png deleted file mode 100644 index 0eadbeef..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/CheckBox/checkbox-yellow-unchecked@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Menus/check-all@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Menus/check-all@2x.png deleted file mode 100644 index 6f384ca7..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Menus/check-all@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Assets/Menus/uncheck-all@2x.png b/Lister/Swift/Lister WatchKit App/Assets/Menus/uncheck-all@2x.png deleted file mode 100644 index bfa20db8..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Assets/Menus/uncheck-all@2x.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json b/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 2c2d8efb..00000000 --- a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "images" : [ - { - "size" : "24x24", - "idiom" : "watch", - "scale" : "2x", - "role" : "notificationCenter", - "subtype" : "38mm" - }, - { - "size" : "27.5x27.5", - "idiom" : "watch", - "scale" : "2x", - "role" : "notificationCenter", - "subtype" : "42mm" - }, - { - "size" : "29x29", - "idiom" : "watch", - "filename" : "Lister58.png", - "role" : "companionSettings", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "watch", - "filename" : "Lister87.png", - "role" : "companionSettings", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "watch", - "scale" : "2x", - "filename" : "Lister80.png", - "role" : "appLauncher", - "subtype" : "38mm" - }, - { - "size" : "44x44", - "idiom" : "watch", - "scale" : "2x", - "role" : "longLook", - "subtype" : "42mm" - }, - { - "size" : "86x86", - "idiom" : "watch", - "scale" : "2x", - "filename" : "Lister172.png", - "role" : "quickLook", - "subtype" : "38mm" - }, - { - "size" : "98x98", - "idiom" : "watch", - "scale" : "2x", - "filename" : "Lister196.png", - "role" : "quickLook", - "subtype" : "42mm" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister172.png b/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister172.png deleted file mode 100644 index 2998d762..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister172.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister196.png b/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister196.png deleted file mode 100644 index c13547c7..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister196.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister58.png b/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister58.png deleted file mode 100644 index e808e1fc..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister58.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister80.png b/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister80.png deleted file mode 100644 index 040300fd..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister80.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister87.png b/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister87.png deleted file mode 100644 index 30d8f1b0..00000000 Binary files a/Lister/Swift/Lister WatchKit App/Images.xcassets/AppIcon.appiconset/Lister87.png and /dev/null differ diff --git a/Lister/Swift/Lister WatchKit App/Info.plist b/Lister/Swift/Lister WatchKit App/Info.plist deleted file mode 100644 index b1e09646..00000000 --- a/Lister/Swift/Lister WatchKit App/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Lister - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 2.0 - CFBundleSignature - ???? - CFBundleVersion - 6 - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - WKCompanionAppBundleIdentifier - ${LISTER_BUNDLE_PREFIX}.Lister - WKWatchKitApp - - - diff --git a/Lister/Swift/Lister WatchKit Extension/Images.xcassets/README__ignoredByTemplate__ b/Lister/Swift/Lister WatchKit Extension/Images.xcassets/README__ignoredByTemplate__ deleted file mode 100644 index b601d383..00000000 --- a/Lister/Swift/Lister WatchKit Extension/Images.xcassets/README__ignoredByTemplate__ +++ /dev/null @@ -1 +0,0 @@ -Did you know that git does not support storing empty directories? diff --git a/Lister/Swift/Lister WatchKit Extension/Lister WatchKit Extension.entitlements b/Lister/Swift/Lister WatchKit Extension/Lister WatchKit Extension.entitlements deleted file mode 100644 index f39988ff..00000000 --- a/Lister/Swift/Lister WatchKit Extension/Lister WatchKit Extension.entitlements +++ /dev/null @@ -1,22 +0,0 @@ - - - - - com.apple.developer.icloud-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.developer.icloud-services - - CloudDocuments - - com.apple.developer.ubiquity-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.security.application-groups - - group.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - - diff --git a/Lister/Swift/Lister WatchKit Extension/Localizable.strings b/Lister/Swift/Lister WatchKit Extension/Localizable.strings deleted file mode 100644 index fc2177d3..00000000 --- a/Lister/Swift/Lister WatchKit Extension/Localizable.strings +++ /dev/null @@ -1,7 +0,0 @@ -/* - - - Localizable strings for the Glance. - - -*/ \ No newline at end of file diff --git a/Lister/Swift/Lister/AppLaunchContext.swift b/Lister/Swift/Lister/AppLaunchContext.swift deleted file mode 100644 index 98cf1312..00000000 --- a/Lister/Swift/Lister/AppLaunchContext.swift +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2015 Apple Inc. All Rights Reserved. - See LICENSE.txt for this sample’s licensing information - - Abstract: - A data object for storing context information relevant to how the app was launched. -*/ - -import UIKit -import ListerKit - -struct AppLaunchContext { - // MARK: Properties - - let listURL: NSURL - - let listColor: List.Color - - // MARK: Initializers - - /** - Initializes an `AppLaunchContext` instance with the color and URL designated by the user activity. - - - parameter userActivity: The userActivity providing the file URL and list color to launch to. - */ - init(userActivity: NSUserActivity) { - assert(userActivity.userInfo != nil, "User activity provided to \(__FUNCTION__) has no `userInfo` dictionary.") - let userInfo = userActivity.userInfo! - - /* - The URL may be provided as either a URL or a URL path via separate keys. Check first for - `NSUserActivityDocumentURLKey`, if not provided, obtain the path and create a file URL from it. - */ - - var URL = userInfo[NSUserActivityDocumentURLKey] as? NSURL - - if URL == nil { - let listInfoFilePath = userInfo[AppConfiguration.UserActivity.listURLPathUserInfoKey] as? String - - assert(listInfoFilePath != nil, "The `userInfo` dictionary provided to \(__FUNCTION__) did not contain a URL or URL path.") - - URL = NSURL(fileURLWithPath: listInfoFilePath!, isDirectory: false) - } - - assert(URL != nil, "The `userInfo` dictionary provided to \(__FUNCTION__) did not contain a valid URL.") - - // Unwrap the URL obtained from the dictionary. - listURL = URL! - - // The color will be stored as an `Int` under the prescribed key. - let rawColor = userInfo[AppConfiguration.UserActivity.listColorUserInfoKey] as? Int - - assert(rawColor == nil || 0...5 ~= rawColor!, "The `userInfo` dictionary provided to \(__FUNCTION__) contains an invalid value for `color`: \(rawColor).") - - // Unwrap the `rawColor` value and construct a `List.Color` from it. - listColor = List.Color(rawValue: rawColor!)! - } - - /** - Initializes an `AppLaunchContext` instance with the color and URL designated by the lister:// URL. - - - parameter listerURL: The URL adhering to the lister:// scheme providing the file URL and list color to launch to. - */ - init(listerURL: NSURL) { - assert(listerURL.scheme == AppConfiguration.ListerScheme.name, "Non-lister URL provided to \(__FUNCTION__).") - - assert(listerURL.path != nil, "URL provided to \(__FUNCTION__) is missing `path`.") - - // Construct a file URL from the path of the lister:// URL. - listURL = NSURL(fileURLWithPath: listerURL.path!, isDirectory: false) - - // Extract the query items to initialize the `listColor` property from the `color` query item. - let urlComponents = NSURLComponents(URL: listerURL, resolvingAgainstBaseURL: false)! - let queryItems = urlComponents.queryItems! - - // Filter down to only the `color` query items. There should only be one. - let colorQueryItems = queryItems.filter { $0.name == AppConfiguration.ListerScheme.colorQueryKey } - - assert(colorQueryItems.count == 1, "URL provided to \(__FUNCTION__) should contain only one `color` query item.") - let colorQueryItem = colorQueryItems.first! - - // Obtain a `rawColor` value by converting the `String` `value` of the query item to an `Int`. - - let rawColor = Int(colorQueryItem.value!) - - assert(rawColor != nil || 0...5 ~= rawColor!, "URL provided to \(__FUNCTION__) contains an invalid value for `color`: \(colorQueryItem.value).") - - // Unwrap the `rawColor` value and construct a `List.Color` from it. - listColor = List.Color(rawValue: rawColor!)! - } -} diff --git a/Lister/Swift/Lister/Base.lproj/Launch Screen.storyboard b/Lister/Swift/Lister/Base.lproj/Launch Screen.storyboard deleted file mode 100644 index 49af6ee2..00000000 --- a/Lister/Swift/Lister/Base.lproj/Launch Screen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Contents.json b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 453ef9fc..00000000 --- a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "images" : [ - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Lister-29-1.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Lister-58.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Lister-87.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Lister-80-1.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Lister-120-1.png", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "57x57", - "scale" : "1x" - }, - { - "idiom" : "iphone", - "size" : "57x57", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Lister-120.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Lister-180.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Lister-29.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Lister-58-1.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Lister-40.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Lister-80.png", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "50x50", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "50x50", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "72x72", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "72x72", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Lister-76.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Lister-152.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-120-1.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-120-1.png deleted file mode 100644 index f7eb41e0..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-120-1.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-120.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-120.png deleted file mode 100644 index ff1184b5..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-120.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-152.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-152.png deleted file mode 100644 index ddccfbd8..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-152.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-180.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-180.png deleted file mode 100644 index edfed498..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-180.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-29-1.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-29-1.png deleted file mode 100644 index 6ff2d066..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-29-1.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-29.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-29.png deleted file mode 100644 index e4015223..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-29.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-40.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-40.png deleted file mode 100644 index ec44246f..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-40.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-58-1.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-58-1.png deleted file mode 100644 index 17ab7d78..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-58-1.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-58.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-58.png deleted file mode 100644 index 86169235..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-58.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-76.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-76.png deleted file mode 100644 index 188b68fc..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-76.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-80-1.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-80-1.png deleted file mode 100644 index bb5c634d..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-80-1.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-80.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-80.png deleted file mode 100644 index 92adae0f..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-80.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-87.png b/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-87.png deleted file mode 100644 index 5d16640c..00000000 Binary files a/Lister/Swift/Lister/Images.xcassets/AppIcon.appiconset/Lister-87.png and /dev/null differ diff --git a/Lister/Swift/Lister/Images.xcassets/Contents.json b/Lister/Swift/Lister/Images.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/Lister/Swift/Lister/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Lister/Swift/Lister/Lister.entitlements b/Lister/Swift/Lister/Lister.entitlements deleted file mode 100644 index f39988ff..00000000 --- a/Lister/Swift/Lister/Lister.entitlements +++ /dev/null @@ -1,22 +0,0 @@ - - - - - com.apple.developer.icloud-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.developer.icloud-services - - CloudDocuments - - com.apple.developer.ubiquity-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.security.application-groups - - group.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - - diff --git a/Lister/Swift/ListerKit (watchOS)/Info.plist b/Lister/Swift/ListerKit (watchOS)/Info.plist deleted file mode 100644 index 475b0df4..00000000 --- a/Lister/Swift/ListerKit (watchOS)/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - AAPLListerBundlePrefix - ${LISTER_BUNDLE_PREFIX} - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Contents.json b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d492563c..00000000 --- a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "Lister16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "Lister32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "Lister32-1.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "Lister64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "Lister128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "Lister256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "Lister256-1.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "Lister512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "Lister512-1.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "Lister1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister1024.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister1024.png deleted file mode 100644 index 21771795..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister1024.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister128.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister128.png deleted file mode 100644 index fa087e9a..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister128.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister16.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister16.png deleted file mode 100644 index 1fcab340..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister16.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister256-1.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister256-1.png deleted file mode 100644 index 613c26e5..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister256-1.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister256.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister256.png deleted file mode 100644 index 613c26e5..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister256.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister32-1.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister32-1.png deleted file mode 100644 index 8b1acc5d..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister32-1.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister32.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister32.png deleted file mode 100644 index 8b1acc5d..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister32.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister512-1.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister512-1.png deleted file mode 100644 index 315ebd5f..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister512-1.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister512.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister512.png deleted file mode 100644 index 315ebd5f..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister512.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister64.png b/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister64.png deleted file mode 100644 index c0c6208c..00000000 Binary files a/Lister/Swift/ListerOSX/Images.xcassets/AppIcon.appiconset/Lister64.png and /dev/null differ diff --git a/Lister/Swift/ListerOSX/ListerOSX.entitlements b/Lister/Swift/ListerOSX/ListerOSX.entitlements deleted file mode 100644 index 3132e2eb..00000000 --- a/Lister/Swift/ListerOSX/ListerOSX.entitlements +++ /dev/null @@ -1,22 +0,0 @@ - - - - - com.apple.developer.icloud-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.developer.icloud-services - - CloudDocuments - - com.apple.developer.ubiquity-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-write - - - diff --git a/Lister/Swift/ListerToday/ListerToday.entitlements b/Lister/Swift/ListerToday/ListerToday.entitlements deleted file mode 100644 index f39988ff..00000000 --- a/Lister/Swift/ListerToday/ListerToday.entitlements +++ /dev/null @@ -1,22 +0,0 @@ - - - - - com.apple.developer.icloud-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.developer.icloud-services - - CloudDocuments - - com.apple.developer.ubiquity-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.security.application-groups - - group.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - - diff --git a/Lister/Swift/ListerTodayOSX/ListerTodayOSX.entitlements b/Lister/Swift/ListerTodayOSX/ListerTodayOSX.entitlements deleted file mode 100644 index 3132e2eb..00000000 --- a/Lister/Swift/ListerTodayOSX/ListerTodayOSX.entitlements +++ /dev/null @@ -1,22 +0,0 @@ - - - - - com.apple.developer.icloud-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.developer.icloud-services - - CloudDocuments - - com.apple.developer.ubiquity-container-identifiers - - iCloud.${LISTER_BUNDLE_PREFIX}.Lister.Documents - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-write - - - diff --git a/Lister/Swift/ListerTodayOSX/en.lproj/InfoPlist.strings b/Lister/Swift/ListerTodayOSX/en.lproj/InfoPlist.strings deleted file mode 100644 index c2566831..00000000 --- a/Lister/Swift/ListerTodayOSX/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,4 +0,0 @@ -/* Display name and description for this extension. */ -"CFBundleDisplayName" = "Lister"; -"com.apple.notificationcenter.widget.description" = "Lister Today View"; - diff --git a/Lister/Swift/Resources/Groceries.list b/Lister/Swift/Resources/Groceries.list deleted file mode 100644 index 1b3c0a4c..00000000 Binary files a/Lister/Swift/Resources/Groceries.list and /dev/null differ diff --git a/Lister/Swift/Resources/ListerDocumentIcon.icns b/Lister/Swift/Resources/ListerDocumentIcon.icns deleted file mode 100644 index a0b97bf9..00000000 Binary files a/Lister/Swift/Resources/ListerDocumentIcon.icns and /dev/null differ diff --git a/Lister/Swift/Resources/Tech Toys.list b/Lister/Swift/Resources/Tech Toys.list deleted file mode 100644 index 78a2c08a..00000000 Binary files a/Lister/Swift/Resources/Tech Toys.list and /dev/null differ diff --git a/Lister/Swift/Resources/Today.list b/Lister/Swift/Resources/Today.list deleted file mode 100644 index 8e06c562..00000000 Binary files a/Lister/Swift/Resources/Today.list and /dev/null differ diff --git a/Lister/iOS and Watch Quick Start.pdf b/Lister/iOS and Watch Quick Start.pdf index a97f7cbf..d70342a6 100644 Binary files a/Lister/iOS and Watch Quick Start.pdf and b/Lister/iOS and Watch Quick Start.pdf differ