Skip to content

Commit 25e5233

Browse files
authored
Merge pull request #64 from hyperoslo/fix/update_demo
Update macOS demo
2 parents 44e199e + 5b7b15e commit 25e5233

File tree

3 files changed

+67
-45
lines changed

3 files changed

+67
-45
lines changed

Example/ImaginaryForMac/ImaginaryForMac.xcodeproj/project.pbxproj

Lines changed: 52 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
78D3FFC6CEE43584B83524A7 /* Pods_ImaginaryForMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 703EB04E6634A3186CCD8E52 /* Pods_ImaginaryForMac.framework */; };
10+
B79DB08593EE4EFC63A78563 /* Pods_ImaginaryForMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA2C8B137EAFB2B633C3103 /* Pods_ImaginaryForMac.framework */; };
1111
D28838FC1D2113A3005FBFE8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28838FB1D2113A3005FBFE8 /* AppDelegate.swift */; };
1212
D28838FE1D2113A3005FBFE8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28838FD1D2113A3005FBFE8 /* ViewController.swift */; };
1313
D28839001D2113A3005FBFE8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D28838FF1D2113A3005FBFE8 /* Assets.xcassets */; };
@@ -17,8 +17,9 @@
1717
/* End PBXBuildFile section */
1818

1919
/* Begin PBXFileReference section */
20-
703EB04E6634A3186CCD8E52 /* Pods_ImaginaryForMac.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ImaginaryForMac.framework; sourceTree = BUILT_PRODUCTS_DIR; };
21-
C2903F74703615995C59EBED /* Pods-ImaginaryForMac.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImaginaryForMac.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ImaginaryForMac/Pods-ImaginaryForMac.debug.xcconfig"; sourceTree = "<group>"; };
20+
043CAD6662E05A93CF72F48D /* Pods-ImaginaryForMac.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImaginaryForMac.release.xcconfig"; path = "Pods/Target Support Files/Pods-ImaginaryForMac/Pods-ImaginaryForMac.release.xcconfig"; sourceTree = "<group>"; };
21+
3BA2C8B137EAFB2B633C3103 /* Pods_ImaginaryForMac.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ImaginaryForMac.framework; sourceTree = BUILT_PRODUCTS_DIR; };
22+
9B812B849966115446D32BEC /* Pods-ImaginaryForMac.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImaginaryForMac.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ImaginaryForMac/Pods-ImaginaryForMac.debug.xcconfig"; sourceTree = "<group>"; };
2223
D28838F81D2113A3005FBFE8 /* ImaginaryForMac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ImaginaryForMac.app; sourceTree = BUILT_PRODUCTS_DIR; };
2324
D28838FB1D2113A3005FBFE8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2425
D28838FD1D2113A3005FBFE8 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -27,36 +28,44 @@
2728
D28839041D2113A3005FBFE8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2829
D288390A1D211522005FBFE8 /* Cell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Cell.swift; sourceTree = "<group>"; };
2930
D288390B1D211522005FBFE8 /* Cell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Cell.xib; sourceTree = "<group>"; };
30-
F352B24B95F67FCE8E31323A /* Pods-ImaginaryForMac.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImaginaryForMac.release.xcconfig"; path = "Pods/Target Support Files/Pods-ImaginaryForMac/Pods-ImaginaryForMac.release.xcconfig"; sourceTree = "<group>"; };
3131
/* End PBXFileReference section */
3232

3333
/* Begin PBXFrameworksBuildPhase section */
3434
D28838F51D2113A3005FBFE8 /* Frameworks */ = {
3535
isa = PBXFrameworksBuildPhase;
3636
buildActionMask = 2147483647;
3737
files = (
38-
78D3FFC6CEE43584B83524A7 /* Pods_ImaginaryForMac.framework in Frameworks */,
38+
B79DB08593EE4EFC63A78563 /* Pods_ImaginaryForMac.framework in Frameworks */,
3939
);
4040
runOnlyForDeploymentPostprocessing = 0;
4141
};
4242
/* End PBXFrameworksBuildPhase section */
4343

