Skip to content

Commit c6f68da

Browse files
committed
Update for Swift 4.2
1 parent b66d624 commit c6f68da

File tree

10 files changed

+82
-13
lines changed

10 files changed

+82
-13
lines changed

MenuExample.xcodeproj/project.pbxproj

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
isa = PBXProject;
238238
attributes = {
239239
LastSwiftUpdateCheck = 0700;
240-
LastUpgradeCheck = 0800;
240+
LastUpgradeCheck = 1000;
241241
ORGANIZATIONNAME = Yalantis;
242242
TargetAttributes = {
243243
50B9664D1A25E40E00208F2E = {
@@ -328,14 +328,22 @@
328328
CLANG_CXX_LIBRARY = "libc++";
329329
CLANG_ENABLE_MODULES = YES;
330330
CLANG_ENABLE_OBJC_ARC = YES;
331+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
331332
CLANG_WARN_BOOL_CONVERSION = YES;
333+
CLANG_WARN_COMMA = YES;
332334
CLANG_WARN_CONSTANT_CONVERSION = YES;
335+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
333336
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
334337
CLANG_WARN_EMPTY_BODY = YES;
335338
CLANG_WARN_ENUM_CONVERSION = YES;
336339
CLANG_WARN_INFINITE_RECURSION = YES;
337340
CLANG_WARN_INT_CONVERSION = YES;
341+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
342+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
343+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
338344
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
345+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
346+
CLANG_WARN_STRICT_PROTOTYPES = YES;
339347
CLANG_WARN_SUSPICIOUS_MOVE = YES;
340348
CLANG_WARN_UNREACHABLE_CODE = YES;
341349
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -363,6 +371,7 @@
363371
ONLY_ACTIVE_ARCH = YES;
364372
SDKROOT = iphoneos;
365373
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
374+
SWIFT_VERSION = 4.2;
366375
};
367376
name = Debug;
368377
};
@@ -374,14 +383,22 @@
374383
CLANG_CXX_LIBRARY = "libc++";
375384
CLANG_ENABLE_MODULES = YES;
376385
CLANG_ENABLE_OBJC_ARC = YES;
386+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
377387
CLANG_WARN_BOOL_CONVERSION = YES;
388+
CLANG_WARN_COMMA = YES;
378389
CLANG_WARN_CONSTANT_CONVERSION = YES;
390+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379391
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380392
CLANG_WARN_EMPTY_BODY = YES;
381393
CLANG_WARN_ENUM_CONVERSION = YES;
382394
CLANG_WARN_INFINITE_RECURSION = YES;
383395
CLANG_WARN_INT_CONVERSION = YES;
396+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
397+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
398+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
384399
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
400+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
401+
CLANG_WARN_STRICT_PROTOTYPES = YES;
385402
CLANG_WARN_SUSPICIOUS_MOVE = YES;
386403
CLANG_WARN_UNREACHABLE_CODE = YES;
387404
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -401,6 +418,7 @@
401418
MTL_ENABLE_DEBUG_INFO = NO;
402419
SDKROOT = iphoneos;
403420
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
421+
SWIFT_VERSION = 4.2;
404422
VALIDATE_PRODUCT = YES;
405423
};
406424
name = Release;
@@ -414,7 +432,7 @@
414432
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
415433
PRODUCT_BUNDLE_IDENTIFIER = "com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)";
416434
PRODUCT_NAME = MenuExample;
417-
SWIFT_VERSION = 3.0;
435+
SWIFT_VERSION = 4.2;
418436
};
419437
name = Debug;
420438
};
@@ -427,7 +445,7 @@
427445
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
428446
PRODUCT_BUNDLE_IDENTIFIER = "com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)";
429447
PRODUCT_NAME = MenuExample;
430-
SWIFT_VERSION = 3.0;
448+
SWIFT_VERSION = 4.2;
431449
};
432450
name = Release;
433451
};

MenuExample.xcodeproj/xcshareddata/xcschemes/MenuExample.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 = "0800"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

