Skip to content

Commit 5833510

Browse files
author
Erik Malyak
committed
Updated to Swift 3 syntax using Xcode migration tool
1 parent 9130597 commit 5833510

File tree

8 files changed

+123
-100
lines changed

8 files changed

+123
-100
lines changed

EMPageViewController.xcodeproj/project.pbxproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,12 @@
146146
isa = PBXProject;
147147
attributes = {
148148
LastSwiftUpdateCheck = 0720;
149-
LastUpgradeCheck = 0720;
149+
LastUpgradeCheck = 0800;
150150
ORGANIZATIONNAME = "Erik Malyak";
151151
TargetAttributes = {
152152
8079226F1C651DE90067DAD2 = {
153153
CreatedOnToolsVersion = 7.2;
154+
LastSwiftMigration = 0800;
154155
};
155156
807922791C651DE90067DAD2 = {
156157
CreatedOnToolsVersion = 7.2;
@@ -233,8 +234,10 @@
233234
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
234235
CLANG_WARN_EMPTY_BODY = YES;
235236
CLANG_WARN_ENUM_CONVERSION = YES;
237+
CLANG_WARN_INFINITE_RECURSION = YES;
236238
CLANG_WARN_INT_CONVERSION = YES;
237239
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
240+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
238241
CLANG_WARN_UNREACHABLE_CODE = YES;
239242
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
240243
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -281,8 +284,10 @@
281284
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
282285
CLANG_WARN_EMPTY_BODY = YES;
283286
CLANG_WARN_ENUM_CONVERSION = YES;
287+
CLANG_WARN_INFINITE_RECURSION = YES;
284288
CLANG_WARN_INT_CONVERSION = YES;
285289
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
290+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
286291
CLANG_WARN_UNREACHABLE_CODE = YES;
287292
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
288293
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -302,6 +307,7 @@
302307
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
303308
MTL_ENABLE_DEBUG_INFO = NO;
304309
SDKROOT = iphoneos;
310+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
305311
TARGETED_DEVICE_FAMILY = "1,2";
306312
VALIDATE_PRODUCT = YES;
307313
VERSIONING_SYSTEM = "apple-generic";
@@ -313,6 +319,7 @@
313319
isa = XCBuildConfiguration;
314320
buildSettings = {
315321
CLANG_ENABLE_MODULES = YES;
322+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
316323
DEFINES_MODULE = YES;
317324
DYLIB_COMPATIBILITY_VERSION = 1;
318325
DYLIB_CURRENT_VERSION = 1;
@@ -324,13 +331,15 @@
324331
PRODUCT_NAME = "$(TARGET_NAME)";
325332
SKIP_INSTALL = YES;
326333
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
334+
SWIFT_VERSION = 3.0;
327335
};
328336
name = Debug;
329337
};
330338
807922861C651DE90067DAD2 /* Release */ = {
331339
isa = XCBuildConfiguration;
332340
buildSettings = {
333341
CLANG_ENABLE_MODULES = YES;
342+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
334343
DEFINES_MODULE = YES;
335344
DYLIB_COMPATIBILITY_VERSION = 1;
336345
DYLIB_CURRENT_VERSION = 1;
@@ -341,6 +350,7 @@
341350
PRODUCT_BUNDLE_IDENTIFIER = com.erikmalyak.EMPageViewController;
342351
PRODUCT_NAME = "$(TARGET_NAME)";
343352
SKIP_INSTALL = YES;
353+
SWIFT_VERSION = 3.0;
344354
};
345355
name = Release;
346356
};

EMPageViewController/EMPageViewController.swift

Lines changed: 56 additions & 56 deletions
Large diffs are not rendered by default.

Examples/Greetings/Greetings.xcodeproj/project.pbxproj

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,16 @@
212212
attributes = {
213213
LastSwiftMigration = 0700;
214214
LastSwiftUpdateCheck = 0700;
215-
LastUpgradeCheck = 0730;
215+
LastUpgradeCheck = 0800;
216216
ORGANIZATIONNAME = "Erik Malyak";
217217
TargetAttributes = {
218218
80F76AC21ABBA99000414300 = {
219219
CreatedOnToolsVersion = 6.2;
220+
LastSwiftMigration = 0800;
220221
};
221222
80F76ADB1ABBA99000414300 = {
222223
CreatedOnToolsVersion = 6.2;
224+
LastSwiftMigration = 0800;
223225
TestTargetID = 80F76AC21ABBA99000414300;
224226
};
225227
};
@@ -353,8 +355,10 @@
353355
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
354356
CLANG_WARN_EMPTY_BODY = YES;
355357
CLANG_WARN_ENUM_CONVERSION = YES;
358+
CLANG_WARN_INFINITE_RECURSION = YES;
356359
CLANG_WARN_INT_CONVERSION = YES;
357360
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
361+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
358362
CLANG_WARN_UNREACHABLE_CODE = YES;
359363
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360364
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -363,6 +367,7 @@
363367
ENABLE_TESTABILITY = YES;
364368
GCC_C_LANGUAGE_STANDARD = gnu99;
365369
GCC_DYNAMIC_NO_PIC = NO;
370+
GCC_NO_COMMON_BLOCKS = YES;
366371
GCC_OPTIMIZATION_LEVEL = 0;
367372
GCC_PREPROCESSOR_DEFINITIONS = (
368373
"DEBUG=1",
@@ -397,15 +402,18 @@
397402
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
398403
CLANG_WARN_EMPTY_BODY = YES;
399404
CLANG_WARN_ENUM_CONVERSION = YES;
405+
CLANG_WARN_INFINITE_RECURSION = YES;
400406
CLANG_WARN_INT_CONVERSION = YES;
401407
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
408+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
402409
CLANG_WARN_UNREACHABLE_CODE = YES;
403410
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
404411
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
405412
COPY_PHASE_STRIP = NO;
406413
ENABLE_NS_ASSERTIONS = NO;
407414
ENABLE_STRICT_OBJC_MSGSEND = YES;
408415
GCC_C_LANGUAGE_STANDARD = gnu99;
416+
GCC_NO_COMMON_BLOCKS = YES;
409417
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
410418
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
411419
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -415,6 +423,7 @@
415423
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
416424
MTL_ENABLE_DEBUG_INFO = NO;
417425
SDKROOT = iphoneos;
426+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
418427
TARGETED_DEVICE_FAMILY = "1,2";
419428
VALIDATE_PRODUCT = YES;
420429
};
@@ -423,24 +432,26 @@
423432
80F76AE71ABBA99000414300 /* Debug */ = {
424433
isa = XCBuildConfiguration;
425434
buildSettings = {
435+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
426436
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
427-
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
428437
INFOPLIST_FILE = Greetings/Info.plist;
429438
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430439
PRODUCT_BUNDLE_IDENTIFIER = "com.erikmalyak.$(PRODUCT_NAME:rfc1034identifier)";
431440
PRODUCT_NAME = "$(TARGET_NAME)";
441+
SWIFT_VERSION = 3.0;
432442
};
433443
name = Debug;
434444
};
435445
80F76AE81ABBA99000414300 /* Release */ = {
436446
isa = XCBuildConfiguration;
437447
buildSettings = {
448+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
438449
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
439-
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
440450
INFOPLIST_FILE = Greetings/Info.plist;
441451
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
442452
PRODUCT_BUNDLE_IDENTIFIER = "com.erikmalyak.$(PRODUCT_NAME:rfc1034identifier)";
443453
PRODUCT_NAME = "$(TARGET_NAME)";
454+
SWIFT_VERSION = 3.0;
444455
};
445456
name = Release;
446457
};
@@ -460,6 +471,7 @@
460471
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
461472
PRODUCT_BUNDLE_IDENTIFIER = "com.erikmalyak.$(PRODUCT_NAME:rfc1034identifier)";
462473
PRODUCT_NAME = "$(TARGET_NAME)";
474+
SWIFT_VERSION = 3.0;
463475
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Greetings.app/Greetings";
464476
};
465477
name = Debug;
@@ -476,6 +488,7 @@
476488
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
477489
PRODUCT_BUNDLE_IDENTIFIER = "com.erikmalyak.$(PRODUCT_NAME:rfc1034identifier)";
478490
PRODUCT_NAME = "$(TARGET_NAME)";
491+
SWIFT_VERSION = 3.0;
479492
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Greetings.app/Greetings";
480493
};
481494
name = Release;

Examples/Greetings/Greetings.xcodeproj/xcuserdata/erikmalyak.xcuserdatad/xcschemes/Greetings.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 = "0730"
3+
LastUpgradeVersion = "0800"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Examples/Greetings/Greetings/AppDelegate.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,33 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
1919

20-
application.statusBarStyle = .LightContent
21-
application.setStatusBarHidden(false, withAnimation: UIStatusBarAnimation.Slide)
20+
application.statusBarStyle = .lightContent
21+
application.setStatusBarHidden(false, with: UIStatusBarAnimation.slide)
2222
return true
2323
}
2424

