Skip to content

Commit 6efc93b

Browse files
committed
Update to Swift 3.0
1 parent 5d245e8 commit 6efc93b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+685
-696
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xcuserdata

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [3.0.0](https://github.com/SwiftKickMobile/SwiftMessages/releases/tag/2.0.0)
5+
6+
### Breaking Changes
7+
8+
* Support for Swift 3.0.
9+
10+
## [2.0.0](https://github.com/SwiftKickMobile/SwiftMessages/releases/tag/2.0.0)
11+
12+
### Breaking Changes
13+
14+
* Support for Swift 2.3 and Xcode 8.
15+
16+
The nib files needed to be updated to Xcode 8 format to work
17+
around an iOS bug. Unfortunately, this makes it necessary
18+
to break backward compatibility with Swift 2.2 and Xcode 7.
19+
420
## [1.1.4](https://github.com/SwiftKickMobile/SwiftMessages/releases/tag/1.1.4)
521

622
### Bug Fixes

Demo/Demo.xcodeproj/project.pbxproj

+14-2
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,12 @@
127127
isa = PBXProject;
128128
attributes = {
129129
LastSwiftUpdateCheck = 0730;
130-
LastUpgradeCheck = 0730;
130+
LastUpgradeCheck = 0800;
131131
ORGANIZATIONNAME = "SwiftKick Mobile";
132132
TargetAttributes = {
133133
86AEDCE11D5D1DB70030232E = {
134134
CreatedOnToolsVersion = 7.3.1;
135+
LastSwiftMigration = 0800;
135136
};
136137
};
137138
};
@@ -210,7 +211,7 @@
210211
);
211212
runOnlyForDeploymentPostprocessing = 0;
212213
shellPath = /bin/sh;
213-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
214+
shellScript = "diff \"${PODS_ROOT}/../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";
214215
showEnvVarsInLog = 0;
215216
};
216217
/* End PBXShellScriptBuildPhase section */
@@ -263,8 +264,10 @@
263264
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
264265
CLANG_WARN_EMPTY_BODY = YES;
265266
CLANG_WARN_ENUM_CONVERSION = YES;
267+
CLANG_WARN_INFINITE_RECURSION = YES;
266268
CLANG_WARN_INT_CONVERSION = YES;
267269
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
270+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
268271
CLANG_WARN_UNREACHABLE_CODE = YES;
269272
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
270273
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -291,6 +294,7 @@
291294
ONLY_ACTIVE_ARCH = YES;
292295
SDKROOT = iphoneos;
293296
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
297+
SWIFT_VERSION = 3.0;
294298
};
295299
name = Debug;
296300
};
@@ -308,8 +312,10 @@
308312
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
309313
CLANG_WARN_EMPTY_BODY = YES;
310314
CLANG_WARN_ENUM_CONVERSION = YES;
315+
CLANG_WARN_INFINITE_RECURSION = YES;
311316
CLANG_WARN_INT_CONVERSION = YES;
312317
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
318+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
313319
CLANG_WARN_UNREACHABLE_CODE = YES;
314320
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
315321
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -328,6 +334,8 @@
328334
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
329335
MTL_ENABLE_DEBUG_INFO = NO;
330336
SDKROOT = iphoneos;
337+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
338+
SWIFT_VERSION = 3.0;
331339
VALIDATE_PRODUCT = YES;
332340
};
333341
name = Release;
@@ -336,23 +344,27 @@
336344
isa = XCBuildConfiguration;
337345
baseConfigurationReference = 160AC8A3EE68E1D705664BF8 /* Pods-Demo.debug.xcconfig */;
338346
buildSettings = {
347+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
339348
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
340349
INFOPLIST_FILE = Demo/Info.plist;
341350
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
342351
PRODUCT_BUNDLE_IDENTIFIER = it.swiftkick.Demo;
343352
PRODUCT_NAME = "$(TARGET_NAME)";
353+
SWIFT_VERSION = 3.0;
344354
};
345355
name = Debug;
346356
};
347357
86AEDCF61D5D1DB70030232E /* Release */ = {
348358
isa = XCBuildConfiguration;
349359
baseConfigurationReference = 16131DA1E3BA049C9E4C0308 /* Pods-Demo.release.xcconfig */;
350360
buildSettings = {
361+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
351362
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
352363
INFOPLIST_FILE = Demo/Info.plist;
353364
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
354365
PRODUCT_BUNDLE_IDENTIFIER = it.swiftkick.Demo;
355366
PRODUCT_NAME = "$(TARGET_NAME)";
367+
SWIFT_VERSION = 3.0;
356368
};
357369
name = Release;
358370
};

Demo/Demo.xcodeproj/xcuserdata/wtmoose.xcuserdatad/xcschemes/Demo.xcscheme

+1-1
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"

Demo/Demo/AppDelegate.swift

+6-8
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,29 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1313

1414
var window: UIWindow?
1515

16-
17-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18-
// Override point for customization after application launch.
16+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
1917
return true
2018
}
2119

22-
func applicationWillResignActive(application: UIApplication) {
20+
func applicationWillResignActive(_ application: UIApplication) {
2321
// 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.
2422
// 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.
2523
}
2624

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

32-
func applicationWillEnterForeground(application: UIApplication) {
30+
func applicationWillEnterForeground(_ application: UIApplication) {
3331
// 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.
3432
}
3533

36-
func applicationDidBecomeActive(application: UIApplication) {
34+
func applicationDidBecomeActive(_ application: UIApplication) {
3735
// 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.
3836
}
3937

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

Demo/Demo/Base.lproj/LaunchScreen.storyboard

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
66
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
7+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
78
</dependencies>
89
<scenes>
910
<!--View Controller-->
@@ -15,29 +16,26 @@
1516
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
1617
</layoutGuides>
1718
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
18-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
19+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1920
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2021
<subviews>
2122
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Demo" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hTc-9T-AJk">
22-
<rect key="frame" x="254" y="281" width="92" height="39"/>
2323
<fontDescription key="fontDescription" type="system" weight="heavy" pointSize="32"/>
24-
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
24+
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2525
<nil key="highlightedColor"/>
2626
</label>
27-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="SwiftMessages" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iEm-gV-LFh">
28-
<rect key="frame" x="238" y="250" width="123" height="21"/>
27+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SwiftMessages" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iEm-gV-LFh">
2928
<fontDescription key="fontDescription" type="system" pointSize="18"/>
30-
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
29+
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
3130
<nil key="highlightedColor"/>
3231
</label>
3332
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="© 2016 SWIFTKICK MOBILE LLC" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sBz-Dk-SSO">
34-
<rect key="frame" x="50" y="576" width="500" height="16"/>
3533
<fontDescription key="fontDescription" type="system" pointSize="13"/>
36-
<color key="textColor" red="0.47391887630000001" green="0.47391887630000001" blue="0.47391887630000001" alpha="1" colorSpace="calibratedRGB"/>
34+
<color key="textColor" red="0.47391887630000001" green="0.47391887630000001" blue="0.47391887630000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
3735
<nil key="highlightedColor"/>
3836
</label>
3937
</subviews>
40-
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
38+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4139
<constraints>
4240
<constraint firstItem="sBz-Dk-SSO" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" constant="30" id="Dkq-dl-gDt"/>
4341
<constraint firstItem="hTc-9T-AJk" firstAttribute="top" secondItem="iEm-gV-LFh" secondAttribute="bottom" constant="10" id="FUA-Cy-JNO"/>

0 commit comments

Comments
 (0)