Skip to content

Commit b45b9a4

Browse files
authored
Merge pull request gskbyte#64 from gskbyte/xocde9-support
Add support for Xcode 9, also for CI
2 parents 1731b0a + f52bae9 commit b45b9a4

File tree

11 files changed

+80
-52
lines changed

11 files changed

+80
-52
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: objective-c
22
script: rake spec
33
after_success: bundle exec slather coverage --verbose GSKStretchyHeaderView/GSKStretchyHeaderView.xcodeproj
4-
osx_image: xcode7.3
4+
osx_image: xcode9

Example/Example.xcodeproj/project.pbxproj

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,12 @@
368368
attributes = {
369369
CLASSPREFIX = GSK;
370370
LastSwiftUpdateCheck = 0730;
371-
LastUpgradeCheck = 0810;
371+
LastUpgradeCheck = 0900;
372372
ORGANIZATIONNAME = "Jose Alcalá Correa";
373373
TargetAttributes = {
374374
6003F589195388D20070C39A = {
375375
DevelopmentTeam = 8LA8LT5B49;
376-
LastSwiftMigration = 0800;
376+
LastSwiftMigration = 0900;
377377
};
378378
};
379379
};
@@ -516,14 +516,20 @@
516516
CLANG_CXX_LIBRARY = "libc++";
517517
CLANG_ENABLE_MODULES = YES;
518518
CLANG_ENABLE_OBJC_ARC = YES;
519+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
519520
CLANG_WARN_BOOL_CONVERSION = YES;
521+
CLANG_WARN_COMMA = YES;
520522
CLANG_WARN_CONSTANT_CONVERSION = YES;
521523
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
522524
CLANG_WARN_EMPTY_BODY = YES;
523525
CLANG_WARN_ENUM_CONVERSION = YES;
524526
CLANG_WARN_INFINITE_RECURSION = YES;
525527
CLANG_WARN_INT_CONVERSION = YES;
528+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
529+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
526530
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
531+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
532+
CLANG_WARN_STRICT_PROTOTYPES = YES;
527533
CLANG_WARN_SUSPICIOUS_MOVE = YES;
528534
CLANG_WARN_UNREACHABLE_CODE = YES;
529535
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -573,7 +579,8 @@
573579
PROVISIONING_PROFILE = "";
574580
SWIFT_OBJC_BRIDGING_HEADER = "GSKStretchyHeaderView/Example-Bridging-Header.h";
575581
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
576-
SWIFT_VERSION = 3.0;
582+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
583+
SWIFT_VERSION = 4.0;
577584
WRAPPER_EXTENSION = app;
578585
};
579586
name = Debug;

Example/GSKStretchyHeaderView/GSKStretchyHeaderView-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>0.12.0</string>
20+
<string>1.0.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>0.12.0</string>
24+
<string>1.0.2</string>
2525
<key>LSRequiresIPhoneOS</key>
2626
<true/>
2727
<key>UILaunchStoryboardName</key>