25-
func applicationWillResignActive(application: UIApplication) {
25+
func applicationWillResignActive(_ application: UIApplication) {
2626
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
2727
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
2828
}
2929

30-
func applicationDidEnterBackground(application: UIApplication) {
30+
func applicationDidEnterBackground(_ application: UIApplication) {
3131
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
3232
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
3333
}
3434

35-
func applicationWillEnterForeground(application: UIApplication) {
35+
func applicationWillEnterForeground(_ application: UIApplication) {
3636
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
3737
}
3838

39-
func applicationDidBecomeActive(application: UIApplication) {
39+
func applicationDidBecomeActive(_ application: UIApplication) {
4040
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
4141
}
4242

43-
func applicationWillTerminate(application: UIApplication) {
43+
func applicationWillTerminate(_ application: UIApplication) {
4444
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
4545
}
4646

Examples/Greetings/Greetings/GreetingViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ class GreetingViewController: UIViewController {
2121
self.label.text = greeting
2222
}
2323

24-
override func viewWillAppear(animated: Bool) {
24+
override func viewWillAppear(_ animated: Bool) {
2525
super.viewWillAppear(animated)
2626

2727
print("viewWillAppear: \(self.greeting) animated: \(animated)")
2828
}
2929

30-
override func viewDidAppear(animated: Bool) {
30+
override func viewDidAppear(_ animated: Bool) {
3131
super.viewDidAppear(animated)
3232

3333
print("viewDidAppear: \(self.greeting) animated: \(animated)")
3434
}
3535

36-
override func viewWillDisappear(animated: Bool) {
36+
override func viewWillDisappear(_ animated: Bool) {
3737
super.viewWillDisappear(animated)
3838

3939
print("viewWillDisappear: \(self.greeting) animated: \(animated)")
4040
}
4141

42-
override func viewDidDisappear(animated: Bool) {
42+
override func viewDidDisappear(_ animated: Bool) {
4343
super.viewDidDisappear(animated)
4444

4545
print("viewDidDisappear: \(self.greeting) animated: \(animated)")

0 commit comments

Comments
 (0)