Skip to content

Commit 4cf3040

Browse files
committed
Update tutorial framework
1 parent d4fcc66 commit 4cf3040

File tree

6 files changed

+57
-39
lines changed

6 files changed

+57
-39
lines changed

.swift-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0
1+
4.0

Example/Tutorial/.swift-version

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

Example/Tutorial/Podfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use_frameworks!
44

55
platform :ios, '8.0'
66

7-
target 'Tutorial' do
8-
pod 'Presentation', path: '../../'
9-
pod 'Hue', git: 'https://github.com/hyperoslo/Hue', branch: 'swift3'
10-
end
7+
pod 'Presentation', path: '../../'
8+
pod 'Hue'
9+
10+
target 'Tutorial'

Example/Tutorial/Podfile.lock

+10-18
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
11
PODS:
2-
- Cartography (1.0.1)
2+
- Cartography (2.0.0)
33
- Hue (1.2.0)
4-
- Pages (1.0.0)
5-
- Presentation (3.0.0):
4+
- Pages (2.0.2)
5+
- Presentation (3.1.0):
66
- Cartography
77
- Pages
88

99
DEPENDENCIES:
10-
- Hue (from `https://github.com/hyperoslo/Hue`, branch `swift3`)
10+
- Hue
1111
- Presentation (from `../../`)
1212

1313
EXTERNAL SOURCES:
14-
Hue:
15-
:branch: swift3
16-
:git: https://github.com/hyperoslo/Hue
1714
Presentation:
18-
:path: "../../"
19-
20-
CHECKOUT OPTIONS:
21-
Hue:
22-
:commit: 3303cbcdf0f771aea1a6d1a153e4b95eef8696eb
23-
:git: https://github.com/hyperoslo/Hue
15+
:path: ../../
2416

2517
SPEC CHECKSUMS:
26-
Cartography: c1460e99395b824d9d75360b0382faeb0b33dcd7
18+
Cartography: d295eb25ab54bb57eecd8c2f04e9648c850f1281
2719
Hue: 0705083b7aff40334033373e6293ec1215285ac2
28-
Pages: f3718e6f03a5e2787f6b0bff4becb3c7c19bcebc
29-
Presentation: 2a7e0379ab403c0bd91c4f6d5c59480edba6f429
20+
Pages: 5564ac6035c48fef7a837049314f57507d263b11
21+
Presentation: 07f001419368d0ece73285f238b1dc3852462f23
3022

31-
PODFILE CHECKSUM: a46ef067438fe85dbabc3ca50d68bda71f1ff526
23+
PODFILE CHECKSUM: a2be853ebf7792783dc915c68a50d0f469a3c2ec
3224

33-
COCOAPODS: 1.2.0
25+
COCOAPODS: 1.3.1

Example/Tutorial/Tutorial.xcodeproj/project.pbxproj