4444
/* Begin PBXGroup section */
45-
31FDF6D46C1C400C275B82C1 /* Frameworks */ = {
45+
7BA70C804F06A549B67C1796 /* Frameworks */ = {
4646
isa = PBXGroup;
4747
children = (
48-
703EB04E6634A3186CCD8E52 /* Pods_ImaginaryForMac.framework */,
48+
3BA2C8B137EAFB2B633C3103 /* Pods_ImaginaryForMac.framework */,
4949
);
5050
name = Frameworks;
5151
sourceTree = "<group>";
5252
};
53+
87A7B1AEB948E39AB1211F8F /* Pods */ = {
54+
isa = PBXGroup;
55+
children = (
56+
9B812B849966115446D32BEC /* Pods-ImaginaryForMac.debug.xcconfig */,
57+
043CAD6662E05A93CF72F48D /* Pods-ImaginaryForMac.release.xcconfig */,
58+
);
59+
name = Pods;
60+
sourceTree = "<group>";
61+
};
5362
D28838EF1D2113A3005FBFE8 = {
5463
isa = PBXGroup;
5564
children = (
5665
D28838FA1D2113A3005FBFE8 /* ImaginaryForMac */,
5766
D28838F91D2113A3005FBFE8 /* Products */,
58-
D94B243ADFC942E9B8A92856 /* Pods */,
59-
31FDF6D46C1C400C275B82C1 /* Frameworks */,
67+
87A7B1AEB948E39AB1211F8F /* Pods */,
68+
7BA70C804F06A549B67C1796 /* Frameworks */,
6069
);
6170
sourceTree = "<group>";
6271
};
@@ -82,28 +91,19 @@
8291
path = ImaginaryForMac;
8392
sourceTree = "<group>";
8493
};
85-
D94B243ADFC942E9B8A92856 /* Pods */ = {
86-
isa = PBXGroup;
87-
children = (
88-
C2903F74703615995C59EBED /* Pods-ImaginaryForMac.debug.xcconfig */,
89-
F352B24B95F67FCE8E31323A /* Pods-ImaginaryForMac.release.xcconfig */,
90-
);
91-
name = Pods;
92-
sourceTree = "<group>";
93-
};
9494
/* End PBXGroup section */
9595

