Skip to content

Commit 45d925f

Browse files
authored
Merge pull request #47 from mihailsalari/master
Converted to Swift 3
2 parents 36750d5 + 57a1537 commit 45d925f

File tree

4 files changed

+149
-139
lines changed

4 files changed

+149
-139
lines changed

SweetAlert.xcodeproj/project.pbxproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,12 @@
134134
9B4CD1001A06E55200B65DE0 /* Project object */ = {
135135
isa = PBXProject;
136136
attributes = {
137-
LastUpgradeCheck = 0700;
137+
LastUpgradeCheck = 0800;
138138
ORGANIZATIONNAME = "Sahil Wasan";
139139
TargetAttributes = {
140140
9B4CD1071A06E55200B65DE0 = {
141141
CreatedOnToolsVersion = 6.1;
142+
LastSwiftMigration = 0800;
142143
};
143144
};
144145
};
@@ -223,8 +224,10 @@
223224
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
224225
CLANG_WARN_EMPTY_BODY = YES;
225226
CLANG_WARN_ENUM_CONVERSION = YES;
227+
CLANG_WARN_INFINITE_RECURSION = YES;
226228
CLANG_WARN_INT_CONVERSION = YES;
227229
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
230+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
228231
CLANG_WARN_UNREACHABLE_CODE = YES;
229232
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
230233
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -233,6 +236,7 @@
233236
ENABLE_TESTABILITY = YES;
234237
GCC_C_LANGUAGE_STANDARD = gnu99;
235238
GCC_DYNAMIC_NO_PIC = NO;
239+
GCC_NO_COMMON_BLOCKS = YES;
236240
GCC_OPTIMIZATION_LEVEL = 0;
237241
GCC_PREPROCESSOR_DEFINITIONS = (
238242
"DEBUG=1",
@@ -266,15 +270,18 @@
266270
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
267271
CLANG_WARN_EMPTY_BODY = YES;
268272
CLANG_WARN_ENUM_CONVERSION = YES;
273+
CLANG_WARN_INFINITE_RECURSION = YES;
269274
CLANG_WARN_INT_CONVERSION = YES;
270275
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
276+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
271277
CLANG_WARN_UNREACHABLE_CODE = YES;
272278
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
273279
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
274280
COPY_PHASE_STRIP = YES;
275281
ENABLE_NS_ASSERTIONS = NO;
276282
ENABLE_STRICT_OBJC_MSGSEND = YES;
277283
GCC_C_LANGUAGE_STANDARD = gnu99;
284+
GCC_NO_COMMON_BLOCKS = YES;
278285
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
279286
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
280287
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -284,6 +291,7 @@
284291
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
285292
MTL_ENABLE_DEBUG_INFO = NO;
286293
SDKROOT = iphoneos;
294+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
287295
VALIDATE_PRODUCT = YES;
288296
};
289297
name = Release;
@@ -296,6 +304,7 @@
296304
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
297305
PRODUCT_BUNDLE_IDENTIFIER = "GNDBL.$(PRODUCT_NAME:rfc1034identifier)";
298306
PRODUCT_NAME = "$(TARGET_NAME)";
307+
SWIFT_VERSION = 3.0;
299308
};
300309
name = Debug;
301310
};
@@ -307,6 +316,7 @@
307316
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
308317
PRODUCT_BUNDLE_IDENTIFIER = "GNDBL.$(PRODUCT_NAME:rfc1034identifier)";
309318
PRODUCT_NAME = "$(TARGET_NAME)";
319+
SWIFT_VERSION = 3.0;
310320
};
311321
name = Release;
312322
};

SweetAlert/AppDelegate.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@ 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
return true
2020
}
2121

22-
func applicationWillResignActive(application: UIApplication) {
22+
func applicationWillResignActive(_ application: UIApplication) {
2323
// 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.
2424
// 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.
2525
}
2626

27-
func applicationDidEnterBackground(application: UIApplication) {
27+
func applicationDidEnterBackground(_ application: UIApplication) {
2828
// 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.
2929
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
3030
}
3131

32-
func applicationWillEnterForeground(application: UIApplication) {
32+
func applicationWillEnterForeground(_ application: UIApplication) {
3333
// 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.
3434
}
3535

36-
func applicationDidBecomeActive(application: UIApplication) {
36+
func applicationDidBecomeActive(_ application: UIApplication) {
3737
// 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.
3838
}
3939

40-
func applicationWillTerminate(application: UIApplication) {
40+
func applicationWillTerminate(_ application: UIApplication) {
4141
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
4242
}
4343

0 commit comments

Comments
 (0)