Skip to content

Commit b40aa1b

Browse files
authored
Swift 4.1 (#3370)
* Fixed misuse of "!" operator * Updated projects for Xcode 9.3 and Swift 4.1 added a workspace to include all demos with the project to make it easier to test changes * Fixes for Xcode 9.3
1 parent 269fef7 commit b40aa1b

File tree

174 files changed

+233
-173
lines changed

Some content is hidden

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

174 files changed

+233
-173
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
language: objective-c
2-
osx_image: xcode9
2+
osx_image: xcode9.3beta
33
matrix:
44
include:
5-
- osx_image: xcode9
5+
- osx_image: xcode9.3beta
66
env: PLATFORM="iOS"
7-
- osx_image: xcode9
7+
- osx_image: xcode9.3beta
88
env: PLATFORM="tvOS"
9-
- osx_image: xcode9
9+
- osx_image: xcode9.3beta
1010
env: PLATFORM="macOS"
1111
env:
1212
global:

Charts.xcodeproj/project.pbxproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@
731731
isa = PBXProject;
732732
attributes = {
733733
LastSwiftUpdateCheck = 0830;
734-
LastUpgradeCheck = 0700;
734+
LastUpgradeCheck = 0930;
735735
TargetAttributes = {
736736
A58A4ED274A941CA248EA921 = {
737737
LastSwiftMigration = 0900;
@@ -1055,13 +1055,15 @@
10551055
CLANG_WARN_BOOL_CONVERSION = YES;
10561056
CLANG_WARN_COMMA = YES;
10571057
CLANG_WARN_CONSTANT_CONVERSION = YES;
1058+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
10581059
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
10591060
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
10601061
CLANG_WARN_EMPTY_BODY = YES;
10611062
CLANG_WARN_ENUM_CONVERSION = YES;
10621063
CLANG_WARN_INFINITE_RECURSION = YES;
10631064
CLANG_WARN_INT_CONVERSION = YES;
10641065
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1066+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
10651067
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
10661068
CLANG_WARN_OBJC_ROOT_CLASS = YES;
10671069
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -1084,6 +1086,7 @@
10841086
GCC_WARN_UNUSED_VARIABLE = YES;
10851087
SDKROOT = macosx;
10861088
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1089+
SWIFT_VERSION = 4.0;
10871090
TARGETED_DEVICE_FAMILY = "1,2,3,4";
10881091
VALIDATE_PRODUCT = YES;
10891092
};
@@ -1103,13 +1106,15 @@
11031106
CLANG_WARN_BOOL_CONVERSION = YES;
11041107
CLANG_WARN_COMMA = YES;
11051108
CLANG_WARN_CONSTANT_CONVERSION = YES;
1109+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
11061110
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
11071111
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
11081112
CLANG_WARN_EMPTY_BODY = YES;
11091113
CLANG_WARN_ENUM_CONVERSION = YES;
11101114
CLANG_WARN_INFINITE_RECURSION = YES;
11111115
CLANG_WARN_INT_CONVERSION = YES;
11121116
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1117+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
11131118
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
11141119
CLANG_WARN_OBJC_ROOT_CLASS = YES;
11151120
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -1140,6 +1145,7 @@
11401145
ONLY_ACTIVE_ARCH = YES;
11411146
SDKROOT = macosx;
11421147
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1148+
SWIFT_VERSION = 4.0;
11431149
TARGETED_DEVICE_FAMILY = "1,2,3,4";
11441150
};
11451151
name = Debug;

Charts.xcodeproj/xcshareddata/xcschemes/Charts.xcscheme

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,82 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
88
<BuildActionEntries>
99
<BuildActionEntry
10-
buildForAnalyzing = "YES"
1110
buildForTesting = "YES"
1211
buildForRunning = "YES"
1312
buildForProfiling = "YES"
14-
buildForArchiving = "YES">
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
1515
<BuildableReference
16-
BuildableIdentifier = 'primary'
17-
BlueprintIdentifier = 'A58A4ED274A941CA248EA921'
18-
BlueprintName = 'Charts'
19-
ReferencedContainer = 'container:Charts.xcodeproj'
20-
BuildableName = 'Charts.framework'>
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "A58A4ED274A941CA248EA921"
18+
BuildableName = "Charts.framework"
19+
BlueprintName = "Charts"
20+
ReferencedContainer = "container:Charts.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
2323
</BuildActionEntries>
2424
</BuildAction>
2525
<TestAction
26+
buildConfiguration = "Debug"
2627
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2728
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28-
shouldUseLaunchSchemeArgsEnv = "YES"
29-
buildConfiguration = "Debug"
30-
codeCoverageEnabled = "NO">
31-
<AdditionalOptions>
32-
</AdditionalOptions>
29+
shouldUseLaunchSchemeArgsEnv = "YES">
3330
<Testables>
3431
<TestableReference
3532
skipped = "NO">
3633
<BuildableReference
37-
BuildableIdentifier = 'primary'
38-
BlueprintIdentifier = 'F2749BD5443C1CB5FE2080C2'
39-
BlueprintName = 'ChartsTests'
40-
ReferencedContainer = 'container:Charts.xcodeproj'
41-
BuildableName = 'ChartsTests.xctest'>
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "F2749BD5443C1CB5FE2080C2"
36+
BuildableName = "ChartsTests.xctest"
37+
BlueprintName = "ChartsTests"
38+
ReferencedContainer = "container:Charts.xcodeproj">
4239
</BuildableReference>
4340
</TestableReference>
4441
</Testables>
42+
<AdditionalOptions>
43+
</AdditionalOptions>
4544
</TestAction>
4645
<LaunchAction
46+
buildConfiguration = "Debug"
4747
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4848
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4949
launchStyle = "0"
5050
useCustomWorkingDirectory = "NO"
5151
ignoresPersistentStateOnLaunch = "NO"
5252
debugDocumentVersioning = "YES"
5353
debugServiceExtension = "internal"
54-
buildConfiguration = "Debug"
5554
allowLocationSimulation = "YES">
56-
<AdditionalOptions>
57-
</AdditionalOptions>
55+
<MacroExpansion>
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "A58A4ED274A941CA248EA921"
59+
BuildableName = "Charts.framework"
60+
BlueprintName = "Charts"
61+
ReferencedContainer = "container:Charts.xcodeproj">
62+
</BuildableReference>
63+
</MacroExpansion>
5864
<EnvironmentVariables>
5965
<EnvironmentVariable
60-
key = 'FB_REFERENCE_IMAGE_DIR'
61-
value = '$(SOURCE_ROOT)/Tests/ReferenceImages'
62-
isEnabled = 'YES'>
66+
key = "FB_REFERENCE_IMAGE_DIR"
67+
value = "$(SOURCE_ROOT)/Tests/ReferenceImages"
68+
isEnabled = "YES">
6369
</EnvironmentVariable>
6470
</EnvironmentVariables>
71+
<AdditionalOptions>
72+
</AdditionalOptions>
6573
</LaunchAction>
6674
<ProfileAction
75+
buildConfiguration = "Release"
76+
shouldUseLaunchSchemeArgsEnv = "YES"
6777
savedToolIdentifier = ""
6878
useCustomWorkingDirectory = "NO"
69-
debugDocumentVersioning = "YES"
70-
buildConfiguration = "Release"
71-
shouldUseLaunchSchemeArgsEnv = "YES">
79+
debugDocumentVersioning = "YES">
7280
</ProfileAction>
7381
<AnalyzeAction
7482
buildConfiguration = "Debug">

Charts.xcodeproj/xcshareddata/xcschemes/ChartsTests.xcscheme

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,83 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
88
<BuildActionEntries>
99
<BuildActionEntry
10-
buildForAnalyzing = "YES"
1110
buildForTesting = "YES"
1211
buildForRunning = "YES"
1312
buildForProfiling = "YES"
14-
buildForArchiving = "YES">
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
1515
<BuildableReference
16-
BuildableIdentifier = 'primary'
17-
BlueprintIdentifier = 'F2749BD5443C1CB5FE2080C2'
18-
BlueprintName = 'ChartsTests'
19-
ReferencedContainer = 'container:Charts.xcodeproj'
20-
BuildableName = 'ChartsTests.xctest'>
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "F2749BD5443C1CB5FE2080C2"
18+
BuildableName = "ChartsTests.xctest"
19+
BlueprintName = "ChartsTests"
20+
ReferencedContainer = "container:Charts.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
2323
</BuildActionEntries>
2424
</BuildAction>
2525
<TestAction
26+
buildConfiguration = "Debug"
2627
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2728
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28-
shouldUseLaunchSchemeArgsEnv = "YES"
29-
buildConfiguration = "Debug"
30-
codeCoverageEnabled = "YES">
31-
<AdditionalOptions>
32-
</AdditionalOptions>
29+
codeCoverageEnabled = "YES"
30+
shouldUseLaunchSchemeArgsEnv = "YES">
3331
<Testables>
3432
<TestableReference
3533
skipped = "NO">
3634
<BuildableReference
37-
BuildableIdentifier = 'primary'
38-
BlueprintIdentifier = 'F2749BD5443C1CB5FE2080C2'
39-
BlueprintName = 'ChartsTests'
40-
ReferencedContainer = 'container:Charts.xcodeproj'
41-
BuildableName = 'ChartsTests.xctest'>
35+
BuildableIdentifier = "primary"
36+
BlueprintIdentifier = "F2749BD5443C1CB5FE2080C2"
37+
BuildableName = "ChartsTests.xctest"
38+
BlueprintName = "ChartsTests"
39+
ReferencedContainer = "container:Charts.xcodeproj">
4240
</BuildableReference>
4341
</TestableReference>
4442
</Testables>
43+
<AdditionalOptions>
44+
</AdditionalOptions>
4545
</TestAction>
4646
<LaunchAction
47+
buildConfiguration = "Debug"
4748
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4849
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4950
launchStyle = "0"
5051
useCustomWorkingDirectory = "NO"
5152
ignoresPersistentStateOnLaunch = "NO"
5253
debugDocumentVersioning = "YES"
5354
debugServiceExtension = "internal"
54-
buildConfiguration = "Debug"
5555
allowLocationSimulation = "YES">
56-
<AdditionalOptions>
57-
</AdditionalOptions>
56+
<MacroExpansion>
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "F2749BD5443C1CB5FE2080C2"
60+
BuildableName = "ChartsTests.xctest"
61+
BlueprintName = "ChartsTests"
62+
ReferencedContainer = "container:Charts.xcodeproj">
63+
</BuildableReference>
64+
</MacroExpansion>
5865
<EnvironmentVariables>
5966
<EnvironmentVariable
60-
key = 'FB_REFERENCE_IMAGE_DIR'
61-
value = '$(SOURCE_ROOT)/Tests/ReferenceImages'
62-
isEnabled = 'YES'>
67+
key = "FB_REFERENCE_IMAGE_DIR"
68+
value = "$(SOURCE_ROOT)/Tests/ReferenceImages"
69+
isEnabled = "YES">
6370
</EnvironmentVariable>
6471
</EnvironmentVariables>
72+
<AdditionalOptions>
73+
</AdditionalOptions>
6574
</LaunchAction>
6675
<ProfileAction
76+
buildConfiguration = "Release"
77+
shouldUseLaunchSchemeArgsEnv = "YES"
6778
savedToolIdentifier = ""
6879
useCustomWorkingDirectory = "NO"
69-
debugDocumentVersioning = "YES"
70-
buildConfiguration = "Release"
71-
shouldUseLaunchSchemeArgsEnv = "YES">
80+
debugDocumentVersioning = "YES">
7281
</ProfileAction>
7382
<AnalyzeAction
7483
buildConfiguration = "Debug">

Charts.xcworkspace/contents.xcworkspacedata

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)