Skip to content

Commit c1681ea

Browse files
author
Toine Heuvelmans
committed
Update examples to use Swift 4.2
1 parent 9850f4e commit c1681ea

40 files changed

Lines changed: 790 additions & 600 deletions

File tree

Examples/BuiltInTransitionsCatalog/BuiltInTransitionsCatalog.xcodeproj/project.pbxproj

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

99
/* Begin PBXBuildFile section */
10+
85277C71050F4FC75BBA430F /* Pods_BuiltInTransitionsCatalog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08B4DEF040CAAD71238C4EB5 /* Pods_BuiltInTransitionsCatalog.framework */; };
1011
BA7592DE1E5CC79B00B021BF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA7592DD1E5CC79B00B021BF /* AppDelegate.swift */; };
1112
BA7592E01E5CC79B00B021BF /* AwesomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA7592DF1E5CC79B00B021BF /* AwesomeViewController.swift */; };
1213
BA7592E31E5CC79B00B021BF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BA7592E11E5CC79B00B021BF /* Main.storyboard */; };
@@ -15,12 +16,11 @@
1516
BA7592F01E5CC89F00B021BF /* CatalogMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA7592EF1E5CC89F00B021BF /* CatalogMenu.swift */; };
1617
BA7592F21E5CD10C00B021BF /* Catalog.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA7592F11E5CD10C00B021BF /* Catalog.swift */; };
1718
BAE576771E5ED48400E8ABC3 /* TransitionStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAE576761E5ED48400E8ABC3 /* TransitionStyle.swift */; };
18-
E869D1806ADD6F26D1037B77 /* Pods_BuiltInTransitionsCatalog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AC8F032D74589B67CB68A56E /* Pods_BuiltInTransitionsCatalog.framework */; };
1919
/* End PBXBuildFile section */
2020

2121
/* Begin PBXFileReference section */
22-
AC8F032D74589B67CB68A56E /* Pods_BuiltInTransitionsCatalog.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuiltInTransitionsCatalog.framework; sourceTree = BUILT_PRODUCTS_DIR; };
23-
B5A66A82E93113AEA7FA77BA /* Pods-BuiltInTransitionsCatalog.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuiltInTransitionsCatalog.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuiltInTransitionsCatalog/Pods-BuiltInTransitionsCatalog.debug.xcconfig"; sourceTree = "<group>"; };
22+
08B4DEF040CAAD71238C4EB5 /* Pods_BuiltInTransitionsCatalog.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuiltInTransitionsCatalog.framework; sourceTree = BUILT_PRODUCTS_DIR; };
23+
4DEF4EAD7EED2B7BDBA682E7 /* Pods-BuiltInTransitionsCatalog.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuiltInTransitionsCatalog.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuiltInTransitionsCatalog/Pods-BuiltInTransitionsCatalog.release.xcconfig"; sourceTree = "<group>"; };
2424
BA7592DA1E5CC79B00B021BF /* BuiltInTransitionsCatalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BuiltInTransitionsCatalog.app; sourceTree = BUILT_PRODUCTS_DIR; };
2525
BA7592DD1E5CC79B00B021BF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2626
BA7592DF1E5CC79B00B021BF /* AwesomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AwesomeViewController.swift; sourceTree = "<group>"; };
@@ -31,34 +31,26 @@
3131
BA7592EF1E5CC89F00B021BF /* CatalogMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CatalogMenu.swift; sourceTree = "<group>"; };
3232
BA7592F11E5CD10C00B021BF /* Catalog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Catalog.swift; sourceTree = "<group>"; };
3333
BAE576761E5ED48400E8ABC3 /* TransitionStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionStyle.swift; sourceTree = "<group>"; };
34-
C0B51F0F4063C9382929024E /* Pods-BuiltInTransitionsCatalog.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuiltInTransitionsCatalog.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuiltInTransitionsCatalog/Pods-BuiltInTransitionsCatalog.release.xcconfig"; sourceTree = "<group>"; };
34+
D5C11E822D9E1D25F5AFFE7C /* Pods-BuiltInTransitionsCatalog.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuiltInTransitionsCatalog.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuiltInTransitionsCatalog/Pods-BuiltInTransitionsCatalog.debug.xcconfig"; sourceTree = "<group>"; };
3535
/* End PBXFileReference section */
3636