Example/GSKStretchyHeaderView/ScalableLabelHeaderView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class ScalableLabelHeaderView: GSKStretchyHeaderView {
77
private lazy var label: UILabel = {
88
let label = UILabel(frame: CGRect(x: 0, y: 20, width: self.contentView.width, height: self.contentView.height - 20))
99
label.autoresizingMask = [.flexibleWidth, .flexibleHeight]
10-
label.font = UIFont.monospacedDigitSystemFont(ofSize: self.maxFontSize, weight: UIFontWeightMedium)
10+
label.font = UIFont.monospacedDigitSystemFont(ofSize: self.maxFontSize, weight: UIFont.Weight.medium)
1111
label.textColor = UIColor.darkGray
1212
label.text = "Scalable text"
1313
label.textAlignment = .center
@@ -37,7 +37,7 @@ class ScalableLabelHeaderView: GSKStretchyHeaderView {
3737

3838
let fontSize = CGFloatTranslateRange(min(1, stretchFactor), 0, 1, minFontSize, maxFontSize)
3939
if abs(fontSize - self.label.font.pointSize) > 0.05 { // to avoid changing the font too often, this could be more precise though
40-
self.label.font = UIFont.monospacedDigitSystemFont(ofSize: fontSize, weight: UIFontWeightMedium)
40+
self.label.font = UIFont.monospacedDigitSystemFont(ofSize: fontSize, weight: UIFont.Weight.medium)
4141
}
4242
}
4343
}

Example/GSKStretchyHeaderView/ScalableLabelViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ScalableLabelViewController: GSKExampleBaseTableViewController {
2222
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: buttonTitle, style: .plain, target: self, action: #selector(switchExpandMode))
2323
}
2424

25-
func switchExpandMode() {
25+
@objc func switchExpandMode() {
2626
switch self.stretchyHeaderView.expansionMode {
2727
case .topOnly:
2828
self.stretchyHeaderView.expansionMode = .immediate

GSKStretchyHeaderView.xcworkspace/xcshareddata/xcschemes/Example.xcscheme

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0810"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -28,7 +28,7 @@
2828
buildForAnalyzing = "YES">
2929
<BuildableReference
3030
BuildableIdentifier = "primary"
31-
BlueprintIdentifier = "D4B2CB9D0510660F61E76886D25D9CAC"
31+
BlueprintIdentifier = "CD71ED72EACA0156F0B96DDE230F2138"
3232
BuildableName = "GSKStretchyHeaderView.framework"
3333
BlueprintName = "GSKStretchyHeaderView"
3434
ReferencedContainer = "container:Example/Pods/Pods.xcodeproj">
@@ -54,6 +54,7 @@
5454
buildConfiguration = "Debug"
5555
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5656
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57+
language = ""
5758
shouldUseLaunchSchemeArgsEnv = "YES"
5859
codeCoverageEnabled = "YES">
5960
<Testables>
@@ -84,6 +85,7 @@
8485
buildConfiguration = "Debug"
8586
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
8687
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
88+
language = ""
8789
launchStyle = "0"
8890
useCustomWorkingDirectory = "NO"
8991
ignoresPersistentStateOnLaunch = "NO"

GSKStretchyHeaderView/GSKStretchyHeaderView.xcodeproj/project.pbxproj

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
82BEE6171D3AAA4300A3C3AA /* Project object */ = {
220220
isa = PBXProject;
221221
attributes = {
222-
LastUpgradeCheck = 0730;
222+
LastUpgradeCheck = 0900;
223223
ORGANIZATIONNAME = "Jose Alcalá-Correa";
224224
TargetAttributes = {
225225
82BEE61F1D3AAA4300A3C3AA = {
@@ -314,13 +314,21 @@
314314
CLANG_CXX_LIBRARY = "libc++";
315315
CLANG_ENABLE_MODULES = YES;
316316
CLANG_ENABLE_OBJC_ARC = YES;
317+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
317318
CLANG_WARN_BOOL_CONVERSION = YES;
319+
CLANG_WARN_COMMA = YES;
318320
CLANG_WARN_CONSTANT_CONVERSION = YES;
319321
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
320322
CLANG_WARN_EMPTY_BODY = YES;
321323
CLANG_WARN_ENUM_CONVERSION = YES;
324+
CLANG_WARN_INFINITE_RECURSION = YES;
322325
CLANG_WARN_INT_CONVERSION = YES;
326+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
323328
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
329+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
330+
CLANG_WARN_STRICT_PROTOTYPES = YES;
331+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
324332
CLANG_WARN_UNREACHABLE_CODE = YES;
325333
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
326334
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -362,13 +370,21 @@
362370
CLANG_CXX_LIBRARY = "libc++";
363371
CLANG_ENABLE_MODULES = YES;
364372
CLANG_ENABLE_OBJC_ARC = YES;
373+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
365374
CLANG_WARN_BOOL_CONVERSION = YES;
375+
CLANG_WARN_COMMA = YES;
366376
CLANG_WARN_CONSTANT_CONVERSION = YES;
367377
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
368378
CLANG_WARN_EMPTY_BODY = YES;
369379
CLANG_WARN_ENUM_CONVERSION = YES;
380+
CLANG_WARN_INFINITE_RECURSION = YES;
370381
CLANG_WARN_INT_CONVERSION = YES;
382+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
383+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
371384
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
385+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
386+
CLANG_WARN_STRICT_PROTOTYPES = YES;
387+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
372388
CLANG_WARN_UNREACHABLE_CODE = YES;
373389
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
374390
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -398,6 +414,7 @@
398414
82BEE6351D3AAA4300A3C3AA /* Debug */ = {
399415
isa = XCBuildConfiguration;
400416
buildSettings = {
417+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
401418
DEFINES_MODULE = YES;
402419
DYLIB_COMPATIBILITY_VERSION = 1;
403420
DYLIB_CURRENT_VERSION = 1;
@@ -415,6 +432,7 @@
415432
82BEE6361D3AAA4300A3C3AA /* Release */ = {
416433
isa = XCBuildConfiguration;
417434
buildSettings = {
435+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
418436
DEFINES_MODULE = YES;
419437
DYLIB_COMPATIBILITY_VERSION = 1;
420438
DYLIB_CURRENT_VERSION = 1;

GSKStretchyHeaderView/GSKStretchyHeaderView.xcodeproj/xcshareddata/xcschemes/GSKStretchyHeaderView.xcscheme

Lines changed: 3 additions & 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 = "0810"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
2930
shouldUseLaunchSchemeArgsEnv = "YES"
3031
codeCoverageEnabled = "YES">
3132
<Testables>
@@ -56,6 +57,7 @@
5657
buildConfiguration = "Debug"
5758
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5859
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
60+
language = ""
5961
launchStyle = "0"
6062
useCustomWorkingDirectory = "NO"
6163
ignoresPersistentStateOnLaunch = "NO"

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'http://www.rubygems.org'
22

33
gem "cocoapods", '~> 1.1'
44
gem "slather", '~> 2.3.0'
5-
gem "xcpretty"
6-
gem "rake"
5+
gem "xcpretty", '0.2.8'
6+
gem "rake", '10.4.2'

Gemfile.lock

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
GEM
22
remote: http://www.rubygems.org/
33
specs:
4-
CFPropertyList (2.3.4)
5-
activesupport (4.2.7.1)
4+
CFPropertyList (2.3.5)
5+
activesupport (4.2.10)
66
i18n (~> 0.7)
7-
json (~> 1.7, >= 1.7.7)
87
minitest (~> 5.1)
98
thread_safe (~> 0.3, >= 0.3.4)
109
tzinfo (~> 1.1)
11-
claide (1.0.1)
10+
claide (1.0.2)
1211
clamp (0.6.5)
13-
cocoapods (1.1.1)
12+
cocoapods (1.3.1)
1413
activesupport (>= 4.0.2, < 5)
15-
claide (>= 1.0.1, < 2.0)
16-
cocoapods-core (= 1.1.1)
14+
claide (>= 1.0.2, < 2.0)
15+
cocoapods-core (= 1.3.1)
1716
cocoapods-deintegrate (>= 1.0.1, < 2.0)
18-
cocoapods-downloader (>= 1.1.2, < 2.0)
17+
cocoapods-downloader (>= 1.1.3, < 2.0)
1918
cocoapods-plugins (>= 1.0.0, < 2.0)
2019
cocoapods-search (>= 1.0.0, < 2.0)
2120
cocoapods-stats (>= 1.0.0, < 2.0)
22-
cocoapods-trunk (>= 1.1.1, < 2.0)
21+
cocoapods-trunk (>= 1.2.0, < 2.0)
2322
cocoapods-try (>= 1.1.0, < 2.0)
24-
colored (~> 1.2)
23+
colored2 (~> 3.1)
2524
escape (~> 0.0.4)
2625
fourflusher (~> 2.0.1)
2726
gh_inspector (~> 1.0)
28-
molinillo (~> 0.5.1)
27+
molinillo (~> 0.5.7)
2928
nap (~> 1.0)
30-
xcodeproj (>= 1.3.3, < 2.0)
31-
cocoapods-core (1.1.1)
32-
activesupport (>= 4.0.2, < 5)
29+
ruby-macho (~> 1.1)
30+
xcodeproj (>= 1.5.1, < 2.0)
31+
cocoapods-core (1.3.1)
32+
activesupport (>= 4.0.2, < 6)
3333
fuzzy_match (~> 2.0.4)
3434
nap (~> 1.0)
3535
cocoapods-deintegrate (1.0.1)
@@ -38,52 +38,51 @@ GEM
3838
nap
3939
cocoapods-search (1.0.0)
4040
cocoapods-stats (1.0.0)
41-
cocoapods-trunk (1.1.2)
41+
cocoapods-trunk (1.3.0)
4242
nap (>= 0.8, < 2.0)
43-
netrc (= 0.7.8)
43+
netrc (~> 0.11)
4444
cocoapods-try (1.1.0)
45-
colored (1.2)
45+
colored2 (3.1.2)
4646
escape (0.0.4)
4747
fourflusher (2.0.1)
4848
fuzzy_match (2.0.4)
49-
gh_inspector (1.0.2)
50-
i18n (0.7.0)
51-
json (1.8.3)
49+
gh_inspector (1.0.3)
50+
i18n (0.8.6)
5251
mini_portile2 (2.1.0)
53-
minitest (5.10.1)
54-
molinillo (0.5.4)
52+
minitest (5.10.3)
53+
molinillo (0.5.7)
5554
nanaimo (0.2.3)
5655
nap (1.1.0)
57-
netrc (0.7.8)
56+
netrc (0.11.0)
5857
nokogiri (1.6.8.1)
5958
mini_portile2 (~> 2.1.0)
60-
rake (12.0.0)
61-
rouge (1.11.1)
59+
rake (10.4.2)
60+
rouge (2.0.7)
61+
ruby-macho (1.1.0)
6262
slather (2.3.0)
6363
activesupport (>= 4.0.2, < 5)
6464
clamp (~> 0.6)
6565
nokogiri (~> 1.6.3)
6666
xcodeproj (>= 0.20, < 2.0.0)
67-
thread_safe (0.3.5)
68-
tzinfo (1.2.2)
67+
thread_safe (0.3.6)
68+
tzinfo (1.2.3)
6969
thread_safe (~> 0.1)
70-
xcodeproj (1.4.2)
70+
xcodeproj (1.5.2)
7171
CFPropertyList (~> 2.3.3)
72-
activesupport (>= 3)
73-
claide (>= 1.0.1, < 2.0)
74-
colored (~> 1.2)
72+
claide (>= 1.0.2, < 2.0)
73+
colored2 (~> 3.1)
7574
nanaimo (~> 0.2.3)
76-
xcpretty (0.2.4)
77-
rouge (~> 1.8)
75+
xcpretty (0.2.8)
76+
rouge (~> 2.0.7)
7877

7978
PLATFORMS
8079
ruby
8180

8281
DEPENDENCIES
8382
cocoapods (~> 1.1)
84-
rake
83+
rake (= 10.4.2)
8584
slather (~> 2.3.0)
86-
xcpretty
85+
xcpretty (= 0.2.8)
8786

8887
BUNDLED WITH
89-
1.13.6
88+
1.15.4

0 commit comments

Comments
 (0)