Skip to content

Commit

Permalink
Update project and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
3lvis committed Oct 4, 2020
1 parent bc3e2f9 commit c7be321
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 54 deletions.
28 changes: 17 additions & 11 deletions Imaginary.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 1030;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Hyper Interaktiv AS";
TargetAttributes = {
BDE8FBE81D1BFB9F00C5A212 = {
Expand Down Expand Up @@ -692,7 +692,7 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Imaginary-Mac";
PRODUCT_NAME = Imaginary;
SDKROOT = macosx;
Expand Down Expand Up @@ -720,7 +720,7 @@
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.Imaginary-Mac";
PRODUCT_NAME = Imaginary;
SDKROOT = macosx;
Expand Down Expand Up @@ -822,7 +822,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
name = Debug;
};
Expand All @@ -849,7 +849,7 @@
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
};
name = Release;
};
Expand All @@ -868,7 +868,7 @@
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "ImaginaryTests-iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -898,7 +898,7 @@
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "ImaginaryTests-iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -935,6 +935,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -960,7 +961,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -995,6 +996,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -1014,7 +1016,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand All @@ -1038,7 +1040,7 @@
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "$(SRCROOT)/Imaginary/iOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1047,7 +1049,9 @@
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.Imaginary;
PRODUCT_NAME = Imaginary;
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
Expand All @@ -1062,7 +1066,7 @@
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "$(SRCROOT)/Imaginary/iOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1071,7 +1075,9 @@
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.Imaginary;
PRODUCT_NAME = Imaginary;
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"repositoryURL": "https://github.com/hyperoslo/Cache.git",
"state": {
"branch": "master",
"revision": "042b2cd22d3c8c30fdcead0c613de94a1d648123",
"revision": "c7f4d633049c3bd649a353bad36f6c17e9df085f",
"version": null
}
}
Expand Down
24 changes: 10 additions & 14 deletions Imaginary.xcodeproj/xcshareddata/xcschemes/Imaginary-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1030"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5DF75901C403D8200BF1AB6"
BuildableName = "Imaginary.framework"
BlueprintName = "Imaginary-iOS"
ReferencedContainer = "container:Imaginary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5DF75901C403D8200BF1AB6"
BuildableName = "Imaginary.framework"
BlueprintName = "Imaginary-iOS"
ReferencedContainer = "container:Imaginary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:Imaginary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1030"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -29,8 +29,6 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -51,8 +49,6 @@
ReferencedContainer = "container:Imaginary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
24 changes: 10 additions & 14 deletions Imaginary.xcodeproj/xcshareddata/xcschemes/Imaginary-tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1030"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D21352C11F7540E400B5375B"
BuildableName = "Imaginary.framework"
BlueprintName = "Imaginary-tvOS"
ReferencedContainer = "container:Imaginary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D21352C11F7540E400B5375B"
BuildableName = "Imaginary.framework"
BlueprintName = "Imaginary-tvOS"
ReferencedContainer = "container:Imaginary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:Imaginary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
4 changes: 2 additions & 2 deletions ImaginaryTests-iOS/ImageFetcherTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import Cache
@testable import Imaginary

private final class ImageFetcherTests: XCTestCase {
var storage: Storage<Image>!
var storage: Storage<String, Image>!
var fetcher: ImageFetcher!
fileprivate var mockDownloader = MockDownloader(modifyRequest: { $0 })
let url = URL(string: "https://no.hyper/imaginary.png")!

override func setUp() {
super.setUp()

storage = try! Storage<Image>(diskConfig: DiskConfig(name: "Floppy"), memoryConfig: MemoryConfig(), transformer: TransformerFactory.forImage())
storage = try! Storage<String, Image>(diskConfig: DiskConfig(name: "Floppy"), memoryConfig: MemoryConfig(), transformer: TransformerFactory.forImage())
fetcher = ImageFetcher(downloader: mockDownloader, storage: storage)
}

Expand Down
4 changes: 2 additions & 2 deletions ImaginaryTests-iOS/MultipleImageFetcherTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import Cache
import Imaginary

private final class MultipleImageFetcherTests: XCTestCase {
var storage: Storage<Image>!
var storage: Storage<String, Image>!

override func setUp() {
super.setUp()

storage = try! Storage<Image>(diskConfig: DiskConfig(name: "Floppy"), memoryConfig: MemoryConfig(), transformer: TransformerFactory.forImage())
storage = try! Storage<String, Image>(diskConfig: DiskConfig(name: "Floppy"), memoryConfig: MemoryConfig(), transformer: TransformerFactory.forImage())
}

override func tearDown() {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Shared/Fetcher/ImageFetcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import Cache
/// It can be fetched from storage or network.
public class ImageFetcher {
private let downloader: ImageDownloader
private let storage: Storage<Image>?
private let storage: Storage<String, Image>?

/// Initialize ImageFetcehr
///
/// - Parameters:
/// - downloader: Used to download images.
/// - storage: Used to store downloaded images. Pass nil to ignore cache
public init(downloader: ImageDownloader, storage: Storage<Image>?) {
public init(downloader: ImageDownloader, storage: Storage<String, Image>?) {
self.downloader = downloader
self.storage = storage
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Shared/Library/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public struct Configuration {
public static var trackError: ((URL, Error) -> Void)?

/// The default storage
public static var imageStorage: Storage<Image> = {
public static var imageStorage: Storage<String, Image> = {
let diskConfig = DiskConfig(name: "Imaginary",
expiry: .date(Date().addingTimeInterval(60 * 60 * 24 * 3)))
let memoryConfig = MemoryConfig(countLimit: 10, totalCostLimit: 0)

do {
return try Storage<Image>(
return try Storage<String, Image>(
diskConfig: diskConfig,
memoryConfig: memoryConfig,
transformer: TransformerFactory.forImage()
Expand Down
2 changes: 1 addition & 1 deletion Sources/Shared/Library/Option.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public struct Option {
/// Specify Storage for memory and disk cache.
/// Defaults to Configuration.imageStorage.
/// Return nil to ignore cache
public var storageMaker: () -> Storage<Image>? = {
public var storageMaker: () -> Storage<String, Image>? = {
return Configuration.imageStorage
}

Expand Down

0 comments on commit c7be321

Please sign in to comment.