3737
/* Begin PBXFrameworksBuildPhase section */
3838
BA7592D71E5CC79B00B021BF /* Frameworks */ = {
3939
isa = PBXFrameworksBuildPhase;
4040
buildActionMask = 2147483647;
4141
files = (
42-
E869D1806ADD6F26D1037B77 /* Pods_BuiltInTransitionsCatalog.framework in Frameworks */,
42+
85277C71050F4FC75BBA430F /* Pods_BuiltInTransitionsCatalog.framework in Frameworks */,
4343
);
4444
runOnlyForDeploymentPostprocessing = 0;
4545
};
4646
/* End PBXFrameworksBuildPhase section */
4747

4848
/* Begin PBXGroup section */
49-
3B9C56C65E2C1CDA4970DE67 /* Frameworks */ = {
49+
18E86D9309BD4FAD631D0F18 /* Pods */ = {
5050
isa = PBXGroup;
5151
children = (
52-
AC8F032D74589B67CB68A56E /* Pods_BuiltInTransitionsCatalog.framework */,
53-
);
54-
name = Frameworks;
55-
sourceTree = "<group>";
56-
};
57-
9D8832D06883192DE70050BC /* Pods */ = {
58-
isa = PBXGroup;
59-
children = (
60-
B5A66A82E93113AEA7FA77BA /* Pods-BuiltInTransitionsCatalog.debug.xcconfig */,
61-
C0B51F0F4063C9382929024E /* Pods-BuiltInTransitionsCatalog.release.xcconfig */,
52+
D5C11E822D9E1D25F5AFFE7C /* Pods-BuiltInTransitionsCatalog.debug.xcconfig */,
53+
4DEF4EAD7EED2B7BDBA682E7 /* Pods-BuiltInTransitionsCatalog.release.xcconfig */,
6254
);
6355
name = Pods;
6456
sourceTree = "<group>";
@@ -68,8 +60,8 @@
6860
children = (
6961
BA7592DC1E5CC79B00B021BF /* BuiltInTransitionsCatalog */,
7062
BA7592DB1E5CC79B00B021BF /* Products */,
71-
9D8832D06883192DE70050BC /* Pods */,
72-
3B9C56C65E2C1CDA4970DE67 /* Frameworks */,
63+
18E86D9309BD4FAD631D0F18 /* Pods */,
64+
E43A34B2DF12344A2117A3D0 /* Frameworks */,
7365
);
7466
sourceTree = "<group>";
7567
};
@@ -105,19 +97,26 @@
10597
name = Resources;
10698
sourceTree = "<group>";
10799
};
100+
E43A34B2DF12344A2117A3D0 /* Frameworks */ = {
101+
isa = PBXGroup;
102+
children = (
103+
08B4DEF040CAAD71238C4EB5 /* Pods_BuiltInTransitionsCatalog.framework */,
104+
);
105+
name = Frameworks;
106+
sourceTree = "<group>";
107+
};
108108
/* End PBXGroup section */
109109