+31-5
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@
122122
isa = PBXProject;
123123
attributes = {
124124
LastSwiftUpdateCheck = 0700;
125-
LastUpgradeCheck = 0800;
125+
LastUpgradeCheck = 0900;
126126
ORGANIZATIONNAME = Hyper;
127127
TargetAttributes = {
128128
D54221851AF64A7000F4E9A8 = {
129129
CreatedOnToolsVersion = 6.3.1;
130-
LastSwiftMigration = 0800;
130+
LastSwiftMigration = 0900;
131131
};
132132
};
133133
};
@@ -168,13 +168,16 @@
168168
files = (
169169
);
170170
inputPaths = (
171+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
172+
"${PODS_ROOT}/Manifest.lock",
171173
);
172174
name = "[CP] Check Pods Manifest.lock";
173175
outputPaths = (
176+
"$(DERIVED_FILE_DIR)/Pods-Tutorial-checkManifestLockResult.txt",
174177
);
175178
runOnlyForDeploymentPostprocessing = 0;
176179
shellPath = /bin/sh;
177-
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";
180+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
178181
showEnvVarsInLog = 0;
179182
};
180183
8058477F6FC36BF93DD6D31F /* [CP] Copy Pods Resources */ = {
@@ -198,9 +201,18 @@
198201
files = (
199202
);
200203
inputPaths = (
204+
"${SRCROOT}/Pods/Target Support Files/Pods-Tutorial/Pods-Tutorial-frameworks.sh",
205+
"${BUILT_PRODUCTS_DIR}/Cartography/Cartography.framework",
206+
"${BUILT_PRODUCTS_DIR}/Hue/Hue.framework",
207+
"${BUILT_PRODUCTS_DIR}/Pages/Pages.framework",
208+
"${BUILT_PRODUCTS_DIR}/Presentation/Presentation.framework",
201209
);
202210
name = "[CP] Embed Pods Frameworks";
203211
outputPaths = (
212+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cartography.framework",
213+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework",
214+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Pages.framework",
215+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Presentation.framework",
204216
);
205217
runOnlyForDeploymentPostprocessing = 0;
206218
shellPath = /bin/sh;
@@ -240,14 +252,20 @@
240252
CLANG_CXX_LIBRARY = "libc++";
241253
CLANG_ENABLE_MODULES = YES;
242254
CLANG_ENABLE_OBJC_ARC = YES;
255+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
243256
CLANG_WARN_BOOL_CONVERSION = YES;
257+
CLANG_WARN_COMMA = YES;
244258
CLANG_WARN_CONSTANT_CONVERSION = YES;
245259
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
246260
CLANG_WARN_EMPTY_BODY = YES;
247261
CLANG_WARN_ENUM_CONVERSION = YES;
248262
CLANG_WARN_INFINITE_RECURSION = YES;
249263
CLANG_WARN_INT_CONVERSION = YES;
264+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
265+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
250266
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
267+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
268+
CLANG_WARN_STRICT_PROTOTYPES = YES;
251269
CLANG_WARN_SUSPICIOUS_MOVE = YES;
252270
CLANG_WARN_UNREACHABLE_CODE = YES;
253271
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -288,14 +306,20 @@
288306
CLANG_CXX_LIBRARY = "libc++";
289307
CLANG_ENABLE_MODULES = YES;
290308
CLANG_ENABLE_OBJC_ARC = YES;
309+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
291310
CLANG_WARN_BOOL_CONVERSION = YES;
311+
CLANG_WARN_COMMA = YES;
292312
CLANG_WARN_CONSTANT_CONVERSION = YES;
293313
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
294314
CLANG_WARN_EMPTY_BODY = YES;
295315
CLANG_WARN_ENUM_CONVERSION = YES;
296316
CLANG_WARN_INFINITE_RECURSION = YES;
297317
CLANG_WARN_INT_CONVERSION = YES;
318+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
319+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
298320
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
321+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
322+
CLANG_WARN_STRICT_PROTOTYPES = YES;
299323
CLANG_WARN_SUSPICIOUS_MOVE = YES;
300324
CLANG_WARN_UNREACHABLE_CODE = YES;
301325
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -331,7 +355,8 @@
331355
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
332356
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.$(PRODUCT_NAME:rfc1034identifier)";
333357
PRODUCT_NAME = Tutorial;
334-
SWIFT_VERSION = 3.0;
358+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
359+
SWIFT_VERSION = 4.0;
335360
TARGETED_DEVICE_FAMILY = "1,2";
336361
};
337362
name = Debug;
@@ -346,7 +371,8 @@
346371
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
347372
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.$(PRODUCT_NAME:rfc1034identifier)";
348373
PRODUCT_NAME = Tutorial;
349-
SWIFT_VERSION = 3.0;
374+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
375+
SWIFT_VERSION = 4.0;
350376
TARGETED_DEVICE_FAMILY = "1,2";
351377
};
352378
name = Release;

Example/Tutorial/Tutorial/AppDelegate.swift

+10-11
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,35 @@ import Presentation
44

55
@UIApplicationMain
66
class AppDelegate: UIResponder, UIApplicationDelegate {
7-
87
var window: UIWindow?
98

109
lazy var navigationController: UINavigationController = { [unowned self] in
1110
let controller = UINavigationController(rootViewController: self.presentationController)
1211
controller.view.backgroundColor = UIColor(hex:"FF5703")
13-
1412
return controller
1513
}()
1614

1715
lazy var presentationController: PresentationController = {
1816
let controller = PresentationController(pages: [])
1917
controller.setNavigationTitle = false
20-
2118
return controller
22-
}()
19+
}()
2320

2421
lazy var leftButton: UIBarButtonItem = { [unowned self] in
2522
let button = UIBarButtonItem(
2623
title: "Previous page",
2724
style: .plain,
2825
target: self.presentationController,
29-
action: #selector(PresentationController.moveBack))
26+
action: #selector(PresentationController.moveBack)
27+
)
3028

3129
button.setTitleTextAttributes(
32-
[NSForegroundColorAttributeName : UIColor.white],
33-
for: .normal)
30+
[NSAttributedStringKey.foregroundColor: UIColor.white],
31+
for: .normal
32+
)
3433

3534
return button
36-
}()
35+
}()
3736

3837
lazy var rightButton: UIBarButtonItem = { [unowned self] in
3938
let button = UIBarButtonItem(
@@ -43,7 +42,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4342
action: #selector(PresentationController.moveForward))
4443

4544
button.setTitleTextAttributes(
46-
[NSForegroundColorAttributeName : UIColor.white],
45+
[NSAttributedStringKey.foregroundColor: UIColor.white],
4746
for: .normal)
4847

4948
return button
@@ -76,8 +75,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
7675
let paragraphStyle = NSMutableParagraphStyle()
7776
paragraphStyle.alignment = .center
7877

79-
let attributes = [NSFontAttributeName: font, NSForegroundColorAttributeName: color,
80-
NSParagraphStyleAttributeName: paragraphStyle]
78+
let attributes = [NSAttributedStringKey.font: font, NSAttributedStringKey.foregroundColor: color,
79+
NSAttributedStringKey.paragraphStyle: paragraphStyle]
8180

8281
let titles = ["Tutorial on how to make a profit", "Step I", "Step II", "Step III", "Thanks"].map {
8382
Content.content(forTitle: $0, attributes: attributes)

0 commit comments

Comments
 (0)