MenuExample/Controller/ViewController.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ extension ViewController: MenuViewControllerDelegate {
5757

5858
extension ViewController: UINavigationControllerDelegate {
5959

60-
func navigationController(_: UINavigationController, animationControllerFor _: UINavigationControllerOperation,
61-
from _: UIViewController, to _: UIViewController) -> UIViewControllerAnimatedTransitioning? {
62-
60+
public func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationController.Operation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
6361
if let transitionPoint = transitionPoint {
6462
return CircularRevealTransitionAnimator(center: transitionPoint)
6563
}

MenuExample/Misc/CircularRevealTransitionAnimator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extension CircularRevealTransitionAnimator: UIViewControllerAnimatedTransitionin
3535
}()
3636

3737
let animator = CircularRevealAnimator(layer: target.layer, center: center, startRadius: 0, endRadius: radius)
38-
animator.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseIn)
38+
animator.timingFunction = CAMediaTimingFunction(name: .easeIn)
3939
animator.duration = transitionDuration(using: context)
4040
animator.completion = {
4141
source.removeFromSuperview()

SideMenu.xcodeproj/project.pbxproj

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
attributes = {
110110
LastSwiftMigration = 0700;
111111
LastSwiftUpdateCheck = 0700;
112-
LastUpgradeCheck = 0610;
112+
LastUpgradeCheck = 1000;
113113
ORGANIZATIONNAME = Yalantis;
114114
TargetAttributes = {
115115
50B42EFF1A6A879C00B05352 = {
@@ -167,21 +167,33 @@
167167
CLANG_CXX_LIBRARY = "libc++";
168168
CLANG_ENABLE_MODULES = YES;
169169
CLANG_ENABLE_OBJC_ARC = YES;
170+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
170171
CLANG_WARN_BOOL_CONVERSION = YES;
172+
CLANG_WARN_COMMA = YES;
171173
CLANG_WARN_CONSTANT_CONVERSION = YES;
174+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
172175
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
173176
CLANG_WARN_EMPTY_BODY = YES;
174177
CLANG_WARN_ENUM_CONVERSION = YES;
178+
CLANG_WARN_INFINITE_RECURSION = YES;
175179
CLANG_WARN_INT_CONVERSION = YES;
180+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
181+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
182+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
176183
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
184+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
185+
CLANG_WARN_STRICT_PROTOTYPES = YES;
186+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
177187
CLANG_WARN_UNREACHABLE_CODE = YES;
178188
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
179189
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
180190
COPY_PHASE_STRIP = NO;
181191
CURRENT_PROJECT_VERSION = 1;
182192
ENABLE_STRICT_OBJC_MSGSEND = YES;
193+
ENABLE_TESTABILITY = YES;
183194
GCC_C_LANGUAGE_STANDARD = gnu99;
184195
GCC_DYNAMIC_NO_PIC = NO;
196+
GCC_NO_COMMON_BLOCKS = YES;
185197
GCC_OPTIMIZATION_LEVEL = 0;
186198
GCC_PREPROCESSOR_DEFINITIONS = (
187199
"DEBUG=1",
@@ -199,6 +211,7 @@
199211
ONLY_ACTIVE_ARCH = YES;
200212
SDKROOT = iphoneos;
201213
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
214+
SWIFT_VERSION = 4.2;
202215
TARGETED_DEVICE_FAMILY = "1,2";
203216
VERSIONING_SYSTEM = "apple-generic";
204217
VERSION_INFO_PREFIX = "";
@@ -213,13 +226,23 @@
213226
CLANG_CXX_LIBRARY = "libc++";
214227
CLANG_ENABLE_MODULES = YES;
215228
CLANG_ENABLE_OBJC_ARC = YES;
229+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
216230
CLANG_WARN_BOOL_CONVERSION = YES;
231+
CLANG_WARN_COMMA = YES;
217232
CLANG_WARN_CONSTANT_CONVERSION = YES;
233+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
218234
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
219235
CLANG_WARN_EMPTY_BODY = YES;
220236
CLANG_WARN_ENUM_CONVERSION = YES;
237+
CLANG_WARN_INFINITE_RECURSION = YES;
221238
CLANG_WARN_INT_CONVERSION = YES;
239+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
240+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
241+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
222242
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
243+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
244+
CLANG_WARN_STRICT_PROTOTYPES = YES;
245+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
223246
CLANG_WARN_UNREACHABLE_CODE = YES;
224247
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
225248
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -228,6 +251,7 @@
228251
ENABLE_NS_ASSERTIONS = NO;
229252
ENABLE_STRICT_OBJC_MSGSEND = YES;
230253
GCC_C_LANGUAGE_STANDARD = gnu99;
254+
GCC_NO_COMMON_BLOCKS = YES;
231255
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
232256
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
233257
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -237,6 +261,8 @@
237261
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
238262
MTL_ENABLE_DEBUG_INFO = NO;
239263
SDKROOT = iphoneos;
264+
SWIFT_COMPILATION_MODE = wholemodule;
265+
SWIFT_VERSION = 4.2;
240266
TARGETED_DEVICE_FAMILY = "1,2";
241267
VALIDATE_PRODUCT = YES;
242268
VERSIONING_SYSTEM = "apple-generic";
@@ -248,6 +274,7 @@
248274
isa = XCBuildConfiguration;
249275
buildSettings = {
250276
APPLICATION_EXTENSION_API_ONLY = YES;
277+
CODE_SIGN_IDENTITY = "";
251278
DEFINES_MODULE = YES;
252279
DYLIB_COMPATIBILITY_VERSION = 1;
253280
DYLIB_CURRENT_VERSION = 1;
@@ -256,16 +283,18 @@
256283
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
257284
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
258285
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
286+
PRODUCT_BUNDLE_IDENTIFIER = "com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)";
259287
PRODUCT_NAME = "$(TARGET_NAME)";
260288
SKIP_INSTALL = YES;
261-
SWIFT_VERSION = 3.0;
289+
SWIFT_VERSION = 4.2;
262290
};
263291
name = Debug;
264292
};
265293
50B42F181A6A879C00B05352 /* Release */ = {
266294
isa = XCBuildConfiguration;
267295
buildSettings = {
268296
APPLICATION_EXTENSION_API_ONLY = YES;
297+
CODE_SIGN_IDENTITY = "";
269298
DEFINES_MODULE = YES;
270299
DYLIB_COMPATIBILITY_VERSION = 1;
271300
DYLIB_CURRENT_VERSION = 1;
@@ -274,9 +303,10 @@
274303
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
275304
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
276305
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
306+
PRODUCT_BUNDLE_IDENTIFIER = "com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)";
277307
PRODUCT_NAME = "$(TARGET_NAME)";
278308
SKIP_INSTALL = YES;
279-
SWIFT_VERSION = 3.0;
309+
SWIFT_VERSION = 4.2;
280310
};
281311
name = Release;
282312
};

SideMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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>

SideMenu.xcodeproj/xcshareddata/xcschemes/SideMenu.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 = "0800"
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>

SideMenu/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>$(EXECUTABLE_NAME)</string>
99
<key>CFBundleIdentifier</key>
10-
<string>com.yalantis.ios.$(PRODUCT_NAME:rfc1034identifier)</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>

0 commit comments

Comments
 (0)