110110
/* Begin PBXNativeTarget section */
111111
BA7592D91E5CC79B00B021BF /* BuiltInTransitionsCatalog */ = {
112112
isa = PBXNativeTarget;
113113
buildConfigurationList = BA7592EC1E5CC79B00B021BF /* Build configuration list for PBXNativeTarget "BuiltInTransitionsCatalog" */;
114114
buildPhases = (
115-
E3310AD200D42A35D2FBA182 /* [CP] Check Pods Manifest.lock */,
115+
F5EC54BB13AFE33EC4E55605 /* [CP] Check Pods Manifest.lock */,
116116
BA7592D61E5CC79B00B021BF /* Sources */,
117117
BA7592D71E5CC79B00B021BF /* Frameworks */,
118118
BA7592D81E5CC79B00B021BF /* Resources */,
119-
C12F6E9F3F5E5C8D1084AD91 /* [CP] Embed Pods Frameworks */,
120-
24B5C947C1AA082EDE06BD7D /* [CP] Copy Pods Resources */,
119+
7C7AB9BE18FC8A69D847A051 /* [CP] Embed Pods Frameworks */,
121120
);
122121
buildRules = (
123122
);
@@ -135,7 +134,7 @@
135134
isa = PBXProject;
136135
attributes = {
137136
LastSwiftUpdateCheck = 0820;
138-
LastUpgradeCheck = 0820;
137+
LastUpgradeCheck = 1000;
139138
ORGANIZATIONNAME = Touchwonders;
140139
TargetAttributes = {
141140
BA7592D91E5CC79B00B021BF = {
@@ -178,31 +177,20 @@
178177
/* End PBXResourcesBuildPhase section */
179178

180179
/* Begin PBXShellScriptBuildPhase section */
181-
24B5C947C1AA082EDE06BD7D /* [CP] Copy Pods Resources */ = {
180+
7C7AB9BE18FC8A69D847A051 /* [CP] Embed Pods Frameworks */ = {
182181
isa = PBXShellScriptBuildPhase;
183182
buildActionMask = 2147483647;
184183
files = (
185184
);
186-
inputPaths = (
187-
);
188-
name = "[CP] Copy Pods Resources";
189-
outputPaths = (
190-
);
191-
runOnlyForDeploymentPostprocessing = 0;
192-
shellPath = /bin/sh;
193-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BuiltInTransitionsCatalog/Pods-BuiltInTransitionsCatalog-resources.sh\"\n";
194-
showEnvVarsInLog = 0;
195-
};
196-
C12F6E9F3F5E5C8D1084AD91 /* [CP] Embed Pods Frameworks */ = {
197-
isa = PBXShellScriptBuildPhase;
198-
buildActionMask = 2147483647;
199-
files = (
185+
inputFileListPaths = (
200186
);
201187
inputPaths = (
202188
"${SRCROOT}/Pods/Target Support Files/Pods-BuiltInTransitionsCatalog/Pods-BuiltInTransitionsCatalog-frameworks.sh",
203189
"${BUILT_PRODUCTS_DIR}/Transition/Transition.framework",
204190
);
205191
name = "[CP] Embed Pods Frameworks";
192+
outputFileListPaths = (
193+
);
206194
outputPaths = (
207195
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Transition.framework",
208196
);
@@ -211,16 +199,20 @@
211199
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BuiltInTransitionsCatalog/Pods-BuiltInTransitionsCatalog-frameworks.sh\"\n";
212200
showEnvVarsInLog = 0;
213201
};
214-
E3310AD200D42A35D2FBA182 /* [CP] Check Pods Manifest.lock */ = {
202+
F5EC54BB13AFE33EC4E55605 /* [CP] Check Pods Manifest.lock */ = {
215203
isa = PBXShellScriptBuildPhase;
216204
buildActionMask = 2147483647;
217205
files = (
218206
);
207+
inputFileListPaths = (
208+
);
219209
inputPaths = (
220210
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
221211
"${PODS_ROOT}/Manifest.lock",
222212
);
223213
name = "[CP] Check Pods Manifest.lock";
214+
outputFileListPaths = (
215+
);
224216
outputPaths = (
225217
"$(DERIVED_FILE_DIR)/Pods-BuiltInTransitionsCatalog-checkManifestLockResult.txt",
226218
);
@@ -275,15 +267,23 @@
275267
CLANG_CXX_LIBRARY = "libc++";
276268
CLANG_ENABLE_MODULES = YES;
277269
CLANG_ENABLE_OBJC_ARC = YES;
270+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
278271
CLANG_WARN_BOOL_CONVERSION = YES;
272+
CLANG_WARN_COMMA = YES;
279273
CLANG_WARN_CONSTANT_CONVERSION = YES;
274+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
280275
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
281276
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
282277
CLANG_WARN_EMPTY_BODY = YES;
283278
CLANG_WARN_ENUM_CONVERSION = YES;
284279
CLANG_WARN_INFINITE_RECURSION = YES;
285280
CLANG_WARN_INT_CONVERSION = YES;
281+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
282+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
283+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
286284
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
285+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
286+
CLANG_WARN_STRICT_PROTOTYPES = YES;
287287
CLANG_WARN_SUSPICIOUS_MOVE = YES;
288288
CLANG_WARN_UNREACHABLE_CODE = YES;
289289
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -323,15 +323,23 @@
323323
CLANG_CXX_LIBRARY = "libc++";
324324
CLANG_ENABLE_MODULES = YES;
325325
CLANG_ENABLE_OBJC_ARC = YES;
326+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
326327
CLANG_WARN_BOOL_CONVERSION = YES;
328+
CLANG_WARN_COMMA = YES;
327329
CLANG_WARN_CONSTANT_CONVERSION = YES;
330+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
328331
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
329332
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
330333
CLANG_WARN_EMPTY_BODY = YES;
331334
CLANG_WARN_ENUM_CONVERSION = YES;
332335
CLANG_WARN_INFINITE_RECURSION = YES;
333336
CLANG_WARN_INT_CONVERSION = YES;
337+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
338+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
339+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
334340
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
341+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
342+
CLANG_WARN_STRICT_PROTOTYPES = YES;
335343
CLANG_WARN_SUSPICIOUS_MOVE = YES;
336344
CLANG_WARN_UNREACHABLE_CODE = YES;
337345
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -357,29 +365,29 @@
357365
};
358366
BA7592ED1E5CC79B00B021BF /* Debug */ = {
359367
isa = XCBuildConfiguration;
360-
baseConfigurationReference = B5A66A82E93113AEA7FA77BA /* Pods-BuiltInTransitionsCatalog.debug.xcconfig */;
368+
baseConfigurationReference = D5C11E822D9E1D25F5AFFE7C /* Pods-BuiltInTransitionsCatalog.debug.xcconfig */;
361369
buildSettings = {
362370
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
363371
INFOPLIST_FILE = BuiltInTransitionsCatalog/Info.plist;
364372
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
365373
PRODUCT_BUNDLE_IDENTIFIER = com.touchwonders.BuiltInTransitionsCatalog;
366374
PRODUCT_NAME = "$(TARGET_NAME)";
367-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
368-
SWIFT_VERSION = 4.0;
375+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
376+
SWIFT_VERSION = 4.2;
369377
};
370378
name = Debug;
371379
};
372380
BA7592EE1E5CC79B00B021BF /* Release */ = {
373381
isa = XCBuildConfiguration;
374-
baseConfigurationReference = C0B51F0F4063C9382929024E /* Pods-BuiltInTransitionsCatalog.release.xcconfig */;
382+
baseConfigurationReference = 4DEF4EAD7EED2B7BDBA682E7 /* Pods-BuiltInTransitionsCatalog.release.xcconfig */;
375383
buildSettings = {
376384
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
377385
INFOPLIST_FILE = BuiltInTransitionsCatalog/Info.plist;
378386
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
379387
PRODUCT_BUNDLE_IDENTIFIER = com.touchwonders.BuiltInTransitionsCatalog;
380388
PRODUCT_NAME = "$(TARGET_NAME)";
381-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
382-
SWIFT_VERSION = 4.0;
389+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
390+
SWIFT_VERSION = 4.2;
383391
};
384392
name = Release;
385393
};

Examples/BuiltInTransitionsCatalog/BuiltInTransitionsCatalog.xcodeproj/xcshareddata/xcschemes/BuiltInTransitionsCatalog.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0820"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Examples/BuiltInTransitionsCatalog/BuiltInTransitionsCatalog/AppDelegate.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2929

3030
var window: UIWindow?
3131

32-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
32+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
3333
if let navigationController = window?.rootViewController as? UINavigationController, let font = UIFont(name: transitionFontName, size: 20.0) {
34-
navigationController.navigationBar.titleTextAttributes = [NSAttributedStringKey.font: font, NSAttributedStringKey.foregroundColor: UIColor.white]
34+
navigationController.navigationBar.titleTextAttributes = [NSAttributedString.Key.font: font, NSAttributedString.Key.foregroundColor: UIColor.white]
3535
}
3636
return true
3737
}

Examples/BuiltInTransitionsCatalog/BuiltInTransitionsCatalog/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@
137137
"filename" : "Icon-iPadPro@2x.png",
138138
"scale" : "2x"
139139
},
140+
{
141+
"idiom" : "ios-marketing",
142+
"size" : "1024x1024",
143+
"scale" : "1x"
144+
},
140145
{
141146
"size" : "60x60",
142147
"idiom" : "car",

Examples/BuiltInTransitionsCatalog/BuiltInTransitionsCatalog/CatalogMenu.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extension CatalogMenu : TransitionsSource {
8181

8282
extension CatalogMenu : InteractiveNavigationTransitionOperationDelegate {
8383

84-
func performOperation(operation: UINavigationControllerOperation, forInteractiveTransitionIn controller: UINavigationController, gestureRecognizer: UIGestureRecognizer) {
84+
func performOperation(operation: UINavigationController.Operation, forInteractiveTransitionIn controller: UINavigationController, gestureRecognizer: UIGestureRecognizer) {
8585
switch operation {
8686
case .push:
8787
if selectedIndex == nil {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
PODS:
2-
- Transition (1.1.0)
2+
- Transition (1.2.1)
33

44
DEPENDENCIES:
55
- Transition (from `../../`)
66

77
EXTERNAL SOURCES:
88
Transition:
9-
:path: ../../
9+
:path: "../../"
1010

1111
SPEC CHECKSUMS:
12-
Transition: 1f9b5445a034df95edcb243f81952b3fda317d72
12+
Transition: 5f88f6d8b18036973976430aaea0857d0c2ef894
1313

1414
PODFILE CHECKSUM: b59c970b89cb4702c2022cf9dcbc7f1aa68e099a
1515

16-
COCOAPODS: 1.3.1
16+
COCOAPODS: 1.5.3

0 commit comments

Comments
 (0)