Add UniqueIdentifier file. Fix a couple build errors.

This commit is contained in:
Brent Simmons 2017-05-24 13:29:40 -07:00
parent a336140a9a
commit f49c552bf9
4 changed files with 22 additions and 3 deletions

View File

@ -27,7 +27,7 @@ final class LocalAccountRefresher: DownloadSessionDelegate {
public func refreshFeeds(_ feeds: NSSet) {
downloadSession.refreshObjects(feeds)
downloadSession.downloadObjects(feeds)
}
// MARK: DownloadSessionDelegate

View File

@ -132,7 +132,7 @@ public extension LocalFeed {
self.unreadCount = unreadCount
}
if let conditionalGetInfoPlist = diskDictionary[feedConditionalGetInfoKey] as? NSDictionary {
if let conditionalGetInfoPlist = diskDictionary[feedConditionalGetInfoKey] as? [String: String] {
if conditionalGetInfoPlist.count > 0 {
self.conditionalGetInfo = HTTPConditionalGetInfo(plist: conditionalGetInfoPlist)
}
@ -162,7 +162,7 @@ public extension LocalFeed {
d.setOptionalStringValue(username, feedUsernameKey)
d.setOptionalStringValue(contentHash, feedContentHashKey)
if let conditionalGetInfoPlist = conditionalGetInfo?.plist as? NSDictionary {
if let conditionalGetInfoPlist = conditionalGetInfo?.plist {
d.setObjectWithStringKey(conditionalGetInfoPlist, feedConditionalGetInfoKey)
}

View File

@ -68,6 +68,7 @@
842DD7F61E14997600E061EB /* RSImageRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5631AC3D13C00CEA6C8 /* RSImageRenderer.m */; };
842DD7F71E14997600E061EB /* RSScaling.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFF5671AC3D1B000CEA6C8 /* RSScaling.h */; settings = {ATTRIBUTES = (Public, ); }; };
842DD7F81E14997600E061EB /* RSScaling.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFF5681AC3D1B000CEA6C8 /* RSScaling.m */; };
842E45CC1ED623C7000A8B52 /* UniqueIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842E45CB1ED623C7000A8B52 /* UniqueIdentifier.swift */; };
8432B1861DACA0E90057D6DF /* NSResponder-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8432B1851DACA0E90057D6DF /* NSResponder-Extensions.swift */; };
8432B1881DACA2060057D6DF /* NSWindow-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8432B1871DACA2060057D6DF /* NSWindow-Extensions.swift */; };
844C915B1B65753E0051FC1B /* RSPlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 844C91591B65753E0051FC1B /* RSPlist.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -163,6 +164,7 @@
842635581D7FA24800196285 /* NSOutlineView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSOutlineView+Extensions.swift"; sourceTree = "<group>"; };
842DD7BC1E14993900E061EB /* RSCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RSCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
842DD7BF1E14993900E061EB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
842E45CB1ED623C7000A8B52 /* UniqueIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UniqueIdentifier.swift; sourceTree = "<group>"; };
8432B1851DACA0E90057D6DF /* NSResponder-Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSResponder-Extensions.swift"; sourceTree = "<group>"; };
8432B1871DACA2060057D6DF /* NSWindow-Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSWindow-Extensions.swift"; sourceTree = "<group>"; };
844C91591B65753E0051FC1B /* RSPlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RSPlist.h; path = RSCore/RSPlist.h; sourceTree = "<group>"; };
@ -302,6 +304,7 @@
8453F7DD1BDF337800B1C8ED /* RSMacroProcessor.m */,
849BF8B91C9130150071D1DA /* DiskSaver.swift */,
84A835891D4EC7B80004C598 /* PlistProviderProtocol.swift */,
842E45CB1ED623C7000A8B52 /* UniqueIdentifier.swift */,
84CFF5241AC3C8A200CEA6C8 /* Foundation */,
84CFF5551AC3CF4A00CEA6C8 /* AppKit */,
84CFF5661AC3D13F00CEA6C8 /* Images */,
@ -699,6 +702,7 @@
844F91D61D90D86100820C48 /* RSTransparentContainerView.m in Sources */,
84CFF56E1AC3D20A00CEA6C8 /* NSImage+RSCore.m in Sources */,
8453F7DF1BDF337800B1C8ED /* RSMacroProcessor.m in Sources */,
842E45CC1ED623C7000A8B52 /* UniqueIdentifier.swift in Sources */,
84A8358A1D4EC7B80004C598 /* PlistProviderProtocol.swift in Sources */,
849A339E1AC90A0A0015BA09 /* NSTableView+RSCore.m in Sources */,
84CFF51B1AC3C77500CEA6C8 /* RSPlatform.m in Sources */,
@ -1009,6 +1013,7 @@
842DD7C31E14993900E061EB /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
84CFF4EE1AC3C69700CEA6C8 /* Build configuration list for PBXProject "RSCore" */ = {
isa = XCConfigurationList;

View File

@ -0,0 +1,14 @@
//
// UniqueIdentifier.swift
// RSCore
//
// Created by Brent Simmons on 5/24/17.
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
//
import Foundation
public func uniqueIdentifier() -> String {
return UUID().uuidString
}