9696
/* Begin PBXNativeTarget section */
9797
D28838F71D2113A3005FBFE8 /* ImaginaryForMac */ = {
9898
isa = PBXNativeTarget;
9999
buildConfigurationList = D28839071D2113A3005FBFE8 /* Build configuration list for PBXNativeTarget "ImaginaryForMac" */;
100100
buildPhases = (
101-
55A2ACC7C6304E095220777D /* [CP] Check Pods Manifest.lock */,
101+
40CCA429685DD255AA363E98 /* [CP] Check Pods Manifest.lock */,
102102
D28838F41D2113A3005FBFE8 /* Sources */,
103103
D28838F51D2113A3005FBFE8 /* Frameworks */,
104104
D28838F61D2113A3005FBFE8 /* Resources */,
105-
53BC74B406E8FA8CA24B5873 /* [CP] Embed Pods Frameworks */,
106-
D66AF2BE601A8F9708469D8F /* [CP] Copy Pods Resources */,
105+
03141398B338940A1BF90C20 /* [CP] Embed Pods Frameworks */,
106+
E3DAFB0252505F0C09FD0D71 /* [CP] Copy Pods Resources */,
107107
);
108108
buildRules = (
109109
);
@@ -121,7 +121,7 @@
121121
isa = PBXProject;
122122
attributes = {
123123
LastSwiftUpdateCheck = 0730;
124-
LastUpgradeCheck = 0800;
124+
LastUpgradeCheck = 0900;
125125
ORGANIZATIONNAME = Hyper;
126126
TargetAttributes = {
127127
D28838F71D2113A3005FBFE8 = {
@@ -162,37 +162,47 @@
162162
/* End PBXResourcesBuildPhase section */
163163

164164
/* Begin PBXShellScriptBuildPhase section */
165-
53BC74B406E8FA8CA24B5873 /* [CP] Embed Pods Frameworks */ = {
165+
03141398B338940A1BF90C20 /* [CP] Embed Pods Frameworks */ = {
166166
isa = PBXShellScriptBuildPhase;
167167
buildActionMask = 2147483647;
168168
files = (
169169
);
170170
inputPaths = (
171+
"${SRCROOT}/Pods/Target Support Files/Pods-ImaginaryForMac/Pods-ImaginaryForMac-frameworks.sh",
172+
"${BUILT_PRODUCTS_DIR}/Cache/Cache.framework",
173+
"${BUILT_PRODUCTS_DIR}/Imaginary/Imaginary.framework",
174+
"${BUILT_PRODUCTS_DIR}/SwiftHash/SwiftHash.framework",
171175
);
172176
name = "[CP] Embed Pods Frameworks";
173177
outputPaths = (
178+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cache.framework",
179+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Imaginary.framework",
180+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftHash.framework",
174181
);
175182
runOnlyForDeploymentPostprocessing = 0;
176183
shellPath = /bin/sh;
177184
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ImaginaryForMac/Pods-ImaginaryForMac-frameworks.sh\"\n";
178185
showEnvVarsInLog = 0;
179186
};
180-
55A2ACC7C6304E095220777D /* [CP] Check Pods Manifest.lock */ = {
187+
40CCA429685DD255AA363E98 /* [CP] Check Pods Manifest.lock */ = {
181188
isa = PBXShellScriptBuildPhase;
182189
buildActionMask = 2147483647;
183190
files = (
184191
);
185192
inputPaths = (
193+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
194+
"${PODS_ROOT}/Manifest.lock",
186195
);
187196
name = "[CP] Check Pods Manifest.lock";
188197
outputPaths = (
198+
"$(DERIVED_FILE_DIR)/Pods-ImaginaryForMac-checkManifestLockResult.txt",
189199
);
190200
runOnlyForDeploymentPostprocessing = 0;
191201
shellPath = /bin/sh;
192-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
202+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
193203
showEnvVarsInLog = 0;
194204
};
195-
D66AF2BE601A8F9708469D8F /* [CP] Copy Pods Resources */ = {
205+
E3DAFB0252505F0C09FD0D71 /* [CP] Copy Pods Resources */ = {
196206
isa = PBXShellScriptBuildPhase;
197207
buildActionMask = 2147483647;
198208
files = (
@@ -243,14 +253,20 @@
243253
CLANG_CXX_LIBRARY = "libc++";
244254
CLANG_ENABLE_MODULES = YES;
245255
CLANG_ENABLE_OBJC_ARC = YES;
256+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
246257
CLANG_WARN_BOOL_CONVERSION = YES;
258+
CLANG_WARN_COMMA = YES;
247259
CLANG_WARN_CONSTANT_CONVERSION = YES;
248260
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249261
CLANG_WARN_EMPTY_BODY = YES;
250262
CLANG_WARN_ENUM_CONVERSION = YES;
251263
CLANG_WARN_INFINITE_RECURSION = YES;
252264
CLANG_WARN_INT_CONVERSION = YES;
265+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
266+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
253267
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
268+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
269+
CLANG_WARN_STRICT_PROTOTYPES = YES;
254270
CLANG_WARN_SUSPICIOUS_MOVE = YES;
255271
CLANG_WARN_UNREACHABLE_CODE = YES;
256272
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -278,6 +294,7 @@
278294
ONLY_ACTIVE_ARCH = YES;
279295
SDKROOT = macosx;
280296
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
297+
SWIFT_VERSION = 4.0;
281298
};
282299
name = Debug;
283300
};
@@ -290,14 +307,20 @@
290307
CLANG_CXX_LIBRARY = "libc++";
291308
CLANG_ENABLE_MODULES = YES;
292309
CLANG_ENABLE_OBJC_ARC = YES;
310+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
293311
CLANG_WARN_BOOL_CONVERSION = YES;
312+
CLANG_WARN_COMMA = YES;
294313
CLANG_WARN_CONSTANT_CONVERSION = YES;
295314
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
296315
CLANG_WARN_EMPTY_BODY = YES;
297316
CLANG_WARN_ENUM_CONVERSION = YES;
298317
CLANG_WARN_INFINITE_RECURSION = YES;
299318
CLANG_WARN_INT_CONVERSION = YES;
319+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
320+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
300321
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
322+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
323+
CLANG_WARN_STRICT_PROTOTYPES = YES;
301324
CLANG_WARN_SUSPICIOUS_MOVE = YES;
302325
CLANG_WARN_UNREACHABLE_CODE = YES;
303326
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -318,12 +341,13 @@
318341
MTL_ENABLE_DEBUG_INFO = NO;
319342
SDKROOT = macosx;
320343
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
344+
SWIFT_VERSION = 4.0;
321345
};
322346
name = Release;
323347
};
324348
D28839081D2113A3005FBFE8 /* Debug */ = {
325349
isa = XCBuildConfiguration;
326-
baseConfigurationReference = C2903F74703615995C59EBED /* Pods-ImaginaryForMac.debug.xcconfig */;
350+
baseConfigurationReference = 9B812B849966115446D32BEC /* Pods-ImaginaryForMac.debug.xcconfig */;
327351
buildSettings = {
328352
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
329353
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -332,13 +356,12 @@
332356
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
333357
PRODUCT_BUNDLE_IDENTIFIER = "no.hyperoslo.Imaginary-Mac.ImaginaryForMac";
334358
PRODUCT_NAME = "$(TARGET_NAME)";
335-
SWIFT_VERSION = 3.0;
336359
};
337360
name = Debug;
338361
};
339362
D28839091D2113A3005FBFE8 /* Release */ = {
340363
isa = XCBuildConfiguration;
341-
baseConfigurationReference = F352B24B95F67FCE8E31323A /* Pods-ImaginaryForMac.release.xcconfig */;
364+
baseConfigurationReference = 043CAD6662E05A93CF72F48D /* Pods-ImaginaryForMac.release.xcconfig */;
342365
buildSettings = {
343366
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
344367
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -347,7 +370,6 @@
347370
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
348371
PRODUCT_BUNDLE_IDENTIFIER = "no.hyperoslo.Imaginary-Mac.ImaginaryForMac";
349372
PRODUCT_NAME = "$(TARGET_NAME)";
350-
SWIFT_VERSION = 3.0;
351373
};
352374
name = Release;
353375
};

Example/ImaginaryForMac/ImaginaryForMac/ViewController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class ViewController: NSViewController {
2929

3030
let layout = NSCollectionViewFlowLayout()
3131
layout.itemSize = NSSize(width: 300.0, height: 150.0)
32-
layout.sectionInset = EdgeInsets(top: 10.0, left: 20.0, bottom: 10.0, right: 20.0)
32+
layout.sectionInset = NSEdgeInsets(top: 10.0, left: 20.0, bottom: 10.0, right: 20.0)
3333
layout.minimumInteritemSpacing = 4.0
3434
layout.minimumLineSpacing = 4.0
3535
collectionView.collectionViewLayout = layout
3636

3737
collectionView.layer?.backgroundColor = NSColor.black.cgColor
38-
39-
collectionView.register(NSNib(nibNamed: "Cell", bundle: nil), forItemWithIdentifier: "Cell")
38+
collectionView.register(NSNib(nibNamed: NSNib.Name(rawValue: "Cell"), bundle: nil)!,
39+
forItemWithIdentifier: NSUserInterfaceItemIdentifier(rawValue: "Cell"))
4040
}
4141
}
4242

@@ -52,11 +52,11 @@ extension ViewController: NSCollectionViewDataSource {
5252

5353
func collectionView(_ collectionView: NSCollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> NSCollectionViewItem {
5454

55-
let item = collectionView.makeItem(withIdentifier: "Cell", for: indexPath)
55+
let item = collectionView.makeItem(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "Cell"), for: indexPath)
5656
guard let cell = item as? Cell else { return item }
5757

5858
let value = values[(indexPath as NSIndexPath).item]
59-
cell.imageView?.setImage(url: value, placeholder: Image(named: "placeholder"))
59+
cell.imageView?.setImage(url: value, placeholder: Image(named: NSImage.Name(rawValue: "placeholder")))
6060

6161
return cell
6262
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
PODS:
2-
- Cache (3.1.0):
3-
- SwiftHash (~> 1.4.0)
4-
- Imaginary (1.0.2):
5-
- Cache (~> 3.0)
6-
- SwiftHash (1.4.0)
2+
- Cache (4.0.0):
3+
- SwiftHash (~> 2.0.0)
4+
- Imaginary (3.0.0):
5+
- Cache (~> 4.0)
6+
- SwiftHash (2.0.0)
77

88
DEPENDENCIES:
99
- Imaginary (from `../../`)
1010

1111
EXTERNAL SOURCES:
1212
Imaginary:
13-
:path: "../../"
13+
:path: ../../
1414

1515
SPEC CHECKSUMS:
16-
Cache: 6dea29625ee40c1cafb2ff6c48f3f7341a59cfb5
17-
Imaginary: 3135892ca46c5126cf94df3340e10e267066bd12
18-
SwiftHash: acf0f29032309a5c7a7f625595eade1aca97aca2
16+
Cache: e73353960c614ab79b0c6911b8c39da05b334470
17+
Imaginary: 61c53e76b1b6f84cb86e98b0b8d47b535af89204
18+
SwiftHash: d2e09b13495447178cdfb8e46e54a5c46f15f5a9
1919

2020
PODFILE CHECKSUM: 804905a0cfc064a8a0388d223095e41774bcee31
2121

22-
COCOAPODS: 1.2.1
22+
COCOAPODS: 1.3.1

0 commit comments

Comments
 (0)